From 1b7a49859b44ae9e03df0afb1205016ba9d9c259 Mon Sep 17 00:00:00 2001 From: william dutton Date: Tue, 8 Aug 2023 08:56:13 +1000 Subject: [PATCH 1/2] QOLDEV-539 Form.io 8.1.0 upgrade * premium@1.19.1 * formiojs@4.15.1 --- .github/workflows/storybook-deploy.js.yml | 2 +- .github/workspace/formiojs/npm | 6 + .github/workspace/formiojs/npx | 6 + .github/workspace/formiojs/package-lock.json | 1074 +-- .github/workspace/formiojs/package.json | 2 +- .github/workspace/formiojs/pom.xml | 6 +- .github/workspace/prem/npm | 6 + .github/workspace/prem/npx | 6 + .github/workspace/prem/package-lock.json | 1045 +-- .github/workspace/prem/package.json | 2 +- .github/workspace/prem/pom.xml | 6 +- lib/formio.changlog.md | 631 +- lib/formio.full.css | 53 +- lib/formio.full.js | 2601 ++++-- lib/formio.full.min.css | 4 +- lib/formio.full.min.js | 2 +- lib/formio.full.min.js.LICENSE.txt | 19 +- lib/premium-server.min.js | 2 + lib/premium-server.min.js.LICENSE.txt | 15 + lib/premium.changlog.md | 3 + lib/premium.css | 16 +- lib/premium.js | 841 +- lib/premium.min.js | 2 +- lib/premium.min.js.LICENSE.txt | 2 +- lib/providers-server.min.js | 2 + lib/providers-server.min.js.LICENSE.txt | 15 + lib/providers.js | 134 +- lib/providers.min.js | 2 +- lib/providers.min.js.LICENSE.txt | 11 +- lib/rulesEngine-server.min.js | 2 + lib/rulesEngine-server.min.js.LICENSE.txt | 66 + lib/rulesEngine.js | 8665 +++++++++++------- lib/rulesEngine.min.js | 2 +- lib/rulesEngine.min.js.LICENSE.txt | 37 +- lib/versions.txt | 8 +- package-lock.json | 190 +- package.json | 4 +- 37 files changed, 8979 insertions(+), 6511 deletions(-) create mode 100755 .github/workspace/formiojs/npm create mode 100755 .github/workspace/formiojs/npx create mode 100755 .github/workspace/prem/npm create mode 100755 .github/workspace/prem/npx create mode 100644 lib/premium-server.min.js create mode 100644 lib/premium-server.min.js.LICENSE.txt create mode 100644 lib/providers-server.min.js create mode 100644 lib/providers-server.min.js.LICENSE.txt create mode 100644 lib/rulesEngine-server.min.js create mode 100644 lib/rulesEngine-server.min.js.LICENSE.txt diff --git a/.github/workflows/storybook-deploy.js.yml b/.github/workflows/storybook-deploy.js.yml index 80c2b133..045d0ce5 100644 --- a/.github/workflows/storybook-deploy.js.yml +++ b/.github/workflows/storybook-deploy.js.yml @@ -22,7 +22,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node: [ '16' ] + node: [ '18' ] name: Deploy with Node ${{ matrix.node }} # if: ${{ github.event.workflow_run.conclusion == 'success' }} steps: diff --git a/.github/workspace/formiojs/npm b/.github/workspace/formiojs/npm new file mode 100755 index 00000000..6e0266f7 --- /dev/null +++ b/.github/workspace/formiojs/npm @@ -0,0 +1,6 @@ +#!/bin/sh +export PATH="$PWD/node/":$PATH +node -v +npm -v +$PWD/node/npm "$@" +##node "node/node_modules/npm/bin/npm-cli.js" "$@" diff --git a/.github/workspace/formiojs/npx b/.github/workspace/formiojs/npx new file mode 100755 index 00000000..0b221534 --- /dev/null +++ b/.github/workspace/formiojs/npx @@ -0,0 +1,6 @@ +#!/bin/sh +export PATH="$PWD/node/":$PATH +node -v +npx -v +$PWD/node/npx "$@" + diff --git a/.github/workspace/formiojs/package-lock.json b/.github/workspace/formiojs/package-lock.json index 761355a8..7b3bc112 100644 --- a/.github/workspace/formiojs/package-lock.json +++ b/.github/workspace/formiojs/package-lock.json @@ -1,7 +1,7 @@ { "name": "formiojs-downloader", "version": "0.0.1", - "lockfileVersion": 2, + "lockfileVersion": 3, "requires": true, "packages": { "": { @@ -9,47 +9,47 @@ "version": "0.0.1", "license": "MIT", "dependencies": { - "formiojs": "4.14.10", + "formiojs": "4.15.1", "moment": "^2.29.4" }, "devDependencies": {} }, "node_modules/@babel/runtime": { - "version": "7.17.9", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/@babel/runtime/-/runtime-7.17.9.tgz", - "integrity": "sha512-lSiBBvodq29uShpWGNbgFdKYNiFDo5/HIYsaCEY9ff4sb10x9jizo2+pRrSyF4jKZCXqgzuqBOQKbUm90gQwJg==", + "version": "7.22.10", + "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/@babel/runtime/-/runtime-7.22.10.tgz", + "integrity": "sha512-21t/fkKLMZI4pqP2wlmsQAWnYW1PDyKyyUV4vCi+B25ydmdaYTKXPwCj0BzSUnZf4seIiYvSA3jcZ3gdsMFkLQ==", "license": "MIT", "dependencies": { - "regenerator-runtime": "^0.13.4" + "regenerator-runtime": "^0.14.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@formio/bootstrap3": { - "version": "2.12.2", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/@formio/bootstrap3/-/bootstrap3-2.12.2.tgz", - "integrity": "sha512-Y1WD/U22HHKRl1MzUt65bXeFHYO9Wlt+wefRqXFrOhIgbmkfTjCx6e0n2b8t/IYz9FUMg+/GTKdqaBrTZgjrTA==", + "version": "2.12.3", + "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/@formio/bootstrap3/-/bootstrap3-2.12.3.tgz", + "integrity": "sha512-/jod5STUSz9wLnniCCZwKvqigLrzHt4jDZ07VUxmnqg1IcPcJKNX1UrY7tBAYWa2lWJ/p1j4bSerC6UWjbdYDQ==", "license": "MIT", "dependencies": { "resize-observer-polyfill": "^1.5.1" } }, "node_modules/@formio/choices.js": { - "version": "9.0.1", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/@formio/choices.js/-/choices.js-9.0.1.tgz", - "integrity": "sha512-+JQRWH0yhaeemVJGE1L4oPe9KPFhipzDlms3Pd31gePXpy8q7Mf3Is54/f0fc88+mWeMjK4GyIhcKIKmuGx5Xw==", + "version": "10.2.0", + "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/@formio/choices.js/-/choices.js-10.2.0.tgz", + "integrity": "sha512-dEF+es4yj3pstKHif7Ck14vQCZdN+b1Afojl0ufTmKw5WIjqas1KXEIBBgtsg4eY6bxqFkgEjtxsK4ecvEeZsA==", "license": "MIT", "dependencies": { - "deepmerge": "^4.2.0", - "fuse.js": "^3.4.5", - "redux": "^4.0.4" + "deepmerge": "^4.2.2", + "fuse.js": "^6.6.2", + "redux": "^4.2.0" } }, "node_modules/@formio/semantic": { - "version": "2.6.0", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/@formio/semantic/-/semantic-2.6.0.tgz", - "integrity": "sha512-RwMEVXkyz+B6RivflrrKIqvvnGR/eZDLQs74u67StcrzO6n3/5D2J8XqTQRSUzQzr5QV6Wq0eZ51z/+mGm6THw==", + "version": "2.6.1", + "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/@formio/semantic/-/semantic-2.6.1.tgz", + "integrity": "sha512-obp1BT5UnzD+uYBbqmnsTfO2hGxI2A2iR/cj3P5JUFLYSBpnr3TS2ShQ7Ee5GCRRtJPu0JnljuJj+YSKLCMuhg==", "license": "MIT" }, "node_modules/@formio/text-mask-addons": { @@ -80,6 +80,18 @@ "integrity": "sha512-XExJS3cLqgrmNBIP3bBw6+1oQ1ksGjFh0+oClDKFYpCCqx/hlqwWO5KO/S63fzUo67SxI9dMrF0y5T/Ey7h8Zw==", "license": "ISC" }, + "node_modules/animation-frame-polyfill": { + "version": "1.0.2", + "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/animation-frame-polyfill/-/animation-frame-polyfill-1.0.2.tgz", + "integrity": "sha512-PvO5poSMoHhaoNNgHPo+oqs/0L9UqjsUbqv0iOXVqLh6HX85fsOVQTUrzSBvjdZz7hydARlgLELyzJJKIrPJAQ==", + "license": "MIT" + }, + "node_modules/array-from": { + "version": "2.1.1", + "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/array-from/-/array-from-2.1.1.tgz", + "integrity": "sha512-GQTc6Uupx1FCavi5mPzBvVT7nEOeWMmUA9P95wpfpW1XwMSKs+KaymD5C2Up7KAUKg/mYwbsUYzdZWcoajlNZg==", + "license": "MIT" + }, "node_modules/atoa": { "version": "1.0.0", "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/atoa/-/atoa-1.0.0.tgz", @@ -87,9 +99,9 @@ "license": "MIT" }, "node_modules/autocompleter": { - "version": "6.1.2", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/autocompleter/-/autocompleter-6.1.2.tgz", - "integrity": "sha512-DfEcgxBJOTJJwxkIRZLv/ggD3g5w/fqzZkdJsOcgk7hjxw36lH/nAfIEXzV7qDE55swnYEe43E/WhZPXmSFfsA==", + "version": "7.1.0", + "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/autocompleter/-/autocompleter-7.1.0.tgz", + "integrity": "sha512-uCToOnq7eAD/GJAteDbYuQ7ksDtrYWOy5CIAq43wh0dT+5frMpPlyD9tp+y5fz8KIcsP+zR2MjzoTAdW5aJESw==", "license": "MIT" }, "node_modules/available-typed-arrays": { @@ -142,9 +154,9 @@ } }, "node_modules/compare-versions": { - "version": "4.1.3", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/compare-versions/-/compare-versions-4.1.3.tgz", - "integrity": "sha512-WQfnbDcrYnGr55UwbxKiQKASnTtNnaAWVi8jZyy8NTpVAXWACSne8lMD1iaIo9AiU6mnuLvSVshCzewVuWxHUg==", + "version": "5.0.3", + "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/compare-versions/-/compare-versions-5.0.3.tgz", + "integrity": "sha512-4UZlZP8Z99MGEY+Ovg/uJxJuvoXuN4M6B3hKaiackiHrgzQFEe3diJi1mf1PNHbFujM7FvLrK2bpgIaImbtZ1A==", "license": "MIT" }, "node_modules/contra": { @@ -158,9 +170,9 @@ } }, "node_modules/core-js": { - "version": "3.22.1", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/core-js/-/core-js-3.22.1.tgz", - "integrity": "sha512-l6CwCLq7XgITOQGhv1dIUmwCFoqFjyQ6zQHUCQlS0xKmb9d6OHIg8jDiEoswhaettT21BSF5qKr6kbvE+aKwxw==", + "version": "3.32.0", + "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/core-js/-/core-js-3.32.0.tgz", + "integrity": "sha512-rd4rYZNlF3WuoYuRIDEmbR/ga9CeuWX9U05umAvgrrZoHY4Z++cp/xwPQMvUpBB4Ag6J8KfD80G0zwCyaSxDww==", "hasInstallScript": true, "license": "MIT", "funding": { @@ -168,6 +180,15 @@ "url": "https://opencollective.com/core-js" } }, + "node_modules/create-point-cb": { + "version": "1.2.0", + "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/create-point-cb/-/create-point-cb-1.2.0.tgz", + "integrity": "sha512-r4l6IO/YGI7hIZRMLggOzwM6XO80+Fdcv4hx1fXCEdU+hKd7zZki6i+cbYfK9OliMwMYx1wPfQLU/snvS+Dygw==", + "license": "MIT", + "dependencies": { + "type-func": "^1.0.1" + } + }, "node_modules/crossvent": { "version": "1.5.5", "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/crossvent/-/crossvent-1.5.5.tgz", @@ -216,9 +237,9 @@ } }, "node_modules/deepmerge": { - "version": "4.2.2", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/deepmerge/-/deepmerge-4.2.2.tgz", - "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", + "version": "4.3.1", + "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", "license": "MIT", "engines": { "node": ">=0.10.0" @@ -246,10 +267,50 @@ "integrity": "sha512-ZbVDJI9uvxPAKze6z146rmfUZjBqNEwcnFTVamQzXH+svluiV7swmVIGr7miwADgfgt1G2JQIytypM9fbyhX4w==", "license": "BSD" }, + "node_modules/dom-autoscroller": { + "version": "2.3.4", + "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/dom-autoscroller/-/dom-autoscroller-2.3.4.tgz", + "integrity": "sha512-HcAdt/2Dq9x4CG6LWXc2x9Iq0MJPAu8fuzHncclq7byufqYEYVtx9sZ/dyzR+gdj4qwEC9p27Lw1G2HRRYX6jQ==", + "license": "MIT", + "dependencies": { + "animation-frame-polyfill": "^1.0.0", + "create-point-cb": "^1.0.0", + "dom-mousemove-dispatcher": "^1.0.1", + "dom-plane": "^1.0.1", + "dom-set": "^1.0.1", + "type-func": "^1.0.1" + } + }, + "node_modules/dom-mousemove-dispatcher": { + "version": "1.0.1", + "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/dom-mousemove-dispatcher/-/dom-mousemove-dispatcher-1.0.1.tgz", + "integrity": "sha512-NMdqqMbgW8kqOdmod2hkS+9hD/v7h4XoSvwU9qqe+wAA/O+ba0jhpbfW0Kb/fCyR0RX9jf4dwfQrl04LQX4FzQ==", + "license": "MIT" + }, + "node_modules/dom-plane": { + "version": "1.0.2", + "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/dom-plane/-/dom-plane-1.0.2.tgz", + "integrity": "sha512-/tR67G6ZGSciXoZLsD706yLxEXvX3mG/OWE8YNYj3A1yU/RAimtPXzklVTu5Y5xoeMoloA/Y+MaNjQm9apgAww==", + "license": "MIT", + "dependencies": { + "create-point-cb": "^1.0.0" + } + }, + "node_modules/dom-set": { + "version": "1.1.1", + "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/dom-set/-/dom-set-1.1.1.tgz", + "integrity": "sha512-sUi2aSvRsK3Ixx++gwX9cnaWk9ZxGVFry8+HnTRVmDimybU5PaiI4wX0o00mVtjFKlQNZLmtGoPTLorYbN0+Rw==", + "license": "WTFPL", + "dependencies": { + "array-from": "^2.1.1", + "is-array": "^1.0.1", + "iselement": "^1.1.4" + } + }, "node_modules/dompurify": { - "version": "2.3.6", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/dompurify/-/dompurify-2.3.6.tgz", - "integrity": "sha512-OFP2u/3T1R5CEgWCEONuJ1a5+MFKnOYpkywpUSxv/dj1LeBT1erK+JwM7zK0ROy2BRhqVCf0LRw/kHqKuMkVGg==", + "version": "2.4.7", + "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/dompurify/-/dompurify-2.4.7.tgz", + "integrity": "sha512-kxxKlPEDa6Nc5WJi+qRgPbOAbgTpSULL+vI3NUXsZMlkJxTqYI9wg5ZTay2sFrdZRWHPWNi+EdAhcJf81WtoMQ==", "license": "(MPL-2.0 OR Apache-2.0)" }, "node_modules/downloadjs": { @@ -384,46 +445,46 @@ "license": "MIT" }, "node_modules/formiojs": { - "version": "4.14.10", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/formiojs/-/formiojs-4.14.10.tgz", - "integrity": "sha512-z1g75ohrxQIWO5Z1N8By4T7Urf2AbRPSZcDVjxxq7aLSnc9BcHmA4W2LZ+PXCQ/YcdLXz1hQPrkOQcG22h173w==", + "version": "4.15.1", + "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/formiojs/-/formiojs-4.15.1.tgz", + "integrity": "sha512-h1Oxcib1dbk63PzBxv7Zzix//7hBdHskZVfX1y0evqRhjA75ZIAQv4UOoebe0OZ0DngGt8qzTp7jsXX5TfDXWw==", "license": "MIT", "dependencies": { - "@formio/bootstrap3": "^2.12.2", - "@formio/choices.js": "^9.0.1", - "@formio/semantic": "^2.6.0", + "@formio/bootstrap3": "2.12.3", + "@formio/choices.js": "10.2.0", + "@formio/semantic": "2.6.1", "@formio/text-mask-addons": "^3.8.0-formio.2", "@formio/vanilla-text-mask": "^5.1.1-formio.1", - "autocompleter": "^6.1.2", + "autocompleter": "^7.0.1", "browser-cookies": "^1.2.0", "browser-md5-file": "^1.1.1", - "compare-versions": "^4.1.3", - "core-js": "^3.21.1", + "compare-versions": "^5.0.1", + "core-js": "^3.26.1", "custom-event-polyfill": "^1.0.7", "dialog-polyfill": "^0.5.6", - "dompurify": "^2.3.4", + "dom-autoscroller": "^2.3.4", + "dompurify": "^2.4.1", "downloadjs": "^1.4.7", "dragula": "^3.7.3", "eventemitter3": "^4.0.7", "fast-deep-equal": "^3.1.3", - "fast-json-patch": "^3.1.0", + "fast-json-patch": "^3.1.1", "fetch-ponyfill": "^7.1.0", - "i18next": "^21.6.0", - "idb": "^6.1.5", + "i18next": "22.4.12", + "idb": "^7.1.1", "ismobilejs": "^1.1.1", - "json-logic-js": "^2.0.0", + "json-logic-js": "^2.0.2", "jstimezonedetect": "^1.0.7", "jwt-decode": "^3.1.2", "lodash": "^4.17.21", - "moment": "^2.29.2", - "moment-timezone": "^0.5.34", + "moment": "^2.29.4", + "moment-timezone": "^0.5.40", "native-promise-only": "^0.8.1", "quill": "^2.0.0-dev.3", - "resize-observer-polyfill": "^1.5.1", - "signature_pad": "^4.0.4", + "signature_pad": "^4.1.4", "string-hash": "^1.1.3", "tippy.js": "^6.3.7", - "uuid": "^8.3.2", + "uuid": "^9.0.0", "vanilla-picker": "^2.12.1" } }, @@ -443,12 +504,12 @@ } }, "node_modules/fuse.js": { - "version": "3.6.1", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/fuse.js/-/fuse.js-3.6.1.tgz", - "integrity": "sha512-hT9yh/tiinkmirKrlv4KWOjztdoZo1mx9Qh4KvWqC7isoXwdUY3PNWUxceF4/qO9R6riA2C29jdTOeQOIROjgw==", + "version": "6.6.2", + "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/fuse.js/-/fuse.js-6.6.2.tgz", + "integrity": "sha512-cJaJkxCCxC8qIIcPBF9yGxY0W/tVZS3uEISDxhYIdtk8OL93pe+6Zj7LjCqVV4dzbqcriOZ+kQ/NE4RXZHsIGA==", "license": "Apache-2.0", "engines": { - "node": ">=6" + "node": ">=10" } }, "node_modules/get-intrinsic": { @@ -542,9 +603,9 @@ } }, "node_modules/i18next": { - "version": "21.6.16", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/i18next/-/i18next-21.6.16.tgz", - "integrity": "sha512-xJlzrVxG9CyAGsbMP1aKuiNr1Ed2m36KiTB7hjGMG2Zo4idfw3p9THUEu+GjBwIgEZ7F11ZbCzJcfv4uyfKNuw==", + "version": "22.4.12", + "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/i18next/-/i18next-22.4.12.tgz", + "integrity": "sha512-2lE+vRXxQ3lGLub1CVbwgO0IfkLHmUSDVOAVdPh22CsxttMXi+35n2qgxh2wZIkKl6t/NMzPfgFPRDiFQOmiCg==", "funding": [ { "type": "individual", @@ -561,13 +622,13 @@ ], "license": "MIT", "dependencies": { - "@babel/runtime": "^7.17.2" + "@babel/runtime": "^7.20.6" } }, "node_modules/idb": { - "version": "6.1.5", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/idb/-/idb-6.1.5.tgz", - "integrity": "sha512-IJtugpKkiVXQn5Y+LteyBCNk1N8xpGV3wWZk9EVtZWH8DYkjBn0bX1XnGP9RkyZF0sAcywa6unHqSWKe7q4LGw==", + "version": "7.1.1", + "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/idb/-/idb-7.1.1.tgz", + "integrity": "sha512-gchesWBzyvGHRO9W8tzUWFDycow5gwjvFKfyV9FF32Y7F50yZMp7mP+T2mJIWFx49zicqyC4uefHM17o6xKIVQ==", "license": "ISC" }, "node_modules/internal-slot": { @@ -600,6 +661,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-array": { + "version": "1.0.1", + "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/is-array/-/is-array-1.0.1.tgz", + "integrity": "sha512-gxiZ+y/u67AzpeFmAmo4CbtME/bs7J2C++su5zQzvQyaxUqVzkh69DI+jN+KZuSO6JaH6TIIU6M6LhqxMjxEpw==", + "license": "MIT" + }, "node_modules/is-bigint": { "version": "1.0.4", "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/is-bigint/-/is-bigint-1.0.4.tgz", @@ -817,6 +884,12 @@ "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", "license": "MIT" }, + "node_modules/iselement": { + "version": "1.1.4", + "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/iselement/-/iselement-1.1.4.tgz", + "integrity": "sha512-4Q519eWmbHO1pbimiz7H1iJRUHVmAmfh0viSsUD+oAwVO4ntZt7gpf8i8AShVBTyOvRTZNYNBpUxOIvwZR+ffw==", + "license": "MIT" + }, "node_modules/ismobilejs": { "version": "1.1.1", "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/ismobilejs/-/ismobilejs-1.1.1.tgz", @@ -856,12 +929,12 @@ } }, "node_modules/moment-timezone": { - "version": "0.5.34", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/moment-timezone/-/moment-timezone-0.5.34.tgz", - "integrity": "sha512-3zAEHh2hKUs3EXLESx/wsgw6IQdusOT8Bxm3D9UrHPQR7zlMmzwybC8zHEM1tQ4LJwP7fcxrWr8tuBg05fFCbg==", + "version": "0.5.43", + "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/moment-timezone/-/moment-timezone-0.5.43.tgz", + "integrity": "sha512-72j3aNyuIsDxdF1i7CEgV2FfxM1r6aaqJyLB2vwb33mXYyoyLly+F1zbWqhA3/bVIoJ4szlUoMbUnVdid32NUQ==", "license": "MIT", "dependencies": { - "moment": ">= 2.9.0" + "moment": "^2.29.4" }, "engines": { "node": "*" @@ -994,18 +1067,18 @@ } }, "node_modules/redux": { - "version": "4.2.0", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/redux/-/redux-4.2.0.tgz", - "integrity": "sha512-oSBmcKKIuIR4ME29/AeNUnl5L+hvBq7OaJWzaptTQJAntaPvxIJqfnjbaEiCzzaIz+XmVILfqAM3Ob0aXLPfjA==", + "version": "4.2.1", + "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/redux/-/redux-4.2.1.tgz", + "integrity": "sha512-LAUYz4lc+Do8/g7aeRa8JkyDErK6ekstQaqWQrNRW//MY1TvCEpMtpTWvlQ+FPbWCx+Xixu/6SHt5N0HR+SB4w==", "license": "MIT", "dependencies": { "@babel/runtime": "^7.9.2" } }, "node_modules/regenerator-runtime": { - "version": "0.13.9", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", - "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", + "version": "0.14.0", + "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz", + "integrity": "sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==", "license": "MIT" }, "node_modules/regexp.prototype.flags": { @@ -1046,9 +1119,9 @@ } }, "node_modules/signature_pad": { - "version": "4.0.5", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/signature_pad/-/signature_pad-4.0.5.tgz", - "integrity": "sha512-DeqSbAyO59ET/Cu92fLEgFmvGiaeaWkRgOetm0GnUV7z3LtEKOz2CazkIGmIdr9ZfSyZz6VgTpTxbP0fgfYuyg==", + "version": "4.1.6", + "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/signature_pad/-/signature_pad-4.1.6.tgz", + "integrity": "sha512-eoZB8qFPfCs7o00weajp5roNnE2gY2kTNjZsh805L8V+lYPagxoZi9qrBFS3A6sgbVq++ukdzgruK7tuv3JFXQ==", "license": "MIT" }, "node_modules/spark-md5": { @@ -1110,6 +1183,12 @@ "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=", "license": "MIT" }, + "node_modules/type-func": { + "version": "1.0.3", + "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/type-func/-/type-func-1.0.3.tgz", + "integrity": "sha512-YA90CUk+i00tWESPNRMahywXhAz+12NLJLKlOWrgHIbqaFXjdZrWstRghaibOW/IxhPjui4SmXxO/03XSGRIjA==", + "license": "MIT" + }, "node_modules/unbox-primitive": { "version": "1.0.1", "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/unbox-primitive/-/unbox-primitive-1.0.1.tgz", @@ -1126,9 +1205,9 @@ } }, "node_modules/uuid": { - "version": "8.3.2", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "version": "9.0.0", + "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/uuid/-/uuid-9.0.0.tgz", + "integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==", "license": "MIT", "bin": { "uuid": "dist/bin/uuid" @@ -1210,842 +1289,5 @@ "url": "https://github.com/sponsors/ljharb" } } - }, - "dependencies": { - "@babel/runtime": { - "version": "7.17.9", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/@babel/runtime/-/runtime-7.17.9.tgz", - "integrity": "sha512-lSiBBvodq29uShpWGNbgFdKYNiFDo5/HIYsaCEY9ff4sb10x9jizo2+pRrSyF4jKZCXqgzuqBOQKbUm90gQwJg==", - "requires": { - "regenerator-runtime": "^0.13.4" - } - }, - "@formio/bootstrap3": { - "version": "2.12.2", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/@formio/bootstrap3/-/bootstrap3-2.12.2.tgz", - "integrity": "sha512-Y1WD/U22HHKRl1MzUt65bXeFHYO9Wlt+wefRqXFrOhIgbmkfTjCx6e0n2b8t/IYz9FUMg+/GTKdqaBrTZgjrTA==", - "requires": { - "resize-observer-polyfill": "^1.5.1" - } - }, - "@formio/choices.js": { - "version": "9.0.1", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/@formio/choices.js/-/choices.js-9.0.1.tgz", - "integrity": "sha512-+JQRWH0yhaeemVJGE1L4oPe9KPFhipzDlms3Pd31gePXpy8q7Mf3Is54/f0fc88+mWeMjK4GyIhcKIKmuGx5Xw==", - "requires": { - "deepmerge": "^4.2.0", - "fuse.js": "^3.4.5", - "redux": "^4.0.4" - } - }, - "@formio/semantic": { - "version": "2.6.0", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/@formio/semantic/-/semantic-2.6.0.tgz", - "integrity": "sha512-RwMEVXkyz+B6RivflrrKIqvvnGR/eZDLQs74u67StcrzO6n3/5D2J8XqTQRSUzQzr5QV6Wq0eZ51z/+mGm6THw==" - }, - "@formio/text-mask-addons": { - "version": "3.8.0-formio.2", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/@formio/text-mask-addons/-/text-mask-addons-3.8.0-formio.2.tgz", - "integrity": "sha512-H4Sm+1Sx59jbrlKxtKbzethhp5OIcP8Oi4JBpsvH/SB8P/KCRmtjKbN5ACqURnXmYtBHLJC6Yr9KZibOVRGxpA==" - }, - "@formio/vanilla-text-mask": { - "version": "5.1.1", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/@formio/vanilla-text-mask/-/vanilla-text-mask-5.1.1.tgz", - "integrity": "sha512-7MhrbMypySPi7RLchg0ys7HnS3Wqddbq/btAijKB1nA94TE7AOOLhpZJWcNm3kOlX0Y3nHfoavj/HP7vsvF34Q==" - }, - "@popperjs/core": { - "version": "2.11.5", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/@popperjs/core/-/core-2.11.5.tgz", - "integrity": "sha512-9X2obfABZuDVLCgPK9aX0a/x4jaOEweTTWE2+9sr0Qqqevj2Uv5XorvusThmc9XGYpS9yI+fhh8RTafBtGposw==" - }, - "@sphinxxxx/color-conversion": { - "version": "2.2.2", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/@sphinxxxx/color-conversion/-/color-conversion-2.2.2.tgz", - "integrity": "sha512-XExJS3cLqgrmNBIP3bBw6+1oQ1ksGjFh0+oClDKFYpCCqx/hlqwWO5KO/S63fzUo67SxI9dMrF0y5T/Ey7h8Zw==" - }, - "atoa": { - "version": "1.0.0", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/atoa/-/atoa-1.0.0.tgz", - "integrity": "sha1-DMDpGkgOc4+SPrwQNnZHF3mzSkk=" - }, - "autocompleter": { - "version": "6.1.2", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/autocompleter/-/autocompleter-6.1.2.tgz", - "integrity": "sha512-DfEcgxBJOTJJwxkIRZLv/ggD3g5w/fqzZkdJsOcgk7hjxw36lH/nAfIEXzV7qDE55swnYEe43E/WhZPXmSFfsA==" - }, - "available-typed-arrays": { - "version": "1.0.5", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", - "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==" - }, - "browser-cookies": { - "version": "1.2.0", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/browser-cookies/-/browser-cookies-1.2.0.tgz", - "integrity": "sha1-/KP/ubamOq3E2MCZnGtX0Pp9KbU=" - }, - "browser-md5-file": { - "version": "1.1.1", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/browser-md5-file/-/browser-md5-file-1.1.1.tgz", - "integrity": "sha512-9h2UViTtZPhBa7oHvp5mb7MvJaX5OKEPUsplDwJ800OIV+In7BOR3RXOMB78obn2iQVIiS3WkVLhG7Zu1EMwbw==", - "requires": { - "spark-md5": "^2.0.2" - } - }, - "call-bind": { - "version": "1.0.2", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", - "requires": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" - } - }, - "clone": { - "version": "2.1.2", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/clone/-/clone-2.1.2.tgz", - "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=" - }, - "compare-versions": { - "version": "4.1.3", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/compare-versions/-/compare-versions-4.1.3.tgz", - "integrity": "sha512-WQfnbDcrYnGr55UwbxKiQKASnTtNnaAWVi8jZyy8NTpVAXWACSne8lMD1iaIo9AiU6mnuLvSVshCzewVuWxHUg==" - }, - "contra": { - "version": "1.9.4", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/contra/-/contra-1.9.4.tgz", - "integrity": "sha1-9TveQtfltZhcrk2ZqNYQUm3o8o0=", - "requires": { - "atoa": "1.0.0", - "ticky": "1.0.1" - } - }, - "core-js": { - "version": "3.22.1", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/core-js/-/core-js-3.22.1.tgz", - "integrity": "sha512-l6CwCLq7XgITOQGhv1dIUmwCFoqFjyQ6zQHUCQlS0xKmb9d6OHIg8jDiEoswhaettT21BSF5qKr6kbvE+aKwxw==" - }, - "crossvent": { - "version": "1.5.5", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/crossvent/-/crossvent-1.5.5.tgz", - "integrity": "sha1-rSCHjkkh6b5z2daXb4suzQ9xoLE=", - "requires": { - "custom-event": "^1.0.0" - } - }, - "custom-event": { - "version": "1.0.1", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/custom-event/-/custom-event-1.0.1.tgz", - "integrity": "sha1-XQKkaFCt8bSjF5RqOSj8y1v9BCU=" - }, - "custom-event-polyfill": { - "version": "1.0.7", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/custom-event-polyfill/-/custom-event-polyfill-1.0.7.tgz", - "integrity": "sha512-TDDkd5DkaZxZFM8p+1I3yAlvM3rSr1wbrOliG4yJiwinMZN8z/iGL7BTlDkrJcYTmgUSb4ywVCc3ZaUtOtC76w==" - }, - "deep-equal": { - "version": "2.0.5", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/deep-equal/-/deep-equal-2.0.5.tgz", - "integrity": "sha512-nPiRgmbAtm1a3JsnLCf6/SLfXcjyN5v8L1TXzdCmHrXJ4hx+gW/w1YCcn7z8gJtSiDArZCgYtbao3QqLm/N1Sw==", - "requires": { - "call-bind": "^1.0.0", - "es-get-iterator": "^1.1.1", - "get-intrinsic": "^1.0.1", - "is-arguments": "^1.0.4", - "is-date-object": "^1.0.2", - "is-regex": "^1.1.1", - "isarray": "^2.0.5", - "object-is": "^1.1.4", - "object-keys": "^1.1.1", - "object.assign": "^4.1.2", - "regexp.prototype.flags": "^1.3.0", - "side-channel": "^1.0.3", - "which-boxed-primitive": "^1.0.1", - "which-collection": "^1.0.1", - "which-typed-array": "^1.1.2" - } - }, - "deepmerge": { - "version": "4.2.2", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/deepmerge/-/deepmerge-4.2.2.tgz", - "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==" - }, - "define-properties": { - "version": "1.1.4", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/define-properties/-/define-properties-1.1.4.tgz", - "integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==", - "requires": { - "has-property-descriptors": "^1.0.0", - "object-keys": "^1.1.1" - } - }, - "dialog-polyfill": { - "version": "0.5.6", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/dialog-polyfill/-/dialog-polyfill-0.5.6.tgz", - "integrity": "sha512-ZbVDJI9uvxPAKze6z146rmfUZjBqNEwcnFTVamQzXH+svluiV7swmVIGr7miwADgfgt1G2JQIytypM9fbyhX4w==" - }, - "dompurify": { - "version": "2.3.6", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/dompurify/-/dompurify-2.3.6.tgz", - "integrity": "sha512-OFP2u/3T1R5CEgWCEONuJ1a5+MFKnOYpkywpUSxv/dj1LeBT1erK+JwM7zK0ROy2BRhqVCf0LRw/kHqKuMkVGg==" - }, - "downloadjs": { - "version": "1.4.7", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/downloadjs/-/downloadjs-1.4.7.tgz", - "integrity": "sha1-9p+W+UDg0FU9rCkROYZaPNAQHjw=" - }, - "dragula": { - "version": "3.7.3", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/dragula/-/dragula-3.7.3.tgz", - "integrity": "sha512-/rRg4zRhcpf81TyDhaHLtXt6sEywdfpv1cRUMeFFy7DuypH2U0WUL0GTdyAQvXegviT4PJK4KuMmOaIDpICseQ==", - "requires": { - "contra": "1.9.4", - "crossvent": "1.5.5" - } - }, - "es-abstract": { - "version": "1.19.5", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/es-abstract/-/es-abstract-1.19.5.tgz", - "integrity": "sha512-Aa2G2+Rd3b6kxEUKTF4TaW67czBLyAv3z7VOhYRU50YBx+bbsYZ9xQP4lMNazePuFlybXI0V4MruPos7qUo5fA==", - "requires": { - "call-bind": "^1.0.2", - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "get-intrinsic": "^1.1.1", - "get-symbol-description": "^1.0.0", - "has": "^1.0.3", - "has-symbols": "^1.0.3", - "internal-slot": "^1.0.3", - "is-callable": "^1.2.4", - "is-negative-zero": "^2.0.2", - "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.2", - "is-string": "^1.0.7", - "is-weakref": "^1.0.2", - "object-inspect": "^1.12.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.2", - "string.prototype.trimend": "^1.0.4", - "string.prototype.trimstart": "^1.0.4", - "unbox-primitive": "^1.0.1" - } - }, - "es-get-iterator": { - "version": "1.1.2", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/es-get-iterator/-/es-get-iterator-1.1.2.tgz", - "integrity": "sha512-+DTO8GYwbMCwbywjimwZMHp8AuYXOS2JZFWoi2AlPOS3ebnII9w/NLpNZtA7A0YLaVDw+O7KFCeoIV7OPvM7hQ==", - "requires": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.0", - "has-symbols": "^1.0.1", - "is-arguments": "^1.1.0", - "is-map": "^2.0.2", - "is-set": "^2.0.2", - "is-string": "^1.0.5", - "isarray": "^2.0.5" - } - }, - "es-to-primitive": { - "version": "1.2.1", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - } - }, - "eventemitter3": { - "version": "4.0.7", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/eventemitter3/-/eventemitter3-4.0.7.tgz", - "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==" - }, - "extend": { - "version": "3.0.2", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" - }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, - "fast-diff": { - "version": "1.2.0", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/fast-diff/-/fast-diff-1.2.0.tgz", - "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==" - }, - "fast-json-patch": { - "version": "3.1.1", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/fast-json-patch/-/fast-json-patch-3.1.1.tgz", - "integrity": "sha512-vf6IHUX2SBcA+5/+4883dsIjpBTqmfBjmYiWK1savxQmFk4JfBMLa7ynTYOs1Rolp/T1betJxHiGD3g1Mn8lUQ==" - }, - "fetch-ponyfill": { - "version": "7.1.0", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/fetch-ponyfill/-/fetch-ponyfill-7.1.0.tgz", - "integrity": "sha512-FhbbL55dj/qdVO3YNK7ZEkshvj3eQ7EuIGV2I6ic/2YiocvyWv+7jg2s4AyS0wdRU75s3tA8ZxI/xPigb0v5Aw==", - "requires": { - "node-fetch": "~2.6.1" - } - }, - "foreach": { - "version": "2.0.5", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/foreach/-/foreach-2.0.5.tgz", - "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=" - }, - "formiojs": { - "version": "4.14.10", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/formiojs/-/formiojs-4.14.10.tgz", - "integrity": "sha512-z1g75ohrxQIWO5Z1N8By4T7Urf2AbRPSZcDVjxxq7aLSnc9BcHmA4W2LZ+PXCQ/YcdLXz1hQPrkOQcG22h173w==", - "requires": { - "@formio/bootstrap3": "^2.12.2", - "@formio/choices.js": "^9.0.1", - "@formio/semantic": "^2.6.0", - "@formio/text-mask-addons": "^3.8.0-formio.2", - "@formio/vanilla-text-mask": "^5.1.1-formio.1", - "autocompleter": "^6.1.2", - "browser-cookies": "^1.2.0", - "browser-md5-file": "^1.1.1", - "compare-versions": "^4.1.3", - "core-js": "^3.21.1", - "custom-event-polyfill": "^1.0.7", - "dialog-polyfill": "^0.5.6", - "dompurify": "^2.3.4", - "downloadjs": "^1.4.7", - "dragula": "^3.7.3", - "eventemitter3": "^4.0.7", - "fast-deep-equal": "^3.1.3", - "fast-json-patch": "^3.1.0", - "fetch-ponyfill": "^7.1.0", - "i18next": "^21.6.0", - "idb": "^6.1.5", - "ismobilejs": "^1.1.1", - "json-logic-js": "^2.0.0", - "jstimezonedetect": "^1.0.7", - "jwt-decode": "^3.1.2", - "lodash": "^4.17.21", - "moment": "^2.29.2", - "moment-timezone": "^0.5.34", - "native-promise-only": "^0.8.1", - "quill": "^2.0.0-dev.3", - "resize-observer-polyfill": "^1.5.1", - "signature_pad": "^4.0.4", - "string-hash": "^1.1.3", - "tippy.js": "^6.3.7", - "uuid": "^8.3.2", - "vanilla-picker": "^2.12.1" - } - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" - }, - "functions-have-names": { - "version": "1.2.3", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/functions-have-names/-/functions-have-names-1.2.3.tgz", - "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==" - }, - "fuse.js": { - "version": "3.6.1", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/fuse.js/-/fuse.js-3.6.1.tgz", - "integrity": "sha512-hT9yh/tiinkmirKrlv4KWOjztdoZo1mx9Qh4KvWqC7isoXwdUY3PNWUxceF4/qO9R6riA2C29jdTOeQOIROjgw==" - }, - "get-intrinsic": { - "version": "1.1.1", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/get-intrinsic/-/get-intrinsic-1.1.1.tgz", - "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", - "requires": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1" - } - }, - "get-symbol-description": { - "version": "1.0.0", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/get-symbol-description/-/get-symbol-description-1.0.0.tgz", - "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", - "requires": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.1" - } - }, - "has": { - "version": "1.0.3", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-bigints": { - "version": "1.0.1", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/has-bigints/-/has-bigints-1.0.1.tgz", - "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==" - }, - "has-property-descriptors": { - "version": "1.0.0", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", - "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", - "requires": { - "get-intrinsic": "^1.1.1" - } - }, - "has-symbols": { - "version": "1.0.3", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==" - }, - "has-tostringtag": { - "version": "1.0.0", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", - "requires": { - "has-symbols": "^1.0.2" - } - }, - "i18next": { - "version": "21.6.16", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/i18next/-/i18next-21.6.16.tgz", - "integrity": "sha512-xJlzrVxG9CyAGsbMP1aKuiNr1Ed2m36KiTB7hjGMG2Zo4idfw3p9THUEu+GjBwIgEZ7F11ZbCzJcfv4uyfKNuw==", - "requires": { - "@babel/runtime": "^7.17.2" - } - }, - "idb": { - "version": "6.1.5", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/idb/-/idb-6.1.5.tgz", - "integrity": "sha512-IJtugpKkiVXQn5Y+LteyBCNk1N8xpGV3wWZk9EVtZWH8DYkjBn0bX1XnGP9RkyZF0sAcywa6unHqSWKe7q4LGw==" - }, - "internal-slot": { - "version": "1.0.3", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/internal-slot/-/internal-slot-1.0.3.tgz", - "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==", - "requires": { - "get-intrinsic": "^1.1.0", - "has": "^1.0.3", - "side-channel": "^1.0.4" - } - }, - "is-arguments": { - "version": "1.1.1", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/is-arguments/-/is-arguments-1.1.1.tgz", - "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", - "requires": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - } - }, - "is-bigint": { - "version": "1.0.4", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/is-bigint/-/is-bigint-1.0.4.tgz", - "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", - "requires": { - "has-bigints": "^1.0.1" - } - }, - "is-boolean-object": { - "version": "1.1.2", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/is-boolean-object/-/is-boolean-object-1.1.2.tgz", - "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", - "requires": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - } - }, - "is-callable": { - "version": "1.2.4", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/is-callable/-/is-callable-1.2.4.tgz", - "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==" - }, - "is-date-object": { - "version": "1.0.5", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/is-date-object/-/is-date-object-1.0.5.tgz", - "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", - "requires": { - "has-tostringtag": "^1.0.0" - } - }, - "is-map": { - "version": "2.0.2", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/is-map/-/is-map-2.0.2.tgz", - "integrity": "sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg==" - }, - "is-negative-zero": { - "version": "2.0.2", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/is-negative-zero/-/is-negative-zero-2.0.2.tgz", - "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==" - }, - "is-number-object": { - "version": "1.0.7", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/is-number-object/-/is-number-object-1.0.7.tgz", - "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", - "requires": { - "has-tostringtag": "^1.0.0" - } - }, - "is-regex": { - "version": "1.1.4", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/is-regex/-/is-regex-1.1.4.tgz", - "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", - "requires": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - } - }, - "is-set": { - "version": "2.0.2", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/is-set/-/is-set-2.0.2.tgz", - "integrity": "sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g==" - }, - "is-shared-array-buffer": { - "version": "1.0.2", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", - "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", - "requires": { - "call-bind": "^1.0.2" - } - }, - "is-string": { - "version": "1.0.7", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/is-string/-/is-string-1.0.7.tgz", - "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", - "requires": { - "has-tostringtag": "^1.0.0" - } - }, - "is-symbol": { - "version": "1.0.4", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/is-symbol/-/is-symbol-1.0.4.tgz", - "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", - "requires": { - "has-symbols": "^1.0.2" - } - }, - "is-typed-array": { - "version": "1.1.8", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/is-typed-array/-/is-typed-array-1.1.8.tgz", - "integrity": "sha512-HqH41TNZq2fgtGT8WHVFVJhBVGuY3AnP3Q36K8JKXUxSxRgk/d+7NjmwG2vo2mYmXK8UYZKu0qH8bVP5gEisjA==", - "requires": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "es-abstract": "^1.18.5", - "foreach": "^2.0.5", - "has-tostringtag": "^1.0.0" - } - }, - "is-weakmap": { - "version": "2.0.1", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/is-weakmap/-/is-weakmap-2.0.1.tgz", - "integrity": "sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA==" - }, - "is-weakref": { - "version": "1.0.2", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/is-weakref/-/is-weakref-1.0.2.tgz", - "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", - "requires": { - "call-bind": "^1.0.2" - } - }, - "is-weakset": { - "version": "2.0.2", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/is-weakset/-/is-weakset-2.0.2.tgz", - "integrity": "sha512-t2yVvttHkQktwnNNmBQ98AhENLdPUTDTE21uPqAQ0ARwQfGeQKRVS0NNurH7bTf7RrvcVn1OOge45CnBeHCSmg==", - "requires": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.1" - } - }, - "isarray": { - "version": "2.0.5", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==" - }, - "ismobilejs": { - "version": "1.1.1", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/ismobilejs/-/ismobilejs-1.1.1.tgz", - "integrity": "sha512-VaFW53yt8QO61k2WJui0dHf4SlL8lxBofUuUmwBo0ljPk0Drz2TiuDW4jo3wDcv41qy/SxrJ+VAzJ/qYqsmzRw==" - }, - "json-logic-js": { - "version": "2.0.2", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/json-logic-js/-/json-logic-js-2.0.2.tgz", - "integrity": "sha512-ZBtBdMJieqQcH7IX/LaBsr5pX+Y5JIW+EhejtM3Ffg2jdN9Iwf+Ht6TbHnvAZ/YtwyuhPaCBlnvzrwVeWdvGDQ==" - }, - "jstimezonedetect": { - "version": "1.0.7", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/jstimezonedetect/-/jstimezonedetect-1.0.7.tgz", - "integrity": "sha512-ARADHortktl9IZ1tr4GHwGPIAzgz3mLNCbR/YjWtRtc/O0o634O3NeFlpLjv95EvuDA5dc8z6yfgbS8nUc4zcQ==" - }, - "jwt-decode": { - "version": "3.1.2", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/jwt-decode/-/jwt-decode-3.1.2.tgz", - "integrity": "sha512-UfpWE/VZn0iP50d8cz9NrZLM9lSWhcJ+0Gt/nm4by88UL+J1SiKN8/5dkjMmbEzwL2CAe+67GsegCbIKtbp75A==" - }, - "lodash": { - "version": "4.17.21", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" - }, - "moment": { - "version": "2.29.4", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/moment/-/moment-2.29.4.tgz", - "integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==" - }, - "moment-timezone": { - "version": "0.5.34", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/moment-timezone/-/moment-timezone-0.5.34.tgz", - "integrity": "sha512-3zAEHh2hKUs3EXLESx/wsgw6IQdusOT8Bxm3D9UrHPQR7zlMmzwybC8zHEM1tQ4LJwP7fcxrWr8tuBg05fFCbg==", - "requires": { - "moment": ">= 2.9.0" - } - }, - "native-promise-only": { - "version": "0.8.1", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/native-promise-only/-/native-promise-only-0.8.1.tgz", - "integrity": "sha1-IKMYwwy0X3H+et+/eyHJnBRy7xE=" - }, - "node-fetch": { - "version": "2.6.7", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", - "requires": { - "whatwg-url": "^5.0.0" - } - }, - "object-inspect": { - "version": "1.12.0", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/object-inspect/-/object-inspect-1.12.0.tgz", - "integrity": "sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g==" - }, - "object-is": { - "version": "1.1.5", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/object-is/-/object-is-1.1.5.tgz", - "integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==", - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" - } - }, - "object-keys": { - "version": "1.1.1", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" - }, - "object.assign": { - "version": "4.1.2", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/object.assign/-/object.assign-4.1.2.tgz", - "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", - "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", - "object-keys": "^1.1.1" - } - }, - "parchment": { - "version": "2.0.0-dev.2", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/parchment/-/parchment-2.0.0-dev.2.tgz", - "integrity": "sha512-4fgRny4pPISoML08Zp7poi52Dff3E2G1ORTi2D/acJ/RiROdDAMDB6VcQNfBcmehrX5Wixp6dxh6JjLyE5yUNQ==" - }, - "quill": { - "version": "2.0.0-dev.4", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/quill/-/quill-2.0.0-dev.4.tgz", - "integrity": "sha512-9WmMVCEIhf3lDdhzl+i+GBDeDl0BFi65waC4Im8Y4HudEJ9kEEb1lciAz9A8pcDmLMjiMbvz84lNt/U5OBS8Vg==", - "requires": { - "clone": "^2.1.2", - "deep-equal": "^2.0.2", - "eventemitter3": "^4.0.0", - "extend": "^3.0.2", - "parchment": "2.0.0-dev.2", - "quill-delta": "4.2.1" - } - }, - "quill-delta": { - "version": "4.2.1", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/quill-delta/-/quill-delta-4.2.1.tgz", - "integrity": "sha512-Y2nksOj6Q+4hizre8n0dml76vLNGK4/y86EoI1d7rv6EL1bx7DPDYRmqQMPu1UqFQO/uQuVHQ3fOmm4ZSzWrfA==", - "requires": { - "deep-equal": "^1.0.1", - "extend": "^3.0.2", - "fast-diff": "1.2.0" - }, - "dependencies": { - "deep-equal": { - "version": "1.1.1", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/deep-equal/-/deep-equal-1.1.1.tgz", - "integrity": "sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==", - "requires": { - "is-arguments": "^1.0.4", - "is-date-object": "^1.0.1", - "is-regex": "^1.0.4", - "object-is": "^1.0.1", - "object-keys": "^1.1.1", - "regexp.prototype.flags": "^1.2.0" - } - } - } - }, - "redux": { - "version": "4.2.0", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/redux/-/redux-4.2.0.tgz", - "integrity": "sha512-oSBmcKKIuIR4ME29/AeNUnl5L+hvBq7OaJWzaptTQJAntaPvxIJqfnjbaEiCzzaIz+XmVILfqAM3Ob0aXLPfjA==", - "requires": { - "@babel/runtime": "^7.9.2" - } - }, - "regenerator-runtime": { - "version": "0.13.9", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", - "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==" - }, - "regexp.prototype.flags": { - "version": "1.4.3", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz", - "integrity": "sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==", - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "functions-have-names": "^1.2.2" - } - }, - "resize-observer-polyfill": { - "version": "1.5.1", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz", - "integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==" - }, - "side-channel": { - "version": "1.0.4", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", - "requires": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" - } - }, - "signature_pad": { - "version": "4.0.5", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/signature_pad/-/signature_pad-4.0.5.tgz", - "integrity": "sha512-DeqSbAyO59ET/Cu92fLEgFmvGiaeaWkRgOetm0GnUV7z3LtEKOz2CazkIGmIdr9ZfSyZz6VgTpTxbP0fgfYuyg==" - }, - "spark-md5": { - "version": "2.0.2", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/spark-md5/-/spark-md5-2.0.2.tgz", - "integrity": "sha512-9WfT+FYBEvlrOOBEs484/zmbtSX4BlGjzXih1qIEWA1yhHbcqgcMHkiwXoWk2Sq1aJjLpcs6ZKV7JxrDNjIlNg==" - }, - "string-hash": { - "version": "1.1.3", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/string-hash/-/string-hash-1.1.3.tgz", - "integrity": "sha1-6Kr8CsGFW0Zmkp7X3RJ1311sgRs=" - }, - "string.prototype.trimend": { - "version": "1.0.4", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", - "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" - } - }, - "string.prototype.trimstart": { - "version": "1.0.4", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", - "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" - } - }, - "ticky": { - "version": "1.0.1", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/ticky/-/ticky-1.0.1.tgz", - "integrity": "sha1-t8+nHnaPHJAAxJe5FRswlHxQ5G0=" - }, - "tippy.js": { - "version": "6.3.7", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/tippy.js/-/tippy.js-6.3.7.tgz", - "integrity": "sha512-E1d3oP2emgJ9dRQZdf3Kkn0qJgI6ZLpyS5z6ZkY1DF3kaQaBsGZsndEpHwx+eC+tYM41HaSNvNtLx8tU57FzTQ==", - "requires": { - "@popperjs/core": "^2.9.0" - } - }, - "tr46": { - "version": "0.0.3", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" - }, - "unbox-primitive": { - "version": "1.0.1", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/unbox-primitive/-/unbox-primitive-1.0.1.tgz", - "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==", - "requires": { - "function-bind": "^1.1.1", - "has-bigints": "^1.0.1", - "has-symbols": "^1.0.2", - "which-boxed-primitive": "^1.0.2" - } - }, - "uuid": { - "version": "8.3.2", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" - }, - "vanilla-picker": { - "version": "2.12.1", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/vanilla-picker/-/vanilla-picker-2.12.1.tgz", - "integrity": "sha512-2qrEP9VYylKXbyzXKsbu2dferBTvqnlsr29XjHwFE+/MEp0VNj6oEUESLDtKZ7DWzGdSv1x/+ujqFZF+KsO3cg==", - "requires": { - "@sphinxxxx/color-conversion": "^2.2.2" - } - }, - "webidl-conversions": { - "version": "3.0.1", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=" - }, - "whatwg-url": { - "version": "5.0.0", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", - "requires": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, - "which-boxed-primitive": { - "version": "1.0.2", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", - "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", - "requires": { - "is-bigint": "^1.0.1", - "is-boolean-object": "^1.1.0", - "is-number-object": "^1.0.4", - "is-string": "^1.0.5", - "is-symbol": "^1.0.3" - } - }, - "which-collection": { - "version": "1.0.1", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/which-collection/-/which-collection-1.0.1.tgz", - "integrity": "sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A==", - "requires": { - "is-map": "^2.0.1", - "is-set": "^2.0.1", - "is-weakmap": "^2.0.1", - "is-weakset": "^2.0.1" - } - }, - "which-typed-array": { - "version": "1.1.7", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/which-typed-array/-/which-typed-array-1.1.7.tgz", - "integrity": "sha512-vjxaB4nfDqwKI0ws7wZpxIlde1XrLX5uB0ZjpfshgmapJMD7jJWhZI+yToJTqaFByF0eNBcYxbjmCzoRP7CfEw==", - "requires": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "es-abstract": "^1.18.5", - "foreach": "^2.0.5", - "has-tostringtag": "^1.0.0", - "is-typed-array": "^1.1.7" - } - } } } diff --git a/.github/workspace/formiojs/package.json b/.github/workspace/formiojs/package.json index 863a590d..07a8ee3b 100644 --- a/.github/workspace/formiojs/package.json +++ b/.github/workspace/formiojs/package.json @@ -30,7 +30,7 @@ }, "devDependencies": {}, "dependencies": { - "formiojs": "4.14.10", + "formiojs": "4.15.1", "moment": "^2.29.4" } } diff --git a/.github/workspace/formiojs/pom.xml b/.github/workspace/formiojs/pom.xml index 2f5f6067..6ae2af5e 100644 --- a/.github/workspace/formiojs/pom.xml +++ b/.github/workspace/formiojs/pom.xml @@ -11,9 +11,9 @@ pom - 1.12.1 - v16.14.2 - 8.5.0 + 1.13.4 + v18.16.1 + 9.5.1 diff --git a/.github/workspace/prem/npm b/.github/workspace/prem/npm new file mode 100755 index 00000000..6e0266f7 --- /dev/null +++ b/.github/workspace/prem/npm @@ -0,0 +1,6 @@ +#!/bin/sh +export PATH="$PWD/node/":$PATH +node -v +npm -v +$PWD/node/npm "$@" +##node "node/node_modules/npm/bin/npm-cli.js" "$@" diff --git a/.github/workspace/prem/npx b/.github/workspace/prem/npx new file mode 100755 index 00000000..0b221534 --- /dev/null +++ b/.github/workspace/prem/npx @@ -0,0 +1,6 @@ +#!/bin/sh +export PATH="$PWD/node/":$PATH +node -v +npx -v +$PWD/node/npx "$@" + diff --git a/.github/workspace/prem/package-lock.json b/.github/workspace/prem/package-lock.json index 251141e0..49f8610d 100644 --- a/.github/workspace/prem/package-lock.json +++ b/.github/workspace/prem/package-lock.json @@ -1,7 +1,7 @@ { "name": "formio-qld-prem-downloader", "version": "0.0.1", - "lockfileVersion": 2, + "lockfileVersion": 3, "requires": true, "packages": { "": { @@ -9,7 +9,7 @@ "version": "0.0.1", "license": "MIT", "dependencies": { - "@formio/premium": "1.19.0-rc.3", + "@formio/premium": "1.19.1", "moment": "^2.29.4" }, "devDependencies": {} @@ -50,16 +50,15 @@ } }, "node_modules/@formio/premium": { - "version": "1.19.0-rc.3", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/@formio/premium/-/premium-1.19.0-rc.3.tgz", - "integrity": "sha512-zMFZmaN3331+dQaQEGEnjRWZNWONxd4uTh3PmfesW4Hg9J4O7Fm57o66ht6W5gEwiBJaNO6bt5IP+juUZP/kzA==", + "version": "1.19.1", + "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/@formio/premium/-/premium-1.19.1.tgz", + "integrity": "sha512-5xxcoJIKA/zlpx9q8UQF1fgsM29wPcgCatIB0OvgKl5e9QylrxGNNngh+eCnmxYCHcBJBiYBPiXwyNpyBnEhIw==", "license": "UNLICENSED", "dependencies": { + "@juggle/resize-observer": "^3.4.0", "@zxing/library": "^0.18.6", "dayjs": "^1.10.7", - "fast-xml-parser": "^3.21.1", "papaparse": "^5.3.1", - "resize-observer-polyfill": "^1.5.1", "tooltip.js": "^1.3.3", "two.js": "0.7.1", "uuid": "^8.3.2", @@ -83,6 +82,12 @@ "license": "Unlicense", "peer": true }, + "node_modules/@juggle/resize-observer": { + "version": "3.4.0", + "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/@juggle/resize-observer/-/resize-observer-3.4.0.tgz", + "integrity": "sha512-dfLbk+PwWvFzSxwk3n5ySL0hfBog779o8h68wK/7/APo/7cgyWp5jcXockbxdk5kFRkbeXWm4Fbi9FrdN381sA==", + "license": "Apache-2.0" + }, "node_modules/@popperjs/core": { "version": "2.11.5", "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/@popperjs/core/-/core-2.11.5.tgz", @@ -434,22 +439,6 @@ "license": "MIT", "peer": true }, - "node_modules/fast-xml-parser": { - "version": "3.21.1", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/fast-xml-parser/-/fast-xml-parser-3.21.1.tgz", - "integrity": "sha512-FTFVjYoBOZTJekiUsawGsSYV9QL0A+zDYCRj7y34IO6Jg+2IMYEtQa+bbictpdpV8dHxXywqU7C0gRDEOFtBFg==", - "license": "MIT", - "dependencies": { - "strnum": "^1.0.4" - }, - "bin": { - "xml2js": "cli.js" - }, - "funding": { - "type": "paypal", - "url": "https://paypal.me/naturalintelligence" - } - }, "node_modules/fetch-ponyfill": { "version": "7.1.0", "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/fetch-ponyfill/-/fetch-ponyfill-7.1.0.tgz", @@ -1180,7 +1169,8 @@ "version": "1.5.1", "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz", "integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==", - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/side-channel": { "version": "1.0.4", @@ -1239,12 +1229,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/strnum": { - "version": "1.0.5", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/strnum/-/strnum-1.0.5.tgz", - "integrity": "sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==", - "license": "MIT" - }, "node_modules/text-mask-addons": { "version": "3.8.0", "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/text-mask-addons/-/text-mask-addons-3.8.0.tgz", @@ -1407,1006 +1391,5 @@ "url": "https://github.com/sponsors/ljharb" } } - }, - "dependencies": { - "@babel/runtime": { - "version": "7.17.9", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/@babel/runtime/-/runtime-7.17.9.tgz", - "integrity": "sha512-lSiBBvodq29uShpWGNbgFdKYNiFDo5/HIYsaCEY9ff4sb10x9jizo2+pRrSyF4jKZCXqgzuqBOQKbUm90gQwJg==", - "peer": true, - "requires": { - "regenerator-runtime": "^0.13.4" - } - }, - "@formio/bootstrap3": { - "version": "2.12.2", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/@formio/bootstrap3/-/bootstrap3-2.12.2.tgz", - "integrity": "sha512-Y1WD/U22HHKRl1MzUt65bXeFHYO9Wlt+wefRqXFrOhIgbmkfTjCx6e0n2b8t/IYz9FUMg+/GTKdqaBrTZgjrTA==", - "peer": true, - "requires": { - "resize-observer-polyfill": "^1.5.1" - } - }, - "@formio/choices.js": { - "version": "9.0.1", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/@formio/choices.js/-/choices.js-9.0.1.tgz", - "integrity": "sha512-+JQRWH0yhaeemVJGE1L4oPe9KPFhipzDlms3Pd31gePXpy8q7Mf3Is54/f0fc88+mWeMjK4GyIhcKIKmuGx5Xw==", - "peer": true, - "requires": { - "deepmerge": "^4.2.0", - "fuse.js": "^3.4.5", - "redux": "^4.0.4" - } - }, - "@formio/premium": { - "version": "1.19.0-rc.3", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/@formio/premium/-/premium-1.19.0-rc.3.tgz", - "integrity": "sha512-zMFZmaN3331+dQaQEGEnjRWZNWONxd4uTh3PmfesW4Hg9J4O7Fm57o66ht6W5gEwiBJaNO6bt5IP+juUZP/kzA==", - "requires": { - "@zxing/library": "^0.18.6", - "dayjs": "^1.10.7", - "fast-xml-parser": "^3.21.1", - "papaparse": "^5.3.1", - "resize-observer-polyfill": "^1.5.1", - "tooltip.js": "^1.3.3", - "two.js": "0.7.1", - "uuid": "^8.3.2", - "vanilla-picker": "^2.12.1" - } - }, - "@formio/semantic": { - "version": "2.6.0", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/@formio/semantic/-/semantic-2.6.0.tgz", - "integrity": "sha512-RwMEVXkyz+B6RivflrrKIqvvnGR/eZDLQs74u67StcrzO6n3/5D2J8XqTQRSUzQzr5QV6Wq0eZ51z/+mGm6THw==", - "peer": true - }, - "@formio/vanilla-text-mask": { - "version": "5.1.1", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/@formio/vanilla-text-mask/-/vanilla-text-mask-5.1.1.tgz", - "integrity": "sha512-7MhrbMypySPi7RLchg0ys7HnS3Wqddbq/btAijKB1nA94TE7AOOLhpZJWcNm3kOlX0Y3nHfoavj/HP7vsvF34Q==", - "peer": true - }, - "@popperjs/core": { - "version": "2.11.5", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/@popperjs/core/-/core-2.11.5.tgz", - "integrity": "sha512-9X2obfABZuDVLCgPK9aX0a/x4jaOEweTTWE2+9sr0Qqqevj2Uv5XorvusThmc9XGYpS9yI+fhh8RTafBtGposw==", - "peer": true - }, - "@sphinxxxx/color-conversion": { - "version": "2.2.2", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/@sphinxxxx/color-conversion/-/color-conversion-2.2.2.tgz", - "integrity": "sha512-XExJS3cLqgrmNBIP3bBw6+1oQ1ksGjFh0+oClDKFYpCCqx/hlqwWO5KO/S63fzUo67SxI9dMrF0y5T/Ey7h8Zw==" - }, - "@zxing/library": { - "version": "0.18.6", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/@zxing/library/-/library-0.18.6.tgz", - "integrity": "sha512-bulZ9JHoLFd9W36pi+7e7DnEYNJhljYjZ1UTsKPOoLMU3qtC+REHITeCRNx40zTRJZx18W5TBRXt5pq2Uopjsw==", - "requires": { - "@zxing/text-encoding": "~0.9.0", - "ts-custom-error": "^3.0.0" - } - }, - "@zxing/text-encoding": { - "version": "0.9.0", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/@zxing/text-encoding/-/text-encoding-0.9.0.tgz", - "integrity": "sha512-U/4aVJ2mxI0aDNI8Uq0wEhMgY+u4CNtEb0om3+y3+niDAsoTCOB33UF0sxpzqzdqXLqmvc+vZyAt4O8pPdfkwA==", - "optional": true - }, - "atoa": { - "version": "1.0.0", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/atoa/-/atoa-1.0.0.tgz", - "integrity": "sha1-DMDpGkgOc4+SPrwQNnZHF3mzSkk=", - "peer": true - }, - "autocompleter": { - "version": "6.1.2", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/autocompleter/-/autocompleter-6.1.2.tgz", - "integrity": "sha512-DfEcgxBJOTJJwxkIRZLv/ggD3g5w/fqzZkdJsOcgk7hjxw36lH/nAfIEXzV7qDE55swnYEe43E/WhZPXmSFfsA==", - "peer": true - }, - "available-typed-arrays": { - "version": "1.0.5", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", - "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", - "peer": true - }, - "browser-cookies": { - "version": "1.2.0", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/browser-cookies/-/browser-cookies-1.2.0.tgz", - "integrity": "sha1-/KP/ubamOq3E2MCZnGtX0Pp9KbU=", - "peer": true - }, - "call-bind": { - "version": "1.0.2", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", - "peer": true, - "requires": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" - } - }, - "clone": { - "version": "2.1.2", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/clone/-/clone-2.1.2.tgz", - "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", - "peer": true - }, - "compare-versions": { - "version": "3.6.0", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/compare-versions/-/compare-versions-3.6.0.tgz", - "integrity": "sha512-W6Af2Iw1z4CB7q4uU4hv646dW9GQuBM+YpC0UvUCWSD8w90SJjp+ujJuXaEMtAXBtSqGfMPuFOVn4/+FlaqfBA==", - "peer": true - }, - "contra": { - "version": "1.9.4", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/contra/-/contra-1.9.4.tgz", - "integrity": "sha1-9TveQtfltZhcrk2ZqNYQUm3o8o0=", - "peer": true, - "requires": { - "atoa": "1.0.0", - "ticky": "1.0.1" - } - }, - "core-js": { - "version": "3.22.1", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/core-js/-/core-js-3.22.1.tgz", - "integrity": "sha512-l6CwCLq7XgITOQGhv1dIUmwCFoqFjyQ6zQHUCQlS0xKmb9d6OHIg8jDiEoswhaettT21BSF5qKr6kbvE+aKwxw==", - "peer": true - }, - "crossvent": { - "version": "1.5.5", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/crossvent/-/crossvent-1.5.5.tgz", - "integrity": "sha1-rSCHjkkh6b5z2daXb4suzQ9xoLE=", - "peer": true, - "requires": { - "custom-event": "^1.0.0" - } - }, - "custom-event": { - "version": "1.0.1", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/custom-event/-/custom-event-1.0.1.tgz", - "integrity": "sha1-XQKkaFCt8bSjF5RqOSj8y1v9BCU=", - "peer": true - }, - "custom-event-polyfill": { - "version": "1.0.7", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/custom-event-polyfill/-/custom-event-polyfill-1.0.7.tgz", - "integrity": "sha512-TDDkd5DkaZxZFM8p+1I3yAlvM3rSr1wbrOliG4yJiwinMZN8z/iGL7BTlDkrJcYTmgUSb4ywVCc3ZaUtOtC76w==", - "peer": true - }, - "dayjs": { - "version": "1.11.1", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/dayjs/-/dayjs-1.11.1.tgz", - "integrity": "sha512-ER7EjqVAMkRRsxNCC5YqJ9d9VQYuWdGt7aiH2qA5R5wt8ZmWaP2dLUSIK6y/kVzLMlmh1Tvu5xUf4M/wdGJ5KA==" - }, - "deep-equal": { - "version": "2.0.5", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/deep-equal/-/deep-equal-2.0.5.tgz", - "integrity": "sha512-nPiRgmbAtm1a3JsnLCf6/SLfXcjyN5v8L1TXzdCmHrXJ4hx+gW/w1YCcn7z8gJtSiDArZCgYtbao3QqLm/N1Sw==", - "peer": true, - "requires": { - "call-bind": "^1.0.0", - "es-get-iterator": "^1.1.1", - "get-intrinsic": "^1.0.1", - "is-arguments": "^1.0.4", - "is-date-object": "^1.0.2", - "is-regex": "^1.1.1", - "isarray": "^2.0.5", - "object-is": "^1.1.4", - "object-keys": "^1.1.1", - "object.assign": "^4.1.2", - "regexp.prototype.flags": "^1.3.0", - "side-channel": "^1.0.3", - "which-boxed-primitive": "^1.0.1", - "which-collection": "^1.0.1", - "which-typed-array": "^1.1.2" - } - }, - "deepmerge": { - "version": "4.2.2", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/deepmerge/-/deepmerge-4.2.2.tgz", - "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", - "peer": true - }, - "define-properties": { - "version": "1.1.4", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/define-properties/-/define-properties-1.1.4.tgz", - "integrity": "sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==", - "peer": true, - "requires": { - "has-property-descriptors": "^1.0.0", - "object-keys": "^1.1.1" - } - }, - "dialog-polyfill": { - "version": "0.5.6", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/dialog-polyfill/-/dialog-polyfill-0.5.6.tgz", - "integrity": "sha512-ZbVDJI9uvxPAKze6z146rmfUZjBqNEwcnFTVamQzXH+svluiV7swmVIGr7miwADgfgt1G2JQIytypM9fbyhX4w==", - "peer": true - }, - "dompurify": { - "version": "2.3.6", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/dompurify/-/dompurify-2.3.6.tgz", - "integrity": "sha512-OFP2u/3T1R5CEgWCEONuJ1a5+MFKnOYpkywpUSxv/dj1LeBT1erK+JwM7zK0ROy2BRhqVCf0LRw/kHqKuMkVGg==", - "peer": true - }, - "downloadjs": { - "version": "1.4.7", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/downloadjs/-/downloadjs-1.4.7.tgz", - "integrity": "sha1-9p+W+UDg0FU9rCkROYZaPNAQHjw=", - "peer": true - }, - "dragula": { - "version": "3.7.3", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/dragula/-/dragula-3.7.3.tgz", - "integrity": "sha512-/rRg4zRhcpf81TyDhaHLtXt6sEywdfpv1cRUMeFFy7DuypH2U0WUL0GTdyAQvXegviT4PJK4KuMmOaIDpICseQ==", - "peer": true, - "requires": { - "contra": "1.9.4", - "crossvent": "1.5.5" - } - }, - "es-abstract": { - "version": "1.19.5", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/es-abstract/-/es-abstract-1.19.5.tgz", - "integrity": "sha512-Aa2G2+Rd3b6kxEUKTF4TaW67czBLyAv3z7VOhYRU50YBx+bbsYZ9xQP4lMNazePuFlybXI0V4MruPos7qUo5fA==", - "peer": true, - "requires": { - "call-bind": "^1.0.2", - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "get-intrinsic": "^1.1.1", - "get-symbol-description": "^1.0.0", - "has": "^1.0.3", - "has-symbols": "^1.0.3", - "internal-slot": "^1.0.3", - "is-callable": "^1.2.4", - "is-negative-zero": "^2.0.2", - "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.2", - "is-string": "^1.0.7", - "is-weakref": "^1.0.2", - "object-inspect": "^1.12.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.2", - "string.prototype.trimend": "^1.0.4", - "string.prototype.trimstart": "^1.0.4", - "unbox-primitive": "^1.0.1" - } - }, - "es-get-iterator": { - "version": "1.1.2", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/es-get-iterator/-/es-get-iterator-1.1.2.tgz", - "integrity": "sha512-+DTO8GYwbMCwbywjimwZMHp8AuYXOS2JZFWoi2AlPOS3ebnII9w/NLpNZtA7A0YLaVDw+O7KFCeoIV7OPvM7hQ==", - "peer": true, - "requires": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.0", - "has-symbols": "^1.0.1", - "is-arguments": "^1.1.0", - "is-map": "^2.0.2", - "is-set": "^2.0.2", - "is-string": "^1.0.5", - "isarray": "^2.0.5" - } - }, - "es-to-primitive": { - "version": "1.2.1", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "peer": true, - "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - } - }, - "eventemitter3": { - "version": "4.0.7", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/eventemitter3/-/eventemitter3-4.0.7.tgz", - "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", - "peer": true - }, - "extend": { - "version": "3.0.2", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "peer": true - }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "peer": true - }, - "fast-diff": { - "version": "1.2.0", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/fast-diff/-/fast-diff-1.2.0.tgz", - "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", - "peer": true - }, - "fast-json-patch": { - "version": "3.1.1", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/fast-json-patch/-/fast-json-patch-3.1.1.tgz", - "integrity": "sha512-vf6IHUX2SBcA+5/+4883dsIjpBTqmfBjmYiWK1savxQmFk4JfBMLa7ynTYOs1Rolp/T1betJxHiGD3g1Mn8lUQ==", - "peer": true - }, - "fast-xml-parser": { - "version": "3.21.1", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/fast-xml-parser/-/fast-xml-parser-3.21.1.tgz", - "integrity": "sha512-FTFVjYoBOZTJekiUsawGsSYV9QL0A+zDYCRj7y34IO6Jg+2IMYEtQa+bbictpdpV8dHxXywqU7C0gRDEOFtBFg==", - "requires": { - "strnum": "^1.0.4" - } - }, - "fetch-ponyfill": { - "version": "7.1.0", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/fetch-ponyfill/-/fetch-ponyfill-7.1.0.tgz", - "integrity": "sha512-FhbbL55dj/qdVO3YNK7ZEkshvj3eQ7EuIGV2I6ic/2YiocvyWv+7jg2s4AyS0wdRU75s3tA8ZxI/xPigb0v5Aw==", - "peer": true, - "requires": { - "node-fetch": "~2.6.1" - } - }, - "foreach": { - "version": "2.0.5", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/foreach/-/foreach-2.0.5.tgz", - "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=", - "peer": true - }, - "formiojs": { - "version": "4.14.3", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/formiojs/-/formiojs-4.14.3.tgz", - "integrity": "sha512-9OrYd3kw+w8mbkOrAO8EnFaXLXERzvU0dkyZqYYW7qU20T579v1cRzoWvDev0ldJwBA8Ov1+Nk9mDxMU3Gvb4A==", - "peer": true, - "requires": { - "@formio/bootstrap3": "^2.12.1", - "@formio/choices.js": "^9.0.1", - "@formio/semantic": "^2.6.0", - "@formio/vanilla-text-mask": "^5.1.1", - "autocompleter": "^6.1.2", - "browser-cookies": "^1.2.0", - "compare-versions": "^3.6.0", - "core-js": "^3.19.3", - "custom-event-polyfill": "^1.0.7", - "dialog-polyfill": "^0.5.6", - "dompurify": "^2.3.4", - "downloadjs": "^1.4.7", - "dragula": "^3.7.3", - "eventemitter3": "^4.0.7", - "fast-deep-equal": "^3.1.3", - "fast-json-patch": "^3.1.0", - "fetch-ponyfill": "^7.1.0", - "i18next": "^21.6.0", - "idb": "^6.1.5", - "ismobilejs": "^1.1.1", - "json-logic-js": "^2.0.0", - "jstimezonedetect": "^1.0.7", - "jwt-decode": "^3.1.2", - "lodash": "^4.17.21", - "moment": "^2.29.1", - "moment-timezone": "^0.5.34", - "native-promise-only": "^0.8.1", - "quill": "^2.0.0-dev.3", - "resize-observer-polyfill": "^1.5.1", - "signature_pad": "^2.3.2", - "string-hash": "^1.1.3", - "text-mask-addons": "^3.8.0", - "tippy.js": "^6.3.7", - "uuid": "^8.3.2", - "vanilla-picker": "^2.12.1" - } - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "peer": true - }, - "functions-have-names": { - "version": "1.2.3", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/functions-have-names/-/functions-have-names-1.2.3.tgz", - "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", - "peer": true - }, - "fuse.js": { - "version": "3.6.1", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/fuse.js/-/fuse.js-3.6.1.tgz", - "integrity": "sha512-hT9yh/tiinkmirKrlv4KWOjztdoZo1mx9Qh4KvWqC7isoXwdUY3PNWUxceF4/qO9R6riA2C29jdTOeQOIROjgw==", - "peer": true - }, - "get-intrinsic": { - "version": "1.1.1", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/get-intrinsic/-/get-intrinsic-1.1.1.tgz", - "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", - "peer": true, - "requires": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1" - } - }, - "get-symbol-description": { - "version": "1.0.0", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/get-symbol-description/-/get-symbol-description-1.0.0.tgz", - "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", - "peer": true, - "requires": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.1" - } - }, - "has": { - "version": "1.0.3", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "peer": true, - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-bigints": { - "version": "1.0.1", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/has-bigints/-/has-bigints-1.0.1.tgz", - "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==", - "peer": true - }, - "has-property-descriptors": { - "version": "1.0.0", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", - "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", - "peer": true, - "requires": { - "get-intrinsic": "^1.1.1" - } - }, - "has-symbols": { - "version": "1.0.3", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "peer": true - }, - "has-tostringtag": { - "version": "1.0.0", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", - "peer": true, - "requires": { - "has-symbols": "^1.0.2" - } - }, - "i18next": { - "version": "21.6.16", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/i18next/-/i18next-21.6.16.tgz", - "integrity": "sha512-xJlzrVxG9CyAGsbMP1aKuiNr1Ed2m36KiTB7hjGMG2Zo4idfw3p9THUEu+GjBwIgEZ7F11ZbCzJcfv4uyfKNuw==", - "peer": true, - "requires": { - "@babel/runtime": "^7.17.2" - } - }, - "idb": { - "version": "6.1.5", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/idb/-/idb-6.1.5.tgz", - "integrity": "sha512-IJtugpKkiVXQn5Y+LteyBCNk1N8xpGV3wWZk9EVtZWH8DYkjBn0bX1XnGP9RkyZF0sAcywa6unHqSWKe7q4LGw==", - "peer": true - }, - "internal-slot": { - "version": "1.0.3", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/internal-slot/-/internal-slot-1.0.3.tgz", - "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==", - "peer": true, - "requires": { - "get-intrinsic": "^1.1.0", - "has": "^1.0.3", - "side-channel": "^1.0.4" - } - }, - "is-arguments": { - "version": "1.1.1", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/is-arguments/-/is-arguments-1.1.1.tgz", - "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", - "peer": true, - "requires": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - } - }, - "is-bigint": { - "version": "1.0.4", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/is-bigint/-/is-bigint-1.0.4.tgz", - "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", - "peer": true, - "requires": { - "has-bigints": "^1.0.1" - } - }, - "is-boolean-object": { - "version": "1.1.2", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/is-boolean-object/-/is-boolean-object-1.1.2.tgz", - "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", - "peer": true, - "requires": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - } - }, - "is-callable": { - "version": "1.2.4", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/is-callable/-/is-callable-1.2.4.tgz", - "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==", - "peer": true - }, - "is-date-object": { - "version": "1.0.5", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/is-date-object/-/is-date-object-1.0.5.tgz", - "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", - "peer": true, - "requires": { - "has-tostringtag": "^1.0.0" - } - }, - "is-map": { - "version": "2.0.2", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/is-map/-/is-map-2.0.2.tgz", - "integrity": "sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg==", - "peer": true - }, - "is-negative-zero": { - "version": "2.0.2", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/is-negative-zero/-/is-negative-zero-2.0.2.tgz", - "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", - "peer": true - }, - "is-number-object": { - "version": "1.0.7", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/is-number-object/-/is-number-object-1.0.7.tgz", - "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", - "peer": true, - "requires": { - "has-tostringtag": "^1.0.0" - } - }, - "is-regex": { - "version": "1.1.4", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/is-regex/-/is-regex-1.1.4.tgz", - "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", - "peer": true, - "requires": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - } - }, - "is-set": { - "version": "2.0.2", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/is-set/-/is-set-2.0.2.tgz", - "integrity": "sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g==", - "peer": true - }, - "is-shared-array-buffer": { - "version": "1.0.2", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", - "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", - "peer": true, - "requires": { - "call-bind": "^1.0.2" - } - }, - "is-string": { - "version": "1.0.7", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/is-string/-/is-string-1.0.7.tgz", - "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", - "peer": true, - "requires": { - "has-tostringtag": "^1.0.0" - } - }, - "is-symbol": { - "version": "1.0.4", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/is-symbol/-/is-symbol-1.0.4.tgz", - "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", - "peer": true, - "requires": { - "has-symbols": "^1.0.2" - } - }, - "is-typed-array": { - "version": "1.1.8", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/is-typed-array/-/is-typed-array-1.1.8.tgz", - "integrity": "sha512-HqH41TNZq2fgtGT8WHVFVJhBVGuY3AnP3Q36K8JKXUxSxRgk/d+7NjmwG2vo2mYmXK8UYZKu0qH8bVP5gEisjA==", - "peer": true, - "requires": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "es-abstract": "^1.18.5", - "foreach": "^2.0.5", - "has-tostringtag": "^1.0.0" - } - }, - "is-weakmap": { - "version": "2.0.1", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/is-weakmap/-/is-weakmap-2.0.1.tgz", - "integrity": "sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA==", - "peer": true - }, - "is-weakref": { - "version": "1.0.2", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/is-weakref/-/is-weakref-1.0.2.tgz", - "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", - "peer": true, - "requires": { - "call-bind": "^1.0.2" - } - }, - "is-weakset": { - "version": "2.0.2", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/is-weakset/-/is-weakset-2.0.2.tgz", - "integrity": "sha512-t2yVvttHkQktwnNNmBQ98AhENLdPUTDTE21uPqAQ0ARwQfGeQKRVS0NNurH7bTf7RrvcVn1OOge45CnBeHCSmg==", - "peer": true, - "requires": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.1" - } - }, - "isarray": { - "version": "2.0.5", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/isarray/-/isarray-2.0.5.tgz", - "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", - "peer": true - }, - "ismobilejs": { - "version": "1.1.1", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/ismobilejs/-/ismobilejs-1.1.1.tgz", - "integrity": "sha512-VaFW53yt8QO61k2WJui0dHf4SlL8lxBofUuUmwBo0ljPk0Drz2TiuDW4jo3wDcv41qy/SxrJ+VAzJ/qYqsmzRw==", - "peer": true - }, - "json-logic-js": { - "version": "2.0.2", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/json-logic-js/-/json-logic-js-2.0.2.tgz", - "integrity": "sha512-ZBtBdMJieqQcH7IX/LaBsr5pX+Y5JIW+EhejtM3Ffg2jdN9Iwf+Ht6TbHnvAZ/YtwyuhPaCBlnvzrwVeWdvGDQ==", - "peer": true - }, - "jstimezonedetect": { - "version": "1.0.7", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/jstimezonedetect/-/jstimezonedetect-1.0.7.tgz", - "integrity": "sha512-ARADHortktl9IZ1tr4GHwGPIAzgz3mLNCbR/YjWtRtc/O0o634O3NeFlpLjv95EvuDA5dc8z6yfgbS8nUc4zcQ==", - "peer": true - }, - "jwt-decode": { - "version": "3.1.2", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/jwt-decode/-/jwt-decode-3.1.2.tgz", - "integrity": "sha512-UfpWE/VZn0iP50d8cz9NrZLM9lSWhcJ+0Gt/nm4by88UL+J1SiKN8/5dkjMmbEzwL2CAe+67GsegCbIKtbp75A==", - "peer": true - }, - "lodash": { - "version": "4.17.21", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "peer": true - }, - "moment": { - "version": "2.29.4", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/moment/-/moment-2.29.4.tgz", - "integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==" - }, - "moment-timezone": { - "version": "0.5.34", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/moment-timezone/-/moment-timezone-0.5.34.tgz", - "integrity": "sha512-3zAEHh2hKUs3EXLESx/wsgw6IQdusOT8Bxm3D9UrHPQR7zlMmzwybC8zHEM1tQ4LJwP7fcxrWr8tuBg05fFCbg==", - "peer": true, - "requires": { - "moment": ">= 2.9.0" - } - }, - "native-promise-only": { - "version": "0.8.1", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/native-promise-only/-/native-promise-only-0.8.1.tgz", - "integrity": "sha1-IKMYwwy0X3H+et+/eyHJnBRy7xE=", - "peer": true - }, - "node-fetch": { - "version": "2.6.7", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", - "peer": true, - "requires": { - "whatwg-url": "^5.0.0" - } - }, - "object-inspect": { - "version": "1.12.0", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/object-inspect/-/object-inspect-1.12.0.tgz", - "integrity": "sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g==", - "peer": true - }, - "object-is": { - "version": "1.1.5", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/object-is/-/object-is-1.1.5.tgz", - "integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==", - "peer": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" - } - }, - "object-keys": { - "version": "1.1.1", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "peer": true - }, - "object.assign": { - "version": "4.1.2", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/object.assign/-/object.assign-4.1.2.tgz", - "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", - "peer": true, - "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", - "object-keys": "^1.1.1" - } - }, - "papaparse": { - "version": "5.3.2", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/papaparse/-/papaparse-5.3.2.tgz", - "integrity": "sha512-6dNZu0Ki+gyV0eBsFKJhYr+MdQYAzFUGlBMNj3GNrmHxmz1lfRa24CjFObPXtjcetlOv5Ad299MhIK0znp3afw==" - }, - "parchment": { - "version": "2.0.0-dev.2", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/parchment/-/parchment-2.0.0-dev.2.tgz", - "integrity": "sha512-4fgRny4pPISoML08Zp7poi52Dff3E2G1ORTi2D/acJ/RiROdDAMDB6VcQNfBcmehrX5Wixp6dxh6JjLyE5yUNQ==", - "peer": true - }, - "popper.js": { - "version": "1.16.1", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/popper.js/-/popper.js-1.16.1.tgz", - "integrity": "sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ==" - }, - "quill": { - "version": "2.0.0-dev.4", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/quill/-/quill-2.0.0-dev.4.tgz", - "integrity": "sha512-9WmMVCEIhf3lDdhzl+i+GBDeDl0BFi65waC4Im8Y4HudEJ9kEEb1lciAz9A8pcDmLMjiMbvz84lNt/U5OBS8Vg==", - "peer": true, - "requires": { - "clone": "^2.1.2", - "deep-equal": "^2.0.2", - "eventemitter3": "^4.0.0", - "extend": "^3.0.2", - "parchment": "2.0.0-dev.2", - "quill-delta": "4.2.1" - } - }, - "quill-delta": { - "version": "4.2.1", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/quill-delta/-/quill-delta-4.2.1.tgz", - "integrity": "sha512-Y2nksOj6Q+4hizre8n0dml76vLNGK4/y86EoI1d7rv6EL1bx7DPDYRmqQMPu1UqFQO/uQuVHQ3fOmm4ZSzWrfA==", - "peer": true, - "requires": { - "deep-equal": "^1.0.1", - "extend": "^3.0.2", - "fast-diff": "1.2.0" - }, - "dependencies": { - "deep-equal": { - "version": "1.1.1", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/deep-equal/-/deep-equal-1.1.1.tgz", - "integrity": "sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==", - "peer": true, - "requires": { - "is-arguments": "^1.0.4", - "is-date-object": "^1.0.1", - "is-regex": "^1.0.4", - "object-is": "^1.0.1", - "object-keys": "^1.1.1", - "regexp.prototype.flags": "^1.2.0" - } - } - } - }, - "redux": { - "version": "4.2.0", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/redux/-/redux-4.2.0.tgz", - "integrity": "sha512-oSBmcKKIuIR4ME29/AeNUnl5L+hvBq7OaJWzaptTQJAntaPvxIJqfnjbaEiCzzaIz+XmVILfqAM3Ob0aXLPfjA==", - "peer": true, - "requires": { - "@babel/runtime": "^7.9.2" - } - }, - "regenerator-runtime": { - "version": "0.13.9", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", - "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", - "peer": true - }, - "regexp.prototype.flags": { - "version": "1.4.3", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz", - "integrity": "sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==", - "peer": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "functions-have-names": "^1.2.2" - } - }, - "resize-observer-polyfill": { - "version": "1.5.1", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz", - "integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==" - }, - "side-channel": { - "version": "1.0.4", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", - "peer": true, - "requires": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" - } - }, - "signature_pad": { - "version": "2.3.2", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/signature_pad/-/signature_pad-2.3.2.tgz", - "integrity": "sha512-peYXLxOsIY6MES2TrRLDiNg2T++8gGbpP2yaC+6Ohtxr+a2dzoaqWosWDY9sWqTAAk6E/TyQO+LJw9zQwyu5kA==", - "peer": true - }, - "string-hash": { - "version": "1.1.3", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/string-hash/-/string-hash-1.1.3.tgz", - "integrity": "sha1-6Kr8CsGFW0Zmkp7X3RJ1311sgRs=", - "peer": true - }, - "string.prototype.trimend": { - "version": "1.0.4", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", - "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", - "peer": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" - } - }, - "string.prototype.trimstart": { - "version": "1.0.4", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", - "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", - "peer": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" - } - }, - "strnum": { - "version": "1.0.5", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/strnum/-/strnum-1.0.5.tgz", - "integrity": "sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA==" - }, - "text-mask-addons": { - "version": "3.8.0", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/text-mask-addons/-/text-mask-addons-3.8.0.tgz", - "integrity": "sha1-F7Ye9mWk82gR8uofAaIjtL5hqyY=", - "peer": true - }, - "ticky": { - "version": "1.0.1", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/ticky/-/ticky-1.0.1.tgz", - "integrity": "sha1-t8+nHnaPHJAAxJe5FRswlHxQ5G0=", - "peer": true - }, - "tippy.js": { - "version": "6.3.7", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/tippy.js/-/tippy.js-6.3.7.tgz", - "integrity": "sha512-E1d3oP2emgJ9dRQZdf3Kkn0qJgI6ZLpyS5z6ZkY1DF3kaQaBsGZsndEpHwx+eC+tYM41HaSNvNtLx8tU57FzTQ==", - "peer": true, - "requires": { - "@popperjs/core": "^2.9.0" - } - }, - "tooltip.js": { - "version": "1.3.3", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/tooltip.js/-/tooltip.js-1.3.3.tgz", - "integrity": "sha512-XWWuy/dBdF/F/YpRE955yqBZ4VdLfiTAUdOqoU+wJm6phJlMpEzl/iYHZ+qJswbeT9VG822bNfsETF9wzmoy5A==", - "requires": { - "popper.js": "^1.0.2" - } - }, - "tr46": { - "version": "0.0.3", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=", - "peer": true - }, - "ts-custom-error": { - "version": "3.2.0", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/ts-custom-error/-/ts-custom-error-3.2.0.tgz", - "integrity": "sha512-cBvC2QjtvJ9JfWLvstVnI45Y46Y5dMxIaG1TDMGAD/R87hpvqFL+7LhvUDhnRCfOnx/xitollFWWvUKKKhbN0A==" - }, - "two.js": { - "version": "0.7.1", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/two.js/-/two.js-0.7.1.tgz", - "integrity": "sha512-fycJzwugOsnvmNygQEEOgirHD/Qb1H9hA0VO0zIfoxYlGRdP8D3iCzXo2D5pJaoaVmmdmgiP3XNVy45DjWUutQ==" - }, - "unbox-primitive": { - "version": "1.0.1", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/unbox-primitive/-/unbox-primitive-1.0.1.tgz", - "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==", - "peer": true, - "requires": { - "function-bind": "^1.1.1", - "has-bigints": "^1.0.1", - "has-symbols": "^1.0.2", - "which-boxed-primitive": "^1.0.2" - } - }, - "uuid": { - "version": "8.3.2", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" - }, - "vanilla-picker": { - "version": "2.12.1", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/vanilla-picker/-/vanilla-picker-2.12.1.tgz", - "integrity": "sha512-2qrEP9VYylKXbyzXKsbu2dferBTvqnlsr29XjHwFE+/MEp0VNj6oEUESLDtKZ7DWzGdSv1x/+ujqFZF+KsO3cg==", - "requires": { - "@sphinxxxx/color-conversion": "^2.2.2" - } - }, - "webidl-conversions": { - "version": "3.0.1", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=", - "peer": true - }, - "whatwg-url": { - "version": "5.0.0", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", - "peer": true, - "requires": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, - "which-boxed-primitive": { - "version": "1.0.2", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", - "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", - "peer": true, - "requires": { - "is-bigint": "^1.0.1", - "is-boolean-object": "^1.1.0", - "is-number-object": "^1.0.4", - "is-string": "^1.0.5", - "is-symbol": "^1.0.3" - } - }, - "which-collection": { - "version": "1.0.1", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/which-collection/-/which-collection-1.0.1.tgz", - "integrity": "sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A==", - "peer": true, - "requires": { - "is-map": "^2.0.1", - "is-set": "^2.0.1", - "is-weakmap": "^2.0.1", - "is-weakset": "^2.0.1" - } - }, - "which-typed-array": { - "version": "1.1.7", - "resolved": "https://nexus.tools.services.qld.gov.au/nexus/repository/npm_all/which-typed-array/-/which-typed-array-1.1.7.tgz", - "integrity": "sha512-vjxaB4nfDqwKI0ws7wZpxIlde1XrLX5uB0ZjpfshgmapJMD7jJWhZI+yToJTqaFByF0eNBcYxbjmCzoRP7CfEw==", - "peer": true, - "requires": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "es-abstract": "^1.18.5", - "foreach": "^2.0.5", - "has-tostringtag": "^1.0.0", - "is-typed-array": "^1.1.7" - } - } } } diff --git a/.github/workspace/prem/package.json b/.github/workspace/prem/package.json index 4f5ba1c3..21dc131f 100644 --- a/.github/workspace/prem/package.json +++ b/.github/workspace/prem/package.json @@ -30,7 +30,7 @@ }, "devDependencies": {}, "dependencies": { - "@formio/premium": "1.19.0-rc.3", + "@formio/premium": "1.19.1", "moment": "^2.29.4" } } diff --git a/.github/workspace/prem/pom.xml b/.github/workspace/prem/pom.xml index 2f5f6067..6ae2af5e 100644 --- a/.github/workspace/prem/pom.xml +++ b/.github/workspace/prem/pom.xml @@ -11,9 +11,9 @@ pom - 1.12.1 - v16.14.2 - 8.5.0 + 1.13.4 + v18.16.1 + 9.5.1 diff --git a/lib/formio.changlog.md b/lib/formio.changlog.md index 90cfb25d..251f72e8 100644 --- a/lib/formio.changlog.md +++ b/lib/formio.changlog.md @@ -4,381 +4,394 @@ All notable changes to this project will be documented in this file The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). -## 4.14.10 +## 4.15.1 ### Changed - Official Release -## 4.14.10-rc.3 +## 4.15.1-rc.4 ### Changed - - FIO-5430 Fixed datetime not being initialized when there are multiple… - - FIO-5430 Fixed datetime not being initialized when there are multiple… + - Revert "FIO-4876 fixed the display of current submission for pdf download" -## 4.14.10-rc.2 +## 4.15.1-rc.3 +### Fixed + - FIO-7054: Fixes an issue where after saving Wizard Panel settings, some of them disappear + +## 4.15.1-rc.2 ### Changed - - FIO-5674: fixed broken positioning of the data table on the submissio… - - FIO-4194: fixed submit button for PDF in FVP + - FIO-7030: Fixes an issue where Wizard pages are displayed in one line in the for builder + - FIO-7049 fixed data populating in the Data Table + - FIO-6840: change unique validation for email comps and certain textfield comps -## 4.14.10-rc.1 +## 4.15.1-rc.1 ### Changed - - FIO-5418: Fixes checkbox values in edit grid not translated + - FIO-5527: Fixed an issue where value in TextArea with wysiwyg editor is not getting cleared on reset + - FIO-6901 Fixed custom headers not being passed through custom request… -## 4.14.9 +## 4.15.0 ### Changed - Official Release + - Updated @formio/bootstrap3@2.12.3 + - Updated @formio/semantic@2.6.1 -## 4.14.9-rc.17 +## 4.15.0-rc.27 ### Changed - - FIO-5431 Fixed Quill editor losing data after switching to source vie… + - FIO-6965 fixed file upload via pdf proxy + - FIO-6165 Updated help link for signature component -## 4.14.9-rc.16 -### Changed - - Revert change to always execute apis on pdf output. +## 4.15.0-rc.26 +### Fixed + - FIO-6895: fixed interpolation for falsy values -## 4.14.9-rc.15 +## 4.15.0-rc.25 ### Changed - - FIO-3814 fixed fetch data several times when RefreshOnBlur + - FIO-6156 Updated help links according to the new documentation structure + - FIO-6892: Temporarely hide the Addons tab + - FIO-6762 added ValueProperty validation + - FIO 6582 - fix bug in auto-focused TextArea components -## 4.14.9-rc.14 -### Changed - - Upgrade vanilla text mask and text-mask addons. -## 4.14.9-rc.13 +## 4.15.0-rc.24 +## Fixed + - FIO-6871: fixed tests + +## 4.15.0-rc.23 +### Changed + - FIO-6760:fixed an issue where in select component when use resource multiple values data isn't rendered correctly + - FIO-5263: Fixed issues with keyboard controls for formbuilder + - FIO-6800: fixed issue where select dropdowns go behind the component settings modal + - FIO-6600: fixed opening of the settings window + - FIO-6661: Fixed DateTime widget throwing an error and not switching la… + - FIO-6654: fixed UI issue with Checkbox condition + - FIO-5398: Fixes special characters not escaped in regex is Select search field + +## 4.15.0-rc.22 +### Added + - FIO-5042: Logout feature for OIDC + +### Changed + - FIO-6675/6676: Fixes issues where wizard page is getting removed regardless user confirmed removement or canceled it… + - FIO-6711: FormIo-angular can edit PDF form in Chrome + - FIO-2088: updated formio-flatpickr version and fixed eslint warnings + - FIO-6766: Removed from submission flag check + - FIO-4232: fixed an issue where form controller does not work for wizard forms in builder + - FIO-6761 removed Storage Type setting for Radio + - FIO-4500: Fixes an issue where specified in the component settings delimiter is not used for CSVExport of Tags component data + - FIO-6512 cannot drag and drop components on to pdf first forms using mac + + +## 4.15.0-rc.21 +### Changed + - FIO-4230 Fixed label display for Button component inside DataGrid + - FIO-6475: fixed an issue for archieved plan where error message is no… + - FIO-6668: fixed display of choices__list dropdown + - FIO-6582: Eliminates race condition between text editor events. + - FIO-4876 fixed the display of current submission for pdf download + +## 4.15.0-rc.20 +### Fixed + - FIO-5048: Number currency components mutiple modal do not show preview + - FIO-5086: Date/Time component allows to submit any string and the server-side validation is not triggered + - FIO-6345: Add rel=noopener to Portal Application Links to Docs / External Links + - FIO-6453 adding sanitization inside error message container + - FIO-5967: fixed issue with setting [object Object] to html options + - FIO-6533: fixed an issue where file upload hash causing delays in file uploads + - FIO-5318: Fixes wrong attributes appearing for Radio component during performance + - FIO-6009 When checkboxes set as radio, conditional logic is triggered upon deselect + - FIO-5967: Fixing issues with selectData saving correctly for pdf down… + - FIO-6616: Fixed issue where the select templates were not getting set… + - FIO-5986 Added check for identical uploaded file + - FIO-6407 Updated tests for Select Component + - Fio 6009 when checkboxes set as radio, conditional logic isn't triggered upon deselect + +## 4.15.0-rc.19 +### Fixed + - Added basic keyboard accessibility for formbuilder + - FIO-5027: Fixes an issue where an asterisk is not shown for the required modal Checkbox + - Fio 5272: use the url data source type for radio buttons and select boxes + - FIO-6148: fixed an issue where boxsign returns an error when editing submission + - FIO-6191: Fixed an issue where addons are not created + - FIO-4429: Add support for pdf auto conversion fields assignment + - FIO-6229: fixed displaying html value on Data tab for inputFormat plain + - Fixing an issue where Radio button fragility would sometimes reset th… + - FIO-6193: Moved plan info into tooltips for encrypted fields + - FIO-6301: Fixed Signature component UI when label is shown and it is r… + - FIO-6323: updated version of the quill library + - FIO-6339: Ensure file upload titles formatted correctly + - FIO-6193: Changed tooltip copy for encrypted fields + - FIO-6431: fixed display of premium components using Quick Inline Embed link + - FIO-6469: Double quotes (") turned to single quotes (') in placeholder text + - FIO-6468: Custom_validation_on_Day_component_confusing_Day_and_Year + - FIO-6512: cannot drag and drop components on to pdf first forms using mac + +## 4.15.0-rc.18 +### Changed + - Fixing the formio.js build with choices.js minified styles being malf… + +## 4.15.0-rc.17 +### Changed + - Updated @formio/bootstrap3@2.12.3-rc.1 + - Updated @formio/semantic@2.6.1-rc.1 + - Updated @formio/choices.js@10.2.0 + +### Added + - FIO-5474: added new simple conditionals + +### Fixed + - FIO-5995: Timezones url fixed + - FIO-6005: Fixing multiple issues with DateTime not showing correct ti + - FIO-5750: Fixing timezones in emails. + - FIO-6088: Fixing datetime issues with the calendar widget. + - FIO-5937: fixed an issue where validation errors donot keep for panel child components after expanding collapsible panel + - FIO-6084: fixed CalendarWidget locale loading + - FIO-5511: ensure contextual row data is validated correctly for nested components + - FIO-5369: fixed an issue where clicking on the tooltip enables the checkboxes on the component settings page + - FIO-5246: fixed unique validation for submission with draft state + - FIO-5335: fixed an issue where logic triggered by events does not work for hidden nested components + - FIO-5288: fixed an issue where existing resource not saving property name correctly + - FIO-4956: fixed an issue where on view submission tab long text values not split up by spaces are displayed in one line + - FIO-5408 added ability to drag the pages icons + - Reverts FIO-4705: fixed an issue with bad request error in console when render pdf form + - FIO-5460: fixed an issue where blur and focus events are not fired for select and address components + - FIO-5811: added scrollup to button next wizard if has error + - FIO-5904: fixed saving data for Components outside of Wizards + - FIO-3295: fixed an issue where data grid group rows were not hidden on the row click when bootstrap 4 is used + - FIO-5785: Fixed Select component submission showing id instead of template for URL data source + - FIO-6078: Hidden Select Boxes validation do not prevent submission + - FIO-6100: Provide submission object to value calculation (eg. To relate to submission metadata in calculation) + - FIO-4343: Fixes datagrid reorder, remove row and drop new component columns using much space + - FIO-6001: fixed an issue where oauth action does not work for buttons inside layout/data components + - FIO-4664: Added tests for conditionals based on Address component + - FIO-5853: added setting to disable autocomplete + - FIO-5963: preset submission value with value property before request for pdf + - FIO-5685: made Data in Select with Entire Object to set as an object + - FIO-5262: added option not to make new api requests when scrolling through search results + - FIO-4551: added unique IDs for components inside nested components + - fixed eslint errors and warnings + - fixed render tests based on changes in latest PRs + - FIO-5811: added scroll up if got error in wizard (improved solution) + - FIO-5992 added formio/core library + - FIO-6220: added some new methods to CDN class + - FIO-6621: added rc version determination for cdn url + - FIO-6029: update choices.js + +## 4.15.0-rc.16 +### Fixed + - FIO-5627: fixed an issue where manual input does not work for date with full month format + - CDN Updates + - FIO-5784: allow quick inline embed to pull in premium components from a deployed environment + - flatpickr-vpat replaced with flatpickr-formio + - FIO-5999: flatpickrType replaced with flatpickr-formio + - FIO-5784: fixed adding links for libs + - FIO-5765: fixed render tests for Bootstrap 5 in html mode + - FIO-5765: fixed tests + +## 4.15.0-rc.15 ### Fixed + - Revert change to always execute apis on pdf output. + - FIO-5431: Fixed Quill editor losing data after switching to source view and back. + - FIO-5674: fixed broken positioning of the data table on the submission + - FIO-4194: fixed submit button for PDF in FVP + - FIO-5430: Fixed datetime not being initialized when there are multiple ones on the form while translations are enabled + - FIO-4777: Fixed issue where a loader icon is showing when file component is used in PDF first forms. + - FIO-4777: added test + - FIO-5697: fixed PDF is not showing borders in Data Grids + - FIO-4824: added overflow property to the datagrid component + - FIO-5792: fixed Caret position for ACE editor + - FIO-5233: fixed an issue where users in different timezones have diff + - FIO-4824: fixed tests for datagrid component + - FIO-5784: Allow Quick Inline Embed to pull Premium + - FIO-5895: fixed an issue where value of radio component inside data grid disappears after submission + - FIO-5872: fixed an issue where Wizard page navigation buttons are centered in some templates + - FIO-5628: fixed an issue where datetime component value is changed on blur when time is disabled + - FIO-5949: fixed data presentation on View submission + - FIO-4447: Bootstrap 5 support + +## 4.15.0-rc.14 +### Added + - FIO-5272: added URL dataSrc for Radio , Select boxes + +### Fixed + - FIO-4799: fixed property value is not set by default and causes the values as 'undefined' + - FIO-2505: Fixes Signature changing size when inside DataGrid on new row adding + - FIO-5053: fixed an issue where data with widget type html5 does not does not display and empty value displays as [Object object] + - FIO-5139: fixed an issue where api validation is not working for select component + - FIO-5142: Fixed resource select data not showing on View Submission page and pdf + - FIO-4799: updated code for Property Value is not set by default and show as 'undefined' + - FIO-3973: Fixes an issue where the invalidRowsError is set to the wrong element when an EditGrid has an opened row + - FIO-5142: fixed an issue where resource select data not showing on view submission and pdf download + - FIO-4405: fixed an issue where walidation error displays with empty value even if it is not required + - fix button loader icon removal at an unexpected event + - FIO-4949: done disable auto fill in browser + - FIO-4886: Fixes value calculation not working for nested forms + - FIO-4876 added condition for displaying the current form revision + - FIO-4816: email-submission-data-display-issues + - FIO-4752: Added autoscroll when dragging components inside of formbuilder + - FIO-4664: Fixed conditional logic based on Address component + - FIO-4629: fixed signature displaying in pdf form + - FIO-3258: fixed when user has to click twice on edit page to change Radio select + - FIO-5178: fixed emitting events from HTML component with Refresh On Change + - FIO-5057: added undefined check for TemplateData + - FIO-4820: Fixes an issue where API key of the component resets after changing some value labels on the Data tab + - FIO-4814: Ability to configure formio to store x-jwt-token in sessionStorage + - FIO-4603: fixed an issue where after closing the error message upload box is missing until refreshing the page + - FIO-5152: fixed an issue where value of html element displays differently on pdf download and form builder pages + - FIO-4814: Fixes form creation failed due to useSessionToken property read on undefined options object + - FIO-4764: Fixed issue with loading zones, added test for showing date in timezone + - FIO-2677: Pass options object to getSubmission as they may include request options + - FIO-4705: fixed an issue with bad request error in console when render pdf form + - FIO-5361: Fixes can not get user info when sesion token configured and session token config not dropped on log out + - FIO-4392: fixed Help links + - FIO-5370: Fixes quick inline embed section broken because of wrong embed form url + - FIO-5082: Label adjustments for PDF condensed mode + - FIO-4943: Fixed an issue where Content component displays wrongly in the build mode when no content is entered + - FIO-4153: fixed when calendar widget local settings not saving + - FIO-3448: Fixes an issue where Keep Overlay Aspect Ratio Signature option does not work in PDF forms - FIO-5234: avoid lazy load flatpickr if it is already available in the window - -## 4.14.9-rc.12 -### Changed - - FIO-5455: Fixes context variables not available in datetime custom disabled dates config - -### Fixed - - FIO-5544: added sticky property to the form components when building forms - -## 4.14.9-rc.11 -### Changed - - FIO-4684: Fixes extra pdf redraw after resources fetch - - FIO-3268 fixed submit button for viewer - - FIO-3268 fixed submit button for viewer - - FIO-3268 fixed submit button for viewer - - FIO-5044: Removed Dropbox for Next Portal - - FIO-5069: API driven dataTable - - FIO-5107: fix button loader icon removal at unexpected event (#4714) - -## 4.14.9-rc.10 -### Changed + - FIO-5399: Make formio use flatpickr script from test cdn for non-production builds + - FIO-5436: Fix incorrect signature size setting - FIO-5266: Fixes flatpickr initialization happend prior to localization script loaded and calendar translations not applied - FIO-5301: Added localization to the builder components search field - - FIO-5399: Make formio use flatpickr script from test cdn for non-production builds + - FIO-5418: Fixes checkbox values in edit grid not translated - FIO-5417: Fixes multiple calendar widgets could be opened at same time - - FIO-5436: Fix incorrect signature size setting - - FIO-2971: fixed an issue table tooltip text of clone row components o… + - FIO-2971: fixed an issue table tooltip text of clone row components option is not fully visible - FIO-4764: Fix date format that prevent saving in ISO standard - FIO-5415 Fixed component settings not fitting in in some cases - -### Fixed - FIO-3308: fixed an issue where all checkboxes (radio type) are displayed as selected in email submissions when user selects just one - - FIO-5418: Fixes checkbox values in edit grid not translated - -## 4.14.9-rc.9 -### Changed - - FIO-5234: avoid lazy load flatpickr if it is already available in the… - - FIO-5234: avoid lazy load flatpickr if it is already available in the… - -## 4.14.9-rc.8 -### Changed - - FIO-3448: Fixes an issue where Keep Overlay Aspect Ratio Signature option does not work in PDF forms - -## 4.14.9-rc.7 -### Changed - - FIO-4943: Fixed an issue where Content component displays wrongly in the build mode when no content is entered - - FIO-4153: fixed when calendar widget local settings not saving - -## 4.14.9-rc.6 -### Changed - - FIO-5082 Label adjustments for PDF condensed mode - -## 4.14.9-rc.5 -### Changed - - FIO-4705: fixed an issue with bad request error in console when rende… - - FIO-4705: fixed an issue with bad request error in console when rende… - - FIO-5361: Fixes can not get user info when sesion token configured and session token config not dropped on log out - - FIO-4392 fixed Help links - - FIO-5149: fixed the structure of the custom component with tree parameter - - FIO-5370: Fixes quick inline embed section broken because of wrong embed form url - -## 4.14.9-rc.4 -### Changed - - FIO-4218: fixed an issue where error message isn't showing in modal window - - FIO-4500: Fixes an issue where a wrong delimiter is shown in the Submission view and expoted data - - FIO-4500: Fixes an issue where a wrong delimiter is shown in the Submission view and expoted data - - fixed Help links - - FIO-4704: fixed an issue with form builder where custom group in the … - - FIO-4395: Fixed typos - - FIO-4851: fixed when 'Multiple Values' setting is enabled, all the selected val… - - FIO-4764: Fixed issue with loading zones, added test for showing date in timezone - - FIO-4629: fixed signature displaying in pdf form - - FIO-4949: done disable auto fill in browser - - FIO-4886: Fixes value calculation not working for nested forms - -## 4.14.9-rc.3 -### Changed - - FIO-4218: fixed an issue where error message isn't showing in modal window - - FIO-4500: Fixes an issue where a wrong delimiter is shown in the Submission view and expoted data - - FIO-4500: Fixes an issue where a wrong delimiter is shown in the Submission view and expoted data - - fixed Help links - - FIO-4704: fixed an issue with form builder where custom group in the … - - FIO-4395: Fixed typos - - FIO-4851: fixed when 'Multiple Values' setting is enabled, all the selected val… - - FIO-4764: Fixed issue with loading zones, added test for showing date in timezone - - FIO-4629: fixed signature displaying in pdf form - - FIO-4949: done disable auto fill in browser - - FIO-4886: Fixes value calculation not working for nested forms + - FIO-5044: Removed Dropbox for Next Portal + - FIO-5069: API driven dataTable + - FIO-5455: Fixes context variables not available in datetime custom disabled dates config + - FIO-5544: added sticky property to the form components when building forms + - Upgrade vanilla text mask and text-mask addons. + - FIO-3814: fixed fetch data several times when RefreshOnBlur + +## 4.15.0-rc.13 +### Added + - FIO-4836: hash was added to file ### Fixed - - FIO-4225: fixed an issue where last selected/entered value from multiple values is highlighted as error value, when Date/Time is required - - FIO-3939 Fixed content of the Content component not being translated - -## 4.14.9-rc.2 -### Changed - - FIO-5152: fixed an issue where value of html element displays differe… - - FIO-5152: fixed an issue where value of html element displays differe… - -## 4.14.9-rc.1 -### Changed - - FIO-4603: fixed an issue where after closing the error message upload… - - FIO-5057 added undefined check for TemplateData - - FIO-4814: Ability to configure formio to store x-jwt-token in sessionStorage - - FIO-5149: fixed processing of custom component using complex data - - FIO-4820: Fixes an issue where API key of the component resets after changing some value labels on the Data tab - - FIO-5178 fixed emitting events from HTML component with Refresh On Ch… - -## 4.14.8 -### Changed - - Official Release - -## 4.14.8-rc.12 -### Changed - - FIO-5142: fixed an issue where resource select data not showing on vi… - -## 4.14.8-rc.11 -### Changed - - FIO-3973: Fixes an issue where the invalidRowsError is set to the wrong element when an EditGrid has an opened row + - FIO-4942: fixed email submission: Custom PDF File Name is not respected + - FIO-4997: extended check for execution on the server side for tabs component + - FIO-4861: fixed restored revision node + - FIO-4976: Fixes select resource data not showing on submission + - FIO-5053: fixed an issue where select data with html5 widget type is not showing on view or pdf download after submission + - FIO-5003: fixed that the radio with the value "false" is not displayed in different templates. + - FIO-4970: reduced limit query parameter value for resource requests + - FIO-5053: fixed an issue where empty value with html5 widget type not showing on pdf download + - FIO-5117: Reverts change where Number component empty value was getting set to empty string instead of null. +## 4.15.0-rc.12 ### Fixed - - FIO-4799: updated code for Property Value is not set by default and show as ‘undefined' + - FIO-4953: Fixed an issue where signature component was not populating -## 4.14.8-rc.10 +## 4.15.0-rc.11 ### Changed - - FIO-5139: fixed an issue where api validation is not working for sele… + - Updated @formio/bootstrap3@2.12.2 +## 4.15.0-rc.10 ### Fixed - - FIO-5142: Fixed resource select data not showing on View Submission page and pdf. + - FIO-4851: fixed when 'Multiple Values' setting is enabled, all the selected values display as the last -## 4.14.8-rc.9 -### Changed - - FIO-4799: fixed property value is not set by default and causes the v… - - FIO-2505: Fixes Signature changing size when inside DataGrid on new row adding - - FIO-5053: fixed an issue where data with widget type html5 does not d… +## 4.15.0-rc.9 +### Fixed + - Fixed the signature pad. -## 4.14.8-rc.8 +## 4.15.0-rc.8 ### Changed - - Revert "Number: fix not present in submission if empty" + - Updated @formio/bootstrap3@2.12.2-rc.1 -## 4.14.8-rc.7 ### Fixed + - FIO-4815: Fixed an issue where submission of the form with Tabs component fails + - FIO-4225: fixed an issue where last selected/entered value from multiple values is highlighted as error value, when Date/Time is required + - FIO-4218: fixed an issue where error message isn't showing in modal window - FIO-3557: Added logic to encrypted checkbox to disable and show tooltip when SAC is false - -## 4.14.8-rc.6 -### Changed - - FIO-5003: fixed that the radio with the value "false" is not displaye… - - FIO-4970: reduced limit query parameter value for resource requests - - FIO-5053: fixed an issue where empty value with html5 widget type not… - - FIO-5053: fixed an issue where empty value with html5 widget type not… - -## 4.14.8-rc.5 -### Changed + - FIO-4559: Fixed issue where infinite loop would trigger if value is not changed with 'this.dataValue = value' + - FIO-3939: Fixed content of the Content component not being translated + - FIO-3408: Fix showing security error for IE11 + - FIO-3442: Fixes an issue where EditGrid opens another row while editing after some rows have been deleted + - FIO-4500: Fixes an issue where a wrong delimiter is shown in the Submission view and expoted data + - FIO-4392: fixed Help links + - FIO-3924: Fixes an issue where the DataGrid has an additional column wwhen "Equal columns width" is checked - FIO-4628: Fixes file statuses replaced on new upload when multiple values configuration - -## 4.14.8-rc.4 -### Fixed - - Issues with import from signature_pad that was breaking server side imports. - -## 4.14.8-rc.3 -### Changed - - FIO-4559: Fixed issue where infinite loop would trigger if value is n… + - FIO-4232: Fixed form controller inside wizard forms + - FIO-4672: View tab shows data when PUT request using POSTMAN + - FIO-4684: Fixes extra pdf redraw after resources fetch + - FIO-3268: fixed submit button for viewer + - FIO-4704: fixed an issue with form builder where custom group in the sidebar is stuck after deleting all symbols from the search field - FIO-4750: fixed custom buttons do not work on 1st click + - FIO-4444: Autofocuse Label property in the component settings + - FIO-4794: Fixes hidden component with clearOnHide and logic with action to set value caused infinite loop + - FIO-3345: Fixes an issue where subpathes of the Tagpad's components do not include its key + - FIO-4395: Fixed typos + - Update translations for aria-labels + - Allow customization of edit grid error messages + - FIO-4352: Added independent scroll for builder sidebar if it is longer than viewport + - fixed an issue where error appears when reordering datagrid rows + - FIO-4364: fixed displaying defaultData instead of empty data -## 4.14.8-rc.2 -### Changed - - FIO-5053: fixed an issue where select data with html5 widget type is … - -## 4.14.8-rc.1 -### Changed - - FIO-4359 submission revisions - - FIO-4359 submission revisions - - FIO-4359 submission revisions - - FIO-4359 submission revisions - - FIO-4359 submission revisions - - FIO-4997: extended check for execution on the server side for tabs component - - FIO-4861: fixed restored revision node - - FIO-4976: Fixes select resource data not showing on submission - -### Changed - - Moved 4.14.7-rc.4 to 4.14.8-rc.1 - -### Fixed - - FIO-4953: fixed signature is deleted when saving and validation is not passing. - -## 4.14.7-rc.4 -### Changed - - FIO-4942: fixed email submission: Custom PDF File Name is not respected - -## 4.14.7-rc.3 -### Changed - - Rebuild. - -## 4.14.7-rc.2 -### Changed - - FIO-4743: Fixed issue where "||" is not allowed for interpolate with … - - fixed displaying defaultData instead of empty data - - FIO-4953: Fixed an issue where signature component was not populating… - -### Changed - - New build. - +## 4.15.0-rc.7 ### Fixed - - FIO-4836: hash was added to file - -## 4.14.6 -### Changed - - Official Release - - Updated @formio/bootstrap3@2.12.2 - -## 4.14.6-rc.3 -### Changed - - FIO_3924: Fixes an issue where the DataGrid has an additional column wwhen "Equal columns width" is checked - -## 4.14.6-rc.2 -### Changed - - Updated @formio/bootstrap3@2.12.2-rc.1 - -## 4.14.6-rc.1 -### Changed - - Fixed an issue where submission of the form with Tabs component fails - -## 4.14.5 -### Changed - - Official Release - -## 4.14.5-rc.1 -### Changed - - FIO-4681: limited table wight - -## 4.14.4 -### Changed - - Official Release - -## 4.14.4-rc.1 -### Changed - - Fixing a browser crash with error message re-assignment. - -## 4.14.3 -### Changed - - Official Release - -## 4.14.3-rc.4 -### Changed + - FIO-4763: Select in Data/Edit Grid: Cannot make a submission. Get 'key editGrid[0].select must not contain '.') + - FIO-4398: Fixed issues where HTML text area in datagrid changes were causing infinite loop issues. - FIO-4763: Fixed issues with Select not setting data properly in metadata. - - FIO-4398: Fixed issues where HTML text area in datagrid changes were … - -## 4.14.3-rc.3 -### Changed - - [FIO-4763] Select in Data/Edit Grid: Cannot make a submission. Get 'key editGrid[0].select must not contain '.') - -## 4.14.3-rc.2 -### Changed - - FIO-4632: Fixing the DateTime widget to work with saveAs date and tex… + - Fixing a browser crash with error message re-assignment. + - FIO-4681: limited table wight -## 4.14.3-rc.1 +## 4.15.0-rc.6 ### Fixed + - FIO-4743: Fixed issue where "||" is not allowed for interpolate with non-url select dropdown templates. - Ensure that we properly read the selectData from the select component. + - FIO-4632: Fixing the DateTime widget to work with saveAs date and text correctly. -## 4.14.2 -### Changed - - Official Release - -## 4.14.2-rc.3 +## 4.15.0-rc.5 ### Fixed - - FIO-4743: Fixed issue where "||" is not allowed for interpolate with non-url select dropdown templates. - -## 4.14.2-rc.2 -### Changed + - Adding selectData to metadata to resolve templates that require more data than is set in the submission. - FIO-3435: Fixed an issue where form revisions would not load properly. -## 4.14.2-rc.1 -### Changed - - Adding selectData to metadata to resolve templates that require more … - -## 4.14.1 +## 4.15.0-rc.4 ### Changed - - Official Release - Updated @formio/bootstrap3@2.12.1 -## 4.14.1-rc.17 -### Changed - - FIO-4698: Fixed html tags not working in tooltips. - -## 4.14.1-rc.16 -### Changed - - FIO-4037: Fixed issues with calculated values so that they do not re-… - -## 4.14.1-rc.15 -### Changed - - FIO-4691: Fixed issues where calculated values would not re-calculate… - - FIO-4693: Fixed issue where input validation would not clear when no … - - FIO-4690: Fixed issues where wizard transformPages was causing crashes. - -## 4.14.1-rc.14 -### Changed - - FIO-4671: Resolved issues where pdf builder would show loading consta… - -## 4.14.1-rc.13 -### Changed +### Fixed + - Failing tests. + - FIO-4632: Fixed the date return to always be a string - FIO-4419: Time fields in Safari - - FIO-4558: fixed an issue where word 'select' with empty rows displays… - - FIO-2864: fixed an issue where tooltip not showing text into double q… - - FIO-4658: Fix the select dropdown for resources without save-as-refer… - - Fixed validation for protected field - - FIO-4632: Fixed the date return to always be a string. - -## 4.14.1-rc.12 -### Changed - - FIX Vertical Right Wizard Header. - - FIO-4631 Fixed tippy.js tooltips - - FIO-4632: Fixing the calendar widget to properly format all ISO time … - -## 4.14.1-rc.11 -### Changed - - FIO-4558: fixed an issue where html element displays error if contain… - - FIO-4632: Fixing date/time to work without time enabled. + - FIO-4558: fixed an issue where word 'select' with empty rows displays error inside HTML element + - FIO-2864: fixed an issue where tooltip not showing text into double quotes + - FIO-4658: Fix the select dropdown for resources without save-as-reference checked from saving incorrect data. + - FIO-4565: Fixed validation for protected field + - FIO-4671: Resolved issues where pdf builder would show loading constantly + - FIO-4691: Fixed issues where calculated values would not re-calculate when allow manual override is checked. + - FIO-4693: Fixed issue where input validation would not clear when no errors are present. + - FIO-4690: Fixed issues where wizard transformPages was causing crashes. + - FIO-4037: Fixed issues with calculated values so that they do not re-calculate once the value has been committed or modified. + - FIO-4698: Fixed html tags not working in tooltips. -## 4.14.1-rc.10 +## 4.15.0-rc.3 ### Fixed - - FIO-4443: Fixed signature component when generating pdf forms.. + - FIO-4632: Fixing date/time to work without time enabled. + - FIO-4632: Fixing the calendar widget to properly format all ISO time + - FIO-4558: fixed an issue where html element displays error if contains only word select + - FIO-4631: Fixed tippy.js tooltips + - FIO-4311: FIX Vertical Right Wizard Header. -## 4.14.1-rc.9 +## 4.15.0-rc.2 ### Changed - Updated @formio/bootstrap3@2.12.1-rc.1 + +### Fixed + - FIO-560: Fixes an issue where CKEditor media is not shown in the view mode - FIO-4579: Fixed extracting valueProperty from template - FIO-4567: Fixes can't draw on Signature component on form load and size changing inside DataGrid - FIO-4573: exclude using of zero form revision - - FIO-4571:Fixea an issue where tooltips do not appear on hover in the component setting modal - - FIO-2645 Made clicking on the error of Container component redirect t… - - FIO-4595 | 4364: Fixes Select with URL keeping default value on pdf submission - - FIO-4362: Fixed issues with checkbox set as radio type. + - FIO-4571: Fixea an issue where tooltips do not appear on hover in the component setting modal + - FIO-2645: Made clicking on the error of Container component redirect to it. + - FIO-4595, FIO-4364: Fixes Select with URL keeping default value on pdf submission + - FIO-4362: Fixed issues with checkbox set as radio type. - FIO-4615: Fixing issues with calendar widget with save as text. -### Fixed - - FIO-560: Fixes an issue where CKEditor media is not shown in the view mode +## 4.15.0-rc.1 +### Changed + - FIO-4359: submission revisions ## 4.14.1-rc.8 ### Fixed diff --git a/lib/formio.full.css b/lib/formio.full.css index 472cbd2f..4bdf83fa 100644 --- a/lib/formio.full.css +++ b/lib/formio.full.css @@ -1,4 +1,4 @@ -.choices{position:relative;margin-bottom:24px;font-size:16px}.choices:focus{outline:0}.choices:last-child{margin-bottom:0}.choices.is-disabled .choices__inner,.choices.is-disabled .choices__input{background-color:#eaeaea;cursor:not-allowed;-webkit-user-select:none;-ms-user-select:none;user-select:none}.choices.is-disabled .choices__item{cursor:not-allowed}.choices [hidden]{display:none!important}.choices[data-type*=select-one]{cursor:pointer}.choices[data-type*=select-one] .choices__inner{padding-bottom:7.5px}.choices[data-type*=select-one] .choices__input{display:block;width:100%;padding:10px;border-bottom:1px solid #ddd;background-color:#fff;margin:0}.choices[data-type*=select-one] .choices__button{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjMDAwIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yLjU5Mi4wNDRsMTguMzY0IDE4LjM2NC0yLjU0OCAyLjU0OEwuMDQ0IDIuNTkyeiIvPjxwYXRoIGQ9Ik0wIDE4LjM2NEwxOC4zNjQgMGwyLjU0OCAyLjU0OEwyLjU0OCAyMC45MTJ6Ii8+PC9nPjwvc3ZnPg==);padding:0;background-size:8px;position:absolute;top:50%;right:0;margin-top:-10px;margin-right:25px;height:20px;width:20px;border-radius:10em;opacity:.5}.choices[data-type*=select-one] .choices__button:focus,.choices[data-type*=select-one] .choices__button:hover{opacity:1}.choices[data-type*=select-one] .choices__button:focus{box-shadow:0 0 0 2px #00bcd4}.choices[data-type*=select-one] .choices__item[data-value=''] .choices__button{display:none}.choices[data-type*=select-one]:after{content:'';height:0;width:0;border-style:solid;border-color:#333 transparent transparent;border-width:5px;position:absolute;right:11.5px;top:50%;margin-top:-2.5px;pointer-events:none}.choices[data-type*=select-one].is-open:after{border-color:transparent transparent #333;margin-top:-7.5px}.choices[data-type*=select-one][dir=rtl]:after{left:11.5px;right:auto}.choices[data-type*=select-one][dir=rtl] .choices__button{right:auto;left:0;margin-left:25px;margin-right:0}.choices[data-type*=select-multiple] .choices__inner,.choices[data-type*=text] .choices__inner{cursor:text}.choices[data-type*=select-multiple] .choices__button,.choices[data-type*=text] .choices__button{position:relative;display:inline-block;margin:0 -4px 0 8px;padding-left:16px;border-left:1px solid #008fa1;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yLjU5Mi4wNDRsMTguMzY0IDE4LjM2NC0yLjU0OCAyLjU0OEwuMDQ0IDIuNTkyeiIvPjxwYXRoIGQ9Ik0wIDE4LjM2NEwxOC4zNjQgMGwyLjU0OCAyLjU0OEwyLjU0OCAyMC45MTJ6Ii8+PC9nPjwvc3ZnPg==);background-size:8px;width:8px;line-height:1;opacity:.75;border-radius:0}.choices[data-type*=select-multiple] .choices__button:focus,.choices[data-type*=select-multiple] .choices__button:hover,.choices[data-type*=text] .choices__button:focus,.choices[data-type*=text] .choices__button:hover{opacity:1}.choices__inner{display:inline-block;vertical-align:top;width:100%;background-color:#f9f9f9;padding:7.5px 7.5px 3.75px;border:1px solid #ddd;border-radius:2.5px;font-size:14px;min-height:44px;overflow:hidden}.is-focused .choices__inner,.is-open .choices__inner{border-color:#b7b7b7}.is-open .choices__inner{border-radius:2.5px 2.5px 0 0}.is-flipped.is-open .choices__inner{border-radius:0 0 2.5px 2.5px}.choices__list{margin:0;padding-left:0;list-style:none}.choices__list--single{display:inline-block;padding:4px 16px 4px 4px;width:100%}[dir=rtl] .choices__list--single{padding-right:4px;padding-left:16px}.choices__list--single .choices__item{width:100%}.choices__list--multiple{display:inline}.choices__list--multiple .choices__item{display:inline-block;vertical-align:middle;border-radius:20px;padding:4px 10px;font-size:12px;font-weight:500;margin-right:3.75px;margin-bottom:3.75px;background-color:#00bcd4;border:1px solid #00a5bb;color:#fff;word-break:break-all;box-sizing:border-box}.choices__list--multiple .choices__item[data-deletable]{padding-right:5px}[dir=rtl] .choices__list--multiple .choices__item{margin-right:0;margin-left:3.75px}.choices__list--multiple .choices__item.is-highlighted{background-color:#00a5bb;border:1px solid #008fa1}.is-disabled .choices__list--multiple .choices__item{background-color:#aaa;border:1px solid #919191}.choices__list--dropdown{visibility:hidden;z-index:1;position:absolute;width:100%;background-color:#fff;border:1px solid #ddd;top:100%;margin-top:-1px;border-bottom-left-radius:2.5px;border-bottom-right-radius:2.5px;overflow:hidden;word-break:break-all;will-change:visibility}.choices__list--dropdown.is-active{visibility:visible}.is-open .choices__list--dropdown{border-color:#b7b7b7}.is-flipped .choices__list--dropdown{top:auto;bottom:100%;margin-top:0;margin-bottom:-1px;border-radius:.25rem .25rem 0 0}.choices__list--dropdown .choices__list{position:relative;max-height:300px;overflow:auto;-webkit-overflow-scrolling:touch;will-change:scroll-position}.choices__list--dropdown .choices__item{position:relative;padding:10px;font-size:14px}[dir=rtl] .choices__list--dropdown .choices__item{text-align:right}@media (min-width:640px){.choices__list--dropdown .choices__item--selectable{padding-right:100px}.choices__list--dropdown .choices__item--selectable:after{content:attr(data-select-text);font-size:12px;opacity:0;position:absolute;right:10px;top:50%;transform:translateY(-50%)}[dir=rtl] .choices__list--dropdown .choices__item--selectable{text-align:right;padding-left:100px;padding-right:10px}[dir=rtl] .choices__list--dropdown .choices__item--selectable:after{right:auto;left:10px}}.choices__list--dropdown .choices__item--selectable.is-highlighted{background-color:#f2f2f2}.choices__list--dropdown .choices__item--selectable.is-highlighted:after{opacity:.5}.choices__item{cursor:default}.choices__item--selectable{cursor:pointer}.choices__item--disabled{cursor:not-allowed;-webkit-user-select:none;-ms-user-select:none;user-select:none;opacity:.5}.choices__heading{font-weight:600;font-size:12px;padding:10px;border-bottom:1px solid #f7f7f7;color:gray}.choices__button{text-indent:-9999px;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;background-color:transparent;background-repeat:no-repeat;background-position:center;cursor:pointer}.choices__button:focus,.choices__input:focus{outline:0}.choices__input{display:inline-block;vertical-align:baseline;background-color:#f9f9f9;font-size:14px;margin-bottom:5px;border:0;border-radius:0;max-width:100%;padding:4px 0 4px 2px}[dir=rtl] .choices__input{padding-right:2px;padding-left:0}.choices__placeholder{opacity:.5} +.choices{position:relative;overflow:hidden;margin-bottom:24px;font-size:16px}.choices:focus{outline:0}.choices:last-child{margin-bottom:0}.choices.is-open{overflow:visible}.choices.is-disabled .choices__inner,.choices.is-disabled .choices__input{background-color:#eaeaea;cursor:not-allowed;-webkit-user-select:none;user-select:none}.choices.is-disabled .choices__item{cursor:not-allowed}.choices [hidden]{display:none!important}.choices[data-type*=select-one]{cursor:pointer}.choices[data-type*=select-one] .choices__inner{padding-bottom:7.5px}.choices[data-type*=select-one] .choices__input{display:block;width:100%;padding:10px;border-bottom:1px solid #ddd;background-color:#fff;margin:0}.choices[data-type*=select-one] .choices__button{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjMDAwIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yLjU5Mi4wNDRsMTguMzY0IDE4LjM2NC0yLjU0OCAyLjU0OEwuMDQ0IDIuNTkyeiIvPjxwYXRoIGQ9Ik0wIDE4LjM2NEwxOC4zNjQgMGwyLjU0OCAyLjU0OEwyLjU0OCAyMC45MTJ6Ii8+PC9nPjwvc3ZnPg==);padding:0;background-size:8px;position:absolute;top:50%;right:0;margin-top:-10px;margin-right:25px;height:20px;width:20px;border-radius:10em;opacity:.25}.choices[data-type*=select-one] .choices__button:focus,.choices[data-type*=select-one] .choices__button:hover{opacity:1}.choices[data-type*=select-one] .choices__button:focus{box-shadow:0 0 0 2px #00bcd4}.choices[data-type*=select-one] .choices__item[data-value=""] .choices__button{display:none}.choices[data-type*=select-one]::after{content:"";height:0;width:0;border-style:solid;border-color:#333 transparent transparent;border-width:5px;position:absolute;right:11.5px;top:50%;margin-top:-2.5px;pointer-events:none}.choices[data-type*=select-one].is-open::after{border-color:transparent transparent #333;margin-top:-7.5px}.choices[data-type*=select-one][dir=rtl]::after{left:11.5px;right:auto}.choices[data-type*=select-one][dir=rtl] .choices__button{right:auto;left:0;margin-left:25px;margin-right:0}.choices[data-type*=select-multiple] .choices__inner,.choices[data-type*=text] .choices__inner{cursor:text}.choices[data-type*=select-multiple] .choices__button,.choices[data-type*=text] .choices__button{position:relative;display:inline-block;margin:0-4px 0 8px;padding-left:16px;border-left:1px solid #008fa1;background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjEiIGhlaWdodD0iMjEiIHZpZXdCb3g9IjAgMCAyMSAyMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZyBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGQ9Ik0yLjU5Mi4wNDRsMTguMzY0IDE4LjM2NC0yLjU0OCAyLjU0OEwuMDQ0IDIuNTkyeiIvPjxwYXRoIGQ9Ik0wIDE4LjM2NEwxOC4zNjQgMGwyLjU0OCAyLjU0OEwyLjU0OCAyMC45MTJ6Ii8+PC9nPjwvc3ZnPg==);background-size:8px;width:8px;line-height:1;opacity:.75;border-radius:0}.choices[data-type*=select-multiple] .choices__button:focus,.choices[data-type*=select-multiple] .choices__button:hover,.choices[data-type*=text] .choices__button:focus,.choices[data-type*=text] .choices__button:hover{opacity:1}.choices__inner{display:inline-block;vertical-align:top;width:100%;background-color:#f9f9f9;padding:7.5px 7.5px 3.75px;border:1px solid #ddd;border-radius:2.5px;font-size:14px;min-height:44px;overflow:hidden}.is-focused .choices__inner,.is-open .choices__inner{border-color:#b7b7b7}.is-open .choices__inner{border-radius:2.5px 2.5px 0 0}.is-flipped.is-open .choices__inner{border-radius:0 0 2.5px 2.5px}.choices__list{margin:0;padding-left:0;list-style:none}.choices__list--single{display:inline-block;padding:4px 16px 4px 4px;width:100%}[dir=rtl] .choices__list--single{padding-right:4px;padding-left:16px}.choices__list--single .choices__item{width:100%}.choices__list--multiple{display:inline}.choices__list--multiple .choices__item{display:inline-block;vertical-align:middle;border-radius:20px;padding:4px 10px;font-size:12px;font-weight:500;margin-right:3.75px;margin-bottom:3.75px;background-color:#00bcd4;border:1px solid #00a5bb;color:#fff;word-break:break-all;box-sizing:border-box}.choices__list--multiple .choices__item[data-deletable]{padding-right:5px}[dir=rtl] .choices__list--multiple .choices__item{margin-right:0;margin-left:3.75px}.choices__list--multiple .choices__item.is-highlighted{background-color:#00a5bb;border:1px solid #008fa1}.is-disabled .choices__list--multiple .choices__item{background-color:#aaa;border:1px solid #919191}.choices__list--dropdown,.choices__list[aria-expanded]{visibility:hidden;z-index:1;position:absolute;width:100%;background-color:#fff;border:1px solid #ddd;top:100%;margin-top:-1px;border-bottom-left-radius:2.5px;border-bottom-right-radius:2.5px;overflow:hidden;word-break:break-all;will-change:visibility}.is-active.choices__list--dropdown,.is-active.choices__list[aria-expanded]{visibility:visible}.is-open .choices__list--dropdown,.is-open .choices__list[aria-expanded]{border-color:#b7b7b7}.is-flipped .choices__list--dropdown,.is-flipped .choices__list[aria-expanded]{top:auto;bottom:100%;margin-top:0;margin-bottom:-1px;border-radius:.25rem .25rem 0 0}.choices__list--dropdown .choices__list,.choices__list[aria-expanded] .choices__list{position:relative;max-height:300px;overflow:auto;-webkit-overflow-scrolling:touch;will-change:scroll-position}.choices__list--dropdown .choices__item,.choices__list[aria-expanded] .choices__item{position:relative;padding:10px;font-size:14px}[dir=rtl] .choices__list--dropdown .choices__item,[dir=rtl] .choices__list[aria-expanded] .choices__item{text-align:right}@media (min-width:640px){.choices__list--dropdown .choices__item--selectable,.choices__list[aria-expanded] .choices__item--selectable{padding-right:100px}.choices__list--dropdown .choices__item--selectable::after,.choices__list[aria-expanded] .choices__item--selectable::after{content:attr(data-select-text);font-size:12px;opacity:0;position:absolute;right:10px;top:50%;transform:translateY(-50%)}[dir=rtl] .choices__list--dropdown .choices__item--selectable,[dir=rtl] .choices__list[aria-expanded] .choices__item--selectable{text-align:right;padding-left:100px;padding-right:10px}[dir=rtl] .choices__list--dropdown .choices__item--selectable::after,[dir=rtl] .choices__list[aria-expanded] .choices__item--selectable::after{right:auto;left:10px}}.choices__list--dropdown .choices__item--selectable.is-highlighted,.choices__list[aria-expanded] .choices__item--selectable.is-highlighted{background-color:#f2f2f2}.choices__list--dropdown .choices__item--selectable.is-highlighted::after,.choices__list[aria-expanded] .choices__item--selectable.is-highlighted::after{opacity:.5}.choices__item{cursor:default}.choices__item--selectable{cursor:pointer}.choices__item--disabled{cursor:not-allowed;-webkit-user-select:none;user-select:none;opacity:.5}.choices__heading{font-weight:600;font-size:12px;padding:10px;border-bottom:1px solid #f7f7f7;color:gray}.choices__button{text-indent:-9999px;-webkit-appearance:none;appearance:none;border:0;background-color:transparent;background-repeat:no-repeat;background-position:center;cursor:pointer}.choices__button:focus,.choices__input:focus{outline:0}.choices__input{display:inline-block;vertical-align:baseline;background-color:#f9f9f9;font-size:14px;margin-bottom:5px;border:0;border-radius:0;max-width:100%;padding:4px 0 4px 2px}.choices__input::-webkit-search-cancel-button,.choices__input::-webkit-search-decoration,.choices__input::-webkit-search-results-button,.choices__input::-webkit-search-results-decoration{display:none}.choices__input::-ms-clear,.choices__input::-ms-reveal{display:none;width:0;height:0}[dir=rtl] .choices__input{padding-right:2px;padding-left:0}.choices__placeholder{opacity:.5} .tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1} dialog { position: absolute; @@ -2492,6 +2492,10 @@ dialog.fixed { color: #004085; } +.formio-form-group { + margin-bottom: 1rem; +} + .formio-wysiwyg-editor { min-height: 200px; background-color: #fff; @@ -2659,7 +2663,8 @@ dialog.fixed { outline: auto; } -td > .form-group { +td > .form-group, +td > .formio-form-group { margin-bottom: 0; } @@ -2667,6 +2672,12 @@ td > .form-group { overflow: hidden; position: relative; } +.signature-pad-body .form-control-feedback { + position: absolute; + font-size: 0.8rem; + top: 1px; + right: 3px; +} .signature-pad-canvas { border-radius: 4px; @@ -2713,7 +2724,7 @@ td > .form-group { color: #C3C3C3; } -.choices__list--dropdown { +.is-active.choices__list--dropdown { z-index: 100; } @@ -3244,6 +3255,7 @@ body.formio-dialog-open { .editgrid-listgroup { margin-bottom: 10px; + overflow-wrap: break-word; } .tree-listgroup { @@ -3254,7 +3266,8 @@ body.formio-dialog-open { display: block; } -.formio-choices.form-group { +.formio-choices.form-group, +.formio-choices.formio-form-group { margin-bottom: 0; } @@ -3277,6 +3290,7 @@ body.formio-dialog-open { .formio-component .table { margin-bottom: 0; + word-break: break-all; } .formio-component-htmlelement { @@ -3344,6 +3358,13 @@ body.formio-dialog-open { transition: opacity 200ms linear, visibility 0ms 200ms; } +.formio-component-datagrid { + overflow-x: auto; +} +.formio-component-datagrid .datagrid-table, .formio-component-datagrid .datagrid-table td, .formio-component-datagrid .datagrid-table th { + border: 3px solid #ddd !important; + padding: 10px; +} .formio-component-datagrid .datagrid-table > tbody > tr > td:last-child { position: relative; } @@ -3353,6 +3374,10 @@ body.formio-dialog-open { transition: visibility 0ms, opacity 200ms linear; } +.datagrid-table > tbody > tr > td { + word-break: break-all; +} + .formio-component-modaledit .formio-modaledit-view-container { position: relative; border: 1px solid #ddd; @@ -3444,6 +3469,7 @@ td .formio-component-modaledit .formio-modaledit-view-container { } .tree__node-content { margin-bottom: 10px; + overflow-wrap: break-word; } .tree__node-children { margin: 0; @@ -3786,6 +3812,7 @@ div[data-oembed-url] { .formio-form > div > nav > ul.pagination { flex-flow: wrap row; + justify-content: flex-start; } .formio-form > div > nav > ul.pagination .page-link { cursor: pointer; @@ -3994,10 +4021,18 @@ div[data-oembed-url] { font-weight: normal; } +.ace_editor, .ace_editor div, .ace_editor span { + font-family: "Monaco", "Menlo", "Ubuntu Mono", "Droid Sans Mono", "Consolas", monospace !important; +} + span[role=link] { text-decoration: underline; cursor: pointer; } + +.hidden { + display: none !important; +} .formbuilder { position: relative; } @@ -4169,6 +4204,10 @@ span[role=link] { position: relative; } +.gu-mirror { + list-style-type: none; +} + .formio-settings-help { color: #8a6d3b; background-color: #fcf8e3; @@ -4200,6 +4239,7 @@ span[role=link] { } .component-edit-tabs.col-sm-6 { + min-height: 87vh; height: 100%; overflow-y: auto; } @@ -4227,4 +4267,9 @@ span[role=link] { cursor: not-allowed; opacity: 0.65; box-shadow: none; +} + +.builder-component-selected { + border: 2px dashed #e8e8e8; + outline: none !important; } \ No newline at end of file diff --git a/lib/formio.full.js b/lib/formio.full.js index 4804a492..2046fd6d 100644 --- a/lib/formio.full.js +++ b/lib/formio.full.js @@ -19,6 +19,17 @@ return /******/ (function() { // webpackBootstrap /******/ var __webpack_modules__ = ({ +/***/ "./lib/CDN.js": +/*!********************!*\ + !*** ./lib/CDN.js ***! + \********************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\n// All external libs URLs should be injected through this class.\n// CDN libs URLs are accessible throuh CDN object properties\n// like Formio.cdn.ace === 'http://cdn.form.io/ace/1.4.12'.\n// For latest version use empty string\nvar CDN = /*#__PURE__*/function () {\n function CDN(baseUrl) {\n _classCallCheck(this, CDN);\n this.baseUrl = baseUrl || 'https://cdn.form.io';\n this.overrides = {};\n this.libs = {\n 'ace': '1.4.12',\n 'bootstrap': '4.6.2',\n 'ckeditor': '19.0.0',\n 'flatpickr': '4.6.8',\n 'flatpickr-formio': '4.6.13-formio.2',\n 'font-awesome': '4.7.0',\n 'grid': 'latest',\n 'moment-timezone': 'latest',\n 'quill': '2.0.0-dev.3',\n 'shortcut-buttons-flatpickr': '0.4.0',\n 'uswds': '2.4.8',\n 'core': ''\n };\n this.updateUrls();\n }\n _createClass(CDN, [{\n key: \"getVersion\",\n value: function getVersion(lib) {\n return this.libs[lib];\n }\n\n // Sets a specific library version\n }, {\n key: \"setVersion\",\n value: function setVersion(lib, version) {\n this.libs[lib] = version;\n this.updateUrls();\n }\n\n // Sets base CDN url for all libraries\n }, {\n key: \"setBaseUrl\",\n value: function setBaseUrl(url) {\n this.baseUrl = url;\n this.updateUrls();\n }\n\n // Allows to override CDN url for a specific library\n }, {\n key: \"setOverrideUrl\",\n value: function setOverrideUrl(lib, url) {\n this.overrides[lib] = url;\n this.updateUrls();\n }\n\n // Removes override for a specific library\n }, {\n key: \"removeOverride\",\n value: function removeOverride(lib) {\n delete this.overrides[lib];\n this.updateUrls();\n }\n\n // Removes all overrides\n }, {\n key: \"removeOverrides\",\n value: function removeOverrides() {\n this.overrides = {};\n this.updateUrls();\n }\n }, {\n key: \"buildUrl\",\n value: function buildUrl(cdnUrl, lib, version) {\n var url;\n if (version === 'latest' || version === '') {\n url = \"\".concat(cdnUrl, \"/\").concat(lib);\n } else {\n url = \"\".concat(cdnUrl, \"/\").concat(lib, \"/\").concat(version);\n }\n return url;\n }\n }, {\n key: \"updateUrls\",\n value: function updateUrls() {\n for (var lib in this.libs) {\n if (lib in this.overrides) {\n this[lib] = this.buildUrl(this.overrides[lib], lib, this.libs[lib]);\n } else {\n this[lib] = this.buildUrl(this.baseUrl, lib, this.libs[lib]);\n }\n }\n }\n }]);\n return CDN;\n}();\nvar _default = CDN;\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/CDN.js?"); + +/***/ }), + /***/ "./lib/Element.js": /*!************************!*\ !*** ./lib/Element.js ***! @@ -26,7 +37,7 @@ return /******/ (function() { // webpackBootstrap /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.weak-map.js */ \"./node_modules/core-js/modules/es.weak-map.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.object.assign.js */ \"./node_modules/core-js/modules/es.object.assign.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.join.js */ \"./node_modules/core-js/modules/es.array.join.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.constructor.js */ \"./node_modules/core-js/modules/es.regexp.constructor.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.includes.js */ \"./node_modules/core-js/modules/es.array.includes.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.includes.js */ \"./node_modules/core-js/modules/es.string.includes.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.slice.js */ \"./node_modules/core-js/modules/es.array.slice.js\");\n\nvar _EventEmitter = _interopRequireDefault(__webpack_require__(/*! ./EventEmitter */ \"./lib/EventEmitter.js\"));\n\nvar _Formio = __webpack_require__(/*! ./Formio */ \"./lib/Formio.js\");\n\nvar FormioUtils = _interopRequireWildcard(__webpack_require__(/*! ./utils/utils */ \"./lib/utils/utils.js\"));\n\nvar _i18next = _interopRequireDefault(__webpack_require__(/*! i18next */ \"./node_modules/i18next/dist/cjs/i18next.js\"));\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nvar _moment = _interopRequireDefault(__webpack_require__(/*! moment */ \"./node_modules/moment/moment.js\"));\n\nvar _vanillaTextMask = _interopRequireDefault(__webpack_require__(/*! @formio/vanilla-text-mask */ \"./node_modules/@formio/vanilla-text-mask/dist/vanillaTextMask.js\"));\n\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\n\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\n/**\n * The root component for all elements within the Form.io renderer.\n */\nvar Element = /*#__PURE__*/function () {\n function Element(options) {\n _classCallCheck(this, Element);\n\n /**\n * The options for this component.\n * @type {{}}\n */\n this.options = Object.assign({\n language: 'en',\n highlightErrors: true,\n componentErrorClass: 'formio-error-wrapper',\n componentWarningClass: 'formio-warning-wrapper',\n row: '',\n namespace: 'formio'\n }, options || {});\n /**\n * The ID of this component. This value is auto-generated when the component is created, but\n * can also be provided from the component.id value passed into the constructor.\n * @type {string}\n */\n\n this.id = FormioUtils.getRandomComponentId();\n /**\n * An array of event handlers so that the destry command can deregister them.\n * @type {Array}\n */\n\n this.eventHandlers = []; // Use the i18next that is passed in, otherwise use the global version.\n\n this.i18next = this.options.i18next || _i18next.default;\n /**\n * An instance of the EventEmitter class to handle the emitting and registration of events.\n *\n * @type {EventEmitter}\n */\n\n this.events = options && options.events ? options.events : new _EventEmitter.default();\n this.defaultMask = null;\n /**\n * Conditional to show or hide helplinks in editForm\n *\n * @type {*|boolean}\n */\n\n this.helplinks = this.options.helplinks === 'false' ? false : this.options.helplinks || 'https://help.form.io';\n }\n /**\n * Register for a new event within this component.\n *\n * @example\n * let component = new BaseComponent({\n * type: 'textfield',\n * label: 'First Name',\n * key: 'firstName'\n * });\n * component.on('componentChange', (changed) => {\n * console.log('this element is changed.');\n * });\n *\n *\n * @param {string} event - The event you wish to register the handler for.\n * @param {function} cb - The callback handler to handle this event.\n */\n\n\n _createClass(Element, [{\n key: \"on\",\n value: function on(event, cb, internal) {\n var once = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n\n if (!this.events) {\n return;\n }\n\n var type = \"\".concat(this.options.namespace, \".\").concat(event); // Store the component id in the handler so that we can determine which events are for this component.\n\n cb.id = this.id;\n cb.key = this.key;\n cb.internal = internal; // Register for this event.\n\n return this.events[once ? 'once' : 'on'](type, cb);\n }\n /**\n * Register for a new single-fire event within this component.\n *\n * @param {string} event - The event you wish to register the handler for.\n * @param {function} cb - The callback handler to handle this event.\n */\n\n }, {\n key: \"once\",\n value: function once(event, cb, internal) {\n return this.on(event, cb, internal, true);\n }\n /**\n * Allow catching any event.\n *\n * @param cb\n * @returns {this}\n */\n\n }, {\n key: \"onAny\",\n value: function onAny(cb) {\n if (!this.events) {\n return;\n }\n\n return this.events.onAny(cb);\n }\n /**\n * Removes the listener that will be fired when any event is emitted.\n *\n * @param cb\n * @returns {this}\n */\n\n }, {\n key: \"offAny\",\n value: function offAny(cb) {\n if (!this.events) {\n return;\n }\n\n return this.events.offAny(cb);\n }\n /**\n * Removes a listener for a certain event. Not passing the 2nd arg will remove all listeners for that event.\n *\n * @param {string} event - The event you wish to register the handler for.\n * @param {function|undefined} cb - The callback handler to handle this event.\n */\n\n }, {\n key: \"off\",\n value: function off(event, cb) {\n var _this = this;\n\n if (!this.events) {\n return;\n }\n\n var type = \"\".concat(this.options.namespace, \".\").concat(event);\n this.events.listeners(type).forEach(function (listener) {\n // Ensure the listener is for this element\n if (!listener || listener.id !== _this.id) {\n return;\n } // If there is a given callback, only deal with the match\n\n\n if (cb && cb !== listener) {\n return;\n }\n\n _this.events.off(type, listener);\n });\n }\n /**\n * Emit a new event.\n *\n * @param {string} event - The event to emit.\n * @param {Object} data - The data to emit with the handler.\n */\n\n }, {\n key: \"emit\",\n value: function emit(event) {\n if (this.events) {\n var _this$events;\n\n for (var _len = arguments.length, data = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n data[_key - 1] = arguments[_key];\n }\n\n (_this$events = this.events).emit.apply(_this$events, [\"\".concat(this.options.namespace, \".\").concat(event)].concat(data));\n }\n }\n /**\n * Check if the component has an event handler set up for the event.\n *\n * @param {string} event - The event name.\n * @returns {boolean}\n */\n\n }, {\n key: \"hasEventHandler\",\n value: function hasEventHandler(event) {\n var _this2 = this;\n\n if (!this.events) {\n return false;\n }\n\n var type = \"\".concat(this.options.namespace, \".\").concat(event);\n return this.events.listeners(type).some(function (listener) {\n if (!listener) {\n return false;\n }\n\n return listener.id === _this2.id || listener.key === _this2.key;\n });\n }\n /**\n * Wrapper method to add an event listener to an HTML element.\n *\n * @param obj\n * The DOM element to add the event to.\n * @param type\n * The event name to add.\n * @param func\n * The callback function to be executed when the listener is triggered.\n * @param persistent\n * If this listener should persist beyond \"destroy\" commands.\n */\n\n }, {\n key: \"addEventListener\",\n value: function addEventListener(obj, type, func, persistent) {\n if (!obj) {\n return;\n }\n\n if (!persistent) {\n this.eventHandlers.push({\n id: this.id,\n obj: obj,\n type: type,\n func: func\n });\n }\n\n if ('addEventListener' in obj) {\n obj.addEventListener(type, func, false);\n } else if ('attachEvent' in obj) {\n obj.attachEvent(\"on\".concat(type), func);\n }\n\n return this;\n }\n /**\n * Remove an event listener from the object.\n *\n * @param obj\n * @param type\n */\n\n }, {\n key: \"removeEventListener\",\n value: function removeEventListener(obj, type) {\n var _this3 = this;\n\n var func = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n var indexes = [];\n\n if (!obj) {\n return;\n }\n\n this.eventHandlers.forEach(function (handler, index) {\n if (handler.id === _this3.id && obj.removeEventListener && handler.type === type && (!func || handler.func === func)) {\n obj.removeEventListener(type, handler.func);\n indexes.push(index);\n }\n });\n\n if (indexes.length) {\n _lodash.default.pullAt(this.eventHandlers, indexes);\n }\n\n return this;\n }\n }, {\n key: \"removeEventListeners\",\n value: function removeEventListeners() {\n var _this4 = this;\n\n this.eventHandlers.forEach(function (handler) {\n if (_this4.id === handler.id && handler.type && handler.obj && handler.obj.removeEventListener) {\n handler.obj.removeEventListener(handler.type, handler.func);\n }\n });\n this.eventHandlers = [];\n }\n }, {\n key: \"removeAllEvents\",\n value: function removeAllEvents(includeExternal) {\n var _this5 = this;\n\n _lodash.default.each(this.events._events, function (events, type) {\n _lodash.default.each(events, function (listener) {\n if (listener && _this5.id === listener.id && (includeExternal || listener.internal)) {\n _this5.events.off(type, listener);\n }\n });\n });\n }\n /**\n * Removes all event listeners attached to this component.\n */\n\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.removeEventListeners();\n this.removeAllEvents();\n }\n /**\n * Append an HTML DOM element to a container.\n *\n * @param element\n * @param container\n */\n\n }, {\n key: \"appendTo\",\n value: function appendTo(element, container) {\n container === null || container === void 0 ? void 0 : container.appendChild(element);\n return this;\n }\n /**\n * Prepend an HTML DOM element to a container.\n *\n * @param {HTMLElement} element - The DOM element to prepend.\n * @param {HTMLElement} container - The DOM element that is the container of the element getting prepended.\n */\n\n }, {\n key: \"prependTo\",\n value: function prependTo(element, container) {\n if (container) {\n if (container.firstChild) {\n try {\n container.insertBefore(element, container.firstChild);\n } catch (err) {\n console.warn(err);\n container.appendChild(element);\n }\n } else {\n container.appendChild(element);\n }\n }\n\n return this;\n }\n /**\n * Removes an HTML DOM element from its bounding container.\n *\n * @param {HTMLElement} element - The element to remove.\n * @param {HTMLElement} container - The DOM element that is the container of the element to remove.\n */\n\n }, {\n key: \"removeChildFrom\",\n value: function removeChildFrom(element, container) {\n if (container && container.contains(element)) {\n try {\n container.removeChild(element);\n } catch (err) {\n console.warn(err);\n }\n }\n\n return this;\n }\n /**\n * Alias for document.createElement.\n *\n * @param {string} type - The type of element to create\n * @param {Object} attr - The element attributes to add to the created element.\n * @param {Various} children - Child elements. Can be a DOM Element, string or array of both.\n *\n * @return {HTMLElement} - The created element.\n */\n\n }, {\n key: \"ce\",\n value: function ce(type, attr) {\n var children = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n // console.warn('Call to deprecated this.ce(). Dom elements should be created with templates, not manually with ce.');\n // Create the element.\n var element = document.createElement(type); // Add attributes.\n\n if (attr) {\n this.attr(element, attr);\n } // Append the children.\n\n\n this.appendChild(element, children);\n return element;\n }\n /**\n * Append different types of children.\n *\n * @param child\n */\n\n }, {\n key: \"appendChild\",\n value: function appendChild(element, child) {\n var _this6 = this;\n\n if (Array.isArray(child)) {\n child.forEach(function (oneChild) {\n return _this6.appendChild(element, oneChild);\n });\n } else if (child instanceof HTMLElement || child instanceof Text) {\n element.appendChild(child);\n } else if (child) {\n element.appendChild(this.text(child.toString()));\n }\n\n return this;\n }\n /**\n * Creates a new input mask placeholder.\n * @param {HTMLElement} mask - The input mask.\n * @returns {string} - The placeholder that will exist within the input as they type.\n */\n\n }, {\n key: \"maskPlaceholder\",\n value: function maskPlaceholder(mask) {\n var _this7 = this;\n\n return mask.map(function (char) {\n return char instanceof RegExp ? _this7.placeholderChar : char;\n }).join('');\n }\n }, {\n key: \"placeholderChar\",\n get: function get() {\n var _this$component;\n\n return ((_this$component = this.component) === null || _this$component === void 0 ? void 0 : _this$component.inputMaskPlaceholderChar) || '_';\n }\n /**\n * Sets the input mask for an input.\n *\n * @param {HTMLElement} input - The html input to apply the mask to.\n * @param {String} inputMask - The input mask to add to this input.\n * @param {Boolean} usePlaceholder - Set the mask placeholder on the input.\n */\n\n }, {\n key: \"setInputMask\",\n value: function setInputMask(input, inputMask, usePlaceholder) {\n if (input && inputMask) {\n var mask = FormioUtils.getInputMask(inputMask, this.placeholderChar);\n this.defaultMask = mask;\n\n try {\n //destroy previous mask\n if (input.mask) {\n input.mask.destroy();\n }\n\n input.mask = (0, _vanillaTextMask.default)({\n inputElement: input,\n mask: mask,\n placeholderChar: this.placeholderChar,\n shadowRoot: this.root ? this.root.shadowRoot : null\n });\n } catch (e) {\n // Don't pass error up, to prevent form rejection.\n // Internal bug of vanilla-text-mask on iOS (`selectionEnd`);\n console.warn(e);\n }\n\n if (mask.numeric) {\n input.setAttribute('pattern', '\\\\d*');\n }\n\n if (usePlaceholder) {\n input.setAttribute('placeholder', this.maskPlaceholder(mask));\n }\n }\n }\n /**\n * Translate a text using the i18n system.\n *\n * @param {string|Array} text - The i18n identifier.\n * @param {Object} params - The i18n parameters to use for translation.\n */\n\n }, {\n key: \"t\",\n value: function t(text) {\n var _this$i18next;\n\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n return (_this$i18next = this.i18next).t.apply(_this$i18next, [text].concat(args));\n }\n /**\n * Alias to create a text node.\n * @param text\n * @returns {Text}\n */\n\n }, {\n key: \"text\",\n value: function text(_text) {\n return document.createTextNode(this.t(_text));\n }\n /**\n * Adds an object of attributes onto an element.\n * @param {HtmlElement} element - The element to add the attributes to.\n * @param {Object} attr - The attributes to add to the input element.\n */\n\n }, {\n key: \"attr\",\n value: function attr(element, _attr) {\n var _this8 = this;\n\n if (!element) {\n return;\n }\n\n _lodash.default.each(_attr, function (value, key) {\n if (typeof value !== 'undefined') {\n if (key.indexOf('on') === 0) {\n // If this is an event, add a listener.\n _this8.addEventListener(element, key.substr(2).toLowerCase(), value);\n } else {\n // Otherwise it is just an attribute.\n element.setAttribute(key, value);\n }\n }\n });\n }\n /**\n * Determines if an element has a class.\n *\n * Taken from jQuery https://j11y.io/jquery/#v=1.5.0&fn=jQuery.fn.hasClass\n */\n\n }, {\n key: \"hasClass\",\n value: function hasClass(element, className) {\n if (!element) {\n return false;\n } // Allow templates to intercept.\n\n\n className = \" \".concat(className, \" \");\n return \" \".concat(element.className, \" \").replace(/[\\n\\t\\r]/g, ' ').indexOf(className) > -1;\n }\n /**\n * Adds a class to a DOM element.\n *\n * @param element\n * The element to add a class to.\n * @param className\n * The name of the class to add.\n */\n\n }, {\n key: \"addClass\",\n value: function addClass(element, className) {\n if (!element || !(element instanceof HTMLElement)) {\n return this;\n } // Allow templates to intercept.\n\n\n var classes = element.getAttribute('class');\n\n if (!(classes !== null && classes !== void 0 && classes.includes(className))) {\n element.setAttribute('class', \"\".concat(classes, \" \").concat(className));\n }\n\n return this;\n }\n /**\n * Remove a class from a DOM element.\n *\n * @param element\n * The DOM element to remove the class from.\n * @param className\n * The name of the class that is to be removed.\n */\n\n }, {\n key: \"removeClass\",\n value: function removeClass(element, className) {\n if (!element || !className || !(element instanceof HTMLElement)) {\n return this;\n } // Allow templates to intercept.\n\n\n var cls = element.getAttribute('class');\n\n if (cls) {\n cls = cls.replace(new RegExp(\" \".concat(className), 'g'), '');\n element.setAttribute('class', cls);\n }\n\n return this;\n }\n /**\n * Empty's an HTML DOM element.\n *\n * @param {HTMLElement} element - The element you wish to empty.\n */\n\n }, {\n key: \"empty\",\n value: function empty(element) {\n if (element) {\n while (element.firstChild) {\n element.removeChild(element.firstChild);\n }\n }\n }\n /**\n * Create an evaluation context for all script executions and interpolations.\n *\n * @param additional\n * @return {*}\n */\n\n }, {\n key: \"evalContext\",\n value: function evalContext(additional) {\n var _this$options;\n\n return Object.assign({\n _: _lodash.default,\n utils: FormioUtils,\n util: FormioUtils,\n user: _Formio.GlobalFormio.getUser(),\n moment: _moment.default,\n instance: this,\n self: this,\n token: _Formio.GlobalFormio.getToken({\n decode: true\n }),\n config: this.root && this.root.form && this.root.form.config ? this.root.form.config : (_this$options = this.options) !== null && _this$options !== void 0 && _this$options.formConfig ? this.options.formConfig : {}\n }, additional, _lodash.default.get(this.root, 'options.evalContext', {}));\n }\n /**\n * Performs an interpolation using the evaluation context of this component.\n *\n * @param string\n * @param data\n * @return {XML|string|*|void}\n */\n\n }, {\n key: \"interpolate\",\n value: function interpolate(string, data) {\n var _this9 = this;\n\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n if (typeof string !== 'function' && (this.component.content || this.component.html) && !FormioUtils.Evaluator.templateSettings.interpolate.test(string)) {\n string = FormioUtils.translateHTMLTemplate(String(string), function (value) {\n return _this9.t(value);\n });\n }\n\n return FormioUtils.interpolate(string, this.evalContext(data), options);\n }\n /**\n * Performs an evaluation using the evaluation context of this component.\n *\n * @param func\n * @param args\n * @param ret\n * @param tokenize\n * @return {*}\n */\n\n }, {\n key: \"evaluate\",\n value: function evaluate(func, args, ret, tokenize) {\n return FormioUtils.evaluate(func, this.evalContext(args), ret, tokenize);\n }\n /**\n * Allow for options to hook into the functionality of this renderer.\n * @return {*}\n */\n\n }, {\n key: \"hook\",\n value: function hook() {\n var name = arguments[0];\n\n if (this.options && this.options.hooks && this.options.hooks[name]) {\n return this.options.hooks[name].apply(this, Array.prototype.slice.call(arguments, 1));\n } else {\n // If this is an async hook instead of a sync.\n var fn = typeof arguments[arguments.length - 1] === 'function' ? arguments[arguments.length - 1] : null;\n\n if (fn) {\n return fn(null, arguments[1]);\n } else {\n return arguments[1];\n }\n }\n }\n }]);\n\n return Element;\n}();\n\nexports[\"default\"] = Element;\n\n//# sourceURL=webpack://Formio/./lib/Element.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.weak-map.js */ \"./node_modules/core-js/modules/es.weak-map.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.object.assign.js */ \"./node_modules/core-js/modules/es.object.assign.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.array.some.js */ \"./node_modules/core-js/modules/es.array.some.js\");\n__webpack_require__(/*! core-js/modules/es.array.is-array.js */ \"./node_modules/core-js/modules/es.array.is-array.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-string.js */ \"./node_modules/core-js/modules/es.date.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.array.join.js */ \"./node_modules/core-js/modules/es.array.join.js\");\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.constructor.js */ \"./node_modules/core-js/modules/es.regexp.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n__webpack_require__(/*! core-js/modules/es.array.index-of.js */ \"./node_modules/core-js/modules/es.array.index-of.js\");\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n__webpack_require__(/*! core-js/modules/es.array.includes.js */ \"./node_modules/core-js/modules/es.array.includes.js\");\n__webpack_require__(/*! core-js/modules/es.string.includes.js */ \"./node_modules/core-js/modules/es.string.includes.js\");\n__webpack_require__(/*! core-js/modules/es.array.slice.js */ \"./node_modules/core-js/modules/es.array.slice.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\nvar _EventEmitter = _interopRequireDefault(__webpack_require__(/*! ./EventEmitter */ \"./lib/EventEmitter.js\"));\nvar _Formio = __webpack_require__(/*! ./Formio */ \"./lib/Formio.js\");\nvar FormioUtils = _interopRequireWildcard(__webpack_require__(/*! ./utils/utils */ \"./lib/utils/utils.js\"));\nvar _i18next = _interopRequireDefault(__webpack_require__(/*! i18next */ \"./node_modules/i18next/dist/cjs/i18next.js\"));\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nvar _moment = _interopRequireDefault(__webpack_require__(/*! moment */ \"./node_modules/moment/moment.js\"));\nvar _vanillaTextMask = _interopRequireDefault(__webpack_require__(/*! @formio/vanilla-text-mask */ \"./node_modules/@formio/vanilla-text-mask/dist/vanillaTextMask.js\"));\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") { return { \"default\": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj[\"default\"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\n/**\n * The root component for all elements within the Form.io renderer.\n */\nvar Element = /*#__PURE__*/function () {\n function Element(options) {\n _classCallCheck(this, Element);\n /**\n * The options for this component.\n * @type {{}}\n */\n this.options = Object.assign({\n language: 'en',\n highlightErrors: true,\n componentErrorClass: 'formio-error-wrapper',\n componentWarningClass: 'formio-warning-wrapper',\n row: '',\n namespace: 'formio'\n }, options || {});\n\n /**\n * The ID of this component. This value is auto-generated when the component is created, but\n * can also be provided from the component.id value passed into the constructor.\n * @type {string}\n */\n this.id = FormioUtils.getRandomComponentId();\n /**\n * An array of event handlers so that the destry command can deregister them.\n * @type {Array}\n */\n this.eventHandlers = [];\n\n // Use the i18next that is passed in, otherwise use the global version.\n this.i18next = this.options.i18next || _i18next[\"default\"];\n\n /**\n * An instance of the EventEmitter class to handle the emitting and registration of events.\n *\n * @type {EventEmitter}\n */\n this.events = options && options.events ? options.events : new _EventEmitter[\"default\"]();\n this.defaultMask = null;\n /**\n * Conditional to show or hide helplinks in editForm\n *\n * @type {*|boolean}\n */\n this.helplinks = this.options.helplinks === 'false' ? false : this.options.helplinks || 'https://help.form.io';\n }\n\n /**\n * Register for a new event within this component.\n *\n * @example\n * let component = new BaseComponent({\n * type: 'textfield',\n * label: 'First Name',\n * key: 'firstName'\n * });\n * component.on('componentChange', (changed) => {\n * console.log('this element is changed.');\n * });\n *\n *\n * @param {string} event - The event you wish to register the handler for.\n * @param {function} cb - The callback handler to handle this event.\n */\n _createClass(Element, [{\n key: \"on\",\n value: function on(event, cb, internal) {\n var once = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n if (!this.events) {\n return;\n }\n var type = \"\".concat(this.options.namespace, \".\").concat(event);\n\n // Store the component id in the handler so that we can determine which events are for this component.\n cb.id = this.id;\n cb.key = this.key;\n cb.internal = internal;\n\n // Register for this event.\n return this.events[once ? 'once' : 'on'](type, cb);\n }\n\n /**\n * Register for a new single-fire event within this component.\n *\n * @param {string} event - The event you wish to register the handler for.\n * @param {function} cb - The callback handler to handle this event.\n */\n }, {\n key: \"once\",\n value: function once(event, cb, internal) {\n return this.on(event, cb, internal, true);\n }\n\n /**\n * Allow catching any event.\n *\n * @param cb\n * @returns {this}\n */\n }, {\n key: \"onAny\",\n value: function onAny(cb) {\n if (!this.events) {\n return;\n }\n return this.events.onAny(cb);\n }\n\n /**\n * Removes the listener that will be fired when any event is emitted.\n *\n * @param cb\n * @returns {this}\n */\n }, {\n key: \"offAny\",\n value: function offAny(cb) {\n if (!this.events) {\n return;\n }\n return this.events.offAny(cb);\n }\n\n /**\n * Removes a listener for a certain event. Not passing the 2nd arg will remove all listeners for that event.\n *\n * @param {string} event - The event you wish to register the handler for.\n * @param {function|undefined} cb - The callback handler to handle this event.\n */\n }, {\n key: \"off\",\n value: function off(event, cb) {\n var _this = this;\n if (!this.events) {\n return;\n }\n var type = \"\".concat(this.options.namespace, \".\").concat(event);\n this.events.listeners(type).forEach(function (listener) {\n // Ensure the listener is for this element\n if (!listener || listener.id !== _this.id) {\n return;\n }\n\n // If there is a given callback, only deal with the match\n if (cb && cb !== listener) {\n return;\n }\n _this.events.off(type, listener);\n });\n }\n\n /**\n * Emit a new event.\n *\n * @param {string} event - The event to emit.\n * @param {Object} data - The data to emit with the handler.\n */\n }, {\n key: \"emit\",\n value: function emit(event) {\n if (this.events) {\n var _this$events;\n for (var _len = arguments.length, data = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n data[_key - 1] = arguments[_key];\n }\n (_this$events = this.events).emit.apply(_this$events, [\"\".concat(this.options.namespace, \".\").concat(event)].concat(data));\n }\n }\n\n /**\n * Check if the component has an event handler set up for the event.\n *\n * @param {string} event - The event name.\n * @returns {boolean}\n */\n }, {\n key: \"hasEventHandler\",\n value: function hasEventHandler(event) {\n var _this2 = this;\n if (!this.events) {\n return false;\n }\n var type = \"\".concat(this.options.namespace, \".\").concat(event);\n return this.events.listeners(type).some(function (listener) {\n if (!listener) {\n return false;\n }\n return listener.id === _this2.id || listener.key === _this2.key;\n });\n }\n\n /**\n * Wrapper method to add an event listener to an HTML element.\n *\n * @param obj\n * The DOM element to add the event to.\n * @param type\n * The event name to add.\n * @param func\n * The callback function to be executed when the listener is triggered.\n * @param persistent\n * If this listener should persist beyond \"destroy\" commands.\n */\n }, {\n key: \"addEventListener\",\n value: function addEventListener(obj, type, func, persistent) {\n if (!obj) {\n return;\n }\n if (!persistent) {\n this.eventHandlers.push({\n id: this.id,\n obj: obj,\n type: type,\n func: func\n });\n }\n if ('addEventListener' in obj) {\n obj.addEventListener(type, func, false);\n } else if ('attachEvent' in obj) {\n obj.attachEvent(\"on\".concat(type), func);\n }\n return this;\n }\n\n /**\n * Remove an event listener from the object.\n *\n * @param obj\n * @param type\n */\n }, {\n key: \"removeEventListener\",\n value: function removeEventListener(obj, type) {\n var _this3 = this;\n var func = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n var indexes = [];\n if (!obj) {\n return;\n }\n this.eventHandlers.forEach(function (handler, index) {\n if (handler.id === _this3.id && obj.removeEventListener && handler.type === type && (!func || handler.func === func)) {\n obj.removeEventListener(type, handler.func);\n indexes.push(index);\n }\n });\n if (indexes.length) {\n _lodash[\"default\"].pullAt(this.eventHandlers, indexes);\n }\n return this;\n }\n }, {\n key: \"removeEventListeners\",\n value: function removeEventListeners() {\n var _this4 = this;\n this.eventHandlers.forEach(function (handler) {\n if (_this4.id === handler.id && handler.type && handler.obj && handler.obj.removeEventListener) {\n handler.obj.removeEventListener(handler.type, handler.func);\n }\n });\n this.eventHandlers = [];\n }\n }, {\n key: \"removeAllEvents\",\n value: function removeAllEvents(includeExternal) {\n var _this5 = this;\n _lodash[\"default\"].each(this.events._events, function (events, type) {\n _lodash[\"default\"].each(events, function (listener) {\n if (listener && _this5.id === listener.id && (includeExternal || listener.internal)) {\n _this5.events.off(type, listener);\n }\n });\n });\n }\n\n /**\n * Removes all event listeners attached to this component.\n */\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.removeEventListeners();\n this.removeAllEvents();\n }\n\n /**\n * Append an HTML DOM element to a container.\n *\n * @param element\n * @param container\n */\n }, {\n key: \"appendTo\",\n value: function appendTo(element, container) {\n container === null || container === void 0 ? void 0 : container.appendChild(element);\n return this;\n }\n\n /**\n * Prepend an HTML DOM element to a container.\n *\n * @param {HTMLElement} element - The DOM element to prepend.\n * @param {HTMLElement} container - The DOM element that is the container of the element getting prepended.\n */\n }, {\n key: \"prependTo\",\n value: function prependTo(element, container) {\n if (container) {\n if (container.firstChild) {\n try {\n container.insertBefore(element, container.firstChild);\n } catch (err) {\n console.warn(err);\n container.appendChild(element);\n }\n } else {\n container.appendChild(element);\n }\n }\n return this;\n }\n\n /**\n * Removes an HTML DOM element from its bounding container.\n *\n * @param {HTMLElement} element - The element to remove.\n * @param {HTMLElement} container - The DOM element that is the container of the element to remove.\n */\n }, {\n key: \"removeChildFrom\",\n value: function removeChildFrom(element, container) {\n if (container && container.contains(element)) {\n try {\n container.removeChild(element);\n } catch (err) {\n console.warn(err);\n }\n }\n return this;\n }\n\n /**\n * Alias for document.createElement.\n *\n * @param {string} type - The type of element to create\n * @param {Object} attr - The element attributes to add to the created element.\n * @param {Various} children - Child elements. Can be a DOM Element, string or array of both.\n *\n * @return {HTMLElement} - The created element.\n */\n }, {\n key: \"ce\",\n value: function ce(type, attr) {\n var children = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n // console.warn('Call to deprecated this.ce(). Dom elements should be created with templates, not manually with ce.');\n // Create the element.\n var element = document.createElement(type);\n\n // Add attributes.\n if (attr) {\n this.attr(element, attr);\n }\n\n // Append the children.\n this.appendChild(element, children);\n return element;\n }\n\n /**\n * Append different types of children.\n *\n * @param child\n */\n }, {\n key: \"appendChild\",\n value: function appendChild(element, child) {\n var _this6 = this;\n if (Array.isArray(child)) {\n child.forEach(function (oneChild) {\n return _this6.appendChild(element, oneChild);\n });\n } else if (child instanceof HTMLElement || child instanceof Text) {\n element.appendChild(child);\n } else if (child) {\n element.appendChild(this.text(child.toString()));\n }\n return this;\n }\n\n /**\n * Creates a new input mask placeholder.\n * @param {HTMLElement} mask - The input mask.\n * @returns {string} - The placeholder that will exist within the input as they type.\n */\n }, {\n key: \"maskPlaceholder\",\n value: function maskPlaceholder(mask) {\n var _this7 = this;\n return mask.map(function (_char) {\n return _char instanceof RegExp ? _this7.placeholderChar : _char;\n }).join('');\n }\n }, {\n key: \"placeholderChar\",\n get: function get() {\n var _this$component;\n return ((_this$component = this.component) === null || _this$component === void 0 ? void 0 : _this$component.inputMaskPlaceholderChar) || '_';\n }\n\n /**\n * Sets the input mask for an input.\n *\n * @param {HTMLElement} input - The html input to apply the mask to.\n * @param {String} inputMask - The input mask to add to this input.\n * @param {Boolean} usePlaceholder - Set the mask placeholder on the input.\n */\n }, {\n key: \"setInputMask\",\n value: function setInputMask(input, inputMask, usePlaceholder) {\n if (input && inputMask) {\n var mask = FormioUtils.getInputMask(inputMask, this.placeholderChar);\n this.defaultMask = mask;\n try {\n //destroy previous mask\n if (input.mask) {\n input.mask.destroy();\n }\n input.mask = (0, _vanillaTextMask[\"default\"])({\n inputElement: input,\n mask: mask,\n placeholderChar: this.placeholderChar,\n shadowRoot: this.root ? this.root.shadowRoot : null\n });\n } catch (e) {\n // Don't pass error up, to prevent form rejection.\n // Internal bug of vanilla-text-mask on iOS (`selectionEnd`);\n console.warn(e);\n }\n if (mask.numeric) {\n input.setAttribute('pattern', '\\\\d*');\n }\n if (usePlaceholder) {\n input.setAttribute('placeholder', this.maskPlaceholder(mask));\n }\n }\n }\n\n /**\n * Translate a text using the i18n system.\n *\n * @param {string|Array} text - The i18n identifier.\n * @param {Object} params - The i18n parameters to use for translation.\n */\n }, {\n key: \"t\",\n value: function t(text) {\n var _this$i18next;\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n return (_this$i18next = this.i18next).t.apply(_this$i18next, [text].concat(args));\n }\n\n /**\n * Alias to create a text node.\n * @param text\n * @returns {Text}\n */\n }, {\n key: \"text\",\n value: function text(_text) {\n return document.createTextNode(this.t(_text));\n }\n\n /**\n * Adds an object of attributes onto an element.\n * @param {HtmlElement} element - The element to add the attributes to.\n * @param {Object} attr - The attributes to add to the input element.\n */\n }, {\n key: \"attr\",\n value: function attr(element, _attr) {\n var _this8 = this;\n if (!element) {\n return;\n }\n _lodash[\"default\"].each(_attr, function (value, key) {\n if (typeof value !== 'undefined') {\n if (key.indexOf('on') === 0) {\n // If this is an event, add a listener.\n _this8.addEventListener(element, key.substr(2).toLowerCase(), value);\n } else {\n // Otherwise it is just an attribute.\n element.setAttribute(key, value);\n }\n }\n });\n }\n\n /**\n * Determines if an element has a class.\n *\n * Taken from jQuery https://j11y.io/jquery/#v=1.5.0&fn=jQuery.fn.hasClass\n */\n }, {\n key: \"hasClass\",\n value: function hasClass(element, className) {\n if (!element) {\n return false;\n }\n // Allow templates to intercept.\n className = \" \".concat(className, \" \");\n return \" \".concat(element.className, \" \").replace(/[\\n\\t\\r]/g, ' ').indexOf(className) > -1;\n }\n\n /**\n * Adds a class to a DOM element.\n *\n * @param element\n * The element to add a class to.\n * @param className\n * The name of the class to add.\n */\n }, {\n key: \"addClass\",\n value: function addClass(element, className) {\n if (!element || !(element instanceof HTMLElement)) {\n return this;\n }\n // Allow templates to intercept.\n var classes = element.getAttribute('class');\n if (!(classes !== null && classes !== void 0 && classes.includes(className))) {\n element.setAttribute('class', \"\".concat(classes, \" \").concat(className));\n }\n return this;\n }\n\n /**\n * Remove a class from a DOM element.\n *\n * @param element\n * The DOM element to remove the class from.\n * @param className\n * The name of the class that is to be removed.\n */\n }, {\n key: \"removeClass\",\n value: function removeClass(element, className) {\n if (!element || !className || !(element instanceof HTMLElement)) {\n return this;\n }\n // Allow templates to intercept.\n var cls = element.getAttribute('class');\n if (cls) {\n cls = cls.replace(new RegExp(\" \".concat(className), 'g'), '');\n element.setAttribute('class', cls);\n }\n return this;\n }\n\n /**\n * Empty's an HTML DOM element.\n *\n * @param {HTMLElement} element - The element you wish to empty.\n */\n }, {\n key: \"empty\",\n value: function empty(element) {\n if (element) {\n while (element.firstChild) {\n element.removeChild(element.firstChild);\n }\n }\n }\n\n /**\n * Create an evaluation context for all script executions and interpolations.\n *\n * @param additional\n * @return {*}\n */\n }, {\n key: \"evalContext\",\n value: function evalContext(additional) {\n var _this$options;\n return Object.assign({\n _: _lodash[\"default\"],\n utils: FormioUtils,\n util: FormioUtils,\n user: _Formio.GlobalFormio.getUser(),\n moment: _moment[\"default\"],\n instance: this,\n self: this,\n token: _Formio.GlobalFormio.getToken({\n decode: true\n }),\n config: this.root && this.root.form && this.root.form.config ? this.root.form.config : (_this$options = this.options) !== null && _this$options !== void 0 && _this$options.formConfig ? this.options.formConfig : {}\n }, additional, _lodash[\"default\"].get(this.root, 'options.evalContext', {}));\n }\n\n /**\n * Performs an interpolation using the evaluation context of this component.\n *\n * @param string\n * @param data\n * @return {XML|string|*|void}\n */\n }, {\n key: \"interpolate\",\n value: function interpolate(string, data) {\n var _this9 = this;\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n if (typeof string !== 'function' && (this.component.content || this.component.html) && !FormioUtils.Evaluator.templateSettings.interpolate.test(string)) {\n string = FormioUtils.translateHTMLTemplate(String(string), function (value) {\n return _this9.t(value);\n });\n }\n return FormioUtils.interpolate(string, this.evalContext(data), options);\n }\n\n /**\n * Performs an evaluation using the evaluation context of this component.\n *\n * @param func\n * @param args\n * @param ret\n * @param tokenize\n * @return {*}\n */\n }, {\n key: \"evaluate\",\n value: function evaluate(func, args, ret, tokenize) {\n return FormioUtils.evaluate(func, this.evalContext(args), ret, tokenize);\n }\n\n /**\n * Allow for options to hook into the functionality of this renderer.\n * @return {*}\n */\n }, {\n key: \"hook\",\n value: function hook() {\n var name = arguments[0];\n if (this.options && this.options.hooks && this.options.hooks[name]) {\n return this.options.hooks[name].apply(this, Array.prototype.slice.call(arguments, 1));\n } else {\n // If this is an async hook instead of a sync.\n var fn = typeof arguments[arguments.length - 1] === 'function' ? arguments[arguments.length - 1] : null;\n if (fn) {\n return fn(null, arguments[1]);\n } else {\n return arguments[1];\n }\n }\n }\n }]);\n return Element;\n}();\nexports[\"default\"] = Element;\n\n//# sourceURL=webpack://Formio/./lib/Element.js?"); /***/ }), @@ -37,7 +48,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.weak-map.js */ \"./node_modules/core-js/modules/es.weak-map.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\nvar _eventemitter = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\n\nvar utils = _interopRequireWildcard(__webpack_require__(/*! ./utils/utils */ \"./lib/utils/utils.js\"));\n\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\n\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar EventEmitter = /*#__PURE__*/function (_EventEmitter) {\n _inherits(EventEmitter, _EventEmitter);\n\n var _super = _createSuper(EventEmitter);\n\n function EventEmitter() {\n var _thisSuper, _thisSuper2, _this;\n\n var conf = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n _classCallCheck(this, EventEmitter);\n\n var _conf$loadLimit = conf.loadLimit,\n loadLimit = _conf$loadLimit === void 0 ? 1000 : _conf$loadLimit,\n _conf$eventsSafeInter = conf.eventsSafeInterval,\n eventsSafeInterval = _conf$eventsSafeInter === void 0 ? 300 : _conf$eventsSafeInter;\n _this = _super.call(this);\n\n _defineProperty(_assertThisInitialized(_this), \"onAny\", function (fn) {\n _this.on('any', fn);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"offAny\", function (fn) {\n _this.off('any', fn);\n });\n\n var overloadHandler = function overloadHandler() {\n console.warn(\"There were more than \".concat(loadLimit, \" events emitted in \").concat(eventsSafeInterval, \" ms. It might be caused by events' infinite loop\"), _this.id);\n };\n\n var dispatch = utils.observeOverload(overloadHandler, {\n limit: loadLimit,\n delay: eventsSafeInterval\n });\n\n _this.emit = function () {\n var _get2, _get3;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n (_get2 = _get((_thisSuper = _assertThisInitialized(_this), _getPrototypeOf(EventEmitter.prototype)), \"emit\", _thisSuper)).call.apply(_get2, [_thisSuper].concat(args));\n\n (_get3 = _get((_thisSuper2 = _assertThisInitialized(_this), _getPrototypeOf(EventEmitter.prototype)), \"emit\", _thisSuper2)).call.apply(_get3, [_thisSuper2, 'any'].concat(args));\n\n dispatch();\n };\n\n return _this;\n }\n\n return _createClass(EventEmitter);\n}(_eventemitter.EventEmitter);\n\nexports[\"default\"] = EventEmitter;\n\n//# sourceURL=webpack://Formio/./lib/EventEmitter.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.weak-map.js */ \"./node_modules/core-js/modules/es.weak-map.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\nvar _eventemitter = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\nvar utils = _interopRequireWildcard(__webpack_require__(/*! ./utils/utils */ \"./lib/utils/utils.js\"));\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") { return { \"default\": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj[\"default\"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar EventEmitter = /*#__PURE__*/function (_EventEmitter) {\n _inherits(EventEmitter, _EventEmitter);\n var _super = _createSuper(EventEmitter);\n function EventEmitter() {\n var _thisSuper, _thisSuper2, _this;\n var conf = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n _classCallCheck(this, EventEmitter);\n var _conf$loadLimit = conf.loadLimit,\n loadLimit = _conf$loadLimit === void 0 ? 1000 : _conf$loadLimit,\n _conf$eventsSafeInter = conf.eventsSafeInterval,\n eventsSafeInterval = _conf$eventsSafeInter === void 0 ? 300 : _conf$eventsSafeInter;\n _this = _super.call(this);\n _defineProperty(_assertThisInitialized(_this), \"onAny\", function (fn) {\n _this.on('any', fn);\n });\n _defineProperty(_assertThisInitialized(_this), \"offAny\", function (fn) {\n _this.off('any', fn);\n });\n var overloadHandler = function overloadHandler() {\n console.warn(\"There were more than \".concat(loadLimit, \" events emitted in \").concat(eventsSafeInterval, \" ms. It might be caused by events' infinite loop\"), _this.id);\n };\n var dispatch = utils.observeOverload(overloadHandler, {\n limit: loadLimit,\n delay: eventsSafeInterval\n });\n _this.emit = function () {\n var _get2, _get3;\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n (_get2 = _get((_thisSuper = _assertThisInitialized(_this), _getPrototypeOf(EventEmitter.prototype)), \"emit\", _thisSuper)).call.apply(_get2, [_thisSuper].concat(args));\n (_get3 = _get((_thisSuper2 = _assertThisInitialized(_this), _getPrototypeOf(EventEmitter.prototype)), \"emit\", _thisSuper2)).call.apply(_get3, [_thisSuper2, 'any'].concat(args));\n dispatch();\n };\n return _this;\n }\n return _createClass(EventEmitter);\n}(_eventemitter.EventEmitter);\nexports[\"default\"] = EventEmitter;\n\n//# sourceURL=webpack://Formio/./lib/EventEmitter.js?"); /***/ }), @@ -48,7 +59,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.weak-map.js */ \"./node_modules/core-js/modules/es.weak-map.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.object.assign.js */ \"./node_modules/core-js/modules/es.object.assign.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\nvar _Element2 = _interopRequireDefault(__webpack_require__(/*! ./Element */ \"./lib/Element.js\"));\n\nvar _Formio = __webpack_require__(/*! ./Formio */ \"./lib/Formio.js\");\n\nvar _displays = _interopRequireDefault(__webpack_require__(/*! ./displays */ \"./lib/displays/index.js\"));\n\nvar _templates = _interopRequireDefault(__webpack_require__(/*! ./templates */ \"./lib/templates/index.js\"));\n\nvar FormioUtils = _interopRequireWildcard(__webpack_require__(/*! ./utils/utils */ \"./lib/utils/utils.js\"));\n\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\n\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\n\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct.bind(); } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar Form = /*#__PURE__*/function (_Element) {\n _inherits(Form, _Element);\n\n var _super = _createSuper(Form);\n\n /**\n * Creates an easy to use interface for embedding webforms, pdfs, and wizards into your application.\n *\n * @param {Object} element - The DOM element you wish to render this form within.\n * @param {Object | string} form - Either a Form JSON schema or the URL of a hosted form via. form.io.\n * @param {Object} options - The options to create a new form instance.\n * @param {boolean} options.readOnly - Set this form to readOnly\n * @param {boolean} options.noAlerts - Set to true to disable the alerts dialog.\n * @param {boolean} options.i18n - The translation file for this rendering. @see https://github.com/formio/formio.js/blob/master/i18n.js\n * @param {boolean} options.template - Provides a way to inject custom logic into the creation of every element rendered within the form.\n *\n * @example\n * import Form from 'formiojs/Form';\n * const form = new Form(document.getElementById('formio'), 'https://examples.form.io/example');\n * form.build();\n */\n function Form() {\n var _this;\n\n _classCallCheck(this, Form);\n\n var options = (arguments.length <= 0 ? undefined : arguments[0]) instanceof HTMLElement ? arguments.length <= 2 ? undefined : arguments[2] : arguments.length <= 1 ? undefined : arguments[1];\n\n if (_Formio.GlobalFormio.options && _Formio.GlobalFormio.options.form) {\n options = Object.assign(options, _Formio.GlobalFormio.options.form);\n }\n\n _this = _super.call(this, options);\n\n if (_this.options.useSessionToken) {\n _Formio.GlobalFormio.useSessionToken(_this.options);\n }\n\n _this.ready = new _nativePromiseOnly.default(function (resolve, reject) {\n _this.readyResolve = resolve;\n _this.readyReject = reject;\n });\n _this.instance = null;\n\n if ((arguments.length <= 0 ? undefined : arguments[0]) instanceof HTMLElement) {\n _this.element = arguments.length <= 0 ? undefined : arguments[0];\n _this.options = (arguments.length <= 2 ? undefined : arguments[2]) || {};\n _this.options.events = _this.events;\n\n _this.setForm(arguments.length <= 1 ? undefined : arguments[1]).then(function () {\n return _this.readyResolve(_this.instance);\n }).catch(_this.readyReject);\n } else if (arguments.length <= 0 ? undefined : arguments[0]) {\n _this.element = null;\n _this.options = (arguments.length <= 1 ? undefined : arguments[1]) || {};\n _this.options.events = _this.events;\n\n _this.setForm(arguments.length <= 0 ? undefined : arguments[0]).then(function () {\n return _this.readyResolve(_this.instance);\n }).catch(_this.readyReject);\n } else {\n _this.element = null;\n _this.options = {};\n _this.options.events = _this.events;\n }\n\n _this.display = '';\n return _this;\n }\n /**\n * Create a new form instance provided the display of the form.\n *\n * @param {string} display - The display of the form, either \"wizard\", \"form\", or \"pdf\"\n * @return {*}\n */\n\n\n _createClass(Form, [{\n key: \"create\",\n value: function create(display) {\n if (this.options && (this.options.flatten || this.options.renderMode === 'flat')) {\n display = 'form';\n }\n\n this.display = display;\n\n if (_displays.default.displays[display]) {\n return new _displays.default.displays[display](this.element, this.options);\n } else {\n // eslint-disable-next-line new-cap\n return new _displays.default.displays['webform'](this.element, this.options);\n }\n }\n /**\n * Sets the form. Either as JSON or a URL to a form JSON schema.\n *\n * @param {string|object} formParam - Either the form JSON or the URL of the form json.\n * @return {*}\n */\n\n }, {\n key: \"form\",\n get:\n /**\n * Returns the loaded forms JSON.\n *\n * @return {object} - The loaded form's JSON\n */\n function get() {\n return this._form;\n }\n /**\n * Changes the display of the form.\n *\n * @param {string} display - The display to set this form. Either \"wizard\", \"form\", or \"pdf\"\n * @return {Promise}\n */\n ,\n set: function set(formParam) {\n return this.setForm(formParam);\n }\n }, {\n key: \"errorForm\",\n value: function errorForm(err) {\n return {\n components: [{\n 'label': 'HTML',\n 'tag': 'div',\n 'className': 'error error-message alert alert-danger ui red message',\n 'attrs': [{\n 'attr': 'role',\n 'value': 'alert'\n }],\n 'key': 'errorMessage',\n 'type': 'htmlelement',\n 'input': false,\n 'content': typeof err === 'string' ? err : err.message\n }]\n };\n }\n }, {\n key: \"setForm\",\n value: function setForm(formParam) {\n var _this2 = this;\n\n var result;\n formParam = formParam || this.form;\n\n if (typeof formParam === 'string') {\n var formio = new _Formio.GlobalFormio(formParam);\n var error;\n result = this.getSubmission(formio).catch(function (err) {\n error = err;\n }).then(function (submission) {\n return formio.loadForm() // If the form returned an error, show it instead of the form.\n .catch(function (err) {\n error = err;\n }).then(function (form) {\n // If the submission returned an error, show it instead of the form.\n if (error) {\n form = _this2.errorForm(error);\n }\n\n _this2.instance = _this2.instance || _this2.create(form.display);\n _this2.instance.url = formParam;\n _this2.instance.nosubmit = false;\n _this2._form = _this2.instance.form = form;\n\n if (submission) {\n _this2.instance.submission = submission;\n }\n\n if (error) {\n throw error;\n }\n\n return _this2.instance;\n });\n });\n } else {\n this.instance = this.instance || this.create(formParam.display);\n this._form = this.instance.form = formParam;\n result = this.instance.ready;\n } // A redraw has occurred so save off the new element in case of a setDisplay causing a rebuild.\n\n\n return result.then(function () {\n _this2.element = _this2.instance.element;\n return _this2.instance;\n });\n }\n }, {\n key: \"getSubmission\",\n value: function getSubmission(formio) {\n if (formio.submissionId) {\n return formio.loadSubmission();\n }\n\n return _nativePromiseOnly.default.resolve();\n }\n }, {\n key: \"setDisplay\",\n value: function setDisplay(display) {\n if (this.display === display && this.instance) {\n return _nativePromiseOnly.default.resolve(this.instance);\n }\n\n this.form.display = display;\n this.instance.destroy();\n this.instance = this.create(display);\n return this.setForm(this.form);\n }\n }, {\n key: \"empty\",\n value: function empty() {\n if (this.element) {\n while (this.element.firstChild) {\n this.element.removeChild(this.element.firstChild);\n }\n }\n }\n }, {\n key: \"sanitize\",\n value:\n /**\n * Sanitize an html string.\n *\n * @param string\n * @returns {*}\n */\n function sanitize(dirty, forceSanitize) {\n // If Sanitize is turned off\n if (this.options.sanitize === false && !forceSanitize) {\n return dirty;\n }\n\n return FormioUtils.sanitize(dirty, this.options);\n }\n }, {\n key: \"setContent\",\n value: function setContent(element, content, forceSanitize) {\n if (element instanceof HTMLElement) {\n element.innerHTML = this.sanitize(content, forceSanitize);\n return true;\n }\n\n return false;\n }\n /**\n * Build a new form.\n *\n * @return {Promise}\n */\n\n }, {\n key: \"build\",\n value: function build() {\n var _this3 = this;\n\n if (!this.instance) {\n return _nativePromiseOnly.default.reject('Form not ready. Use form.ready promise');\n }\n\n if (!this.element) {\n return _nativePromiseOnly.default.reject('No DOM element for form.');\n } // Add temporary loader.\n\n\n var template = this.options && this.options.template ? this.options.template : 'bootstrap';\n var loader = _templates.default[template].loader || _templates.default.bootstrap.loader;\n this.setContent(this.element, loader.form);\n return this.render().then(function (html) {\n _this3.setContent(_this3.element, html);\n\n return _this3.attach(_this3.element).then(function () {\n return _this3.instance;\n });\n }).then(function (param) {\n _this3.emit('build', param);\n\n return param;\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this4 = this;\n\n if (!this.instance) {\n return _nativePromiseOnly.default.reject('Form not ready. Use form.ready promise');\n }\n\n return _nativePromiseOnly.default.resolve(this.instance.render()).then(function (param) {\n _this4.emit('render', param);\n\n return param;\n });\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n var _this5 = this;\n\n if (!this.instance) {\n return _nativePromiseOnly.default.reject('Form not ready. Use form.ready promise');\n }\n\n this.element = element;\n return this.instance.attach(this.element).then(function (param) {\n _this5.emit('attach', param);\n\n return param;\n });\n }\n }], [{\n key: \"embed\",\n value: function embed(_embed) {\n var _this6 = this;\n\n return new _nativePromiseOnly.default(function (resolve) {\n if (!_embed || !_embed.src) {\n resolve();\n }\n\n var id = _this6.id || \"formio-\".concat(Math.random().toString(36).substring(7));\n var className = _embed.class || 'formio-form-wrapper';\n var code = _embed.styles ? \"\") : '';\n code += \"
\");\n document.write(code);\n var attempts = 0;\n var wait = setInterval(function () {\n attempts++;\n var formElement = document.getElementById(id);\n\n if (formElement || attempts > 10) {\n resolve(new Form(formElement, _embed.src).ready);\n clearInterval(wait);\n }\n }, 10);\n });\n }\n }]);\n\n return Form;\n}(_Element2.default); // Allow simple embedding.\n\n\nexports[\"default\"] = Form;\n\n_Formio.GlobalFormio.embedForm = function (embed) {\n return Form.embed(embed);\n};\n/**\n * Factory that creates a new form based on the form parameters.\n *\n * @param element {HMTLElement} - The HTML Element to add this form to.\n * @param form {string|Object} - The src of the form, or a form object.\n * @param options {Object} - The options to create this form.\n *\n * @return {Promise} - When the form is instance is ready.\n */\n\n\n_Formio.GlobalFormio.createForm = function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _construct(Form, args).ready;\n};\n\n_Formio.GlobalFormio.Form = Form;\n\n//# sourceURL=webpack://Formio/./lib/Form.js?"); +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.weak-map.js */ \"./node_modules/core-js/modules/es.weak-map.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.object.assign.js */ \"./node_modules/core-js/modules/es.object.assign.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-string.js */ \"./node_modules/core-js/modules/es.date.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/web.timers.js */ \"./node_modules/core-js/modules/web.timers.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _Element2 = _interopRequireDefault(__webpack_require__(/*! ./Element */ \"./lib/Element.js\"));\nvar _Formio = __webpack_require__(/*! ./Formio */ \"./lib/Formio.js\");\nvar _displays = _interopRequireDefault(__webpack_require__(/*! ./displays */ \"./lib/displays/index.js\"));\nvar _templates = _interopRequireDefault(__webpack_require__(/*! ./templates */ \"./lib/templates/index.js\"));\nvar FormioUtils = _interopRequireWildcard(__webpack_require__(/*! ./utils/utils */ \"./lib/utils/utils.js\"));\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") { return { \"default\": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj[\"default\"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct.bind(); } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar Form = /*#__PURE__*/function (_Element) {\n _inherits(Form, _Element);\n var _super = _createSuper(Form);\n /**\n * Creates an easy to use interface for embedding webforms, pdfs, and wizards into your application.\n *\n * @param {Object} element - The DOM element you wish to render this form within.\n * @param {Object | string} form - Either a Form JSON schema or the URL of a hosted form via. form.io.\n * @param {Object} options - The options to create a new form instance.\n * @param {boolean} options.readOnly - Set this form to readOnly\n * @param {boolean} options.noAlerts - Set to true to disable the alerts dialog.\n * @param {boolean} options.i18n - The translation file for this rendering. @see https://github.com/formio/formio.js/blob/master/i18n.js\n * @param {boolean} options.template - Provides a way to inject custom logic into the creation of every element rendered within the form.\n *\n * @example\n * import Form from 'formiojs/Form';\n * const form = new Form(document.getElementById('formio'), 'https://examples.form.io/example');\n * form.build();\n */\n function Form() {\n var _this;\n _classCallCheck(this, Form);\n var options = (arguments.length <= 0 ? undefined : arguments[0]) instanceof HTMLElement ? arguments.length <= 2 ? undefined : arguments[2] : arguments.length <= 1 ? undefined : arguments[1];\n if (_Formio.GlobalFormio.options && _Formio.GlobalFormio.options.form) {\n options = Object.assign(options, _Formio.GlobalFormio.options.form);\n }\n _this = _super.call(this, options);\n if (_this.options.useSessionToken) {\n _Formio.GlobalFormio.useSessionToken(_this.options);\n }\n _this.ready = new _nativePromiseOnly[\"default\"](function (resolve, reject) {\n _this.readyResolve = resolve;\n _this.readyReject = reject;\n });\n _this.instance = null;\n if ((arguments.length <= 0 ? undefined : arguments[0]) instanceof HTMLElement) {\n _this.element = arguments.length <= 0 ? undefined : arguments[0];\n _this.options = (arguments.length <= 2 ? undefined : arguments[2]) || {};\n _this.options.events = _this.events;\n _this.setForm(arguments.length <= 1 ? undefined : arguments[1]).then(function () {\n return _this.readyResolve(_this.instance);\n })[\"catch\"](_this.readyReject);\n } else if (arguments.length <= 0 ? undefined : arguments[0]) {\n _this.element = null;\n _this.options = (arguments.length <= 1 ? undefined : arguments[1]) || {};\n _this.options.events = _this.events;\n _this.setForm(arguments.length <= 0 ? undefined : arguments[0]).then(function () {\n return _this.readyResolve(_this.instance);\n })[\"catch\"](_this.readyReject);\n } else {\n _this.element = null;\n _this.options = {};\n _this.options.events = _this.events;\n }\n _this.display = '';\n return _this;\n }\n\n /**\n * Create a new form instance provided the display of the form.\n *\n * @param {string} display - The display of the form, either \"wizard\", \"form\", or \"pdf\"\n * @return {*}\n */\n _createClass(Form, [{\n key: \"create\",\n value: function create(display) {\n if (this.options && (this.options.flatten || this.options.renderMode === 'flat')) {\n display = 'form';\n }\n this.display = display;\n if (_displays[\"default\"].displays[display]) {\n return new _displays[\"default\"].displays[display](this.element, this.options);\n } else {\n // eslint-disable-next-line new-cap\n return new _displays[\"default\"].displays['webform'](this.element, this.options);\n }\n }\n\n /**\n * Sets the form. Either as JSON or a URL to a form JSON schema.\n *\n * @param {string|object} formParam - Either the form JSON or the URL of the form json.\n * @return {*}\n */\n }, {\n key: \"form\",\n get:\n /**\n * Returns the loaded forms JSON.\n *\n * @return {object} - The loaded form's JSON\n */\n function get() {\n return this._form;\n }\n\n /**\n * Changes the display of the form.\n *\n * @param {string} display - The display to set this form. Either \"wizard\", \"form\", or \"pdf\"\n * @return {Promise}\n */,\n set: function set(formParam) {\n return this.setForm(formParam);\n }\n }, {\n key: \"errorForm\",\n value: function errorForm(err) {\n return {\n components: [{\n 'label': 'HTML',\n 'tag': 'div',\n 'className': 'error error-message alert alert-danger ui red message',\n 'attrs': [{\n 'attr': 'role',\n 'value': 'alert'\n }],\n 'key': 'errorMessage',\n 'type': 'htmlelement',\n 'input': false,\n 'content': typeof err === 'string' ? err : err.message\n }]\n };\n }\n }, {\n key: \"setForm\",\n value: function setForm(formParam) {\n var _this2 = this;\n var result;\n formParam = formParam || this.form;\n if (typeof formParam === 'string') {\n var formio = new _Formio.GlobalFormio(formParam);\n var error;\n result = this.getSubmission(formio, this.options)[\"catch\"](function (err) {\n error = err;\n }).then(function (submission) {\n return formio.loadForm()\n // If the form returned an error, show it instead of the form.\n [\"catch\"](function (err) {\n error = err;\n }).then(function (form) {\n // If the submission returned an error, show it instead of the form.\n if (error) {\n form = _this2.errorForm(error);\n }\n _this2.instance = _this2.instance || _this2.create(form.display);\n _this2.instance.url = formParam;\n _this2.instance.nosubmit = false;\n _this2._form = _this2.instance.form = form;\n if (submission) {\n _this2.instance.submission = submission;\n }\n if (error) {\n throw error;\n }\n return _this2.instance;\n });\n });\n } else {\n this.instance = this.instance || this.create(formParam.display);\n this._form = this.instance.form = formParam;\n result = this.instance.ready;\n }\n\n // A redraw has occurred so save off the new element in case of a setDisplay causing a rebuild.\n return result.then(function () {\n _this2.element = _this2.instance.element;\n return _this2.instance;\n });\n }\n }, {\n key: \"getSubmission\",\n value: function getSubmission(formio, opts) {\n if (formio.submissionId) {\n return formio.loadSubmission(null, opts);\n }\n return _nativePromiseOnly[\"default\"].resolve();\n }\n }, {\n key: \"setDisplay\",\n value: function setDisplay(display) {\n if (this.display === display && this.instance) {\n return _nativePromiseOnly[\"default\"].resolve(this.instance);\n }\n this.form.display = display;\n this.instance.destroy();\n this.instance = this.create(display);\n return this.setForm(this.form);\n }\n }, {\n key: \"empty\",\n value: function empty() {\n if (this.element) {\n while (this.element.firstChild) {\n this.element.removeChild(this.element.firstChild);\n }\n }\n }\n }, {\n key: \"sanitize\",\n value:\n /**\n * Sanitize an html string.\n *\n * @param string\n * @returns {*}\n */\n function sanitize(dirty, forceSanitize) {\n // If Sanitize is turned off\n if (this.options.sanitize === false && !forceSanitize) {\n return dirty;\n }\n return FormioUtils.sanitize(dirty, this.options);\n }\n }, {\n key: \"setContent\",\n value: function setContent(element, content, forceSanitize) {\n if (element instanceof HTMLElement) {\n element.innerHTML = this.sanitize(content, forceSanitize);\n return true;\n }\n return false;\n }\n\n /**\n * Build a new form.\n *\n * @return {Promise}\n */\n }, {\n key: \"build\",\n value: function build() {\n var _this3 = this;\n if (!this.instance) {\n return _nativePromiseOnly[\"default\"].reject('Form not ready. Use form.ready promise');\n }\n if (!this.element) {\n return _nativePromiseOnly[\"default\"].reject('No DOM element for form.');\n }\n\n // Add temporary loader.\n var template = this.options && this.options.template ? this.options.template : 'bootstrap';\n var loader = _templates[\"default\"][template].loader || _templates[\"default\"].bootstrap.loader;\n this.setContent(this.element, loader.form);\n return this.render().then(function (html) {\n _this3.setContent(_this3.element, html);\n return _this3.attach(_this3.element).then(function () {\n return _this3.instance;\n });\n }).then(function (param) {\n _this3.emit('build', param);\n return param;\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this4 = this;\n if (!this.instance) {\n return _nativePromiseOnly[\"default\"].reject('Form not ready. Use form.ready promise');\n }\n return _nativePromiseOnly[\"default\"].resolve(this.instance.render()).then(function (param) {\n _this4.emit('render', param);\n return param;\n });\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n var _this5 = this;\n if (!this.instance) {\n return _nativePromiseOnly[\"default\"].reject('Form not ready. Use form.ready promise');\n }\n this.element = element;\n return this.instance.attach(this.element).then(function (param) {\n _this5.emit('attach', param);\n return param;\n });\n }\n }], [{\n key: \"embed\",\n value: function embed(_embed) {\n var _this6 = this;\n return new _nativePromiseOnly[\"default\"](function (resolve) {\n if (!_embed || !_embed.src) {\n resolve();\n }\n var id = _this6.id || \"formio-\".concat(Math.random().toString(36).substring(7));\n var className = _embed[\"class\"] || 'formio-form-wrapper';\n var code = _embed.styles ? \"\") : '';\n code += \"
\");\n document.write(code);\n var attempts = 0;\n var wait = setInterval(function () {\n attempts++;\n var formElement = document.getElementById(id);\n if (formElement || attempts > 10) {\n resolve(new Form(formElement, _embed.src).ready);\n clearInterval(wait);\n }\n }, 10);\n });\n }\n }]);\n return Form;\n}(_Element2[\"default\"]); // Allow simple embedding.\nexports[\"default\"] = Form;\n_Formio.GlobalFormio.embedForm = function (embed) {\n return Form.embed(embed);\n};\n\n/**\n * Factory that creates a new form based on the form parameters.\n *\n * @param element {HMTLElement} - The HTML Element to add this form to.\n * @param form {string|Object} - The src of the form, or a form object.\n * @param options {Object} - The options to create this form.\n *\n * @return {Promise} - When the form is instance is ready.\n */\n_Formio.GlobalFormio.createForm = function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n return _construct(Form, args).ready;\n};\n_Formio.GlobalFormio.Form = Form;\n\n//# sourceURL=webpack://Formio/./lib/Form.js?"); /***/ }), @@ -59,7 +70,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.object.assign.js */ \"./node_modules/core-js/modules/es.object.assign.js\");\n\nvar _Formio = __webpack_require__(/*! ./Formio */ \"./lib/Formio.js\");\n\nvar _builders = _interopRequireDefault(__webpack_require__(/*! ./builders */ \"./lib/builders/index.js\"));\n\nvar _Form2 = _interopRequireDefault(__webpack_require__(/*! ./Form */ \"./lib/Form.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct.bind(); } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar FormBuilder = /*#__PURE__*/function (_Form) {\n _inherits(FormBuilder, _Form);\n\n var _super = _createSuper(FormBuilder);\n\n function FormBuilder(element, form, options) {\n _classCallCheck(this, FormBuilder);\n\n form = form || {};\n options = options || {};\n return _super.call(this, element, form, Object.assign(options, FormBuilder.options, _Formio.GlobalFormio.options && _Formio.GlobalFormio.options.builder ? _Formio.GlobalFormio.options.builder : {}));\n }\n\n _createClass(FormBuilder, [{\n key: \"create\",\n value: function create(display) {\n if (_builders.default.builders[display]) {\n return new _builders.default.builders[display](this.element, this.options);\n } else {\n // eslint-disable-next-line new-cap\n return new _builders.default.builders['webform'](this.element, this.options);\n }\n }\n }]);\n\n return FormBuilder;\n}(_Form2.default);\n/**\n * Factory that creates a new form builder based on the form parameter.\n *\n * @param element {HMTLElement} - The HTML Element to add this form to.\n * @param form {string|Object} - The src of the form, or a form object.\n * @param options {Object} - The options to create this form.\n *\n * @return {Promise} - When the form is instance is ready.\n */\n\n\nexports[\"default\"] = FormBuilder;\n\n_defineProperty(FormBuilder, \"options\", {});\n\n_Formio.GlobalFormio.builder = function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _construct(FormBuilder, args).ready;\n};\n\n_Formio.GlobalFormio.FormBuilder = FormBuilder;\n\n//# sourceURL=webpack://Formio/./lib/FormBuilder.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.object.assign.js */ \"./node_modules/core-js/modules/es.object.assign.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\nvar _Formio = __webpack_require__(/*! ./Formio */ \"./lib/Formio.js\");\nvar _builders = _interopRequireDefault(__webpack_require__(/*! ./builders */ \"./lib/builders/index.js\"));\nvar _Form2 = _interopRequireDefault(__webpack_require__(/*! ./Form */ \"./lib/Form.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct.bind(); } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar FormBuilder = /*#__PURE__*/function (_Form) {\n _inherits(FormBuilder, _Form);\n var _super = _createSuper(FormBuilder);\n function FormBuilder(element, form, options) {\n _classCallCheck(this, FormBuilder);\n form = form || {};\n options = options || {};\n return _super.call(this, element, form, Object.assign(options, FormBuilder.options, _Formio.GlobalFormio.options && _Formio.GlobalFormio.options.builder ? _Formio.GlobalFormio.options.builder : {}));\n }\n _createClass(FormBuilder, [{\n key: \"create\",\n value: function create(display) {\n if (_builders[\"default\"].builders[display]) {\n return new _builders[\"default\"].builders[display](this.element, this.options);\n } else {\n // eslint-disable-next-line new-cap\n return new _builders[\"default\"].builders['webform'](this.element, this.options);\n }\n }\n }]);\n return FormBuilder;\n}(_Form2[\"default\"]);\n/**\n * Factory that creates a new form builder based on the form parameter.\n *\n * @param element {HMTLElement} - The HTML Element to add this form to.\n * @param form {string|Object} - The src of the form, or a form object.\n * @param options {Object} - The options to create this form.\n *\n * @return {Promise} - When the form is instance is ready.\n */\nexports[\"default\"] = FormBuilder;\n_defineProperty(FormBuilder, \"options\", {});\n_Formio.GlobalFormio.builder = function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n return _construct(FormBuilder, args).ready;\n};\n_Formio.GlobalFormio.FormBuilder = FormBuilder;\n\n//# sourceURL=webpack://Formio/./lib/FormBuilder.js?"); /***/ }), @@ -70,7 +81,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\n__webpack_require__(/*! core-js/modules/es.array.slice.js */ \"./node_modules/core-js/modules/es.array.slice.js\");\n\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.from.js */ \"./node_modules/core-js/modules/es.array.from.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = exports.GlobalFormio = void 0;\n\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.match.js */ \"./node_modules/core-js/modules/es.string.match.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.search.js */ \"./node_modules/core-js/modules/es.string.search.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.split.js */ \"./node_modules/core-js/modules/es.string.split.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.constructor.js */ \"./node_modules/core-js/modules/es.regexp.constructor.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.join.js */ \"./node_modules/core-js/modules/es.array.join.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.includes.js */ \"./node_modules/core-js/modules/es.array.includes.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.includes.js */ \"./node_modules/core-js/modules/es.string.includes.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.assign.js */ \"./node_modules/core-js/modules/es.object.assign.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.sort.js */ \"./node_modules/core-js/modules/es.array.sort.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\n\nvar _fetchPonyfill2 = _interopRequireDefault(__webpack_require__(/*! fetch-ponyfill */ \"./node_modules/fetch-ponyfill/build/fetch-browser.js\"));\n\nvar _EventEmitter = _interopRequireDefault(__webpack_require__(/*! ./EventEmitter */ \"./lib/EventEmitter.js\"));\n\nvar _browserCookies = _interopRequireDefault(__webpack_require__(/*! browser-cookies */ \"./node_modules/browser-cookies/src/browser-cookies.js\"));\n\nvar _providers = _interopRequireDefault(__webpack_require__(/*! ./providers */ \"./lib/providers/index.js\"));\n\nvar _intersection2 = _interopRequireDefault(__webpack_require__(/*! lodash/intersection */ \"./node_modules/lodash/intersection.js\"));\n\nvar _get2 = _interopRequireDefault(__webpack_require__(/*! lodash/get */ \"./node_modules/lodash/get.js\"));\n\nvar _cloneDeep2 = _interopRequireDefault(__webpack_require__(/*! lodash/cloneDeep */ \"./node_modules/lodash/cloneDeep.js\"));\n\nvar _defaults2 = _interopRequireDefault(__webpack_require__(/*! lodash/defaults */ \"./node_modules/lodash/defaults.js\"));\n\nvar _utils = __webpack_require__(/*! ./utils/utils */ \"./lib/utils/utils.js\");\n\nvar _jwtDecode = _interopRequireDefault(__webpack_require__(/*! jwt-decode */ \"./node_modules/jwt-decode/build/jwt-decode.esm.js\"));\n\n__webpack_require__(/*! ./polyfills */ \"./lib/polyfills/index.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { 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\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nvar _fetchPonyfill = (0, _fetchPonyfill2.default)({\n Promise: _nativePromiseOnly.default\n}),\n fetch = _fetchPonyfill.fetch,\n Headers = _fetchPonyfill.Headers;\n\nvar isBoolean = function isBoolean(val) {\n return _typeof(val) === _typeof(true);\n};\n\nvar isNil = function isNil(val) {\n return val === null || val === undefined;\n};\n\nvar isObject = function isObject(val) {\n return val && _typeof(val) === 'object';\n};\n\nfunction cloneResponse(response) {\n var copy = (0, _cloneDeep2.default)(response);\n\n if (Array.isArray(response)) {\n copy.skip = response.skip;\n copy.limit = response.limit;\n copy.serverCount = response.serverCount;\n }\n\n return copy;\n}\n/**\n * The Formio interface class.\n *\n * let formio = new Formio('https://examples.form.io/example');\n */\n\n\nvar Formio = /*#__PURE__*/function () {\n /* eslint-disable max-statements */\n function Formio(path) {\n var _this = this;\n\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n _classCallCheck(this, Formio);\n\n // Ensure we have an instance of Formio.\n if (!(this instanceof Formio)) {\n return new Formio(path);\n } // Initialize our variables.\n\n\n this.base = '';\n this.projectsUrl = '';\n this.projectUrl = '';\n this.projectId = '';\n this.roleUrl = '';\n this.rolesUrl = '';\n this.roleId = '';\n this.formUrl = '';\n this.formsUrl = '';\n this.formId = '';\n this.submissionsUrl = '';\n this.submissionUrl = '';\n this.submissionId = '';\n this.actionsUrl = '';\n this.actionId = '';\n this.actionUrl = '';\n this.vsUrl = '';\n this.vId = '';\n this.vUrl = '';\n this.query = ''; // Store the original path and options.\n\n this.path = path;\n this.options = options;\n\n if (options.useSessionToken) {\n Formio.useSessionToken(options);\n }\n\n if (options.hasOwnProperty('base')) {\n this.base = options.base;\n } else if (Formio.baseUrl) {\n this.base = Formio.baseUrl;\n } else if (typeof window !== 'undefined') {\n this.base = window.location.href.match(/http[s]?:\\/\\/api./)[0];\n }\n\n if (!path) {\n // Allow user to create new projects if this was instantiated without\n // a url\n this.projectUrl = Formio.projectUrl || \"\".concat(this.base, \"/project\");\n this.projectsUrl = \"\".concat(this.base, \"/project\");\n this.projectId = false;\n this.query = '';\n return;\n }\n\n if (options.hasOwnProperty('project')) {\n this.projectUrl = options.project;\n }\n\n var project = this.projectUrl || Formio.projectUrl;\n var projectRegEx = /(^|\\/)(project)($|\\/[^/]+)/;\n var isProjectUrl = path.search(projectRegEx) !== -1; // 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\n if (project && this.base === project && !isProjectUrl) {\n this.noProject = true;\n this.projectUrl = this.base;\n } // Normalize to an absolute path.\n\n\n if (path.indexOf('http') !== 0 && path.indexOf('//') !== 0) {\n path = this.base + path;\n }\n\n var hostparts = this.getUrlParts(path);\n var parts = [];\n var hostName = hostparts[1] + hostparts[2];\n path = hostparts.length > 3 ? hostparts[3] : '';\n var queryparts = path.split('?');\n\n if (queryparts.length > 1) {\n path = queryparts[0];\n this.query = \"?\".concat(queryparts[1]);\n } // Register a specific path.\n\n\n var registerPath = function registerPath(name, base) {\n _this[\"\".concat(name, \"sUrl\")] = \"\".concat(base, \"/\").concat(name);\n var regex = new RegExp(\"/\".concat(name, \"/([^/]+)\"));\n\n if (path.search(regex) !== -1) {\n parts = path.match(regex);\n _this[\"\".concat(name, \"Url\")] = parts ? base + parts[0] : '';\n _this[\"\".concat(name, \"Id\")] = parts.length > 1 ? parts[1] : '';\n base += parts[0];\n }\n\n return base;\n }; // Register an array of items.\n\n\n var registerItems = function registerItems(items, base, staticBase) {\n for (var i in items) {\n if (items.hasOwnProperty(i)) {\n var item = items[i];\n\n if (Array.isArray(item)) {\n registerItems(item, base, true);\n } else {\n var newBase = registerPath(item, base);\n base = staticBase ? base : newBase;\n }\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 var regex = \"^\".concat(hostName.replace(/\\//g, '\\\\/'), \".[^/]+\");\n var match = project.match(new RegExp(regex));\n this.projectUrl = match ? match[0] : hostName;\n } else {\n this.projectUrl = hostName;\n }\n } // Check if we have a specified path type.\n\n\n var isNotSubdomainType = false;\n\n if (Formio.pathType) {\n isNotSubdomainType = Formio.pathType !== 'Subdomains';\n }\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 } else if (hostName === this.base) {\n // Get project id as first part of path (subdirectory).\n if (hostparts.length > 3 && path.split('/').length > 1) {\n var isFile = path.match(/.json/);\n var pathParts = path.split('/');\n\n if (isFile) {\n this.projectUrl = hostName;\n } else {\n pathParts.shift(); // Throw away the first /.\n\n this.projectId = pathParts.shift();\n path = \"/\".concat(pathParts.join('/'));\n this.projectUrl = \"\".concat(hostName, \"/\").concat(this.projectId);\n }\n }\n } else {\n // Get project id from subdomain.\n if (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\n this.projectsUrl = this.projectsUrl || \"\".concat(this.base, \"/project\");\n } // Configure Role urls and role ids.\n\n\n registerItems(['role'], this.projectUrl); // Configure Form urls and form ids.\n\n if (/(^|\\/)(form)($|\\/)/.test(path)) {\n registerItems(['form', ['submission', 'action', 'v']], this.projectUrl);\n } else {\n var subRegEx = new RegExp('/(submission|action|v)($|/.*)');\n var subs = path.match(subRegEx);\n this.pathType = subs && subs.length > 1 ? subs[1] : '';\n path = path.replace(subRegEx, '');\n path = path.replace(/\\/$/, '');\n this.formsUrl = \"\".concat(this.projectUrl, \"/form\");\n this.formUrl = path ? this.projectUrl + path : '';\n this.formId = path.replace(/^\\/+|\\/+$/g, '');\n var items = ['submission', 'action', 'v'];\n\n for (var i in items) {\n if (items.hasOwnProperty(i)) {\n var item = items[i];\n this[\"\".concat(item, \"sUrl\")] = \"\".concat(this.projectUrl + path, \"/\").concat(item);\n\n if (this.pathType === item && subs.length > 2 && subs[2]) {\n this[\"\".concat(item, \"Id\")] = subs[2].replace(/^\\/+|\\/+$/g, '');\n this[\"\".concat(item, \"Url\")] = this.projectUrl + path + subs[0];\n }\n }\n }\n } // Set the app url if it is not set.\n\n\n if (!Formio.projectUrlSet) {\n Formio.projectUrl = this.projectUrl;\n }\n }\n /* eslint-enable max-statements */\n\n\n _createClass(Formio, [{\n key: \"delete\",\n value: function _delete(type, opts) {\n var _id = \"\".concat(type, \"Id\");\n\n var _url = \"\".concat(type, \"Url\");\n\n if (!this[_id]) {\n return _nativePromiseOnly.default.reject('Nothing to delete');\n }\n\n Formio.cache = {};\n return this.makeRequest(type, this[_url], 'delete', null, opts);\n }\n }, {\n key: \"index\",\n value: function index(type, query, opts) {\n var _url = \"\".concat(type, \"Url\");\n\n query = query || '';\n\n if (query && isObject(query)) {\n query = \"?\".concat(Formio.serialize(query.params));\n }\n\n return this.makeRequest(type, this[_url] + query, 'get', null, opts);\n }\n }, {\n key: \"save\",\n value: function save(type, data, opts) {\n var _id = \"\".concat(type, \"Id\");\n\n var _url = \"\".concat(type, \"Url\");\n\n var method = this[_id] || data._id ? 'put' : 'post';\n var reqUrl = this[_id] ? this[_url] : this[\"\".concat(type, \"sUrl\")];\n\n if (!this[_id] && data._id && method === 'put' && !reqUrl.includes(data._id)) {\n reqUrl += \"/\".concat(data._id);\n }\n\n Formio.cache = {};\n return this.makeRequest(type, reqUrl + this.query, method, data, opts);\n }\n }, {\n key: \"load\",\n value: function load(type, query, opts) {\n var _id = \"\".concat(type, \"Id\");\n\n var _url = \"\".concat(type, \"Url\");\n\n if (query && isObject(query)) {\n query = Formio.serialize(query.params);\n }\n\n if (query) {\n query = this.query ? \"\".concat(this.query, \"&\").concat(query) : \"?\".concat(query);\n } else {\n query = this.query;\n }\n\n if (!this[_id]) {\n return _nativePromiseOnly.default.reject(\"Missing \".concat(_id));\n }\n\n var url = this[_url] + query;\n\n if (type === 'form' && !isNaN(parseInt(this.vId)) && parseInt(this.vId) !== 0) {\n url += url.match(/\\?/) ? '&' : '?';\n url += \"formRevision=\".concat(this.vId);\n }\n\n return this.makeRequest(type, url, 'get', null, opts);\n }\n }, {\n key: \"makeRequest\",\n value: function makeRequest() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return Formio.makeRequest.apply(Formio, [this].concat(args));\n }\n }, {\n key: \"loadProject\",\n value: function loadProject(query, opts) {\n return this.load('project', query, opts);\n }\n }, {\n key: \"saveProject\",\n value: function saveProject(data, opts) {\n return this.save('project', data, opts);\n }\n }, {\n key: \"deleteProject\",\n value: function deleteProject(opts) {\n return this.delete('project', opts);\n }\n }, {\n key: \"loadRole\",\n value: function loadRole(opts) {\n return this.load('role', null, opts);\n }\n }, {\n key: \"saveRole\",\n value: function saveRole(data, opts) {\n return this.save('role', data, opts);\n }\n }, {\n key: \"deleteRole\",\n value: function deleteRole(opts) {\n return this.delete('role', opts);\n }\n }, {\n key: \"loadRoles\",\n value: function loadRoles(opts) {\n return this.index('roles', null, opts);\n }\n }, {\n key: \"loadForm\",\n value: function loadForm(query, opts) {\n var _this2 = this;\n\n return this.load('form', query, opts).then(function (currentForm) {\n // Check to see if there isn't a number in vId.\n if (!currentForm.revisions || isNaN(parseInt(_this2.vId))) {\n return currentForm;\n } // If a submission already exists but form is marked to load current version of form.\n\n\n if (currentForm.revisions === 'current' && _this2.submissionId) {\n return currentForm;\n } // eslint-disable-next-line eqeqeq\n\n\n if (currentForm._vid == _this2.vId || currentForm.revisionId === _this2.vId) {\n return currentForm;\n } // If they specified a revision form, load the revised form components.\n\n\n if (query && isObject(query)) {\n query = Formio.serialize(query.params);\n }\n\n if (query) {\n query = _this2.query ? \"\".concat(_this2.query, \"&\").concat(query) : \"?\".concat(query);\n } else {\n query = _this2.query;\n }\n\n return _this2.makeRequest('form', _this2.vUrl + query, 'get', null, opts).then(function (revisionForm) {\n currentForm._vid = revisionForm._vid;\n currentForm.components = revisionForm.components;\n currentForm.settings = revisionForm.settings;\n currentForm.revisionId = revisionForm.revisionId; // Using object.assign so we don't cross polinate multiple form loads.\n\n return Object.assign({}, currentForm);\n }) // If we couldn't load the revision, just return the original form.\n .catch(function () {\n return Object.assign({}, currentForm);\n });\n });\n }\n }, {\n key: \"saveForm\",\n value: function saveForm(data, opts) {\n return this.save('form', data, opts);\n }\n }, {\n key: \"deleteForm\",\n value: function deleteForm(opts) {\n return this.delete('form', opts);\n }\n }, {\n key: \"loadForms\",\n value: function loadForms(query, opts) {\n return this.index('forms', query, opts);\n }\n }, {\n key: \"loadSubmission\",\n value: function loadSubmission(query, opts) {\n var _this3 = this;\n\n return this.load('submission', query, opts).then(function (submission) {\n _this3.vId = submission._frid || submission._fvid;\n _this3.vUrl = \"\".concat(_this3.formUrl, \"/v/\").concat(_this3.vId);\n return submission;\n });\n }\n }, {\n key: \"saveSubmission\",\n value: function saveSubmission(data, opts) {\n if (!isNaN(parseInt(this.vId))) {\n data._fvid = this.vId;\n }\n\n return this.save('submission', data, opts);\n }\n }, {\n key: \"deleteSubmission\",\n value: function deleteSubmission(opts) {\n return this.delete('submission', opts);\n }\n }, {\n key: \"loadSubmissions\",\n value: function loadSubmissions(query, opts) {\n return this.index('submissions', query, opts);\n }\n }, {\n key: \"loadAction\",\n value: function loadAction(query, opts) {\n return this.load('action', query, opts);\n }\n }, {\n key: \"saveAction\",\n value: function saveAction(data, opts) {\n return this.save('action', data, opts);\n }\n }, {\n key: \"deleteAction\",\n value: function deleteAction(opts) {\n return this.delete('action', opts);\n }\n }, {\n key: \"loadActions\",\n value: function loadActions(query, opts) {\n return this.index('actions', query, opts);\n }\n }, {\n key: \"availableActions\",\n value: function availableActions() {\n return this.makeRequest('availableActions', \"\".concat(this.formUrl, \"/actions\"));\n }\n }, {\n key: \"actionInfo\",\n value: function actionInfo(name) {\n return this.makeRequest('actionInfo', \"\".concat(this.formUrl, \"/actions/\").concat(name));\n }\n }, {\n key: \"isObjectId\",\n value: function isObjectId(id) {\n var checkForHexRegExp = new RegExp('^[0-9a-fA-F]{24}$');\n return checkForHexRegExp.test(id);\n }\n }, {\n key: \"getProjectId\",\n value: function getProjectId() {\n if (!this.projectId) {\n return _nativePromiseOnly.default.resolve('');\n }\n\n if (this.isObjectId(this.projectId)) {\n return _nativePromiseOnly.default.resolve(this.projectId);\n } else {\n return this.loadProject().then(function (project) {\n return project._id;\n });\n }\n }\n }, {\n key: \"getFormId\",\n value: function getFormId() {\n if (!this.formId) {\n return _nativePromiseOnly.default.resolve('');\n }\n\n if (this.isObjectId(this.formId)) {\n return _nativePromiseOnly.default.resolve(this.formId);\n } else {\n return this.loadForm().then(function (form) {\n return form._id;\n });\n }\n }\n }, {\n key: \"currentUser\",\n value: function currentUser(options) {\n return Formio.currentUser(this, options);\n }\n }, {\n key: \"accessInfo\",\n value: function accessInfo() {\n return Formio.accessInfo(this);\n }\n /**\n * Returns the JWT token for this instance.\n *\n * @return {*}\n */\n\n }, {\n key: \"getToken\",\n value: function getToken(options) {\n return Formio.getToken(Object.assign({\n formio: this\n }, this.options, options));\n }\n /**\n * Sets the JWT token for this instance.\n *\n * @return {*}\n */\n\n }, {\n key: \"setToken\",\n value: function setToken(token, options) {\n return Formio.setToken(token, Object.assign({\n formio: this\n }, this.options, options));\n }\n /**\n * Returns a temporary authentication token for single purpose token generation.\n */\n\n }, {\n key: \"getTempToken\",\n value: function getTempToken(expire, allowed, options) {\n var token = Formio.getToken(options);\n\n if (!token) {\n return _nativePromiseOnly.default.reject('You must be authenticated to generate a temporary auth token.');\n }\n\n var authUrl = Formio.authUrl || this.projectUrl;\n return this.makeRequest('tempToken', \"\".concat(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 download url for a submission PDF of this submission.\n *\n * @return {*}\n */\n\n }, {\n key: \"getDownloadUrl\",\n value: function getDownloadUrl(form) {\n var _this4 = this;\n\n if (!this.submissionId) {\n return _nativePromiseOnly.default.resolve('');\n }\n\n if (!form) {\n // Make sure to load the form first.\n return this.loadForm().then(function (_form) {\n if (!_form) {\n return '';\n }\n\n return _this4.getDownloadUrl(_form);\n });\n }\n\n var apiUrl = \"/project/\".concat(form.project);\n apiUrl += \"/form/\".concat(form._id);\n apiUrl += \"/submission/\".concat(this.submissionId);\n var postfix = form.submissionRevisions && form.settings.changeLog ? '/download/changelog' : '/download';\n apiUrl += postfix;\n var download = this.base + apiUrl;\n return new _nativePromiseOnly.default(function (resolve, reject) {\n _this4.getTempToken(3600, \"GET:\".concat(apiUrl)).then(function (tempToken) {\n download += \"?token=\".concat(tempToken.key);\n resolve(download);\n }, function () {\n resolve(download);\n }).catch(reject);\n });\n }\n }, {\n key: \"uploadFile\",\n value: function uploadFile(storage, file, fileName, dir, progressCallback, url, options, fileKey, groupPermissions, groupId, uploadStartCallback, abortCallback) {\n var _this5 = this;\n\n var requestArgs = {\n provider: storage,\n method: 'upload',\n file: file,\n fileName: fileName,\n dir: dir\n };\n fileKey = fileKey || 'file';\n var request = Formio.pluginWait('preRequest', requestArgs).then(function () {\n return Formio.pluginGet('fileRequest', requestArgs).then(function (result) {\n if (storage && isNil(result)) {\n var Provider = _providers.default.getProvider('storage', storage);\n\n if (Provider) {\n var provider = new Provider(_this5);\n\n if (uploadStartCallback) {\n uploadStartCallback();\n }\n\n return provider.uploadFile(file, fileName, dir, progressCallback, url, options, fileKey, groupPermissions, groupId, abortCallback);\n } else {\n throw 'Storage provider not found';\n }\n }\n\n return result || {\n url: ''\n };\n });\n });\n return Formio.pluginAlter('wrapFileRequestPromise', request, requestArgs);\n }\n }, {\n key: \"downloadFile\",\n value: function downloadFile(file, options) {\n var _this6 = this;\n\n var requestArgs = {\n method: 'download',\n file: file\n };\n var request = Formio.pluginWait('preRequest', requestArgs).then(function () {\n return Formio.pluginGet('fileRequest', requestArgs).then(function (result) {\n if (file.storage && isNil(result)) {\n var Provider = _providers.default.getProvider('storage', file.storage);\n\n if (Provider) {\n var provider = new Provider(_this6);\n return provider.downloadFile(file, options);\n } else {\n throw 'Storage provider not found';\n }\n }\n\n return result || {\n url: ''\n };\n });\n });\n return Formio.pluginAlter('wrapFileRequestPromise', request, requestArgs);\n }\n }, {\n key: \"deleteFile\",\n value: function deleteFile(file, options) {\n var _this7 = this;\n\n var requestArgs = {\n method: 'delete',\n file: file\n };\n var request = Formio.pluginWait('preRequest', requestArgs).then(function () {\n return Formio.pluginGet('fileRequest', requestArgs).then(function (result) {\n if (file.storage && isNil(result)) {\n var Provider = _providers.default.getProvider('storage', file.storage);\n\n if (Provider) {\n var provider = new Provider(_this7);\n return provider.deleteFile(file, options);\n } else {\n throw 'Storage provider not found';\n }\n }\n\n return result || {\n url: ''\n };\n });\n });\n return Formio.pluginAlter('wrapFileRequestPromise', request, requestArgs);\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\n }, {\n key: \"userPermissions\",\n value: function userPermissions(user, form, submission) {\n return _nativePromiseOnly.default.all([form !== undefined ? _nativePromiseOnly.default.resolve(form) : this.loadForm(), user !== undefined ? _nativePromiseOnly.default.resolve(user) : this.currentUser(), submission !== undefined || !this.submissionId ? _nativePromiseOnly.default.resolve(submission) : this.loadSubmission(), this.accessInfo()]).then(function (results) {\n var form = results.shift();\n var user = results.shift() || {\n _id: false,\n roles: []\n };\n var submission = results.shift();\n var access = results.shift();\n var permMap = {\n create: 'create',\n read: 'read',\n update: 'edit',\n delete: 'delete'\n };\n var perms = {\n user: user,\n form: form,\n access: access,\n create: false,\n read: false,\n edit: false,\n delete: false\n };\n\n for (var roleName in access.roles) {\n if (access.roles.hasOwnProperty(roleName)) {\n var role = access.roles[roleName];\n\n if (role.default && user._id === false) {\n // User is anonymous. Add the anonymous role.\n user.roles.push(role._id);\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\n if (form && form.submissionAccess) {\n for (var i = 0; i < form.submissionAccess.length; i++) {\n var permission = form.submissionAccess[i];\n\n var _permission$type$spli = permission.type.split('_'),\n _permission$type$spli2 = _slicedToArray(_permission$type$spli, 2),\n perm = _permission$type$spli2[0],\n scope = _permission$type$spli2[1];\n\n if (['create', 'read', 'update', 'delete'].includes(perm)) {\n if ((0, _intersection2.default)(permission.roles, user.roles).length) {\n perms[permMap[perm]] = scope === 'all' || !submission || user._id === submission.owner;\n }\n }\n }\n } // check for Group Permissions\n\n\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, _utils.eachComponent)(form.components, function (component, path) {\n if (component && component.defaultPermission) {\n var value = (0, _get2.default)(submission.data, path); // make it work for single-select Group and multi-select Group\n\n var groups = Array.isArray(value) ? value : [value];\n groups.forEach(function (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\n if (component.defaultPermission === 'create') {\n perms[permMap.create] = true;\n perms[permMap.read] = true;\n }\n\n if (component.defaultPermission === 'write') {\n perms[permMap.create] = true;\n perms[permMap.read] = true;\n perms[permMap.update] = true;\n }\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\n return perms;\n });\n }\n /**\n * Determine if the current user can submit a form.\n * @return {*}\n */\n\n }, {\n key: \"canSubmit\",\n value: function canSubmit() {\n var _this8 = this;\n\n return this.userPermissions().then(function (perms) {\n // If there is user and they cannot create, then check anonymous user permissions.\n if (!perms.create && Formio.getUser()) {\n return _this8.userPermissions(null).then(function (anonPerms) {\n if (anonPerms.create) {\n Formio.setUser(null);\n return true;\n }\n\n return false;\n });\n }\n\n return perms.create;\n });\n }\n }, {\n key: \"getUrlParts\",\n value: function getUrlParts(url) {\n return Formio.getUrlParts(url, this);\n }\n }], [{\n key: \"useSessionToken\",\n value: function useSessionToken(options) {\n var tokenName = \"\".concat(options.namespace || Formio.namespace || 'formio', \"Token\");\n var token = localStorage.getItem(tokenName);\n\n if (token) {\n localStorage.removeItem(tokenName);\n sessionStorage.setItem(tokenName, token);\n }\n\n var userName = \"\".concat(options.namespace || Formio.namespace || 'formio', \"User\");\n var user = localStorage.getItem(userName);\n\n if (user) {\n localStorage.removeItem(userName);\n sessionStorage.setItem(userName, user);\n }\n\n localStorage.setItem('useSessionToken', true);\n }\n }, {\n key: \"loadProjects\",\n value: function loadProjects(query, opts) {\n query = query || '';\n\n if (isObject(query)) {\n query = \"?\".concat(Formio.serialize(query.params));\n }\n\n return Formio.makeStaticRequest(\"\".concat(Formio.baseUrl, \"/project\").concat(query), 'GET', null, opts);\n }\n }, {\n key: \"getUrlParts\",\n value: function getUrlParts(url, formio) {\n var base = formio && formio.base ? formio.base : Formio.baseUrl;\n var regex = '^(http[s]?:\\\\/\\\\/)';\n\n if (base && url.indexOf(base) === 0) {\n regex += \"(\".concat(base.replace(/^http[s]?:\\/\\//, ''), \")\");\n } else {\n regex += '([^/]+)';\n }\n\n regex += '($|\\\\/.*)';\n return url.match(new RegExp(regex));\n }\n }, {\n key: \"serialize\",\n value: function serialize(obj, _interpolate) {\n var str = [];\n\n var interpolate = function interpolate(item) {\n return _interpolate ? _interpolate(item) : item;\n };\n\n for (var p in obj) {\n if (obj.hasOwnProperty(p)) {\n str.push(\"\".concat(encodeURIComponent(p), \"=\").concat(encodeURIComponent(interpolate(obj[p]))));\n }\n }\n\n return str.join('&');\n }\n }, {\n key: \"getRequestArgs\",\n value: function getRequestArgs(formio, type, url, method, data, opts) {\n method = (method || 'GET').toUpperCase();\n\n if (!opts || !isObject(opts)) {\n opts = {};\n }\n\n var requestArgs = {\n url: url,\n method: method,\n data: data || null,\n opts: opts\n };\n\n if (type) {\n requestArgs.type = type;\n }\n\n if (formio) {\n requestArgs.formio = formio;\n }\n\n return requestArgs;\n }\n }, {\n key: \"makeStaticRequest\",\n value: function makeStaticRequest(url, method, data, opts) {\n var requestArgs = Formio.getRequestArgs(null, '', url, method, data, opts);\n var request = Formio.pluginWait('preRequest', requestArgs).then(function () {\n return Formio.pluginGet('staticRequest', requestArgs).then(function (result) {\n if (isNil(result)) {\n return Formio.request(requestArgs.url, requestArgs.method, requestArgs.data, requestArgs.opts.header, requestArgs.opts);\n }\n\n return result;\n });\n });\n return Formio.pluginAlter('wrapStaticRequestPromise', request, requestArgs);\n }\n }, {\n key: \"makeRequest\",\n value: function makeRequest(formio, type, url, method, data, opts) {\n if (!formio) {\n return Formio.makeStaticRequest(url, method, data, opts);\n }\n\n var requestArgs = Formio.getRequestArgs(formio, type, url, method, data, opts);\n requestArgs.opts = requestArgs.opts || {};\n requestArgs.opts.formio = formio; //for Formio requests default Accept and Content-type headers\n\n if (!requestArgs.opts.headers) {\n requestArgs.opts.headers = {};\n }\n\n requestArgs.opts.headers = (0, _defaults2.default)(requestArgs.opts.headers, {\n 'Accept': 'application/json',\n 'Content-type': 'application/json'\n });\n var request = Formio.pluginWait('preRequest', requestArgs).then(function () {\n return Formio.pluginGet('request', requestArgs).then(function (result) {\n if (isNil(result)) {\n return Formio.request(requestArgs.url, requestArgs.method, requestArgs.data, requestArgs.opts.header, requestArgs.opts);\n }\n\n return result;\n });\n });\n return Formio.pluginAlter('wrapRequestPromise', request, requestArgs);\n }\n }, {\n key: \"request\",\n value: function request(url, method, data, header, opts) {\n if (!url) {\n return _nativePromiseOnly.default.reject('No url provided');\n }\n\n var _Formio = Formio;\n method = (method || 'GET').toUpperCase(); // For reverse compatibility, if they provided the ignoreCache parameter,\n // then change it back to the options format where that is a parameter.\n\n if (isBoolean(opts)) {\n opts = {\n ignoreCache: opts\n };\n }\n\n if (!opts || !isObject(opts)) {\n opts = {};\n } // Generate a cachekey.\n\n\n var cacheKey = btoa(encodeURI(url)); // Get the cached promise to save multiple loads.\n\n if (!opts.ignoreCache && method === 'GET' && _Formio.cache.hasOwnProperty(cacheKey)) {\n return _nativePromiseOnly.default.resolve(cloneResponse(_Formio.cache[cacheKey]));\n } // Set up and fetch request\n\n\n var headers = header || new Headers(opts.headers || {\n 'Accept': 'application/json',\n 'Content-type': 'application/json'\n });\n\n var token = _Formio.getToken(opts);\n\n if (token && !opts.noToken) {\n headers.append('x-jwt-token', token);\n } // The fetch-ponyfill can't handle a proper Headers class anymore. Change it back to an object.\n\n\n var headerObj = {};\n headers.forEach(function (value, name) {\n headerObj[name] = value;\n });\n var options = {\n method: method,\n headers: headerObj,\n mode: 'cors'\n };\n\n if (data) {\n options.body = JSON.stringify(data);\n } // Allow plugins to alter the options.\n\n\n options = _Formio.pluginAlter('requestOptions', options, url);\n\n if (options.namespace || _Formio.namespace) {\n opts.namespace = options.namespace || _Formio.namespace;\n }\n\n var requestToken = options.headers['x-jwt-token'];\n\n var result = _Formio.pluginAlter('wrapFetchRequestPromise', _Formio.fetch(url, options), {\n url: url,\n method: method,\n data: data,\n opts: opts\n }).then(function (response) {\n // Allow plugins to respond.\n response = _Formio.pluginAlter('requestResponse', response, _Formio, data);\n\n if (!response.ok) {\n if (response.status === 440) {\n _Formio.setToken(null, opts);\n\n _Formio.events.emit('formio.sessionExpired', response.body);\n } else if (response.status === 401) {\n _Formio.events.emit('formio.unauthorized', response.body);\n } else if (response.status === 416) {\n _Formio.events.emit('formio.rangeIsNotSatisfiable', response.body);\n } else if (response.status === 504) {\n return _nativePromiseOnly.default.reject(new Error('Network request failed'));\n } // Parse and return the error as a rejected promise to reject this promise\n\n\n return (response.headers.get('content-type').includes('application/json') ? response.json() : response.text()).then(function (error) {\n return _nativePromiseOnly.default.reject(error);\n });\n } // Handle fetch results\n\n\n var token = response.headers.get('x-jwt-token'); // 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\n var tokenIntroduced = false;\n\n if (method === 'GET' && !requestToken && token && !opts.external && !url.includes('token=') && !url.includes('x-jwt-token=')) {\n console.warn('Token was introduced in request.');\n tokenIntroduced = true;\n }\n\n if (response.status >= 200 && response.status < 300 && token && token !== '' && !tokenIntroduced) {\n _Formio.setToken(token, opts);\n } // 204 is no content. Don't try to .json() it.\n\n\n if (response.status === 204) {\n return {};\n }\n\n var getResult = response.headers.get('content-type').includes('application/json') ? response.json() : response.text();\n return getResult.then(function (result) {\n // Add some content-range metadata to the result here\n var range = response.headers.get('content-range');\n\n if (range && isObject(result)) {\n range = range.split('/');\n\n if (range[0] !== '*') {\n var skipLimit = range[0].split('-');\n result.skip = Number(skipLimit[0]);\n result.limit = skipLimit[1] - skipLimit[0] + 1;\n }\n\n result.serverCount = range[1] === '*' ? range[1] : Number(range[1]);\n }\n\n if (!opts.getHeaders) {\n return result;\n }\n\n var headers = {};\n response.headers.forEach(function (item, key) {\n headers[key] = item;\n }); // Return the result with the headers.\n\n return {\n result: result,\n headers: headers\n };\n });\n }).then(function (result) {\n if (opts.getHeaders) {\n return result;\n } // Cache the response.\n\n\n if (method === 'GET') {\n _Formio.cache[cacheKey] = result;\n }\n\n return cloneResponse(result);\n }).catch(function (err) {\n if (err === 'Bad Token') {\n _Formio.setToken(null, opts);\n\n _Formio.events.emit('formio.badToken', err);\n }\n\n if (err.message) {\n err = new Error(\"Could not connect to API server (\".concat(err.message, \"): \").concat(url));\n err.networkError = true;\n }\n\n if (method === 'GET') {\n delete _Formio.cache[cacheKey];\n }\n\n return _nativePromiseOnly.default.reject(err);\n });\n\n return result;\n } // Needed to maintain reverse compatability...\n\n }, {\n key: \"token\",\n get: function get() {\n if (!Formio.tokens) {\n Formio.tokens = {};\n }\n\n return Formio.tokens.formioToken || '';\n } // Needed to maintain reverse compatability...\n ,\n set: function set(token) {\n if (!Formio.tokens) {\n Formio.tokens = {};\n }\n\n Formio.tokens.formioToken = token || '';\n }\n }, {\n key: \"setToken\",\n value: function setToken() {\n var token = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n var opts = arguments.length > 1 ? arguments[1] : undefined;\n token = token || '';\n opts = typeof opts === 'string' ? {\n namespace: opts\n } : opts || {};\n var tokenName = \"\".concat(opts.namespace || Formio.namespace || 'formio', \"Token\");\n\n if (!Formio.tokens) {\n Formio.tokens = {};\n }\n\n var storage = localStorage.getItem('useSessionToken') ? sessionStorage : localStorage;\n\n if (!token) {\n if (!opts.fromUser) {\n opts.fromToken = true;\n Formio.setUser(null, opts);\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\n\n try {\n storage.removeItem(tokenName);\n } catch (err) {\n _browserCookies.default.erase(tokenName, {\n path: '/'\n });\n }\n\n Formio.tokens[tokenName] = token;\n return _nativePromiseOnly.default.resolve(null);\n }\n\n if (Formio.tokens[tokenName] !== token) {\n Formio.tokens[tokenName] = token; // iOS in private browse mode will throw an error but we can't detect ahead of time that we are in private mode.\n\n try {\n storage.setItem(tokenName, token);\n } catch (err) {\n _browserCookies.default.set(tokenName, token, {\n path: '/'\n });\n }\n } // Return or updates the current user\n\n\n return this.currentUserResolved ? Formio.currentUser(opts.formio, opts) : _nativePromiseOnly.default.resolve(null);\n }\n }, {\n key: \"getToken\",\n value: function getToken(options) {\n options = typeof options === 'string' ? {\n namespace: options\n } : options || {};\n var tokenName = \"\".concat(options.namespace || Formio.namespace || 'formio', \"Token\");\n var decodedTokenName = options.decode ? \"\".concat(tokenName, \"Decoded\") : tokenName;\n\n if (!Formio.tokens) {\n Formio.tokens = {};\n }\n\n if (Formio.tokens[decodedTokenName]) {\n return Formio.tokens[decodedTokenName];\n }\n\n try {\n var token = localStorage.getItem('useSessionToken') ? sessionStorage.getItem(tokenName) : localStorage.getItem(tokenName);\n Formio.tokens[tokenName] = token || '';\n\n if (options.decode) {\n Formio.tokens[decodedTokenName] = Formio.tokens[tokenName] ? (0, _jwtDecode.default)(Formio.tokens[tokenName]) : {};\n return Formio.tokens[decodedTokenName];\n }\n\n return Formio.tokens[tokenName];\n } catch (e) {\n Formio.tokens[tokenName] = _browserCookies.default.get(tokenName);\n return Formio.tokens[tokenName];\n }\n }\n }, {\n key: \"setUser\",\n value: function setUser(user) {\n var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var userName = \"\".concat(opts.namespace || Formio.namespace || 'formio', \"User\");\n var storage = localStorage.getItem('useSessionToken') ? sessionStorage : localStorage;\n\n if (!user) {\n if (!opts.fromToken) {\n opts.fromUser = true;\n Formio.setToken(null, opts);\n } // Emit an event on the cleared user.\n\n\n Formio.events.emit('formio.user', null); // iOS in private browse mode will throw an error but we can't detect ahead of time that we are in private mode.\n\n try {\n return storage.removeItem(userName);\n } catch (err) {\n return _browserCookies.default.erase(userName, {\n 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\n\n try {\n storage.setItem(userName, JSON.stringify(user));\n } catch (err) {\n _browserCookies.default.set(userName, JSON.stringify(user), {\n path: '/'\n });\n } // Emit an event on the authenticated user.\n\n\n Formio.events.emit('formio.user', user);\n }\n }, {\n key: \"getUser\",\n value: function getUser(options) {\n options = options || {};\n var userName = \"\".concat(options.namespace || Formio.namespace || 'formio', \"User\");\n\n try {\n return JSON.parse((localStorage.getItem('useSessionToken') ? sessionStorage : localStorage).getItem(userName) || null);\n } catch (e) {\n return JSON.parse(_browserCookies.default.get(userName));\n }\n }\n }, {\n key: \"setBaseUrl\",\n value: function setBaseUrl(url) {\n Formio.baseUrl = url;\n\n if (!Formio.projectUrlSet) {\n Formio.projectUrl = url;\n }\n }\n }, {\n key: \"getBaseUrl\",\n value: function getBaseUrl() {\n return Formio.baseUrl;\n }\n }, {\n key: \"setApiUrl\",\n value: function setApiUrl(url) {\n return Formio.setBaseUrl(url);\n }\n }, {\n key: \"getApiUrl\",\n value: function getApiUrl() {\n return Formio.getBaseUrl();\n }\n }, {\n key: \"setAppUrl\",\n value: function setAppUrl(url) {\n console.warn('Formio.setAppUrl() is deprecated. Use Formio.setProjectUrl instead.');\n Formio.projectUrl = url;\n Formio.projectUrlSet = true;\n }\n }, {\n key: \"setProjectUrl\",\n value: function setProjectUrl(url) {\n Formio.projectUrl = url;\n Formio.projectUrlSet = true;\n }\n }, {\n key: \"setAuthUrl\",\n value: function setAuthUrl(url) {\n Formio.authUrl = url;\n }\n }, {\n key: \"getAppUrl\",\n value: function getAppUrl() {\n console.warn('Formio.getAppUrl() is deprecated. Use Formio.getProjectUrl instead.');\n return Formio.projectUrl;\n }\n }, {\n key: \"getProjectUrl\",\n value: function getProjectUrl() {\n return Formio.projectUrl;\n }\n }, {\n key: \"clearCache\",\n value: function clearCache() {\n Formio.cache = {};\n }\n }, {\n key: \"noop\",\n value: function noop() {}\n }, {\n key: \"identity\",\n value: function identity(value) {\n return value;\n }\n }, {\n key: \"deregisterPlugin\",\n value: function deregisterPlugin(plugin) {\n var beforeLength = Formio.plugins.length;\n Formio.plugins = Formio.plugins.filter(function (p) {\n if (p !== plugin && p.__name !== plugin) {\n return true;\n }\n\n (p.deregister || Formio.noop).call(plugin, Formio);\n return false;\n });\n return beforeLength !== Formio.plugins.length;\n }\n }, {\n key: \"registerPlugin\",\n value: function registerPlugin(plugin, name) {\n var __Formio = Formio;\n\n __Formio.plugins.push(plugin);\n\n __Formio.plugins.sort(function (a, b) {\n return (b.priority || 0) - (a.priority || 0);\n });\n\n plugin.__name = name;\n\n (plugin.init || __Formio.noop).call(plugin, __Formio);\n }\n }, {\n key: \"getPlugin\",\n value: function getPlugin(name) {\n var _iterator = _createForOfIteratorHelper(Formio.plugins),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var plugin = _step.value;\n\n if (plugin.__name === name) {\n return plugin;\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n return null;\n }\n }, {\n key: \"pluginWait\",\n value: function pluginWait(pluginFn) {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n return _nativePromiseOnly.default.all(Formio.plugins.map(function (plugin) {\n var _ref;\n\n return (_ref = plugin[pluginFn] || Formio.noop).call.apply(_ref, [plugin].concat(args));\n }));\n }\n }, {\n key: \"pluginGet\",\n value: function pluginGet(pluginFn) {\n for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {\n args[_key3 - 1] = arguments[_key3];\n }\n\n var callPlugin = function callPlugin(index) {\n var _ref2;\n\n var plugin = Formio.plugins[index];\n\n if (!plugin) {\n return _nativePromiseOnly.default.resolve(null);\n }\n\n return _nativePromiseOnly.default.resolve((_ref2 = plugin[pluginFn] || Formio.noop).call.apply(_ref2, [plugin].concat(args))).then(function (result) {\n if (!isNil(result)) {\n return result;\n }\n\n return callPlugin(index + 1);\n });\n };\n\n return callPlugin(0);\n }\n }, {\n key: \"pluginAlter\",\n value: function pluginAlter(pluginFn, value) {\n for (var _len4 = arguments.length, args = new Array(_len4 > 2 ? _len4 - 2 : 0), _key4 = 2; _key4 < _len4; _key4++) {\n args[_key4 - 2] = arguments[_key4];\n }\n\n return Formio.plugins.reduce(function (value, plugin) {\n return (plugin[pluginFn] || Formio.identity).apply(void 0, [value].concat(args));\n }, value);\n }\n }, {\n key: \"accessInfo\",\n value: function accessInfo(formio) {\n var projectUrl = formio ? formio.projectUrl : Formio.projectUrl;\n return Formio.makeRequest(formio, 'accessInfo', \"\".concat(projectUrl, \"/access\"));\n }\n }, {\n key: \"projectRoles\",\n value: function projectRoles(formio) {\n var projectUrl = formio ? formio.projectUrl : Formio.projectUrl;\n return Formio.makeRequest(formio, 'projectRoles', \"\".concat(projectUrl, \"/role\"));\n }\n }, {\n key: \"currentUser\",\n value: function currentUser(formio, options) {\n var _this9 = this;\n\n var authUrl = Formio.authUrl;\n\n if (!authUrl) {\n authUrl = formio ? formio.projectUrl : Formio.projectUrl || Formio.baseUrl;\n }\n\n authUrl += '/current';\n var user = Formio.getUser(options);\n\n if (user) {\n return Formio.pluginAlter('wrapStaticRequestPromise', _nativePromiseOnly.default.resolve(user), {\n url: authUrl,\n method: 'GET',\n options: options\n });\n }\n\n var token = Formio.getToken(options);\n\n if ((!options || !options.external) && !token) {\n return Formio.pluginAlter('wrapStaticRequestPromise', _nativePromiseOnly.default.resolve(null), {\n url: authUrl,\n method: 'GET',\n options: options\n });\n }\n\n authUrl = \"\".concat(Formio.baseUrl, \"/current\");\n this.currentUserResolved = false;\n return Formio.makeRequest(formio, 'currentUser', authUrl, 'GET', null, options).then(function (response) {\n _this9.currentUserResolved = true;\n Formio.setUser(response, options);\n return response;\n });\n }\n }, {\n key: \"logout\",\n value: function logout(formio, options) {\n options = options || {};\n options.formio = formio;\n var projectUrl = Formio.authUrl ? Formio.authUrl : formio ? formio.projectUrl : Formio.baseUrl;\n\n var logout = function logout() {\n Formio.setToken(null, options);\n Formio.setUser(null, options);\n Formio.clearCache();\n localStorage.removeItem('useSessionToken');\n };\n\n return Formio.makeRequest(formio, 'logout', \"\".concat(projectUrl, \"/logout\")).then(function (result) {\n logout();\n return result;\n }).catch(function (err) {\n logout();\n throw err;\n });\n }\n }, {\n key: \"pageQuery\",\n value: function pageQuery() {\n var pageQuery = {};\n pageQuery.paths = [];\n var hashes = location.hash.substr(1).replace(/\\?/g, '&').split('&');\n var parts = [];\n location.search.substr(1).split('&').forEach(function (item) {\n parts = item.split('=');\n\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\n if (parts.length > 1) {\n pageQuery[parts[0]] = parts[1] && decodeURIComponent(parts[1]);\n } else if (item.indexOf('/') === 0) {\n pageQuery.paths = item.substr(1).split('/');\n }\n });\n return pageQuery;\n }\n }, {\n key: \"oAuthCurrentUser\",\n value: function oAuthCurrentUser(formio, token) {\n return Formio.currentUser(formio, {\n external: true,\n headers: {\n Authorization: \"Bearer \".concat(token)\n }\n });\n }\n }, {\n key: \"samlInit\",\n value: function samlInit(options) {\n options = options || {};\n var query = Formio.pageQuery();\n\n if (query.saml) {\n Formio.setUser(null);\n var retVal = Formio.setToken(query.saml);\n var uri = window.location.toString();\n uri = uri.substring(0, uri.indexOf('?'));\n\n if (window.location.hash) {\n uri += window.location.hash;\n }\n\n window.history.replaceState({}, document.title, uri);\n return retVal;\n } // Set the relay if not provided.\n\n\n if (!options.relay) {\n options.relay = window.location.href;\n } // go to the saml sso endpoint for this project.\n\n\n var authUrl = Formio.authUrl || Formio.projectUrl;\n window.location.href = \"\".concat(authUrl, \"/saml/sso?relay=\").concat(encodeURI(options.relay));\n return false;\n }\n }, {\n key: \"oktaInit\",\n value: function oktaInit(options) {\n options = options || {};\n\n if ((typeof OktaAuth === \"undefined\" ? \"undefined\" : _typeof(OktaAuth)) !== undefined) {\n options.OktaAuth = OktaAuth;\n }\n\n if (_typeof(options.OktaAuth) === undefined) {\n var 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 _nativePromiseOnly.default.reject(errorMessage);\n }\n\n return new _nativePromiseOnly.default(function (resolve, reject) {\n var Okta = options.OktaAuth;\n delete options.OktaAuth;\n var authClient = new Okta(options);\n authClient.tokenManager.get('accessToken').then(function (accessToken) {\n if (accessToken) {\n resolve(Formio.oAuthCurrentUser(options.formio, accessToken.accessToken));\n } else if (location.hash) {\n authClient.token.parseFromUrl().then(function (token) {\n authClient.tokenManager.add('accessToken', token);\n resolve(Formio.oAuthCurrentUser(options.formio, token.accessToken));\n }).catch(function (err) {\n console.warn(err);\n reject(err);\n });\n } else {\n authClient.token.getWithRedirect({\n responseType: 'token',\n scopes: options.scopes\n });\n resolve(false);\n }\n }).catch(function (error) {\n reject(error);\n });\n });\n }\n }, {\n key: \"ssoInit\",\n value: function ssoInit(type, options) {\n switch (type) {\n case 'saml':\n return Formio.samlInit(options);\n\n case 'okta':\n return Formio.oktaInit(options);\n\n default:\n console.warn('Unknown SSO type');\n return _nativePromiseOnly.default.reject('Unknown SSO type');\n }\n }\n }, {\n key: \"requireLibrary\",\n value: function requireLibrary(name, property, src, polling, onload) {\n if (!Formio.libraries.hasOwnProperty(name)) {\n Formio.libraries[name] = {};\n Formio.libraries[name].ready = new _nativePromiseOnly.default(function (resolve, reject) {\n Formio.libraries[name].resolve = resolve;\n Formio.libraries[name].reject = reject;\n });\n var callbackName = \"\".concat(name, \"Callback\");\n\n if (!polling && !window[callbackName]) {\n window[callbackName] = function () {\n return Formio.libraries[name].resolve();\n };\n } // See if the plugin already exists.\n\n\n var plugin = (0, _get2.default)(window, property);\n\n if (plugin) {\n Formio.libraries[name].resolve(plugin);\n } else {\n src = Array.isArray(src) ? src : [src];\n src.forEach(function (lib) {\n var attrs = {};\n var elementType = '';\n\n if (typeof lib === 'string') {\n lib = {\n type: 'script',\n src: lib\n };\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\n case 'styles':\n elementType = 'link';\n attrs = {\n href: lib.src,\n rel: 'stylesheet'\n };\n break;\n } // Add the script to the top of the page.\n\n\n var element = document.createElement(elementType);\n\n if (element.setAttribute) {\n for (var attr in attrs) {\n element.setAttribute(attr, attrs[attr]);\n }\n }\n\n if (onload) {\n element.addEventListener('load', function () {\n Formio.libraries[name].loaded = true;\n onload(Formio.libraries[name].ready);\n });\n }\n\n var _document = document,\n head = _document.head;\n\n if (head) {\n head.appendChild(element);\n }\n }); // if no callback is provided, then check periodically for the script.\n\n if (polling) {\n var interval = setInterval(function () {\n var plugin = (0, _get2.default)(window, property);\n\n if (plugin) {\n clearInterval(interval);\n Formio.libraries[name].resolve(plugin);\n }\n }, 200);\n }\n }\n }\n\n var lib = Formio.libraries[name];\n return onload && lib.loaded ? onload(lib.ready) : lib.ready;\n }\n }, {\n key: \"libraryReady\",\n value: function libraryReady(name) {\n if (Formio.libraries.hasOwnProperty(name) && Formio.libraries[name].ready) {\n return Formio.libraries[name].ready;\n }\n\n return _nativePromiseOnly.default.reject(\"\".concat(name, \" library was not required.\"));\n }\n }, {\n key: \"addToGlobal\",\n value: function addToGlobal(global) {\n if (_typeof(global) === 'object' && !global.Formio) {\n global.Formio = Formio;\n }\n }\n }, {\n key: \"setPathType\",\n value: function setPathType(type) {\n if (typeof type === 'string') {\n Formio.pathType = type;\n }\n }\n }, {\n key: \"getPathType\",\n value: function getPathType() {\n return Formio.pathType;\n }\n }, {\n key: \"rulesEntities\",\n get: function get() {\n return {\n ValueSources: Formio.ValueSources,\n Conjunctions: Formio.Conjunctions,\n Operators: Formio.Operators,\n Transformers: Formio.Transformers,\n QuickRules: Formio.QuickRules,\n Rules: Formio.Rules\n };\n }\n }, {\n key: \"GlobalFormio\",\n get: function get() {\n if (typeof __webpack_require__.g !== 'undefined' && __webpack_require__.g.Formio) {\n return __webpack_require__.g.Formio;\n } else if (typeof window !== 'undefined' && window.Formio) {\n return window.Formio;\n }\n\n return Formio;\n }\n }]);\n\n return Formio;\n}(); // Define all the static properties.\n\n\n_defineProperty(Formio, \"currentUserResolved\", true);\n\nFormio.libraries = {};\nFormio.Promise = _nativePromiseOnly.default;\nFormio.fetch = fetch;\nFormio.Headers = Headers;\nFormio.baseUrl = 'https://api.form.io';\nFormio.projectUrl = Formio.baseUrl;\nFormio.authUrl = '';\nFormio.projectUrlSet = false;\nFormio.plugins = [];\nFormio.cache = {};\nFormio.Providers = _providers.default;\nFormio.version = '4.14.10';\nFormio.pathType = '';\nFormio.events = new _EventEmitter.default();\n\nif (typeof __webpack_require__.g !== 'undefined') {\n Formio.addToGlobal(__webpack_require__.g);\n}\n\nif (typeof window !== 'undefined') {\n Formio.addToGlobal(window);\n}\n\nvar GlobalFormio = Formio.GlobalFormio;\nexports.GlobalFormio = GlobalFormio;\nvar _default = Formio;\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/Formio.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.array.slice.js */ \"./node_modules/core-js/modules/es.array.slice.js\");\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n__webpack_require__(/*! core-js/modules/es.array.from.js */ \"./node_modules/core-js/modules/es.array.from.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = exports.GlobalFormio = void 0;\n__webpack_require__(/*! core-js/modules/es.array.is-array.js */ \"./node_modules/core-js/modules/es.array.is-array.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n__webpack_require__(/*! core-js/modules/es.string.match.js */ \"./node_modules/core-js/modules/es.string.match.js\");\n__webpack_require__(/*! core-js/modules/es.string.search.js */ \"./node_modules/core-js/modules/es.string.search.js\");\n__webpack_require__(/*! core-js/modules/es.array.index-of.js */ \"./node_modules/core-js/modules/es.array.index-of.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.constructor.js */ \"./node_modules/core-js/modules/es.regexp.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n__webpack_require__(/*! core-js/modules/es.array.join.js */ \"./node_modules/core-js/modules/es.array.join.js\");\n__webpack_require__(/*! core-js/modules/es.array.includes.js */ \"./node_modules/core-js/modules/es.array.includes.js\");\n__webpack_require__(/*! core-js/modules/es.string.includes.js */ \"./node_modules/core-js/modules/es.string.includes.js\");\n__webpack_require__(/*! core-js/modules/es.parse-int.js */ \"./node_modules/core-js/modules/es.parse-int.js\");\n__webpack_require__(/*! core-js/modules/es.object.assign.js */ \"./node_modules/core-js/modules/es.object.assign.js\");\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n__webpack_require__(/*! core-js/modules/es.array.sort.js */ \"./node_modules/core-js/modules/es.array.sort.js\");\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n__webpack_require__(/*! core-js/modules/es.array.reduce.js */ \"./node_modules/core-js/modules/es.array.reduce.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-string.js */ \"./node_modules/core-js/modules/es.date.to-string.js\");\n__webpack_require__(/*! core-js/modules/web.timers.js */ \"./node_modules/core-js/modules/web.timers.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\nvar _fetchPonyfill2 = _interopRequireDefault(__webpack_require__(/*! fetch-ponyfill */ \"./node_modules/fetch-ponyfill/build/fetch-browser.js\"));\nvar _EventEmitter = _interopRequireDefault(__webpack_require__(/*! ./EventEmitter */ \"./lib/EventEmitter.js\"));\nvar _browserCookies = _interopRequireDefault(__webpack_require__(/*! browser-cookies */ \"./node_modules/browser-cookies/src/browser-cookies.js\"));\nvar _providers = _interopRequireDefault(__webpack_require__(/*! ./providers */ \"./lib/providers/index.js\"));\nvar _intersection2 = _interopRequireDefault(__webpack_require__(/*! lodash/intersection */ \"./node_modules/lodash/intersection.js\"));\nvar _get2 = _interopRequireDefault(__webpack_require__(/*! lodash/get */ \"./node_modules/lodash/get.js\"));\nvar _cloneDeep2 = _interopRequireDefault(__webpack_require__(/*! lodash/cloneDeep */ \"./node_modules/lodash/cloneDeep.js\"));\nvar _defaults2 = _interopRequireDefault(__webpack_require__(/*! lodash/defaults */ \"./node_modules/lodash/defaults.js\"));\nvar _utils = __webpack_require__(/*! ./utils/utils */ \"./lib/utils/utils.js\");\nvar _jwtDecode = _interopRequireDefault(__webpack_require__(/*! jwt-decode */ \"./node_modules/jwt-decode/build/jwt-decode.esm.js\"));\n__webpack_require__(/*! ./polyfills */ \"./lib/polyfills/index.js\");\nvar _CDN = _interopRequireDefault(__webpack_require__(/*! ./CDN */ \"./lib/CDN.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it[\"return\"] != null) it[\"return\"](); } finally { if (didErr) throw err; } } }; }\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\nfunction _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : \"undefined\" != typeof Symbol && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) { ; } } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i[\"return\"] && (_r = _i[\"return\"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nvar _fetchPonyfill = (0, _fetchPonyfill2[\"default\"])({\n Promise: _nativePromiseOnly[\"default\"]\n }),\n fetch = _fetchPonyfill.fetch,\n Headers = _fetchPonyfill.Headers;\nvar isBoolean = function isBoolean(val) {\n return _typeof(val) === _typeof(true);\n};\nvar isNil = function isNil(val) {\n return val === null || val === undefined;\n};\nvar isObject = function isObject(val) {\n return val && _typeof(val) === 'object';\n};\nfunction cloneResponse(response) {\n var copy = (0, _cloneDeep2[\"default\"])(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/**\n * The Formio interface class.\n *\n * let formio = new Formio('https://examples.form.io/example');\n */\nvar Formio = /*#__PURE__*/function () {\n /* eslint-disable max-statements */\n function Formio(path) {\n var _this = this;\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n _classCallCheck(this, Formio);\n // Ensure we have an instance of Formio.\n if (!(this instanceof Formio)) {\n return new Formio(path);\n }\n\n // Initialize our variables.\n this.base = '';\n this.projectsUrl = '';\n this.projectUrl = '';\n this.projectId = '';\n this.roleUrl = '';\n this.rolesUrl = '';\n this.roleId = '';\n this.formUrl = '';\n this.formsUrl = '';\n this.formId = '';\n this.submissionsUrl = '';\n this.submissionUrl = '';\n this.submissionId = '';\n this.actionsUrl = '';\n this.actionId = '';\n this.actionUrl = '';\n this.vsUrl = '';\n this.vId = '';\n this.vUrl = '';\n this.query = '';\n\n // Store the original path and options.\n this.path = path;\n this.options = options;\n if (options.useSessionToken) {\n Formio.useSessionToken(options);\n }\n if (options.hasOwnProperty('base')) {\n this.base = options.base;\n } else if (Formio.baseUrl) {\n this.base = Formio.baseUrl;\n } else if (typeof window !== 'undefined') {\n this.base = window.location.href.match(/http[s]?:\\/\\/api./)[0];\n }\n if (!path) {\n // Allow user to create new projects if this was instantiated without\n // a url\n this.projectUrl = Formio.projectUrl || \"\".concat(this.base, \"/project\");\n this.projectsUrl = \"\".concat(this.base, \"/project\");\n this.projectId = false;\n this.query = '';\n return;\n }\n if (options.hasOwnProperty('project')) {\n this.projectUrl = options.project;\n }\n var project = this.projectUrl || Formio.projectUrl;\n var projectRegEx = /(^|\\/)(project)($|\\/[^/]+)/;\n var isProjectUrl = path.search(projectRegEx) !== -1;\n\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\n // Normalize to an absolute path.\n if (path.indexOf('http') !== 0 && path.indexOf('//') !== 0) {\n path = this.base + path;\n }\n var hostparts = this.getUrlParts(path);\n var parts = [];\n var hostName = hostparts[1] + hostparts[2];\n path = hostparts.length > 3 ? hostparts[3] : '';\n var queryparts = path.split('?');\n if (queryparts.length > 1) {\n path = queryparts[0];\n this.query = \"?\".concat(queryparts[1]);\n }\n\n // Register a specific path.\n var registerPath = function registerPath(name, base) {\n _this[\"\".concat(name, \"sUrl\")] = \"\".concat(base, \"/\").concat(name);\n var regex = new RegExp(\"/\".concat(name, \"/([^/]+)\"));\n if (path.search(regex) !== -1) {\n parts = path.match(regex);\n _this[\"\".concat(name, \"Url\")] = parts ? base + parts[0] : '';\n _this[\"\".concat(name, \"Id\")] = parts.length > 1 ? parts[1] : '';\n base += parts[0];\n }\n return base;\n };\n\n // Register an array of items.\n var registerItems = function registerItems(items, base, staticBase) {\n for (var i in items) {\n if (items.hasOwnProperty(i)) {\n var item = items[i];\n if (Array.isArray(item)) {\n registerItems(item, base, true);\n } else {\n var 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 var regex = \"^\".concat(hostName.replace(/\\//g, '\\\\/'), \".[^/]+\");\n var match = project.match(new RegExp(regex));\n this.projectUrl = match ? match[0] : hostName;\n } else {\n this.projectUrl = hostName;\n }\n }\n // Check if we have a specified path type.\n var 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 } else if (hostName === this.base) {\n // Get project id as first part of path (subdirectory).\n if (hostparts.length > 3 && path.split('/').length > 1) {\n var isFile = path.match(/.json/);\n var pathParts = path.split('/');\n if (isFile) {\n this.projectUrl = hostName;\n } else {\n pathParts.shift(); // Throw away the first /.\n this.projectId = pathParts.shift();\n path = \"/\".concat(pathParts.join('/'));\n this.projectUrl = \"\".concat(hostName, \"/\").concat(this.projectId);\n }\n }\n } else {\n // Get project id from subdomain.\n if (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 || \"\".concat(this.base, \"/project\");\n }\n\n // Configure Role urls and role ids.\n registerItems(['role'], this.projectUrl);\n\n // Configure Form urls and form ids.\n if (/(^|\\/)(form)($|\\/)/.test(path)) {\n registerItems(['form', ['submission', 'action', 'v']], this.projectUrl);\n } else {\n var subRegEx = new RegExp('/(submission|action|v)($|/.*)');\n var subs = path.match(subRegEx);\n this.pathType = subs && subs.length > 1 ? subs[1] : '';\n path = path.replace(subRegEx, '');\n path = path.replace(/\\/$/, '');\n this.formsUrl = \"\".concat(this.projectUrl, \"/form\");\n this.formUrl = path ? this.projectUrl + path : '';\n this.formId = path.replace(/^\\/+|\\/+$/g, '');\n var items = ['submission', 'action', 'v'];\n for (var i in items) {\n if (items.hasOwnProperty(i)) {\n var item = items[i];\n this[\"\".concat(item, \"sUrl\")] = \"\".concat(this.projectUrl + path, \"/\").concat(item);\n if (this.pathType === item && subs.length > 2 && subs[2]) {\n this[\"\".concat(item, \"Id\")] = subs[2].replace(/^\\/+|\\/+$/g, '');\n this[\"\".concat(item, \"Url\")] = this.projectUrl + path + subs[0];\n }\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 _createClass(Formio, [{\n key: \"delete\",\n value: function _delete(type, opts) {\n var _id = \"\".concat(type, \"Id\");\n var _url = \"\".concat(type, \"Url\");\n if (!this[_id]) {\n return _nativePromiseOnly[\"default\"].reject('Nothing to delete');\n }\n Formio.cache = {};\n return this.makeRequest(type, this[_url], 'delete', null, opts);\n }\n }, {\n key: \"index\",\n value: function index(type, query, opts) {\n var _url = \"\".concat(type, \"Url\");\n query = query || '';\n if (query && isObject(query)) {\n query = \"?\".concat(Formio.serialize(query.params));\n }\n return this.makeRequest(type, this[_url] + query, 'get', null, opts);\n }\n }, {\n key: \"save\",\n value: function save(type, data, opts) {\n var _id = \"\".concat(type, \"Id\");\n var _url = \"\".concat(type, \"Url\");\n var method = this[_id] || data._id ? 'put' : 'post';\n var reqUrl = this[_id] ? this[_url] : this[\"\".concat(type, \"sUrl\")];\n if (!this[_id] && data._id && method === 'put' && !reqUrl.includes(data._id)) {\n reqUrl += \"/\".concat(data._id);\n }\n Formio.cache = {};\n return this.makeRequest(type, reqUrl + this.query, method, data, opts);\n }\n }, {\n key: \"load\",\n value: function load(type, query, opts) {\n var _id = \"\".concat(type, \"Id\");\n var _url = \"\".concat(type, \"Url\");\n if (query && isObject(query)) {\n query = Formio.serialize(query.params);\n }\n if (query) {\n query = this.query ? \"\".concat(this.query, \"&\").concat(query) : \"?\".concat(query);\n } else {\n query = this.query;\n }\n if (!this[_id]) {\n return _nativePromiseOnly[\"default\"].reject(\"Missing \".concat(_id));\n }\n var url = this[_url] + query;\n if (type === 'form' && !isNaN(parseInt(this.vId)) && parseInt(this.vId) !== 0) {\n url += url.match(/\\?/) ? '&' : '?';\n url += \"formRevision=\".concat(this.vId);\n }\n return this.makeRequest(type, url, 'get', null, opts);\n }\n }, {\n key: \"makeRequest\",\n value: function makeRequest() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n return Formio.makeRequest.apply(Formio, [this].concat(args));\n }\n }, {\n key: \"loadProject\",\n value: function loadProject(query, opts) {\n return this.load('project', query, opts);\n }\n }, {\n key: \"saveProject\",\n value: function saveProject(data, opts) {\n return this.save('project', data, opts);\n }\n }, {\n key: \"deleteProject\",\n value: function deleteProject(opts) {\n return this[\"delete\"]('project', opts);\n }\n }, {\n key: \"loadRole\",\n value: function loadRole(opts) {\n return this.load('role', null, opts);\n }\n }, {\n key: \"saveRole\",\n value: function saveRole(data, opts) {\n return this.save('role', data, opts);\n }\n }, {\n key: \"deleteRole\",\n value: function deleteRole(opts) {\n return this[\"delete\"]('role', opts);\n }\n }, {\n key: \"loadRoles\",\n value: function loadRoles(opts) {\n return this.index('roles', null, opts);\n }\n }, {\n key: \"loadForm\",\n value: function loadForm(query, opts) {\n var _this2 = this;\n return this.load('form', query, opts).then(function (currentForm) {\n // Check to see if there isn't a number in vId.\n if (!currentForm.revisions || isNaN(parseInt(_this2.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' && _this2.submissionId) {\n return currentForm;\n }\n // eslint-disable-next-line eqeqeq\n if (currentForm._vid == _this2.vId || currentForm.revisionId === _this2.vId) {\n return currentForm;\n }\n // If they specified a revision form, load the revised form components.\n if (query && isObject(query)) {\n query = Formio.serialize(query.params);\n }\n if (query) {\n query = _this2.query ? \"\".concat(_this2.query, \"&\").concat(query) : \"?\".concat(query);\n } else {\n query = _this2.query;\n }\n return _this2.makeRequest('form', _this2.vUrl + query, 'get', null, opts).then(function (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\"](function () {\n return Object.assign({}, currentForm);\n });\n });\n }\n }, {\n key: \"saveForm\",\n value: function saveForm(data, opts) {\n return this.save('form', data, opts);\n }\n }, {\n key: \"deleteForm\",\n value: function deleteForm(opts) {\n return this[\"delete\"]('form', opts);\n }\n }, {\n key: \"loadForms\",\n value: function loadForms(query, opts) {\n return this.index('forms', query, opts);\n }\n }, {\n key: \"loadSubmission\",\n value: function loadSubmission(query, opts) {\n var _this3 = this;\n return this.load('submission', query, opts).then(function (submission) {\n _this3.vId = submission._frid || submission._fvid;\n _this3.vUrl = \"\".concat(_this3.formUrl, \"/v/\").concat(_this3.vId);\n return submission;\n });\n }\n }, {\n key: \"saveSubmission\",\n value: function saveSubmission(data, opts) {\n if (!isNaN(parseInt(this.vId))) {\n data._fvid = this.vId;\n }\n return this.save('submission', data, opts);\n }\n }, {\n key: \"deleteSubmission\",\n value: function deleteSubmission(opts) {\n return this[\"delete\"]('submission', opts);\n }\n }, {\n key: \"loadSubmissions\",\n value: function loadSubmissions(query, opts) {\n return this.index('submissions', query, opts);\n }\n }, {\n key: \"loadAction\",\n value: function loadAction(query, opts) {\n return this.load('action', query, opts);\n }\n }, {\n key: \"saveAction\",\n value: function saveAction(data, opts) {\n return this.save('action', data, opts);\n }\n }, {\n key: \"deleteAction\",\n value: function deleteAction(opts) {\n return this[\"delete\"]('action', opts);\n }\n }, {\n key: \"loadActions\",\n value: function loadActions(query, opts) {\n return this.index('actions', query, opts);\n }\n }, {\n key: \"availableActions\",\n value: function availableActions() {\n return this.makeRequest('availableActions', \"\".concat(this.formUrl, \"/actions\"));\n }\n }, {\n key: \"actionInfo\",\n value: function actionInfo(name) {\n return this.makeRequest('actionInfo', \"\".concat(this.formUrl, \"/actions/\").concat(name));\n }\n }, {\n key: \"isObjectId\",\n value: function isObjectId(id) {\n var checkForHexRegExp = new RegExp('^[0-9a-fA-F]{24}$');\n return checkForHexRegExp.test(id);\n }\n }, {\n key: \"getProjectId\",\n value: function getProjectId() {\n if (!this.projectId) {\n return _nativePromiseOnly[\"default\"].resolve('');\n }\n if (this.isObjectId(this.projectId)) {\n return _nativePromiseOnly[\"default\"].resolve(this.projectId);\n } else {\n return this.loadProject().then(function (project) {\n return project._id;\n });\n }\n }\n }, {\n key: \"getFormId\",\n value: function getFormId() {\n if (!this.formId) {\n return _nativePromiseOnly[\"default\"].resolve('');\n }\n if (this.isObjectId(this.formId)) {\n return _nativePromiseOnly[\"default\"].resolve(this.formId);\n } else {\n return this.loadForm().then(function (form) {\n return form._id;\n });\n }\n }\n }, {\n key: \"currentUser\",\n value: function currentUser(options) {\n return Formio.currentUser(this, options);\n }\n }, {\n key: \"accessInfo\",\n value: function accessInfo() {\n return Formio.accessInfo(this);\n }\n\n /**\n * Sets OAuth Logout URL.\n *\n * @return {*}\n */\n }, {\n key: \"oauthLogoutURI\",\n value: function oauthLogoutURI(uri, options) {\n return Formio.oauthLogoutURI(uri, Object.assign({\n formio: this\n }, this.options, options));\n }\n\n /**\n * Returns the JWT token for this instance.\n *\n * @return {*}\n */\n }, {\n key: \"getToken\",\n value: function getToken(options) {\n return Formio.getToken(Object.assign({\n formio: this\n }, this.options, options));\n }\n\n /**\n * Sets the JWT token for this instance.\n *\n * @return {*}\n */\n }, {\n key: \"setToken\",\n value: function setToken(token, options) {\n return Formio.setToken(token, Object.assign({\n formio: this\n }, this.options, options));\n }\n\n /**\n * Returns a temporary authentication token for single purpose token generation.\n */\n }, {\n key: \"getTempToken\",\n value: function getTempToken(expire, allowed, options) {\n var token = Formio.getToken(options);\n if (!token) {\n return _nativePromiseOnly[\"default\"].reject('You must be authenticated to generate a temporary auth token.');\n }\n var authUrl = Formio.authUrl || this.projectUrl;\n return this.makeRequest('tempToken', \"\".concat(authUrl, \"/token\"), 'GET', null, {\n ignoreCache: true,\n header: new Headers({\n 'x-expire': expire,\n 'x-allow': allowed\n })\n });\n }\n\n /**\n * Get a download url for a submission PDF of this submission.\n *\n * @return {*}\n */\n }, {\n key: \"getDownloadUrl\",\n value: function getDownloadUrl(form) {\n var _this4 = this;\n if (!this.submissionId) {\n return _nativePromiseOnly[\"default\"].resolve('');\n }\n if (!form) {\n // Make sure to load the form first.\n return this.loadForm().then(function (_form) {\n if (!_form) {\n return '';\n }\n return _this4.getDownloadUrl(_form);\n });\n }\n var apiUrl = \"/project/\".concat(form.project);\n apiUrl += \"/form/\".concat(form._id);\n apiUrl += \"/submission/\".concat(this.submissionId);\n var postfix = form.submissionRevisions && form.settings.changeLog ? '/download/changelog' : '/download';\n apiUrl += postfix;\n var download = this.base + apiUrl;\n return new _nativePromiseOnly[\"default\"](function (resolve, reject) {\n _this4.getTempToken(3600, \"GET:\".concat(apiUrl)).then(function (tempToken) {\n download += \"?token=\".concat(tempToken.key);\n resolve(download);\n }, function () {\n resolve(download);\n })[\"catch\"](reject);\n });\n }\n }, {\n key: \"uploadFile\",\n value: function uploadFile(storage, file, fileName, dir, progressCallback, url, options, fileKey, groupPermissions, groupId, uploadStartCallback, abortCallback) {\n var _this5 = this;\n var requestArgs = {\n provider: storage,\n method: 'upload',\n file: file,\n fileName: fileName,\n dir: dir\n };\n fileKey = fileKey || 'file';\n var request = Formio.pluginWait('preRequest', requestArgs).then(function () {\n return Formio.pluginGet('fileRequest', requestArgs).then(function (result) {\n if (storage && isNil(result)) {\n var Provider = _providers[\"default\"].getProvider('storage', storage);\n if (Provider) {\n var provider = new Provider(_this5);\n if (uploadStartCallback) {\n uploadStartCallback();\n }\n return provider.uploadFile(file, fileName, dir, progressCallback, url, options, fileKey, groupPermissions, groupId, abortCallback);\n } else {\n throw 'Storage provider not found';\n }\n }\n return result || {\n url: ''\n };\n });\n });\n return Formio.pluginAlter('wrapFileRequestPromise', request, requestArgs);\n }\n }, {\n key: \"downloadFile\",\n value: function downloadFile(file, options) {\n var _this6 = this;\n var requestArgs = {\n method: 'download',\n file: file\n };\n var request = Formio.pluginWait('preRequest', requestArgs).then(function () {\n return Formio.pluginGet('fileRequest', requestArgs).then(function (result) {\n if (file.storage && isNil(result)) {\n var Provider = _providers[\"default\"].getProvider('storage', file.storage);\n if (Provider) {\n var provider = new Provider(_this6);\n return provider.downloadFile(file, options);\n } else {\n throw 'Storage provider not found';\n }\n }\n return result || {\n url: ''\n };\n });\n });\n return Formio.pluginAlter('wrapFileRequestPromise', request, requestArgs);\n }\n }, {\n key: \"deleteFile\",\n value: function deleteFile(file, options) {\n var _this7 = this;\n var requestArgs = {\n method: 'delete',\n file: file\n };\n var request = Formio.pluginWait('preRequest', requestArgs).then(function () {\n return Formio.pluginGet('fileRequest', requestArgs).then(function (result) {\n if (file.storage && isNil(result)) {\n var Provider = _providers[\"default\"].getProvider('storage', file.storage);\n if (Provider) {\n var provider = new Provider(_this7);\n return provider.deleteFile(file, options);\n } else {\n throw 'Storage provider not found';\n }\n }\n return result || {\n url: ''\n };\n });\n });\n return Formio.pluginAlter('wrapFileRequestPromise', request, requestArgs);\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 }, {\n key: \"userPermissions\",\n value: function userPermissions(user, form, submission) {\n return _nativePromiseOnly[\"default\"].all([form !== undefined ? _nativePromiseOnly[\"default\"].resolve(form) : this.loadForm(), user !== undefined ? _nativePromiseOnly[\"default\"].resolve(user) : this.currentUser(), submission !== undefined || !this.submissionId ? _nativePromiseOnly[\"default\"].resolve(submission) : this.loadSubmission(), this.accessInfo()]).then(function (results) {\n var form = results.shift();\n var user = results.shift() || {\n _id: false,\n roles: []\n };\n var submission = results.shift();\n var access = results.shift();\n var permMap = {\n create: 'create',\n read: 'read',\n update: 'edit',\n \"delete\": 'delete'\n };\n var 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 (var roleName in access.roles) {\n if (access.roles.hasOwnProperty(roleName)) {\n var 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 } 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 (var i = 0; i < form.submissionAccess.length; i++) {\n var permission = form.submissionAccess[i];\n var _permission$type$spli = permission.type.split('_'),\n _permission$type$spli2 = _slicedToArray(_permission$type$spli, 2),\n perm = _permission$type$spli2[0],\n scope = _permission$type$spli2[1];\n if (['create', 'read', 'update', 'delete'].includes(perm)) {\n if ((0, _intersection2[\"default\"])(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, _utils.eachComponent)(form.components, function (component, path) {\n if (component && component.defaultPermission) {\n var value = (0, _get2[\"default\"])(submission.data, path);\n // make it work for single-select Group and multi-select Group\n var groups = Array.isArray(value) ? value : [value];\n groups.forEach(function (group) {\n if (group && group._id &&\n // 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 /**\n * Determine if the current user can submit a form.\n * @return {*}\n */\n }, {\n key: \"canSubmit\",\n value: function canSubmit() {\n var _this8 = this;\n return this.userPermissions().then(function (perms) {\n // If there is user and they cannot create, then check anonymous user permissions.\n if (!perms.create && Formio.getUser()) {\n return _this8.userPermissions(null).then(function (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 }, {\n key: \"getUrlParts\",\n value: function getUrlParts(url) {\n return Formio.getUrlParts(url, this);\n }\n }], [{\n key: \"useSessionToken\",\n value: function useSessionToken(options) {\n var tokenName = \"\".concat(options.namespace || Formio.namespace || 'formio', \"Token\");\n var token = localStorage.getItem(tokenName);\n if (token) {\n localStorage.removeItem(tokenName);\n sessionStorage.setItem(tokenName, token);\n }\n var userName = \"\".concat(options.namespace || Formio.namespace || 'formio', \"User\");\n var 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 key: \"loadProjects\",\n value: function loadProjects(query, opts) {\n query = query || '';\n if (isObject(query)) {\n query = \"?\".concat(Formio.serialize(query.params));\n }\n return Formio.makeStaticRequest(\"\".concat(Formio.baseUrl, \"/project\").concat(query), 'GET', null, opts);\n }\n }, {\n key: \"getUrlParts\",\n value: function getUrlParts(url, formio) {\n var base = formio && formio.base ? formio.base : Formio.baseUrl;\n var regex = '^(http[s]?:\\\\/\\\\/)';\n if (base && url.indexOf(base) === 0) {\n regex += \"(\".concat(base.replace(/^http[s]?:\\/\\//, ''), \")\");\n } else {\n regex += '([^/]+)';\n }\n regex += '($|\\\\/.*)';\n return url.match(new RegExp(regex));\n }\n }, {\n key: \"serialize\",\n value: function serialize(obj, _interpolate) {\n var str = [];\n var interpolate = function interpolate(item) {\n return _interpolate ? _interpolate(item) : item;\n };\n for (var p in obj) {\n if (obj.hasOwnProperty(p)) {\n str.push(\"\".concat(encodeURIComponent(p), \"=\").concat(encodeURIComponent(interpolate(obj[p]))));\n }\n }\n return str.join('&');\n }\n }, {\n key: \"getRequestArgs\",\n value: function getRequestArgs(formio, type, url, method, data, opts) {\n method = (method || 'GET').toUpperCase();\n if (!opts || !isObject(opts)) {\n opts = {};\n }\n var requestArgs = {\n url: url,\n method: method,\n data: data || null,\n opts: opts\n };\n if (type) {\n requestArgs.type = type;\n }\n if (formio) {\n requestArgs.formio = formio;\n }\n return requestArgs;\n }\n }, {\n key: \"makeStaticRequest\",\n value: function makeStaticRequest(url, method, data, opts) {\n var requestArgs = Formio.getRequestArgs(null, '', url, method, data, opts);\n var request = Formio.pluginWait('preRequest', requestArgs).then(function () {\n return Formio.pluginGet('staticRequest', requestArgs).then(function (result) {\n if (isNil(result)) {\n return Formio.request(requestArgs.url, requestArgs.method, requestArgs.data, requestArgs.opts.header, requestArgs.opts);\n }\n return result;\n });\n });\n return Formio.pluginAlter('wrapStaticRequestPromise', request, requestArgs);\n }\n }, {\n key: \"makeRequest\",\n value: function makeRequest(formio, type, url, method, data, opts) {\n if (!formio) {\n return Formio.makeStaticRequest(url, method, data, opts);\n }\n var requestArgs = Formio.getRequestArgs(formio, type, url, method, data, opts);\n requestArgs.opts = requestArgs.opts || {};\n requestArgs.opts.formio = formio;\n\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, _defaults2[\"default\"])(requestArgs.opts.headers, {\n 'Accept': 'application/json',\n 'Content-type': 'application/json'\n });\n var request = Formio.pluginWait('preRequest', requestArgs).then(function () {\n return Formio.pluginGet('request', requestArgs).then(function (result) {\n if (isNil(result)) {\n return Formio.request(requestArgs.url, requestArgs.method, requestArgs.data, requestArgs.opts.header, requestArgs.opts);\n }\n return result;\n });\n });\n return Formio.pluginAlter('wrapRequestPromise', request, requestArgs);\n }\n }, {\n key: \"request\",\n value: function request(url, method, data, header, opts) {\n if (!url) {\n return _nativePromiseOnly[\"default\"].reject('No url provided');\n }\n var _Formio = Formio;\n method = (method || 'GET').toUpperCase();\n\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 (isBoolean(opts)) {\n opts = {\n ignoreCache: opts\n };\n }\n if (!opts || !isObject(opts)) {\n opts = {};\n }\n\n // Generate a cachekey.\n var cacheKey = btoa(encodeURI(url));\n\n // Get the cached promise to save multiple loads.\n if (!opts.ignoreCache && method === 'GET' && _Formio.cache.hasOwnProperty(cacheKey)) {\n return _nativePromiseOnly[\"default\"].resolve(cloneResponse(_Formio.cache[cacheKey]));\n }\n\n // Set up and fetch request\n var headers = header || new Headers(opts.headers || {\n 'Accept': 'application/json',\n 'Content-type': 'application/json'\n });\n var token = _Formio.getToken(opts);\n if (token && !opts.noToken) {\n headers.append('x-jwt-token', token);\n }\n\n // The fetch-ponyfill can't handle a proper Headers class anymore. Change it back to an object.\n var headerObj = {};\n headers.forEach(function (value, name) {\n headerObj[name] = value;\n });\n var options = {\n method: method,\n headers: headerObj,\n mode: 'cors'\n };\n if (data) {\n options.body = JSON.stringify(data);\n }\n\n // Allow plugins to alter the options.\n options = _Formio.pluginAlter('requestOptions', options, url);\n if (options.namespace || _Formio.namespace) {\n opts.namespace = options.namespace || _Formio.namespace;\n }\n var requestToken = options.headers['x-jwt-token'];\n var result = _Formio.pluginAlter('wrapFetchRequestPromise', _Formio.fetch(url, options), {\n url: url,\n method: method,\n data: data,\n opts: opts\n }).then(function (response) {\n // Allow plugins to respond.\n response = _Formio.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 } else if (response.status === 401) {\n _Formio.events.emit('formio.unauthorized', response.body);\n } else if (response.status === 416) {\n _Formio.events.emit('formio.rangeIsNotSatisfiable', response.body);\n } else if (response.status === 504) {\n return _nativePromiseOnly[\"default\"].reject(new Error('Network request failed'));\n }\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') ? response.json() : response.text()).then(function (error) {\n return _nativePromiseOnly[\"default\"].reject(error);\n });\n }\n\n // Handle fetch results\n var token = response.headers.get('x-jwt-token');\n\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 var tokenIntroduced = false;\n if (method === 'GET' && !requestToken && token && !opts.external && !url.includes('token=') && !url.includes('x-jwt-token=')) {\n console.warn('Token was introduced in request.');\n tokenIntroduced = true;\n }\n if (response.status >= 200 && response.status < 300 && token && token !== '' && !tokenIntroduced) {\n _Formio.setToken(token, opts);\n }\n // 204 is no content. Don't try to .json() it.\n if (response.status === 204) {\n return {};\n }\n var getResult = response.headers.get('content-type').includes('application/json') ? response.json() : response.text();\n return getResult.then(function (result) {\n // Add some content-range metadata to the result here\n var range = response.headers.get('content-range');\n if (range && isObject(result)) {\n range = range.split('/');\n if (range[0] !== '*') {\n var 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 var headers = {};\n response.headers.forEach(function (item, key) {\n headers[key] = item;\n });\n\n // Return the result with the headers.\n return {\n result: result,\n headers: headers\n };\n });\n }).then(function (result) {\n if (opts.getHeaders) {\n return result;\n }\n\n // Cache the response.\n if (method === 'GET') {\n _Formio.cache[cacheKey] = result;\n }\n return cloneResponse(result);\n })[\"catch\"](function (err) {\n if (err === 'Bad Token') {\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 (\".concat(err.message, \"): \").concat(url));\n err.networkError = true;\n }\n if (method === 'GET') {\n delete _Formio.cache[cacheKey];\n }\n return _nativePromiseOnly[\"default\"].reject(err);\n });\n return result;\n }\n\n // Needed to maintain reverse compatability...\n }, {\n key: \"token\",\n get: function get() {\n if (!Formio.tokens) {\n Formio.tokens = {};\n }\n return Formio.tokens.formioToken || '';\n }\n\n // Needed to maintain reverse compatability...\n ,\n set: function set(token) {\n if (!Formio.tokens) {\n Formio.tokens = {};\n }\n Formio.tokens.formioToken = token || '';\n }\n }, {\n key: \"setToken\",\n value: function setToken() {\n var token = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n var opts = arguments.length > 1 ? arguments[1] : undefined;\n token = token || '';\n opts = typeof opts === 'string' ? {\n namespace: opts\n } : opts || {};\n var tokenName = \"\".concat(opts.namespace || Formio.namespace || 'formio', \"Token\");\n if (!Formio.tokens) {\n Formio.tokens = {};\n }\n var 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 } catch (err) {\n _browserCookies[\"default\"].erase(tokenName, {\n path: '/'\n });\n }\n Formio.tokens[tokenName] = token;\n return _nativePromiseOnly[\"default\"].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 } catch (err) {\n _browserCookies[\"default\"].set(tokenName, token, {\n path: '/'\n });\n }\n }\n // Return or updates the current user\n return this.currentUserResolved ? Formio.currentUser(opts.formio, opts) : _nativePromiseOnly[\"default\"].resolve(null);\n }\n }, {\n key: \"getToken\",\n value: function getToken(options) {\n options = typeof options === 'string' ? {\n namespace: options\n } : options || {};\n var tokenName = \"\".concat(options.namespace || Formio.namespace || 'formio', \"Token\");\n var decodedTokenName = options.decode ? \"\".concat(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 var token = localStorage.getItem('useSessionToken') ? sessionStorage.getItem(tokenName) : localStorage.getItem(tokenName);\n Formio.tokens[tokenName] = token || '';\n if (options.decode) {\n Formio.tokens[decodedTokenName] = Formio.tokens[tokenName] ? (0, _jwtDecode[\"default\"])(Formio.tokens[tokenName]) : {};\n return Formio.tokens[decodedTokenName];\n }\n return Formio.tokens[tokenName];\n } catch (e) {\n Formio.tokens[tokenName] = _browserCookies[\"default\"].get(tokenName);\n return Formio.tokens[tokenName];\n }\n }\n }, {\n key: \"oauthLogoutURI\",\n value: function oauthLogoutURI(uri, options) {\n options = typeof options === 'string' ? {\n namespace: options\n } : options || {};\n var logoutURIName = \"\".concat(options.namespace || Formio.namespace || 'formio', \"LogoutAuthUrl\");\n Formio.tokens[logoutURIName];\n localStorage.setItem(logoutURIName, uri);\n return Formio.tokens[logoutURIName];\n }\n }, {\n key: \"setUser\",\n value: function setUser(user) {\n var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var userName = \"\".concat(opts.namespace || Formio.namespace || 'formio', \"User\");\n var storage = localStorage.getItem('useSessionToken') ? sessionStorage : localStorage;\n if (!user) {\n if (!opts.fromToken) {\n opts.fromUser = true;\n Formio.setToken(null, opts);\n }\n\n // Emit an event on the cleared user.\n Formio.events.emit('formio.user', null);\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 return storage.removeItem(userName);\n } catch (err) {\n return _browserCookies[\"default\"].erase(userName, {\n path: '/'\n });\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 } catch (err) {\n _browserCookies[\"default\"].set(userName, JSON.stringify(user), {\n path: '/'\n });\n }\n\n // Emit an event on the authenticated user.\n Formio.events.emit('formio.user', user);\n }\n }, {\n key: \"getUser\",\n value: function getUser(options) {\n options = options || {};\n var userName = \"\".concat(options.namespace || Formio.namespace || 'formio', \"User\");\n try {\n return JSON.parse((localStorage.getItem('useSessionToken') ? sessionStorage : localStorage).getItem(userName) || null);\n } catch (e) {\n return JSON.parse(_browserCookies[\"default\"].get(userName));\n }\n }\n }, {\n key: \"setBaseUrl\",\n value: function setBaseUrl(url) {\n Formio.baseUrl = url;\n if (!Formio.projectUrlSet) {\n Formio.projectUrl = url;\n }\n }\n }, {\n key: \"getBaseUrl\",\n value: function getBaseUrl() {\n return Formio.baseUrl;\n }\n }, {\n key: \"setApiUrl\",\n value: function setApiUrl(url) {\n return Formio.setBaseUrl(url);\n }\n }, {\n key: \"getApiUrl\",\n value: function getApiUrl() {\n return Formio.getBaseUrl();\n }\n }, {\n key: \"setAppUrl\",\n value: function setAppUrl(url) {\n console.warn('Formio.setAppUrl() is deprecated. Use Formio.setProjectUrl instead.');\n Formio.projectUrl = url;\n Formio.projectUrlSet = true;\n }\n }, {\n key: \"setProjectUrl\",\n value: function setProjectUrl(url) {\n Formio.projectUrl = url;\n Formio.projectUrlSet = true;\n }\n }, {\n key: \"setAuthUrl\",\n value: function setAuthUrl(url) {\n Formio.authUrl = url;\n }\n }, {\n key: \"getAppUrl\",\n value: function getAppUrl() {\n console.warn('Formio.getAppUrl() is deprecated. Use Formio.getProjectUrl instead.');\n return Formio.projectUrl;\n }\n }, {\n key: \"getProjectUrl\",\n value: function getProjectUrl() {\n return Formio.projectUrl;\n }\n }, {\n key: \"clearCache\",\n value: function clearCache() {\n Formio.cache = {};\n }\n }, {\n key: \"noop\",\n value: function noop() {}\n }, {\n key: \"identity\",\n value: function identity(value) {\n return value;\n }\n }, {\n key: \"deregisterPlugin\",\n value: function deregisterPlugin(plugin) {\n var beforeLength = Formio.plugins.length;\n Formio.plugins = Formio.plugins.filter(function (p) {\n if (p !== plugin && p.__name !== plugin) {\n return true;\n }\n (p.deregister || Formio.noop).call(plugin, Formio);\n return false;\n });\n return beforeLength !== Formio.plugins.length;\n }\n }, {\n key: \"registerPlugin\",\n value: function registerPlugin(plugin, name) {\n var __Formio = Formio;\n __Formio.plugins.push(plugin);\n __Formio.plugins.sort(function (a, b) {\n return (b.priority || 0) - (a.priority || 0);\n });\n plugin.__name = name;\n (plugin.init || __Formio.noop).call(plugin, __Formio);\n }\n }, {\n key: \"getPlugin\",\n value: function getPlugin(name) {\n var _iterator = _createForOfIteratorHelper(Formio.plugins),\n _step;\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var plugin = _step.value;\n if (plugin.__name === name) {\n return plugin;\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n return null;\n }\n }, {\n key: \"pluginWait\",\n value: function pluginWait(pluginFn) {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n return _nativePromiseOnly[\"default\"].all(Formio.plugins.map(function (plugin) {\n var _ref;\n return (_ref = plugin[pluginFn] || Formio.noop).call.apply(_ref, [plugin].concat(args));\n }));\n }\n }, {\n key: \"pluginGet\",\n value: function pluginGet(pluginFn) {\n for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {\n args[_key3 - 1] = arguments[_key3];\n }\n var callPlugin = function callPlugin(index) {\n var _ref2;\n var plugin = Formio.plugins[index];\n if (!plugin) {\n return _nativePromiseOnly[\"default\"].resolve(null);\n }\n return _nativePromiseOnly[\"default\"].resolve((_ref2 = plugin[pluginFn] || Formio.noop).call.apply(_ref2, [plugin].concat(args))).then(function (result) {\n if (!isNil(result)) {\n return result;\n }\n return callPlugin(index + 1);\n });\n };\n return callPlugin(0);\n }\n }, {\n key: \"pluginAlter\",\n value: function pluginAlter(pluginFn, value) {\n for (var _len4 = arguments.length, args = new Array(_len4 > 2 ? _len4 - 2 : 0), _key4 = 2; _key4 < _len4; _key4++) {\n args[_key4 - 2] = arguments[_key4];\n }\n return Formio.plugins.reduce(function (value, plugin) {\n return (plugin[pluginFn] || Formio.identity).apply(void 0, [value].concat(args));\n }, value);\n }\n }, {\n key: \"accessInfo\",\n value: function accessInfo(formio) {\n var projectUrl = formio ? formio.projectUrl : Formio.projectUrl;\n return Formio.makeRequest(formio, 'accessInfo', \"\".concat(projectUrl, \"/access\"));\n }\n }, {\n key: \"projectRoles\",\n value: function projectRoles(formio) {\n var projectUrl = formio ? formio.projectUrl : Formio.projectUrl;\n return Formio.makeRequest(formio, 'projectRoles', \"\".concat(projectUrl, \"/role\"));\n }\n }, {\n key: \"currentUser\",\n value: function currentUser(formio, options) {\n var _this9 = this;\n var authUrl = Formio.authUrl;\n if (!authUrl) {\n authUrl = formio ? formio.projectUrl : Formio.projectUrl || Formio.baseUrl;\n }\n authUrl += '/current';\n var user = Formio.getUser(options);\n if (user) {\n return Formio.pluginAlter('wrapStaticRequestPromise', _nativePromiseOnly[\"default\"].resolve(user), {\n url: authUrl,\n method: 'GET',\n options: options\n });\n }\n var token = Formio.getToken(options);\n if ((!options || !options.external) && !token) {\n return Formio.pluginAlter('wrapStaticRequestPromise', _nativePromiseOnly[\"default\"].resolve(null), {\n url: authUrl,\n method: 'GET',\n options: options\n });\n }\n this.currentUserResolved = false;\n return Formio.makeRequest(formio, 'currentUser', authUrl, 'GET', null, options).then(function (response) {\n _this9.currentUserResolved = true;\n Formio.setUser(response, options);\n return response;\n });\n }\n }, {\n key: \"logout\",\n value: function logout(formio, options) {\n options = options || {};\n options.formio = formio;\n var projectUrl = Formio.authUrl ? Formio.authUrl : formio ? formio.projectUrl : Formio.baseUrl;\n var logout = function 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', \"\".concat(projectUrl, \"/logout\")).then(function (result) {\n logout();\n return result;\n })[\"catch\"](function (err) {\n logout();\n throw err;\n });\n }\n }, {\n key: \"pageQuery\",\n value: function pageQuery() {\n var pageQuery = {};\n pageQuery.paths = [];\n var hashes = location.hash.substr(1).replace(/\\?/g, '&').split('&');\n var 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 } else if (item.indexOf('/') === 0) {\n pageQuery.paths = item.substr(1).split('/');\n }\n });\n return pageQuery;\n }\n }, {\n key: \"oAuthCurrentUser\",\n value: function oAuthCurrentUser(formio, token) {\n return Formio.currentUser(formio, {\n external: true,\n headers: {\n Authorization: \"Bearer \".concat(token)\n }\n });\n }\n }, {\n key: \"samlInit\",\n value: function samlInit(options) {\n options = options || {};\n var query = Formio.pageQuery();\n if (query.saml) {\n Formio.setUser(null);\n var retVal = Formio.setToken(query.saml);\n var 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\n // Set the relay if not provided.\n if (!options.relay) {\n options.relay = window.location.href;\n }\n\n // go to the saml sso endpoint for this project.\n var authUrl = Formio.authUrl || Formio.projectUrl;\n window.location.href = \"\".concat(authUrl, \"/saml/sso?relay=\").concat(encodeURI(options.relay));\n return false;\n }\n }, {\n key: \"oktaInit\",\n value: function oktaInit(options) {\n options = options || {};\n if ((typeof OktaAuth === \"undefined\" ? \"undefined\" : _typeof(OktaAuth)) !== undefined) {\n options.OktaAuth = OktaAuth;\n }\n if (_typeof(options.OktaAuth) === undefined) {\n var 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 _nativePromiseOnly[\"default\"].reject(errorMessage);\n }\n return new _nativePromiseOnly[\"default\"](function (resolve, reject) {\n var Okta = options.OktaAuth;\n delete options.OktaAuth;\n var authClient = new Okta(options);\n authClient.tokenManager.get('accessToken').then(function (accessToken) {\n if (accessToken) {\n resolve(Formio.oAuthCurrentUser(options.formio, accessToken.accessToken));\n } else if (location.hash) {\n authClient.token.parseFromUrl().then(function (token) {\n authClient.tokenManager.add('accessToken', token);\n resolve(Formio.oAuthCurrentUser(options.formio, token.accessToken));\n })[\"catch\"](function (err) {\n console.warn(err);\n reject(err);\n });\n } else {\n authClient.token.getWithRedirect({\n responseType: 'token',\n scopes: options.scopes\n });\n resolve(false);\n }\n })[\"catch\"](function (error) {\n reject(error);\n });\n });\n }\n }, {\n key: \"ssoInit\",\n value: function 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 _nativePromiseOnly[\"default\"].reject('Unknown SSO type');\n }\n }\n }, {\n key: \"requireLibrary\",\n value: function requireLibrary(name, property, src, polling, onload) {\n if (!Formio.libraries.hasOwnProperty(name)) {\n Formio.libraries[name] = {};\n Formio.libraries[name].ready = new _nativePromiseOnly[\"default\"](function (resolve, reject) {\n Formio.libraries[name].resolve = resolve;\n Formio.libraries[name].reject = reject;\n });\n var callbackName = \"\".concat(name, \"Callback\");\n if (!polling && !window[callbackName]) {\n window[callbackName] = function () {\n return Formio.libraries[name].resolve();\n };\n }\n\n // See if the plugin already exists.\n var plugin = (0, _get2[\"default\"])(window, property);\n if (plugin) {\n Formio.libraries[name].resolve(plugin);\n } else {\n src = Array.isArray(src) ? src : [src];\n src.forEach(function (lib) {\n var attrs = {};\n var 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\n // Add the script to the top of the page.\n var element = document.createElement(elementType);\n if (element.setAttribute) {\n for (var attr in attrs) {\n element.setAttribute(attr, attrs[attr]);\n }\n }\n if (onload) {\n element.addEventListener('load', function () {\n Formio.libraries[name].loaded = true;\n onload(Formio.libraries[name].ready);\n });\n }\n var _document = document,\n head = _document.head;\n if (head) {\n head.appendChild(element);\n }\n });\n\n // if no callback is provided, then check periodically for the script.\n if (polling) {\n var interval = setInterval(function () {\n var plugin = (0, _get2[\"default\"])(window, property);\n if (plugin) {\n clearInterval(interval);\n Formio.libraries[name].resolve(plugin);\n }\n }, 200);\n }\n }\n }\n var lib = Formio.libraries[name];\n return onload && lib.loaded ? onload(lib.ready) : lib.ready;\n }\n }, {\n key: \"libraryReady\",\n value: function libraryReady(name) {\n if (Formio.libraries.hasOwnProperty(name) && Formio.libraries[name].ready) {\n return Formio.libraries[name].ready;\n }\n return _nativePromiseOnly[\"default\"].reject(\"\".concat(name, \" library was not required.\"));\n }\n }, {\n key: \"addToGlobal\",\n value: function addToGlobal(global) {\n if (_typeof(global) === 'object' && !global.Formio) {\n global.Formio = Formio;\n }\n }\n }, {\n key: \"setPathType\",\n value: function setPathType(type) {\n if (typeof type === 'string') {\n Formio.pathType = type;\n }\n }\n }, {\n key: \"getPathType\",\n value: function getPathType() {\n return Formio.pathType;\n }\n }, {\n key: \"rulesEntities\",\n get: function get() {\n return {\n ValueSources: Formio.ValueSources,\n Conjunctions: Formio.Conjunctions,\n Operators: Formio.Operators,\n Transformers: Formio.Transformers,\n QuickRules: Formio.QuickRules,\n Rules: Formio.Rules\n };\n }\n }, {\n key: \"GlobalFormio\",\n get: function get() {\n if (typeof __webpack_require__.g !== 'undefined' && __webpack_require__.g.Formio) {\n return __webpack_require__.g.Formio;\n } else if (typeof window !== 'undefined' && window.Formio) {\n return window.Formio;\n }\n return Formio;\n }\n }]);\n return Formio;\n}(); // Define all the static properties.\n_defineProperty(Formio, \"currentUserResolved\", true);\nFormio.libraries = {};\nFormio.Promise = _nativePromiseOnly[\"default\"];\nFormio.fetch = fetch;\nFormio.Headers = Headers;\nFormio.baseUrl = 'https://api.form.io';\nFormio.projectUrl = Formio.baseUrl;\nFormio.authUrl = '';\nFormio.projectUrlSet = false;\nFormio.plugins = [];\nFormio.cache = {};\nFormio.Providers = _providers[\"default\"];\nFormio.version = '4.15.1';\nFormio.pathType = '';\nFormio.events = new _EventEmitter[\"default\"]();\nFormio.cdn = new _CDN[\"default\"]();\nif ((Formio.version || '').includes('rc')) {\n Formio.cdn.setBaseUrl('https://cdn.test-form.io');\n}\nif (typeof __webpack_require__.g !== 'undefined') {\n Formio.addToGlobal(__webpack_require__.g);\n}\nif (typeof window !== 'undefined') {\n Formio.addToGlobal(window);\n}\nvar GlobalFormio = Formio.GlobalFormio;\nexports.GlobalFormio = GlobalFormio;\nvar _default = Formio;\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/Formio.js?"); /***/ }), @@ -81,7 +92,7 @@ eval("\n\n__webpack_require__(/*! core-js/modules/es.array.slice.js */ \"./node_ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptors.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.promise.js */ \"./node_modules/core-js/modules/es.promise.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.find.js */ \"./node_modules/core-js/modules/es.array.find.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.join.js */ \"./node_modules/core-js/modules/es.array.join.js\");\n\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.trim.js */ \"./node_modules/core-js/modules/es.string.trim.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\n\nvar _Formio = __webpack_require__(/*! ./Formio */ \"./lib/Formio.js\");\n\nvar _Webform2 = _interopRequireDefault(__webpack_require__(/*! ./Webform */ \"./lib/Webform.js\"));\n\nvar _utils = __webpack_require__(/*! ./utils/utils */ \"./lib/utils/utils.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar PDF = /*#__PURE__*/function (_Webform) {\n _inherits(PDF, _Webform);\n\n var _super = _createSuper(PDF);\n\n function PDF(element, options) {\n var _this;\n\n _classCallCheck(this, PDF);\n\n options.display = 'pdf';\n _this = _super.call(this, element, options);\n _this.components = [];\n return _this;\n }\n\n _createClass(PDF, [{\n key: \"init\",\n value: function init() {\n var _this2 = this;\n\n _get(_getPrototypeOf(PDF.prototype), \"init\", this).call(this); // Handle an iframe submission.\n\n\n this.on('iframe-submission', function (submission) {\n return _this2.setValue(submission, {\n fromIframe: true\n });\n }, true);\n this.on('iframe-change', function (submission) {\n return _this2.setValue(submission, {\n fromIframe: true\n });\n }, true);\n this.on('iframe-getIframePositions', function (query) {\n var iframe = document.getElementById(\"iframe-\".concat(query.formId));\n\n if (iframe) {\n var iframeBoundingClientRect = iframe.getBoundingClientRect();\n\n _this2.postMessage({\n name: 'iframePositions',\n data: {\n formId: query.formId,\n iframe: {\n top: iframeBoundingClientRect.top\n },\n scrollY: window.scrollY || window.pageYOffset\n }\n });\n }\n }); // Trigger when this form is ready.\n\n this.on('iframe-ready', function () {\n return _this2.iframeReadyResolve();\n }, true);\n }\n }, {\n key: \"render\",\n value: function render() {\n this.submitButton = this.addComponent({\n disabled: this.form.disableWizardSubmit,\n input: true,\n type: 'button',\n action: 'submit',\n internal: true,\n label: 'Submit',\n key: 'submit',\n ref: 'button',\n hidden: this.isSubmitButtonHidden()\n });\n return this.renderTemplate('pdf', {\n submitButton: this.submitButton.render(),\n classes: 'formio-form-pdf',\n children: this.renderComponents()\n });\n }\n }, {\n key: \"redraw\",\n value: function redraw() {\n this.postMessage({\n name: 'redraw'\n });\n return this.builderMode ? _nativePromiseOnly.default.resolve() : _get(_getPrototypeOf(PDF.prototype), \"redraw\", this).call(this);\n }\n }, {\n key: \"rebuild\",\n value: function rebuild() {\n if (this.builderMode && this.component.components) {\n this.destroyComponents();\n this.addComponents();\n return _nativePromiseOnly.default.resolve();\n }\n\n this.postMessage({\n name: 'redraw'\n });\n return _get(_getPrototypeOf(PDF.prototype), \"rebuild\", this).call(this);\n } // Do not attach nested components for pdf.\n\n }, {\n key: \"attachComponents\",\n value: function attachComponents(element, components, container) {\n components = components || this.components;\n container = container || this.component.components;\n element = this.hook('attachComponents', element, components, container, this);\n return Promise.resolve();\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n var _this3 = this;\n\n return _get(_getPrototypeOf(PDF.prototype), \"attach\", this).call(this, element).then(function () {\n _this3.loadRefs(element, {\n button: 'single',\n buttonMessageContainer: 'single',\n buttonMessage: 'single',\n zoomIn: 'single',\n zoomOut: 'single',\n iframeContainer: 'single'\n });\n\n _this3.submitButton.refs = _objectSpread({}, _this3.refs);\n\n _this3.submitButton.attachButton(); // Reset the iframeReady promise.\n\n\n _this3.iframeReady = new _nativePromiseOnly.default(function (resolve, reject) {\n _this3.iframeReadyResolve = resolve;\n _this3.iframeReadyReject = reject;\n }); // iframes cannot be in the template so manually create it\n\n _this3.iframeElement = _this3.ce('iframe', {\n src: _this3.getSrc(),\n id: \"iframe-\".concat(_this3.id),\n seamless: true,\n class: 'formio-iframe'\n });\n _this3.iframeElement.formioContainer = _this3.component.components;\n _this3.iframeElement.formioComponent = _this3; // Append the iframe to the iframeContainer in the template\n\n _this3.empty(_this3.refs.iframeContainer);\n\n _this3.appendChild(_this3.refs.iframeContainer, _this3.iframeElement); // Post the form to the iframe\n\n\n _this3.form.base = _Formio.GlobalFormio.getBaseUrl();\n _this3.form.projectUrl = _Formio.GlobalFormio.getProjectUrl();\n\n _this3.postMessage({\n name: 'form',\n data: _this3.form\n }); // Hide the submit button if the associated component is hidden\n\n\n var submitButton = _this3.components.find(function (c) {\n return c.element === _this3.refs.button;\n });\n\n if (submitButton) {\n _this3.refs.button.classList.toggle('hidden', !submitButton.visible);\n }\n\n _this3.addEventListener(_this3.refs.zoomIn, 'click', function (event) {\n event.preventDefault();\n\n _this3.postMessage({\n name: 'zoomIn'\n });\n });\n\n _this3.addEventListener(_this3.refs.zoomOut, 'click', function (event) {\n event.preventDefault();\n\n _this3.postMessage({\n name: 'zoomOut'\n });\n });\n\n var form = (0, _utils.fastCloneDeep)(_this3.form);\n\n if (_this3.formio) {\n form.projectUrl = _this3.formio.projectUrl;\n form.url = _this3.formio.formUrl;\n form.base = _this3.formio.base;\n\n _this3.postMessage({\n name: 'token',\n data: _this3.formio.getToken()\n });\n }\n\n _this3.emit('attach');\n });\n }\n /**\n * Get the submission from the iframe.\n *\n * @return {Promise}\n */\n\n }, {\n key: \"getSubmission\",\n value: function getSubmission() {\n var _this4 = this;\n\n return new _nativePromiseOnly.default(function (resolve) {\n _this4.once('iframe-submission', resolve);\n\n _this4.postMessage({\n name: 'getSubmission'\n });\n });\n }\n /**\n * Ensure we have the submission from the iframe before we submit the form.\n *\n * @param options\n * @return {*}\n */\n\n }, {\n key: \"submitForm\",\n value: function submitForm() {\n var _this5 = this;\n\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n this.postMessage({\n name: 'getErrors'\n });\n return this.getSubmission().then(function () {\n return _get(_getPrototypeOf(PDF.prototype), \"submitForm\", _this5).call(_this5, options);\n });\n }\n }, {\n key: \"getSrc\",\n value: function getSrc() {\n if (!this._form || !this._form.settings || !this._form.settings.pdf) {\n return '';\n }\n\n var iframeSrc = \"\".concat(this._form.settings.pdf.src, \".html\");\n var params = [\"id=\".concat(this.id)];\n\n if (this.options.showCheckboxBackground || this._form.settings.showCheckboxBackground) {\n params.push('checkboxbackground=1');\n }\n\n if (this.options.readOnly) {\n params.push('readonly=1');\n }\n\n if (this.options.zoom) {\n params.push(\"zoom=\".concat(this.options.zoom));\n }\n\n if (this.builderMode) {\n params.push('builder=1');\n }\n\n if (params.length) {\n iframeSrc += \"?\".concat(params.join('&'));\n }\n\n return iframeSrc;\n }\n }, {\n key: \"setForm\",\n value: function setForm(form) {\n var _this6 = this;\n\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return _get(_getPrototypeOf(PDF.prototype), \"setForm\", this).call(this, form, flags).then(function () {\n if (_this6.formio) {\n form.projectUrl = _this6.formio.projectUrl;\n form.url = _this6.formio.formUrl;\n form.base = _this6.formio.base;\n\n _this6.postMessage({\n name: 'token',\n data: _this6.formio.getToken()\n });\n }\n\n _this6.postMessage({\n name: 'form',\n data: _this6.form\n });\n });\n }\n /**\n * Set's the value of this form component.\n *\n * @param submission\n * @param flags\n */\n\n }, {\n key: \"setValue\",\n value: function setValue(submission) {\n var _this7 = this;\n\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n var changed = _get(_getPrototypeOf(PDF.prototype), \"setValue\", this).call(this, submission, flags);\n\n if (!flags || !flags.fromIframe) {\n this.once('iframe-ready', function () {\n if (changed) {\n _this7.postMessage({\n name: 'submission',\n data: submission\n });\n }\n });\n }\n\n return changed;\n }\n }, {\n key: \"postMessage\",\n value: function postMessage(message) {\n var _this8 = this;\n\n // If we get here before the iframeReady promise is set up, it's via the superclass constructor\n if (!this.iframeReady) {\n return;\n }\n\n if (!message.type) {\n message.type = 'iframe-data';\n }\n\n this.iframeReady.then(function () {\n if (_this8.iframeElement && _this8.iframeElement.contentWindow && !(message.name === 'form' && _this8.iframeFormSetUp)) {\n _this8.iframeElement.contentWindow.postMessage(JSON.stringify(message), '*');\n\n _this8.iframeFormSetUp = message.name === 'form';\n }\n });\n }\n }, {\n key: \"focusOnComponent\",\n value: function focusOnComponent(key) {\n this.postMessage({\n name: 'focusErroredField',\n data: key\n });\n } // Do not clear the iframe.\n\n }, {\n key: \"clear\",\n value: function clear() {}\n }, {\n key: \"showErrors\",\n value: function showErrors(error, triggerEvent) {\n var _this$refs$buttonMess;\n\n var helpBlock = document.getElementById('submit-error');\n var submitError = this.t('submitError');\n var isSubmitErrorShown = ((_this$refs$buttonMess = this.refs.buttonMessage) === null || _this$refs$buttonMess === void 0 ? void 0 : _this$refs$buttonMess.textContent.trim()) === submitError;\n\n if (!helpBlock && this.errors.length && !isSubmitErrorShown) {\n var p = this.ce('p', {\n class: 'help-block'\n });\n this.setContent(p, submitError);\n p.addEventListener('click', function () {\n window.scrollTo(0, 0);\n });\n var div = this.ce('div', {\n id: 'submit-error',\n class: 'has-error'\n });\n this.appendTo(p, div);\n this.appendTo(div, this.element);\n }\n\n if (!this.errors.length && helpBlock) {\n helpBlock.remove();\n }\n\n _get(_getPrototypeOf(PDF.prototype), \"showErrors\", this).call(this, error, triggerEvent);\n }\n }, {\n key: \"isSubmitButtonHidden\",\n value: function isSubmitButtonHidden() {\n var hidden = false;\n (0, _utils.eachComponent)(this.component.components, function (component) {\n if (component.type === 'button' && (component.action === 'submit' || !component.action)) {\n hidden = component.hidden || false;\n }\n });\n return hidden;\n }\n }]);\n\n return PDF;\n}(_Webform2.default);\n/**\n * Listen for window messages.\n */\n\n\nexports[\"default\"] = PDF;\n\nif (typeof window !== 'undefined') {\n window.addEventListener('message', function (event) {\n var eventData = null;\n\n try {\n eventData = JSON.parse(event.data);\n } catch (err) {\n eventData = null;\n } // If this form exists, then emit the event within this form.\n\n\n if (eventData && eventData.name && eventData.formId && _Formio.GlobalFormio.forms.hasOwnProperty(eventData.formId)) {\n _Formio.GlobalFormio.forms[eventData.formId].emit(\"iframe-\".concat(eventData.name), eventData.data);\n }\n });\n}\n\n//# sourceURL=webpack://Formio/./lib/PDF.js?"); +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptors.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-properties.js */ \"./node_modules/core-js/modules/es.object.define-properties.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.promise.js */ \"./node_modules/core-js/modules/es.promise.js\");\n__webpack_require__(/*! core-js/modules/es.array.find.js */ \"./node_modules/core-js/modules/es.array.find.js\");\n__webpack_require__(/*! core-js/modules/es.array.join.js */ \"./node_modules/core-js/modules/es.array.join.js\");\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n__webpack_require__(/*! core-js/modules/es.string.trim.js */ \"./node_modules/core-js/modules/es.string.trim.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\nvar _Formio = __webpack_require__(/*! ./Formio */ \"./lib/Formio.js\");\nvar _Webform2 = _interopRequireDefault(__webpack_require__(/*! ./Webform */ \"./lib/Webform.js\"));\nvar _utils = __webpack_require__(/*! ./utils/utils */ \"./lib/utils/utils.js\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar PDF = /*#__PURE__*/function (_Webform) {\n _inherits(PDF, _Webform);\n var _super = _createSuper(PDF);\n function PDF(element, options) {\n var _this;\n _classCallCheck(this, PDF);\n options.display = 'pdf';\n _this = _super.call(this, element, options);\n _this.components = [];\n return _this;\n }\n _createClass(PDF, [{\n key: \"init\",\n value: function init() {\n var _this2 = this;\n _get(_getPrototypeOf(PDF.prototype), \"init\", this).call(this);\n\n // Handle an iframe submission.\n this.on('iframe-submission', function (submission) {\n return _this2.setValue(submission, {\n fromIframe: true\n });\n }, true);\n this.on('iframe-change', function (submission) {\n return _this2.setValue(submission, {\n fromIframe: true\n });\n }, true);\n this.on('iframe-getIframePositions', function (query) {\n var iframe = document.getElementById(\"iframe-\".concat(query.formId));\n if (iframe) {\n var iframeBoundingClientRect = iframe.getBoundingClientRect();\n _this2.postMessage({\n name: 'iframePositions',\n data: {\n formId: query.formId,\n iframe: {\n top: iframeBoundingClientRect.top\n },\n scrollY: window.scrollY || window.pageYOffset\n }\n });\n }\n });\n\n // Trigger when this form is ready.\n this.on('iframe-ready', function () {\n return _this2.iframeReadyResolve();\n }, true);\n }\n }, {\n key: \"render\",\n value: function render() {\n this.submitButton = this.addComponent({\n disabled: this.form.disableWizardSubmit,\n input: true,\n type: 'button',\n action: 'submit',\n internal: true,\n label: 'Submit',\n key: 'submit',\n ref: 'button',\n hidden: this.isSubmitButtonHidden()\n });\n return this.renderTemplate('pdf', {\n submitButton: this.submitButton.render(),\n classes: 'formio-form-pdf',\n children: this.renderComponents()\n });\n }\n }, {\n key: \"redraw\",\n value: function redraw() {\n this.postMessage({\n name: 'redraw'\n });\n return this.builderMode ? _nativePromiseOnly[\"default\"].resolve() : _get(_getPrototypeOf(PDF.prototype), \"redraw\", this).call(this);\n }\n }, {\n key: \"rebuild\",\n value: function rebuild() {\n if (this.builderMode && this.component.components) {\n this.destroyComponents();\n this.addComponents();\n return _nativePromiseOnly[\"default\"].resolve();\n }\n this.postMessage({\n name: 'redraw'\n });\n return _get(_getPrototypeOf(PDF.prototype), \"rebuild\", this).call(this);\n }\n\n // Do not attach nested components for pdf.\n }, {\n key: \"attachComponents\",\n value: function attachComponents(element, components, container) {\n components = components || this.components;\n container = container || this.component.components;\n element = this.hook('attachComponents', element, components, container, this);\n return Promise.resolve();\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n var _this3 = this;\n return _get(_getPrototypeOf(PDF.prototype), \"attach\", this).call(this, element).then(function () {\n _this3.loadRefs(element, {\n button: 'single',\n buttonMessageContainer: 'single',\n buttonMessage: 'single',\n zoomIn: 'single',\n zoomOut: 'single',\n iframeContainer: 'single'\n });\n _this3.submitButton.refs = _objectSpread({}, _this3.refs);\n _this3.submitButton.attachButton();\n\n // Reset the iframeReady promise.\n _this3.iframeReady = new _nativePromiseOnly[\"default\"](function (resolve, reject) {\n _this3.iframeReadyResolve = resolve;\n _this3.iframeReadyReject = reject;\n });\n\n // iframes cannot be in the template so manually create it\n _this3.iframeElement = _this3.ce('iframe', {\n src: _this3.getSrc(),\n id: \"iframe-\".concat(_this3.id),\n seamless: true,\n \"class\": 'formio-iframe'\n });\n _this3.iframeElement.formioContainer = _this3.component.components;\n _this3.iframeElement.formioComponent = _this3;\n\n // Append the iframe to the iframeContainer in the template\n _this3.empty(_this3.refs.iframeContainer);\n _this3.appendChild(_this3.refs.iframeContainer, _this3.iframeElement);\n\n // Post the form to the iframe\n _this3.form.base = _Formio.GlobalFormio.getBaseUrl();\n _this3.form.projectUrl = _Formio.GlobalFormio.getProjectUrl();\n _this3.postMessage({\n name: 'form',\n data: _this3.form\n });\n\n // Hide the submit button if the associated component is hidden\n var submitButton = _this3.components.find(function (c) {\n return c.element === _this3.refs.button;\n });\n if (submitButton) {\n _this3.refs.button.classList.toggle('hidden', !submitButton.visible);\n }\n _this3.addEventListener(_this3.refs.zoomIn, 'click', function (event) {\n event.preventDefault();\n _this3.postMessage({\n name: 'zoomIn'\n });\n });\n _this3.addEventListener(_this3.refs.zoomOut, 'click', function (event) {\n event.preventDefault();\n _this3.postMessage({\n name: 'zoomOut'\n });\n });\n var form = (0, _utils.fastCloneDeep)(_this3.form);\n if (_this3.formio) {\n form.projectUrl = _this3.formio.projectUrl;\n form.url = _this3.formio.formUrl;\n form.base = _this3.formio.base;\n _this3.postMessage({\n name: 'token',\n data: _this3.formio.getToken()\n });\n }\n _this3.emit('attach');\n });\n }\n\n /**\n * Get the submission from the iframe.\n *\n * @return {Promise}\n */\n }, {\n key: \"getSubmission\",\n value: function getSubmission() {\n var _this4 = this;\n return new _nativePromiseOnly[\"default\"](function (resolve) {\n _this4.once('iframe-submission', resolve);\n _this4.postMessage({\n name: 'getSubmission'\n });\n });\n }\n\n /**\n * Ensure we have the submission from the iframe before we submit the form.\n *\n * @param options\n * @return {*}\n */\n }, {\n key: \"submitForm\",\n value: function submitForm() {\n var _this5 = this;\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n this.postMessage({\n name: 'getErrors'\n });\n return this.getSubmission().then(function () {\n return _get(_getPrototypeOf(PDF.prototype), \"submitForm\", _this5).call(_this5, options);\n });\n }\n }, {\n key: \"getSrc\",\n value: function getSrc() {\n if (!this._form || !this._form.settings || !this._form.settings.pdf) {\n return '';\n }\n var iframeSrc = \"\".concat(this._form.settings.pdf.src, \".html\");\n var params = [\"id=\".concat(this.id)];\n if (this.options.showCheckboxBackground || this._form.settings.showCheckboxBackground) {\n params.push('checkboxbackground=1');\n }\n if (this.options.readOnly) {\n params.push('readonly=1');\n }\n if (this.options.zoom) {\n params.push(\"zoom=\".concat(this.options.zoom));\n }\n if (this.builderMode) {\n params.push('builder=1');\n }\n if (params.length) {\n iframeSrc += \"?\".concat(params.join('&'));\n }\n return iframeSrc;\n }\n }, {\n key: \"setForm\",\n value: function setForm(form) {\n var _this6 = this;\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return _get(_getPrototypeOf(PDF.prototype), \"setForm\", this).call(this, form, flags).then(function () {\n if (_this6.formio) {\n form.projectUrl = _this6.formio.projectUrl;\n form.url = _this6.formio.formUrl;\n form.base = _this6.formio.base;\n _this6.postMessage({\n name: 'token',\n data: _this6.formio.getToken()\n });\n }\n _this6.postMessage({\n name: 'form',\n data: _this6.form\n });\n });\n }\n\n /**\n * Set's the value of this form component.\n *\n * @param submission\n * @param flags\n */\n }, {\n key: \"setValue\",\n value: function setValue(submission) {\n var _this7 = this;\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var changed = _get(_getPrototypeOf(PDF.prototype), \"setValue\", this).call(this, submission, flags);\n if (!flags || !flags.fromIframe) {\n this.once('iframe-ready', function () {\n if (changed) {\n _this7.postMessage({\n name: 'submission',\n data: submission\n });\n }\n });\n }\n return changed;\n }\n }, {\n key: \"postMessage\",\n value: function postMessage(message) {\n var _this8 = this;\n // If we get here before the iframeReady promise is set up, it's via the superclass constructor\n if (!this.iframeReady) {\n return;\n }\n if (!message.type) {\n message.type = 'iframe-data';\n }\n this.iframeReady.then(function () {\n if (_this8.iframeElement && _this8.iframeElement.contentWindow && !(message.name === 'form' && _this8.iframeFormSetUp)) {\n _this8.iframeElement.contentWindow.postMessage(JSON.stringify(message), '*');\n _this8.iframeFormSetUp = message.name === 'form';\n }\n });\n }\n }, {\n key: \"focusOnComponent\",\n value: function focusOnComponent(key) {\n this.postMessage({\n name: 'focusErroredField',\n data: key\n });\n }\n\n // Do not clear the iframe.\n }, {\n key: \"clear\",\n value: function clear() {}\n }, {\n key: \"showErrors\",\n value: function showErrors(error, triggerEvent) {\n var _this$refs$buttonMess;\n var helpBlock = document.getElementById('submit-error');\n var submitError = this.t('submitError');\n var isSubmitErrorShown = ((_this$refs$buttonMess = this.refs.buttonMessage) === null || _this$refs$buttonMess === void 0 ? void 0 : _this$refs$buttonMess.textContent.trim()) === submitError;\n if (!helpBlock && this.errors.length && !isSubmitErrorShown) {\n var p = this.ce('p', {\n \"class\": 'help-block'\n });\n this.setContent(p, submitError);\n p.addEventListener('click', function () {\n window.scrollTo(0, 0);\n });\n var div = this.ce('div', {\n id: 'submit-error',\n \"class\": 'has-error'\n });\n this.appendTo(p, div);\n this.appendTo(div, this.element);\n }\n if (!this.errors.length && helpBlock) {\n helpBlock.remove();\n }\n _get(_getPrototypeOf(PDF.prototype), \"showErrors\", this).call(this, error, triggerEvent);\n }\n }, {\n key: \"isSubmitButtonHidden\",\n value: function isSubmitButtonHidden() {\n var hidden = false;\n (0, _utils.eachComponent)(this.component.components, function (component) {\n if (component.type === 'button' && (component.action === 'submit' || !component.action)) {\n hidden = component.hidden || false;\n }\n });\n return hidden;\n }\n }]);\n return PDF;\n}(_Webform2[\"default\"]);\n/**\n * Listen for window messages.\n */\nexports[\"default\"] = PDF;\nif (typeof window !== 'undefined') {\n window.addEventListener('message', function (event) {\n var eventData = null;\n try {\n eventData = JSON.parse(event.data);\n } catch (err) {\n eventData = null;\n }\n\n // If this form exists, then emit the event within this form.\n if (eventData && eventData.name && eventData.formId && _Formio.GlobalFormio.forms.hasOwnProperty(eventData.formId)) {\n _Formio.GlobalFormio.forms[eventData.formId].emit(\"iframe-\".concat(eventData.name), eventData.data);\n }\n });\n}\n\n//# sourceURL=webpack://Formio/./lib/PDF.js?"); /***/ }), @@ -92,7 +103,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.from.js */ \"./node_modules/core-js/modules/es.array.from.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.slice.js */ \"./node_modules/core-js/modules/es.array.slice.js\");\n\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.includes.js */ \"./node_modules/core-js/modules/es.array.includes.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.includes.js */ \"./node_modules/core-js/modules/es.string.includes.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\n\nvar _Formio = __webpack_require__(/*! ./Formio */ \"./lib/Formio.js\");\n\nvar _WebformBuilder2 = _interopRequireDefault(__webpack_require__(/*! ./WebformBuilder */ \"./lib/WebformBuilder.js\"));\n\nvar _utils = __webpack_require__(/*! ./utils/utils */ \"./lib/utils/utils.js\");\n\nvar _formUtils = __webpack_require__(/*! ./utils/formUtils */ \"./lib/utils/formUtils.js\");\n\nvar _builder = _interopRequireDefault(__webpack_require__(/*! ./utils/builder */ \"./lib/utils/builder.js\"));\n\nvar _PDF = _interopRequireDefault(__webpack_require__(/*! ./PDF */ \"./lib/PDF.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar PDFBuilder = /*#__PURE__*/function (_WebformBuilder) {\n _inherits(PDFBuilder, _WebformBuilder);\n\n var _super = _createSuper(PDFBuilder);\n\n function PDFBuilder() {\n var _this;\n\n _classCallCheck(this, PDFBuilder);\n\n var element, options;\n\n if (arguments[0] instanceof HTMLElement || arguments[1]) {\n element = arguments[0];\n options = arguments[1];\n } else {\n options = arguments[0];\n } // Force superclass to skip the automatic init; we'll trigger it manually\n\n\n options.skipInit = true;\n options.display = 'pdf';\n\n if (element) {\n _this = _super.call(this, element, options);\n } else {\n _this = _super.call(this, options);\n }\n\n _this.dragDropEnabled = false;\n return _possibleConstructorReturn(_this);\n }\n\n _createClass(PDFBuilder, [{\n key: \"defaultGroups\",\n get: function get() {\n return {\n pdf: {\n title: 'PDF Fields',\n weight: 0,\n default: true,\n components: {\n textfield: true,\n number: true,\n password: true,\n email: true,\n phoneNumber: true,\n currency: true,\n checkbox: true,\n signature: true,\n select: true,\n textarea: true,\n datetime: true,\n file: true,\n htmlelement: true,\n signrequestsignature: true\n }\n },\n basic: false,\n advanced: false,\n layout: false,\n data: false,\n premium: false,\n resource: false\n };\n }\n }, {\n key: \"hasPDF\",\n get: function get() {\n return _lodash.default.has(this.webform.form, 'settings.pdf');\n }\n }, {\n key: \"projectUrl\",\n get: function get() {\n return this.options.projectUrl || _Formio.GlobalFormio.getProjectUrl();\n }\n }, {\n key: \"init\",\n value: function init() {\n this.options.attachMode = 'builder';\n this.webform = this.webform || this.createForm(this.options);\n this.webform.init();\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n\n var result = this.renderTemplate('pdfBuilder', {\n sidebar: this.renderTemplate('builderSidebar', {\n scrollEnabled: this.sideBarScroll,\n groupOrder: this.groupOrder,\n groupId: \"builder-sidebar-\".concat(this.id),\n groups: this.groupOrder.map(function (groupKey) {\n return _this2.renderTemplate('builderSidebarGroup', {\n group: _this2.groups[groupKey],\n groupKey: groupKey,\n groupId: \"builder-sidebar-\".concat(_this2.id),\n subgroups: _this2.groups[groupKey].subgroups.map(function (group) {\n return _this2.renderTemplate('builderSidebarGroup', {\n group: group,\n groupKey: group.key,\n groupId: \"group-container-\".concat(groupKey),\n subgroups: []\n });\n })\n });\n })\n }),\n form: this.hasPDF ? this.webform.render() : this.renderTemplate('pdfBuilderUpload', {})\n });\n return result;\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n var _this3 = this;\n\n // PDF Upload\n if (!this.hasPDF) {\n this.loadRefs(element, {\n 'fileDrop': 'single',\n 'fileBrowse': 'single',\n 'hiddenFileInputElement': 'single',\n 'uploadError': 'single',\n 'uploadProgress': 'single',\n 'uploadProgressWrapper': 'single',\n 'dragDropText': 'single'\n });\n this.addEventListener(this.refs['pdf-upload-button'], 'click', function (event) {\n event.preventDefault();\n }); // Init the upload error.\n\n if (!this.projectUrl) {\n this.setUploadError('Form options.projectUrl not set. Please set the \"projectUrl\" property of the options for this form or use Formio.setProjectUrl(). This setting is necessary to upload a pdf background.');\n } else {\n this.setUploadError();\n }\n\n if (this.refs.fileDrop) {\n var _element = this;\n\n this.addEventListener(this.refs.fileDrop, 'dragover', function (event) {\n this.className = 'fileSelector fileDragOver';\n event.preventDefault();\n });\n this.addEventListener(this.refs.fileDrop, 'dragleave', function (event) {\n this.className = 'fileSelector';\n event.preventDefault();\n });\n this.addEventListener(this.refs.fileDrop, 'drop', function (event) {\n this.className = 'fileSelector';\n event.preventDefault();\n\n _element.upload(event.dataTransfer.files[0]);\n\n return false;\n });\n }\n\n if (this.refs.fileBrowse && this.refs.hiddenFileInputElement) {\n this.addEventListener(this.refs.fileBrowse, 'click', function (event) {\n event.preventDefault(); // There is no direct way to trigger a file dialog. To work around this, create an input of type file and trigger\n // a click event on it.\n\n if (typeof _this3.refs.hiddenFileInputElement.trigger === 'function') {\n _this3.refs.hiddenFileInputElement.trigger('click');\n } else {\n _this3.refs.hiddenFileInputElement.click();\n }\n });\n this.addEventListener(this.refs.hiddenFileInputElement, 'change', function () {\n if (!_this3.refs.hiddenFileInputElement.value) {\n return;\n }\n\n _this3.upload(_this3.refs.hiddenFileInputElement.files[0]);\n\n _this3.refs.hiddenFileInputElement.value = '';\n });\n }\n\n return _nativePromiseOnly.default.resolve();\n } // Normal PDF Builder\n\n\n return _get(_getPrototypeOf(PDFBuilder.prototype), \"attach\", this).call(this, element).then(function () {\n _this3.loadRefs(_this3.element, {\n iframeDropzone: 'single',\n 'sidebar-container': 'multiple',\n 'sidebar': 'single'\n });\n\n _this3.afterAttach();\n\n return _this3.element;\n });\n }\n }, {\n key: \"afterAttach\",\n value: function afterAttach() {\n var _this4 = this;\n\n this.on('saveComponent', function (component) {\n _this4.webform.postMessage({\n name: 'updateElement',\n data: component\n });\n });\n this.on('removeComponent', function (component) {\n _this4.webform.postMessage({\n name: 'removeElement',\n data: component\n });\n });\n this.initIframeEvents();\n this.updateDropzoneDimensions();\n var sidebar = this.refs.sidebar;\n\n if (sidebar) {\n this.addClass(sidebar, 'disabled');\n this.webform.on('iframe-ready', function () {\n _this4.pdfLoaded = true;\n\n _this4.updateDragAndDrop();\n\n _this4.removeClass(sidebar, 'disabled');\n }, true);\n }\n }\n }, {\n key: \"upload\",\n value: function upload(file) {\n var _this5 = this;\n\n var formio = new _Formio.GlobalFormio(this.projectUrl);\n\n if (this.refs.dragDropText) {\n this.refs.dragDropText.style.display = 'none';\n }\n\n if (this.refs.uploadProgressWrapper) {\n this.refs.uploadProgressWrapper.style.display = 'inherit';\n }\n\n formio.uploadFile('url', file, file, '', function (event) {\n if (_this5.refs.uploadProgress) {\n var progress = Math.floor(event.loaded / event.total * 100);\n _this5.refs.uploadProgress.style.width = \"\".concat(progress, \"%\");\n\n if (progress > 98) {\n _this5.refs.uploadProgress.innerHTML = _this5.t('Converting PDF. Please wait.');\n } else {\n _this5.refs.uploadProgress.innerHTML = \"\".concat(_this5.t('Uploading'), \" \").concat(progress, \"%\");\n }\n }\n }, \"\".concat(this.projectUrl, \"/upload\"), {}, 'file').then(function (result) {\n _lodash.default.set(_this5.webform.form, 'settings.pdf', {\n id: result.data.file,\n src: \"\".concat(result.data.filesServer).concat(result.data.path)\n });\n\n if (_this5.refs.dragDropText) {\n _this5.refs.dragDropText.style.display = 'inherit';\n }\n\n if (_this5.refs.uploadProgressWrapper) {\n _this5.refs.uploadProgressWrapper.style.display = 'none';\n }\n\n _this5.emit('pdfUploaded', result.data);\n\n _this5.redraw();\n }).catch(function (err) {\n return _this5.setUploadError(err);\n });\n }\n }, {\n key: \"setUploadError\",\n value: function setUploadError(message) {\n if (!this.refs.uploadError) {\n return;\n }\n\n this.refs.uploadError.style.display = message ? '' : 'none';\n this.refs.uploadError.innerHTML = message;\n }\n }, {\n key: \"createForm\",\n value: function createForm(options) {\n var _this6 = this;\n\n // Instantiate the webform from the PDF class instead of Webform\n options.skipInit = false;\n options.hideLoader = true;\n this.webform = new _PDF.default(this.element, options);\n this.webform.on('attach', function () {\n // If the dropzone exists but has been removed in a PDF rebuild, reinstate it\n if (_this6.refs.iframeDropzone && !_toConsumableArray(_this6.refs.form.children).includes(_this6.refs.iframeDropzone)) {\n _this6.prependTo(_this6.refs.iframeDropzone, _this6.refs.form);\n }\n });\n return this.webform;\n }\n }, {\n key: \"destroy\",\n value: function destroy(deleteFromGlobal) {\n _get(_getPrototypeOf(PDFBuilder.prototype), \"destroy\", this).call(this, deleteFromGlobal);\n\n this.webform.destroy(deleteFromGlobal);\n } // d8b 8888888888 888\n // Y8P 888 888\n // 888 888\n // 888 8888888 888d888 8888b. 88888b.d88b. .d88b. .d88b. 888 888 .d88b. 88888b. 888888 .d8888b\n // 888 888 888P\" \"88b 888 \"888 \"88b d8P Y8b d8P Y8b 888 888 d8P Y8b 888 \"88b 888 88K\n // 888 888 888 .d888888 888 888 888 88888888 88888888 Y88 88P 88888888 888 888 888 \"Y8888b.\n // 888 888 888 888 888 888 888 888 Y8b. Y8b. Y8bd8P Y8b. 888 888 Y88b. X88\n // 888 888 888 \"Y888888 888 888 888 \"Y8888 \"Y8888 Y88P \"Y8888 888 888 \"Y888 88888P'\n\n }, {\n key: \"getParentContainer\",\n value: function getParentContainer(component) {\n var container = [];\n var originalComponent = null;\n (0, _formUtils.eachComponent)(this.webform._form.components, function (comp, path, components) {\n if (comp.id === component.component.id) {\n container = components;\n originalComponent = comp;\n return true;\n }\n }, true);\n return {\n formioComponent: component.parent,\n formioContainer: container,\n originalComponent: originalComponent\n };\n }\n }, {\n key: \"initIframeEvents\",\n value: function initIframeEvents() {\n var _this7 = this;\n\n this.webform.off('iframe-elementUpdate');\n this.webform.off('iframe-componentUpdate');\n this.webform.off('iframe-componentClick');\n this.webform.on('iframe-elementUpdate', function (schema) {\n var component = _this7.webform.getComponentById(schema.id);\n\n if (component && component.component) {\n var isNew = true;\n component.component.overlay = {\n page: schema.page,\n left: schema.left,\n top: schema.top,\n height: schema.height,\n width: schema.width\n };\n\n if (!_this7.options.noNewEdit && !component.component.noNewEdit) {\n _this7.editComponent(component.component, _this7.getParentContainer(component), isNew);\n }\n\n _this7.emit('updateComponent', component.component);\n }\n\n return component;\n });\n this.webform.on('iframe-componentUpdate', function (schema) {\n var component = _this7.webform.getComponentById(schema.id);\n\n if (component && component.component) {\n component.component.overlay = {\n page: schema.overlay.page,\n left: schema.overlay.left,\n top: schema.overlay.top,\n height: schema.overlay.height,\n width: schema.overlay.width\n };\n\n _this7.emit('updateComponent', component.component);\n\n _this7.emit('change', _this7.form);\n }\n\n return component;\n });\n this.webform.on('iframe-componentClick', function (schema) {\n var component = _this7.webform.getComponentById(schema.id);\n\n if (component) {\n _this7.editComponent(component.component, _this7.getParentContainer(component));\n }\n }, true);\n } // 8888888b. 888 d8b\n // 888 \"Y88b 888 Y8P\n // 888 888 888\n // 888 888 888d888 .d88b. 88888b. 88888888 .d88b. 88888b. .d88b. 888 .d88b. .d88b. 888 .d8888b\n // 888 888 888P\" d88\"\"88b 888 \"88b d88P d88\"\"88b 888 \"88b d8P Y8b 888 d88\"\"88b d88P\"88b 888 d88P\"\n // 888 888 888 888 888 888 888 d88P 888 888 888 888 88888888 888 888 888 888 888 888 888\n // 888 .d88P 888 Y88..88P 888 d88P d88P Y88..88P 888 888 Y8b. 888 Y88..88P Y88b 888 888 Y88b.\n // 8888888P\" 888 \"Y88P\" 88888P\" 88888888 \"Y88P\" 888 888 \"Y8888 888 \"Y88P\" \"Y88888 888 \"Y8888P\n // 888 888\n // 888 Y8b d88P\n // 888 \"Y88P\"\n\n }, {\n key: \"initDropzoneEvents\",\n value: function initDropzoneEvents() {\n if (!this.refs.iframeDropzone) {\n return;\n } // This is required per HTML spec in order for the drop event to fire\n\n\n this.removeEventListener(this.refs.iframeDropzone, 'dragover');\n this.removeEventListener(this.refs.iframeDropzone, 'drop');\n this.addEventListener(this.refs.iframeDropzone, 'dragover', function (e) {\n e.preventDefault();\n return false;\n });\n this.addEventListener(this.refs.iframeDropzone, 'drop', this.onDropzoneDrop.bind(this));\n }\n }, {\n key: \"updateDragAndDrop\",\n value: function updateDragAndDrop() {\n if (!this.pdfLoaded) {\n return;\n }\n\n this.initDropzoneEvents();\n this.prepSidebarComponentsForDrag();\n }\n }, {\n key: \"prepSidebarComponentsForDrag\",\n value: function prepSidebarComponentsForDrag() {\n var _this8 = this;\n\n if (!this.refs['sidebar-container']) {\n return;\n }\n\n this.refs['sidebar-container'].forEach(function (container) {\n _toConsumableArray(container.children).forEach(function (el) {\n el.draggable = true;\n el.setAttribute('draggable', true);\n\n _this8.removeEventListener(el, 'dragstart');\n\n _this8.removeEventListener(el, 'dragend');\n\n _this8.addEventListener(el, 'dragstart', _this8.onDragStart.bind(_this8), true);\n\n _this8.addEventListener(el, 'dragend', _this8.onDragEnd.bind(_this8), true);\n\n _this8.addEventListener(el, 'drag', function (e) {\n e.target.style.cursor = 'none';\n });\n });\n });\n }\n }, {\n key: \"updateDropzoneDimensions\",\n value: function updateDropzoneDimensions() {\n if (!this.refs.iframeDropzone) {\n return;\n }\n\n var iframeRect = (0, _utils.getElementRect)(this.webform.refs.iframeContainer);\n this.refs.iframeDropzone.style.height = iframeRect && iframeRect.height ? \"\".concat(iframeRect.height, \"px\") : '1000px';\n this.refs.iframeDropzone.style.width = iframeRect && iframeRect.width ? \"\".concat(iframeRect.width, \"px\") : '100%';\n }\n }, {\n key: \"onDragStart\",\n value: function onDragStart(e) {\n // Taking the current offset of a dragged item relative to the cursor\n var _e$offsetX = e.offsetX,\n offsetX = _e$offsetX === void 0 ? 0 : _e$offsetX,\n _e$offsetY = e.offsetY,\n offsetY = _e$offsetY === void 0 ? 0 : _e$offsetY;\n this.itemOffsetX = offsetX;\n this.itemOffsetY = offsetY;\n e.dataTransfer.setData('text', '');\n this.updateDropzoneDimensions();\n this.addClass(this.refs.iframeDropzone, 'enabled');\n }\n }, {\n key: \"onDropzoneDrop\",\n value: function onDropzoneDrop(e) {\n this.dropEvent = e;\n e.preventDefault();\n return false;\n }\n }, {\n key: \"onDragEnd\",\n value: function onDragEnd(e) {\n // IMPORTANT - must retrieve offsets BEFORE disabling the dropzone - offsets will\n // reflect absolute positioning if accessed after the target element is hidden\n var layerX = this.dropEvent ? this.dropEvent.layerX : null;\n var layerY = this.dropEvent ? this.dropEvent.layerY : null;\n var WIDTH = 100;\n var HEIGHT = 20; // Always disable the dropzone on drag end\n\n this.removeClass(this.refs.iframeDropzone, 'enabled'); // If there hasn't been a drop event on the dropzone, we're done\n\n if (!this.dropEvent) {\n return;\n }\n\n var element = e.target;\n var type = element.getAttribute('data-type');\n var key = element.getAttribute('data-key');\n var group = element.getAttribute('data-group');\n var schema = (0, _utils.fastCloneDeep)(this.schemas[type]);\n\n if (key && group) {\n var info = this.getComponentInfo(key, group);\n\n _lodash.default.merge(schema, info);\n } // Set a unique key for this component.\n\n\n _builder.default.uniquify([this.webform._form], schema);\n\n this.webform._form.components.push(schema);\n\n schema.overlay = {\n top: layerY - this.itemOffsetY + HEIGHT,\n left: layerX - this.itemOffsetX,\n width: WIDTH,\n height: HEIGHT\n };\n this.webform.addComponent(schema, {}, null, true);\n this.webform.postMessage({\n name: 'addElement',\n data: schema\n });\n this.emit('addComponent', schema, this.webform, schema.key, this.webform.component.components.length, !this.options.noNewEdit && !schema.noNewEdit); // Delete the stored drop event now that it's been handled\n\n this.dropEvent = null;\n e.target.style.cursor = 'default';\n }\n }, {\n key: \"highlightInvalidComponents\",\n value: function highlightInvalidComponents() {\n var _this9 = this;\n\n var repeatablePaths = this.findRepeatablePaths(); // update elements which path was duplicated if any pathes have been changed\n\n if (!_lodash.default.isEqual(this.repeatablePaths, repeatablePaths)) {\n (0, _formUtils.eachComponent)(this.webform.getComponents(), function (comp, path) {\n if (_this9.repeatablePaths.includes(path)) {\n _this9.webform.postMessage({\n name: 'updateElement',\n data: comp.component\n });\n }\n });\n this.repeatablePaths = repeatablePaths;\n }\n\n if (!repeatablePaths.length) {\n return;\n }\n\n (0, _formUtils.eachComponent)(this.webform.getComponents(), function (comp, path) {\n if (_this9.repeatablePaths.includes(path)) {\n _this9.webform.postMessage({\n name: 'showBuilderErrors',\n data: {\n compId: comp.component.id,\n errorMessage: \"API Key is not unique: \".concat(comp.key)\n }\n });\n }\n });\n }\n }]);\n\n return PDFBuilder;\n}(_WebformBuilder2.default);\n\nexports[\"default\"] = PDFBuilder;\n\n//# sourceURL=webpack://Formio/./lib/PDFBuilder.js?"); +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.array.is-array.js */ \"./node_modules/core-js/modules/es.array.is-array.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.from.js */ \"./node_modules/core-js/modules/es.array.from.js\");\n__webpack_require__(/*! core-js/modules/es.array.slice.js */ \"./node_modules/core-js/modules/es.array.slice.js\");\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.url.js */ \"./node_modules/core-js/modules/web.url.js\");\n__webpack_require__(/*! core-js/modules/web.url-search-params.js */ \"./node_modules/core-js/modules/web.url-search-params.js\");\n__webpack_require__(/*! core-js/modules/es.array.includes.js */ \"./node_modules/core-js/modules/es.array.includes.js\");\n__webpack_require__(/*! core-js/modules/es.string.includes.js */ \"./node_modules/core-js/modules/es.string.includes.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n__webpack_require__(/*! core-js/modules/esnext.global-this.js */ \"./node_modules/core-js/modules/esnext.global-this.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\nvar _Formio = __webpack_require__(/*! ./Formio */ \"./lib/Formio.js\");\nvar _WebformBuilder2 = _interopRequireDefault(__webpack_require__(/*! ./WebformBuilder */ \"./lib/WebformBuilder.js\"));\nvar _utils = __webpack_require__(/*! ./utils/utils */ \"./lib/utils/utils.js\");\nvar _formUtils = __webpack_require__(/*! ./utils/formUtils */ \"./lib/utils/formUtils.js\");\nvar _builder = _interopRequireDefault(__webpack_require__(/*! ./utils/builder */ \"./lib/utils/builder.js\"));\nvar _PDF = _interopRequireDefault(__webpack_require__(/*! ./PDF */ \"./lib/PDF.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar PDFBuilder = /*#__PURE__*/function (_WebformBuilder) {\n _inherits(PDFBuilder, _WebformBuilder);\n var _super = _createSuper(PDFBuilder);\n function PDFBuilder() {\n var _this;\n _classCallCheck(this, PDFBuilder);\n var element, options;\n if (arguments[0] instanceof HTMLElement || arguments[1]) {\n element = arguments[0];\n options = arguments[1];\n } else {\n options = arguments[0];\n }\n\n // Force superclass to skip the automatic init; we'll trigger it manually\n options.skipInit = true;\n options.display = 'pdf';\n if (element) {\n _this = _super.call(this, element, options);\n } else {\n _this = _super.call(this, options);\n }\n _this.dragDropEnabled = false;\n return _possibleConstructorReturn(_this);\n }\n _createClass(PDFBuilder, [{\n key: \"defaultGroups\",\n get: function get() {\n return {\n pdf: {\n title: 'PDF Fields',\n weight: 0,\n \"default\": true,\n components: {\n textfield: true,\n number: true,\n password: true,\n email: true,\n phoneNumber: true,\n currency: true,\n checkbox: true,\n signature: true,\n select: true,\n textarea: true,\n datetime: true,\n file: true,\n htmlelement: true,\n signrequestsignature: true\n }\n },\n basic: false,\n advanced: false,\n layout: false,\n data: false,\n premium: false,\n resource: false\n };\n }\n }, {\n key: \"hasPDF\",\n get: function get() {\n return _lodash[\"default\"].has(this.webform.form, 'settings.pdf');\n }\n }, {\n key: \"projectUrl\",\n get: function get() {\n return this.options.projectUrl || _Formio.GlobalFormio.getProjectUrl();\n }\n }, {\n key: \"init\",\n value: function init() {\n this.options.attachMode = 'builder';\n this.webform = this.webform || this.createForm(this.options);\n this.webform.init();\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n var result = this.renderTemplate('pdfBuilder', {\n sidebar: this.renderTemplate('builderSidebar', {\n scrollEnabled: this.sideBarScroll,\n groupOrder: this.groupOrder,\n groupId: \"builder-sidebar-\".concat(this.id),\n groups: this.groupOrder.map(function (groupKey) {\n return _this2.renderTemplate('builderSidebarGroup', {\n group: _this2.groups[groupKey],\n groupKey: groupKey,\n groupId: \"builder-sidebar-\".concat(_this2.id),\n subgroups: _this2.groups[groupKey].subgroups.map(function (group) {\n return _this2.renderTemplate('builderSidebarGroup', {\n group: group,\n groupKey: group.key,\n groupId: \"group-container-\".concat(groupKey),\n subgroups: []\n });\n })\n });\n })\n }),\n form: this.hasPDF ? this.webform.render() : this.renderTemplate('pdfBuilderUpload', {})\n });\n return result;\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n var _this3 = this;\n // PDF Upload\n if (!this.hasPDF) {\n this.loadRefs(element, {\n 'fileDrop': 'single',\n 'fileBrowse': 'single',\n 'hiddenFileInputElement': 'single',\n 'uploadError': 'single',\n 'uploadProgress': 'single',\n 'uploadProgressWrapper': 'single',\n 'dragDropText': 'single'\n });\n this.addEventListener(this.refs['pdf-upload-button'], 'click', function (event) {\n event.preventDefault();\n });\n\n // Init the upload error.\n if (!this.projectUrl) {\n this.setUploadError('Form options.projectUrl not set. Please set the \"projectUrl\" property of the options for this form or use Formio.setProjectUrl(). This setting is necessary to upload a pdf background.');\n } else {\n this.setUploadError();\n }\n if (this.refs.fileDrop) {\n var _element = this;\n this.addEventListener(this.refs.fileDrop, 'dragover', function (event) {\n this.className = 'fileSelector fileDragOver';\n event.preventDefault();\n });\n this.addEventListener(this.refs.fileDrop, 'dragleave', function (event) {\n this.className = 'fileSelector';\n event.preventDefault();\n });\n this.addEventListener(this.refs.fileDrop, 'drop', function (event) {\n this.className = 'fileSelector';\n event.preventDefault();\n _element.upload(event.dataTransfer.files[0]);\n return false;\n });\n }\n if (this.refs.fileBrowse && this.refs.hiddenFileInputElement) {\n this.addEventListener(this.refs.fileBrowse, 'click', function (event) {\n event.preventDefault();\n // There is no direct way to trigger a file dialog. To work around this, create an input of type file and trigger\n // a click event on it.\n if (typeof _this3.refs.hiddenFileInputElement.trigger === 'function') {\n _this3.refs.hiddenFileInputElement.trigger('click');\n } else {\n _this3.refs.hiddenFileInputElement.click();\n }\n });\n this.addEventListener(this.refs.hiddenFileInputElement, 'change', function () {\n if (!_this3.refs.hiddenFileInputElement.value) {\n return;\n }\n _this3.upload(_this3.refs.hiddenFileInputElement.files[0]);\n _this3.refs.hiddenFileInputElement.value = '';\n });\n }\n return _nativePromiseOnly[\"default\"].resolve();\n }\n\n // Normal PDF Builder\n return _get(_getPrototypeOf(PDFBuilder.prototype), \"attach\", this).call(this, element).then(function () {\n _this3.loadRefs(_this3.element, {\n iframeDropzone: 'single',\n 'sidebar-container': 'multiple',\n 'sidebar': 'single'\n });\n _this3.afterAttach();\n return _this3.element;\n });\n }\n }, {\n key: \"afterAttach\",\n value: function afterAttach() {\n var _this4 = this;\n this.on('saveComponent', function (component) {\n _this4.webform.postMessage({\n name: 'updateElement',\n data: component\n });\n });\n this.on('removeComponent', function (component) {\n _this4.webform.postMessage({\n name: 'removeElement',\n data: component\n });\n });\n this.initIframeEvents();\n this.updateDropzoneDimensions();\n var sidebar = this.refs.sidebar;\n if (sidebar) {\n this.addClass(sidebar, 'disabled');\n this.webform.on('iframe-ready', function () {\n _this4.pdfLoaded = true;\n _this4.updateDragAndDrop();\n _this4.removeClass(sidebar, 'disabled');\n }, true);\n }\n }\n }, {\n key: \"upload\",\n value: function upload(file) {\n var _this5 = this;\n var formio = new _Formio.GlobalFormio(this.projectUrl);\n if (this.refs.dragDropText) {\n this.refs.dragDropText.style.display = 'none';\n }\n if (this.refs.uploadProgressWrapper) {\n this.refs.uploadProgressWrapper.style.display = 'inherit';\n }\n formio.uploadFile('url', file, file, '', function (event) {\n if (_this5.refs.uploadProgress) {\n var progress = Math.floor(event.loaded / event.total * 100);\n _this5.refs.uploadProgress.style.width = \"\".concat(progress, \"%\");\n if (progress > 98) {\n _this5.refs.uploadProgress.innerHTML = _this5.t('Converting PDF. Please wait.');\n } else {\n _this5.refs.uploadProgress.innerHTML = \"\".concat(_this5.t('Uploading'), \" \").concat(progress, \"%\");\n }\n }\n }, \"\".concat(this.projectUrl, \"/upload\"), {}, 'file').then(function (result) {\n var _result$data$formfiel;\n var autoConversionComponentsAssigned = false;\n if ((_result$data$formfiel = result.data.formfields) !== null && _result$data$formfiel !== void 0 && _result$data$formfiel.components && result.data.formfields.components.length) {\n var _this5$webform$form$c, _this5$webform$form$c2, _this5$webform$form$c3;\n var formInitState = ((_this5$webform$form$c = _this5.webform.form.components[0]) === null || _this5$webform$form$c === void 0 ? void 0 : _this5$webform$form$c.key) === 'submit';\n var wizardInitState = ((_this5$webform$form$c2 = _this5.webform.form.components[0]) === null || _this5$webform$form$c2 === void 0 ? void 0 : _this5$webform$form$c2.key) === 'page1' && ((_this5$webform$form$c3 = _this5.webform.form.components[0]) === null || _this5$webform$form$c3 === void 0 ? void 0 : _this5$webform$form$c3.components.length) === 0;\n var emptyFormState = _this5.webform.form.components.length === 0;\n if (formInitState || wizardInitState || emptyFormState) {\n autoConversionComponentsAssigned = true;\n _this5.webform.form.components = result.data.formfields.components;\n }\n }\n if (_this5.refs.dragDropText) {\n _this5.refs.dragDropText.style.display = 'inherit';\n }\n if (_this5.refs.uploadProgressWrapper) {\n _this5.refs.uploadProgressWrapper.style.display = 'none';\n }\n _lodash[\"default\"].set(_this5.webform.form, 'settings.pdf', {\n id: result.data.file,\n src: result.data.filesServer ? \"\".concat(result.data.filesServer).concat(result.data.path) : \"\".concat(new URL(_this5.projectUrl).origin, \"/pdf-proxy\").concat(result.data.path),\n nonFillableConversionUsed: autoConversionComponentsAssigned && result.data.formfields.nonFillableConversionUsed\n });\n _this5.emit('pdfUploaded', result.data);\n _this5.redraw();\n })[\"catch\"](function (err) {\n return _this5.setUploadError(err);\n });\n }\n }, {\n key: \"setUploadError\",\n value: function setUploadError(message) {\n if (!this.refs.uploadError) {\n return;\n }\n this.refs.uploadError.style.display = message ? '' : 'none';\n this.refs.uploadError.innerHTML = message;\n }\n }, {\n key: \"createForm\",\n value: function createForm(options) {\n var _this6 = this;\n // Instantiate the webform from the PDF class instead of Webform\n options.skipInit = false;\n options.hideLoader = true;\n this.webform = new _PDF[\"default\"](this.element, options);\n this.webform.on('attach', function () {\n // If the dropzone exists but has been removed in a PDF rebuild, reinstate it\n if (_this6.refs.iframeDropzone && !_toConsumableArray(_this6.refs.form.children).includes(_this6.refs.iframeDropzone)) {\n _this6.prependTo(_this6.refs.iframeDropzone, _this6.refs.form);\n }\n });\n return this.webform;\n }\n }, {\n key: \"destroy\",\n value: function destroy(deleteFromGlobal) {\n _get(_getPrototypeOf(PDFBuilder.prototype), \"destroy\", this).call(this, deleteFromGlobal);\n this.webform.destroy(deleteFromGlobal);\n }\n\n // d8b 8888888888 888\n // Y8P 888 888\n // 888 888\n // 888 8888888 888d888 8888b. 88888b.d88b. .d88b. .d88b. 888 888 .d88b. 88888b. 888888 .d8888b\n // 888 888 888P\" \"88b 888 \"888 \"88b d8P Y8b d8P Y8b 888 888 d8P Y8b 888 \"88b 888 88K\n // 888 888 888 .d888888 888 888 888 88888888 88888888 Y88 88P 88888888 888 888 888 \"Y8888b.\n // 888 888 888 888 888 888 888 888 Y8b. Y8b. Y8bd8P Y8b. 888 888 Y88b. X88\n // 888 888 888 \"Y888888 888 888 888 \"Y8888 \"Y8888 Y88P \"Y8888 888 888 \"Y888 88888P'\n }, {\n key: \"getParentContainer\",\n value: function getParentContainer(component) {\n var container = [];\n var originalComponent = null;\n (0, _formUtils.eachComponent)(this.webform._form.components, function (comp, path, components) {\n if (comp.id === component.component.id) {\n container = components;\n originalComponent = comp;\n return true;\n }\n }, true);\n return {\n formioComponent: component.parent,\n formioContainer: container,\n originalComponent: originalComponent\n };\n }\n }, {\n key: \"initIframeEvents\",\n value: function initIframeEvents() {\n var _this7 = this;\n this.webform.off('iframe-elementUpdate');\n this.webform.off('iframe-componentUpdate');\n this.webform.off('iframe-componentClick');\n this.webform.on('iframe-elementUpdate', function (schema) {\n var component = _this7.webform.getComponentById(schema.id);\n if (component && component.component) {\n var isNew = true;\n component.component.overlay = {\n page: schema.page,\n left: schema.left,\n top: schema.top,\n height: schema.height,\n width: schema.width\n };\n if (!_this7.options.noNewEdit && !component.component.noNewEdit) {\n _this7.editComponent(component.component, _this7.getParentContainer(component), isNew);\n }\n _this7.emit('updateComponent', component.component);\n }\n return component;\n });\n this.webform.on('iframe-componentUpdate', function (schema) {\n var component = _this7.webform.getComponentById(schema.id);\n if (component && component.component) {\n component.component.overlay = {\n page: schema.overlay.page,\n left: schema.overlay.left,\n top: schema.overlay.top,\n height: schema.overlay.height,\n width: schema.overlay.width\n };\n _this7.emit('updateComponent', component.component);\n _this7.emit('change', _this7.form);\n }\n return component;\n });\n this.webform.on('iframe-componentClick', function (schema) {\n var component = _this7.webform.getComponentById(schema.id);\n if (component) {\n _this7.editComponent(component.component, _this7.getParentContainer(component));\n }\n }, true);\n }\n\n // 8888888b. 888 d8b\n // 888 \"Y88b 888 Y8P\n // 888 888 888\n // 888 888 888d888 .d88b. 88888b. 88888888 .d88b. 88888b. .d88b. 888 .d88b. .d88b. 888 .d8888b\n // 888 888 888P\" d88\"\"88b 888 \"88b d88P d88\"\"88b 888 \"88b d8P Y8b 888 d88\"\"88b d88P\"88b 888 d88P\"\n // 888 888 888 888 888 888 888 d88P 888 888 888 888 88888888 888 888 888 888 888 888 888\n // 888 .d88P 888 Y88..88P 888 d88P d88P Y88..88P 888 888 Y8b. 888 Y88..88P Y88b 888 888 Y88b.\n // 8888888P\" 888 \"Y88P\" 88888P\" 88888888 \"Y88P\" 888 888 \"Y8888 888 \"Y88P\" \"Y88888 888 \"Y8888P\n // 888 888\n // 888 Y8b d88P\n // 888 \"Y88P\"\n }, {\n key: \"initDropzoneEvents\",\n value: function initDropzoneEvents() {\n if (!this.refs.iframeDropzone) {\n return;\n }\n // This is required per HTML spec in order for the drop event to fire\n this.removeEventListener(this.refs.iframeDropzone, 'dragover');\n this.removeEventListener(this.refs.iframeDropzone, 'drop');\n this.addEventListener(this.refs.iframeDropzone, 'dragover', function (e) {\n e.preventDefault();\n return false;\n });\n this.addEventListener(this.refs.iframeDropzone, 'drop', this.onDropzoneDrop.bind(this));\n }\n }, {\n key: \"updateDragAndDrop\",\n value: function updateDragAndDrop() {\n if (!this.pdfLoaded) {\n return;\n }\n this.initDropzoneEvents();\n this.prepSidebarComponentsForDrag();\n }\n }, {\n key: \"prepSidebarComponentsForDrag\",\n value: function prepSidebarComponentsForDrag() {\n var _this8 = this;\n if (!this.refs['sidebar-container']) {\n return;\n }\n this.refs['sidebar-container'].forEach(function (container) {\n _toConsumableArray(container.children).forEach(function (el) {\n el.draggable = true;\n el.setAttribute('draggable', true);\n _this8.removeEventListener(el, 'dragstart');\n _this8.removeEventListener(el, 'dragend');\n _this8.addEventListener(el, 'dragstart', _this8.onDragStart.bind(_this8), true);\n _this8.addEventListener(el, 'dragend', _this8.onDragEnd.bind(_this8), true);\n _this8.addEventListener(el, 'drag', function (e) {\n e.target.style.cursor = 'none';\n });\n });\n });\n }\n }, {\n key: \"updateDropzoneDimensions\",\n value: function updateDropzoneDimensions() {\n if (!this.refs.iframeDropzone) {\n return;\n }\n var iframeRect = (0, _utils.getElementRect)(this.webform.refs.iframeContainer);\n this.refs.iframeDropzone.style.height = iframeRect && iframeRect.height ? \"\".concat(iframeRect.height, \"px\") : '1000px';\n this.refs.iframeDropzone.style.width = iframeRect && iframeRect.width ? \"\".concat(iframeRect.width, \"px\") : '100%';\n }\n }, {\n key: \"onDragStart\",\n value: function onDragStart(e) {\n // Taking the current offset of a dragged item relative to the cursor\n var _e$offsetX = e.offsetX,\n offsetX = _e$offsetX === void 0 ? 0 : _e$offsetX,\n _e$offsetY = e.offsetY,\n offsetY = _e$offsetY === void 0 ? 0 : _e$offsetY;\n this.itemOffsetX = offsetX;\n this.itemOffsetY = offsetY;\n e.dataTransfer.setData('text', '');\n this.updateDropzoneDimensions();\n this.addClass(this.refs.iframeDropzone, 'enabled');\n this.dropEmitted = false;\n }\n }, {\n key: \"onDropzoneDrop\",\n value: function onDropzoneDrop(e) {\n this.dropEmitted = true;\n this.dropEvent = e;\n e.preventDefault();\n return false;\n }\n }, {\n key: \"onDragEnd\",\n value: function onDragEnd(e) {\n // IMPORTANT - must retrieve offsets BEFORE disabling the dropzone - offsets will\n // reflect absolute positioning if accessed after the target element is hidden\n var iframeRect = this.webform.refs.iframeContainer.getBoundingClientRect();\n var layerX = this.dropEvent ? this.dropEvent.layerX : null;\n var layerY = this.dropEvent ? this.dropEvent.layerY : null;\n var WIDTH = 100;\n var HEIGHT = 20;\n // Always disable the dropzone on drag end\n this.removeClass(this.refs.iframeDropzone, 'enabled');\n\n // If there hasn't been a drop event on the dropzone, we're done\n if (!this.dropEvent) {\n // a 'drop' event may not be emited in the chrome browser when using a Mac, therefore an additional check has been added\n // eslint-disable-next-line no-undef\n if (!this.dropEmitted && (0, _utils.getBrowserInfo)().chrome && globalThis.navigator.userAgentData.platform === 'macOS' && iframeRect.left < e.clientX && iframeRect.top < e.clientY) {\n this.dropEvent = e;\n this.dropEvent.dataTransfer.effectAllowed = 'all';\n this.dropEmitted = true;\n } else {\n return;\n }\n }\n var element = e.target;\n var type = element.getAttribute('data-type');\n var key = element.getAttribute('data-key');\n var group = element.getAttribute('data-group');\n var schema = (0, _utils.fastCloneDeep)(this.schemas[type]);\n if (key && group) {\n var info = this.getComponentInfo(key, group);\n _lodash[\"default\"].merge(schema, info);\n }\n\n // Set a unique key for this component.\n _builder[\"default\"].uniquify([this.webform._form], schema);\n this.webform._form.components.push(schema);\n schema.overlay = {\n top: layerY ? layerY - this.itemOffsetY + HEIGHT : e.clientY - iframeRect.top - (this.itemOffsetY - HEIGHT) * 2,\n left: layerX ? layerX - this.itemOffsetX : e.clientX - iframeRect.left - this.itemOffsetX * 2,\n width: WIDTH,\n height: HEIGHT\n };\n this.webform.addComponent(schema, {}, null, true);\n this.webform.postMessage({\n name: 'addElement',\n data: schema\n });\n this.emit('addComponent', schema, this.webform, schema.key, this.webform.component.components.length, !this.options.noNewEdit && !schema.noNewEdit);\n\n // Delete the stored drop event now that it's been handled\n this.dropEvent = null;\n e.target.style.cursor = 'default';\n }\n }, {\n key: \"highlightInvalidComponents\",\n value: function highlightInvalidComponents() {\n var _this9 = this;\n var repeatablePaths = this.findRepeatablePaths();\n\n // update elements which path was duplicated if any pathes have been changed\n if (!_lodash[\"default\"].isEqual(this.repeatablePaths, repeatablePaths)) {\n (0, _formUtils.eachComponent)(this.webform.getComponents(), function (comp, path) {\n if (_this9.repeatablePaths.includes(path)) {\n _this9.webform.postMessage({\n name: 'updateElement',\n data: comp.component\n });\n }\n });\n this.repeatablePaths = repeatablePaths;\n }\n if (!repeatablePaths.length) {\n return;\n }\n (0, _formUtils.eachComponent)(this.webform.getComponents(), function (comp, path) {\n if (_this9.repeatablePaths.includes(path)) {\n _this9.webform.postMessage({\n name: 'showBuilderErrors',\n data: {\n compId: comp.component.id,\n errorMessage: \"API Key is not unique: \".concat(comp.key)\n }\n });\n }\n });\n }\n }]);\n return PDFBuilder;\n}(_WebformBuilder2[\"default\"]);\nexports[\"default\"] = PDFBuilder;\n\n//# sourceURL=webpack://Formio/./lib/PDFBuilder.js?"); /***/ }), @@ -103,7 +114,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptors.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.split.js */ \"./node_modules/core-js/modules/es.string.split.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.assign.js */ \"./node_modules/core-js/modules/es.object.assign.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.includes.js */ \"./node_modules/core-js/modules/es.array.includes.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.includes.js */ \"./node_modules/core-js/modules/es.string.includes.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nvar _moment = _interopRequireDefault(__webpack_require__(/*! moment */ \"./node_modules/moment/moment.js\"));\n\nvar _compareVersions = _interopRequireDefault(__webpack_require__(/*! compare-versions */ \"./node_modules/compare-versions/index.mjs\"));\n\nvar _EventEmitter = _interopRequireDefault(__webpack_require__(/*! ./EventEmitter */ \"./lib/EventEmitter.js\"));\n\nvar _i18next = _interopRequireDefault(__webpack_require__(/*! i18next */ \"./node_modules/i18next/dist/cjs/i18next.js\"));\n\nvar _i18n = _interopRequireDefault(__webpack_require__(/*! ./i18n */ \"./lib/i18n.js\"));\n\nvar _Formio = __webpack_require__(/*! ./Formio */ \"./lib/Formio.js\");\n\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\n\nvar _Components = _interopRequireDefault(__webpack_require__(/*! ./components/Components */ \"./lib/components/Components.js\"));\n\nvar _NestedDataComponent2 = _interopRequireDefault(__webpack_require__(/*! ./components/_classes/nesteddata/NestedDataComponent */ \"./lib/components/_classes/nesteddata/NestedDataComponent.js\"));\n\nvar _utils = __webpack_require__(/*! ./utils/utils */ \"./lib/utils/utils.js\");\n\nvar _formUtils = __webpack_require__(/*! ./utils/formUtils */ \"./lib/utils/formUtils.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n// Initialize the available forms.\n_Formio.GlobalFormio.forms = {}; // Allow people to register components.\n\n_Formio.GlobalFormio.registerComponent = _Components.default.setComponent;\n\nfunction getIconSet(icons) {\n if (icons === 'fontawesome') {\n return 'fa';\n }\n\n return icons || '';\n}\n\nfunction getOptions(options) {\n options = _lodash.default.defaults(options, {\n submitOnEnter: false,\n iconset: getIconSet(options && options.icons ? options.icons : _Formio.GlobalFormio.icons),\n i18next: _i18next.default,\n saveDraft: false,\n alwaysDirty: false,\n saveDraftThrottle: 5000,\n display: 'form'\n });\n\n if (!options.events) {\n options.events = new _EventEmitter.default();\n }\n\n return options;\n}\n/**\n * Renders a Form.io form within the webpage.\n */\n\n\nvar Webform = /*#__PURE__*/function (_NestedDataComponent) {\n _inherits(Webform, _NestedDataComponent);\n\n var _super = _createSuper(Webform);\n\n /**\n * Creates a new Form instance.\n *\n * @param {Object} options - The options to create a new form instance.\n * @param {boolean} options.saveDraft - Set this if you would like to enable the save draft feature.\n * @param {boolean} options.saveDraftThrottle - The throttle for the save draft feature.\n * @param {boolean} options.readOnly - Set this form to readOnly\n * @param {boolean} options.noAlerts - Set to true to disable the alerts dialog.\n * @param {boolean} options.i18n - The translation file for this rendering. @see https://github.com/formio/formio.js/blob/master/i18n.js\n * @param {boolean} options.template - Provides a way to inject custom logic into the creation of every element rendered within the form.\n */\n\n /* eslint-disable max-statements */\n function Webform() {\n var _this2;\n\n _classCallCheck(this, Webform);\n\n var element, options;\n\n if (arguments[0] instanceof HTMLElement || arguments[1]) {\n element = arguments[0];\n options = arguments[1];\n } else {\n options = arguments[0];\n }\n\n _this2 = _super.call(this, null, getOptions(options));\n\n _defineProperty(_assertThisInitialized(_this2), \"executeShortcuts\", function (event) {\n var target = event.target;\n\n if (!_this2.keyboardCatchableElement(target)) {\n return;\n }\n\n var ctrl = event.ctrlKey || event.metaKey;\n var keyCode = event.keyCode;\n var char = '';\n\n if (65 <= keyCode && keyCode <= 90) {\n char = String.fromCharCode(keyCode);\n } else if (keyCode === 13) {\n char = 'Enter';\n } else if (keyCode === 27) {\n char = 'Esc';\n }\n\n _lodash.default.each(_this2.shortcuts, function (shortcut) {\n if (shortcut.ctrl && !ctrl) {\n return;\n }\n\n if (shortcut.shortcut === char) {\n shortcut.element.click();\n event.preventDefault();\n }\n });\n });\n\n _this2.element = element; // Keep track of all available forms globally.\n\n _Formio.GlobalFormio.forms[_this2.id] = _assertThisInitialized(_this2); // Set the base url.\n\n if (_this2.options.baseUrl) {\n _Formio.GlobalFormio.setBaseUrl(_this2.options.baseUrl);\n }\n /**\n * The i18n configuration for this component.\n */\n\n\n var i18n = _i18n.default;\n\n if (options && options.i18n && !options.i18nReady) {\n // Support legacy way of doing translations.\n if (options.i18n.resources) {\n i18n = options.i18n;\n } else {\n _lodash.default.each(options.i18n, function (lang, code) {\n if (code === 'options') {\n _lodash.default.merge(i18n, lang);\n } else if (!i18n.resources[code]) {\n // extend the default translations (validations, buttons etc.) in case they are not in the options.\n i18n.resources[code] = {\n translation: _lodash.default.assign((0, _utils.fastCloneDeep)(_i18n.default.resources.en.translation), lang)\n };\n } else {\n _lodash.default.assign(i18n.resources[code].translation, lang);\n }\n });\n }\n\n options.i18n = i18n;\n options.i18nReady = true;\n }\n\n if (options && options.i18n) {\n _this2.options.i18n = options.i18n;\n } else {\n _this2.options.i18n = i18n;\n } // Set the language.\n\n\n if (_this2.options.language) {\n _this2.options.i18n.lng = _this2.options.language;\n }\n /**\n * The type of this element.\n * @type {string}\n */\n\n\n _this2.type = 'form';\n _this2._src = '';\n _this2._loading = false;\n _this2._form = {};\n _this2.draftEnabled = false;\n _this2.savingDraft = true;\n\n if (_this2.options.saveDraftThrottle) {\n _this2.triggerSaveDraft = _lodash.default.throttle(_this2.saveDraft.bind(_assertThisInitialized(_this2)), _this2.options.saveDraftThrottle);\n } else {\n _this2.triggerSaveDraft = _this2.saveDraft.bind(_assertThisInitialized(_this2));\n }\n\n _this2.customErrors = [];\n /**\n * Determines if this form should submit the API on submit.\n * @type {boolean}\n */\n\n _this2.nosubmit = false;\n /**\n * Determines if the form has tried to be submitted, error or not.\n *\n * @type {boolean}\n */\n\n _this2.submitted = false;\n /**\n * Determines if the form is being submitted at the moment.\n *\n * @type {boolean}\n */\n\n _this2.submitting = false;\n /**\n * The Formio instance for this form.\n * @type {Formio}\n */\n\n _this2.formio = null;\n /**\n * The loader HTML element.\n * @type {HTMLElement}\n */\n\n _this2.loader = null;\n /**\n * The alert HTML element\n * @type {HTMLElement}\n */\n\n _this2.alert = null;\n /**\n * Promise that is triggered when the submission is done loading.\n * @type {Promise}\n */\n\n _this2.onSubmission = null;\n /**\n * Determines if this submission is explicitly set.\n * @type {boolean}\n */\n\n _this2.submissionSet = false;\n /**\n * Promise that executes when the form is ready and rendered.\n * @type {Promise}\n *\n * @example\n * import Webform from 'formiojs/Webform';\n * let form = new Webform(document.getElementById('formio'));\n * form.formReady.then(() => {\n * console.log('The form is ready!');\n * });\n * form.src = 'https://examples.form.io/example';\n */\n\n _this2.formReady = new _nativePromiseOnly.default(function (resolve, reject) {\n /**\n * Called when the formReady state of this form has been resolved.\n *\n * @type {function}\n */\n _this2.formReadyResolve = resolve;\n /**\n * Called when this form could not load and is rejected.\n *\n * @type {function}\n */\n\n _this2.formReadyReject = reject;\n });\n /**\n * Promise that executes when the submission is ready and rendered.\n * @type {Promise}\n *\n * @example\n * import Webform from 'formiojs/Webform';\n * let form = new Webform(document.getElementById('formio'));\n * form.submissionReady.then(() => {\n * console.log('The submission is ready!');\n * });\n * form.src = 'https://examples.form.io/example/submission/234234234234234243';\n */\n\n _this2.submissionReady = new _nativePromiseOnly.default(function (resolve, reject) {\n /**\n * Called when the formReady state of this form has been resolved.\n *\n * @type {function}\n */\n _this2.submissionReadyResolve = resolve;\n /**\n * Called when this form could not load and is rejected.\n *\n * @type {function}\n */\n\n _this2.submissionReadyReject = reject;\n });\n _this2.shortcuts = []; // Set language after everything is established.\n\n _this2.localize().then(function () {\n _this2.language = _this2.options.language;\n }); // See if we need to restore the draft from a user.\n\n\n if (_this2.options.saveDraft && !_this2.options.skipDraftRestore) {\n var user = _Formio.GlobalFormio.getUser(); // Only restore a draft if the submission isn't explicitly set.\n\n\n if (user && !_this2.submissionSet) {\n _this2.restoreDraft(user._id);\n }\n }\n\n _this2.component.clearOnHide = false; // Ensure the root is set to this component.\n\n _this2.root = _assertThisInitialized(_this2);\n _this2.localRoot = _assertThisInitialized(_this2);\n return _this2;\n }\n /* eslint-enable max-statements */\n\n\n _createClass(Webform, [{\n key: \"language\",\n get: function get() {\n return this.options.language;\n },\n set:\n /**\n * Sets the language for this form.\n *\n * @param lang\n * @return {Promise}\n */\n function set(lang) {\n var _this3 = this;\n\n this.options.language = lang;\n\n if (this.i18next.language === lang) {\n return;\n }\n\n try {\n this.i18next.changeLanguage(lang, function (err) {\n if (err) {\n return;\n }\n\n _this3.redraw();\n\n _this3.emit('languageChanged');\n });\n } catch (err) {\n return;\n }\n }\n }, {\n key: \"emptyValue\",\n get: function get() {\n return null;\n }\n }, {\n key: \"componentContext\",\n value: function componentContext() {\n return this._data;\n }\n }, {\n key: \"componentComponents\",\n get: function get() {\n return this.form.components;\n }\n }, {\n key: \"shadowRoot\",\n get: function get() {\n return this.options.shadowRoot;\n }\n /**\n * Add a language for translations\n *\n * @param code\n * @param lang\n * @param active\n * @return {*}\n */\n\n }, {\n key: \"addLanguage\",\n value: function addLanguage(code, lang) {\n var active = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n\n var translations = _lodash.default.assign((0, _utils.fastCloneDeep)(_i18n.default.resources.en.translation), lang);\n\n this.i18next.addResourceBundle(code, 'translation', translations, true, true);\n\n if (active) {\n this.language = code;\n }\n }\n /**\n * Perform the localization initialization.\n * @returns {*}\n */\n\n }, {\n key: \"localize\",\n value: function localize() {\n var _this4 = this;\n\n if (this.i18next.initialized) {\n return _nativePromiseOnly.default.resolve(this.i18next);\n }\n\n this.i18next.initialized = true;\n return new _nativePromiseOnly.default(function (resolve, reject) {\n try {\n _this4.i18next.init(_objectSpread(_objectSpread({}, _this4.options.i18n), {\n compatibilityJSON: 'v3'\n }), function (err) {\n // Get language but remove any ;q=1 that might exist on it.\n _this4.options.language = _this4.i18next.language.split(';')[0];\n\n if (err) {\n return reject(err);\n }\n\n resolve(_this4.i18next);\n });\n } catch (err) {\n return reject(err);\n }\n });\n }\n }, {\n key: \"keyboardCatchableElement\",\n value: function keyboardCatchableElement(element) {\n if (element.nodeName === 'TEXTAREA') {\n return false;\n }\n\n if (element.nodeName === 'INPUT') {\n return ['text', 'email', 'password'].indexOf(element.type) === -1;\n }\n\n return true;\n }\n }, {\n key: \"addShortcut\",\n value: function addShortcut(element, shortcut) {\n if (!shortcut || !/^([A-Z]|Enter|Esc)$/i.test(shortcut)) {\n return;\n }\n\n shortcut = _lodash.default.capitalize(shortcut);\n\n if (shortcut === 'Enter' || shortcut === 'Esc') {\n // Restrict Enter and Esc only for buttons\n if (element.tagName !== 'BUTTON') {\n return;\n }\n\n this.shortcuts.push({\n shortcut: shortcut,\n element: element\n });\n } else {\n this.shortcuts.push({\n ctrl: true,\n shortcut: shortcut,\n element: element\n });\n }\n }\n }, {\n key: \"removeShortcut\",\n value: function removeShortcut(element, shortcut) {\n if (!shortcut || !/^([A-Z]|Enter|Esc)$/i.test(shortcut)) {\n return;\n }\n\n _lodash.default.remove(this.shortcuts, {\n shortcut: shortcut,\n element: element\n });\n }\n /**\n * Get the embed source of the form.\n *\n * @returns {string}\n */\n\n }, {\n key: \"src\",\n get: function get() {\n return this._src;\n }\n /**\n * Loads the submission if applicable.\n */\n ,\n set:\n /**\n * Set the Form source, which is typically the Form.io embed URL.\n *\n * @param {string} value - The value of the form embed url.\n *\n * @example\n * import Webform from 'formiojs/Webform';\n * let form = new Webform(document.getElementById('formio'));\n * form.formReady.then(() => {\n * console.log('The form is formReady!');\n * });\n * form.src = 'https://examples.form.io/example';\n */\n function set(value) {\n this.setSrc(value);\n }\n /**\n * Get the embed source of the form.\n *\n * @returns {string}\n */\n\n }, {\n key: \"loadSubmission\",\n value: function loadSubmission() {\n var _this5 = this;\n\n this.loadingSubmission = true;\n\n if (this.formio.submissionId) {\n this.onSubmission = this.formio.loadSubmission().then(function (submission) {\n return _this5.setSubmission(submission);\n }, function (err) {\n return _this5.submissionReadyReject(err);\n }).catch(function (err) {\n return _this5.submissionReadyReject(err);\n });\n } else {\n this.submissionReadyResolve();\n }\n\n return this.submissionReady;\n }\n /**\n * Set the src of the form renderer.\n *\n * @param value\n * @param options\n */\n\n }, {\n key: \"setSrc\",\n value: function setSrc(value, options) {\n var _this6 = this;\n\n if (this.setUrl(value, options)) {\n this.nosubmit = false;\n return this.formio.loadForm({\n params: {\n live: 1\n }\n }).then(function (form) {\n var setForm = _this6.setForm(form);\n\n _this6.loadSubmission();\n\n return setForm;\n }).catch(function (err) {\n console.warn(err);\n\n _this6.formReadyReject(err);\n });\n }\n\n return _nativePromiseOnly.default.resolve();\n }\n }, {\n key: \"url\",\n get: function get() {\n return this._src;\n }\n /**\n * Sets the url of the form renderer.\n *\n * @param value\n * @param options\n */\n ,\n set:\n /**\n * Set the form source but don't initialize the form and submission from the url.\n *\n * @param {string} value - The value of the form embed url.\n */\n function set(value) {\n this.setUrl(value);\n }\n /**\n * Called when both the form and submission have been loaded.\n *\n * @returns {Promise} - The promise to trigger when both form and submission have loaded.\n */\n\n }, {\n key: \"setUrl\",\n value: function setUrl(value, options) {\n if (!value || typeof value !== 'string' || value === this._src) {\n return false;\n }\n\n this._src = value;\n this.nosubmit = true;\n this.formio = this.options.formio = new _Formio.GlobalFormio(value, options);\n\n if (this.type === 'form') {\n // Set the options source so this can be passed to other components.\n this.options.src = value;\n }\n\n return true;\n }\n }, {\n key: \"ready\",\n get: function get() {\n var _this7 = this;\n\n return this.formReady.then(function () {\n return _get(_getPrototypeOf(Webform.prototype), \"ready\", _this7).then(function () {\n return _this7.loadingSubmission ? _this7.submissionReady : true;\n });\n });\n }\n /**\n * Returns if this form is loading.\n *\n * @returns {boolean} - TRUE means the form is loading, FALSE otherwise.\n */\n\n }, {\n key: \"loading\",\n get: function get() {\n return this._loading;\n }\n /**\n * Set the loading state for this form, and also show the loader spinner.\n *\n * @param {boolean} loading - If this form should be \"loading\" or not.\n */\n ,\n set: function set(loading) {\n if (this._loading !== loading) {\n this._loading = loading;\n\n if (!this.loader && loading) {\n this.loader = this.ce('div', {\n class: 'loader-wrapper'\n });\n var spinner = this.ce('div', {\n class: 'loader text-center'\n });\n this.loader.appendChild(spinner);\n }\n /* eslint-disable max-depth */\n\n\n if (this.loader) {\n try {\n if (loading) {\n this.prependTo(this.loader, this.wrapper);\n } else {\n this.removeChildFrom(this.loader, this.wrapper);\n }\n } catch (err) {// ingore\n }\n }\n /* eslint-enable max-depth */\n\n }\n }\n /**\n * Sets the JSON schema for the form to be rendered.\n *\n * @example\n * import Webform from 'formiojs/Webform';\n * let form = new Webform(document.getElementById('formio'));\n * form.setForm({\n * components: [\n * {\n * type: 'textfield',\n * key: 'firstName',\n * label: 'First Name',\n * placeholder: 'Enter your first name.',\n * input: true\n * },\n * {\n * type: 'textfield',\n * key: 'lastName',\n * label: 'Last Name',\n * placeholder: 'Enter your last name',\n * input: true\n * },\n * {\n * type: 'button',\n * action: 'submit',\n * label: 'Submit',\n * theme: 'primary'\n * }\n * ]\n * });\n *\n * @param {Object} form - The JSON schema of the form @see https://examples.form.io/example for an example JSON schema.\n * @param flags\n * @returns {*}\n */\n\n }, {\n key: \"setForm\",\n value: function setForm(form, flags) {\n var _this$_form$component,\n _this8 = this;\n\n var isFormAlreadySet = this._form && ((_this$_form$component = this._form.components) === null || _this$_form$component === void 0 ? void 0 : _this$_form$component.length);\n\n try {\n var _this$parent, _this$parent$componen;\n\n // Do not set the form again if it has been already set\n if (isFormAlreadySet && JSON.stringify(this._form) === JSON.stringify(form)) {\n return _nativePromiseOnly.default.resolve();\n } // Create the form.\n\n\n this._form = flags !== null && flags !== void 0 && flags.keepAsReference ? form : _lodash.default.cloneDeep(form);\n\n if (this.onSetForm) {\n this.onSetForm(_lodash.default.cloneDeep(this._form), form);\n }\n\n if ((_this$parent = this.parent) !== null && _this$parent !== void 0 && (_this$parent$componen = _this$parent.component) !== null && _this$parent$componen !== void 0 && _this$parent$componen.modalEdit) {\n return _nativePromiseOnly.default.resolve();\n }\n } catch (err) {\n console.warn(err); // If provided form is not a valid JSON object, do not set it too\n\n return _nativePromiseOnly.default.resolve();\n } // Allow the form to provide component overrides.\n\n\n if (form && form.settings && form.settings.components) {\n this.options.components = form.settings.components;\n }\n\n if (form && form.properties) {\n this.options.properties = form.properties;\n }\n\n if ('schema' in form && (0, _compareVersions.default)(form.schema, '1.x') > 0) {\n this.ready.then(function () {\n _this8.setAlert('alert alert-danger', 'Form schema is for a newer version, please upgrade your renderer. Some functionality may not work.');\n });\n } // See if they pass a module, and evaluate it if so.\n\n\n if (form && form.module) {\n var formModule = null;\n\n if (typeof form.module === 'string') {\n try {\n formModule = this.evaluate(\"return \".concat(form.module));\n } catch (err) {\n console.warn(err);\n }\n } else {\n formModule = form.module;\n }\n\n if (formModule) {\n _Formio.GlobalFormio.use(formModule); // Since we got here after instantiation, we need to manually apply form options.\n\n\n if (formModule.options && formModule.options.form) {\n this.options = Object.assign(this.options, formModule.options.form);\n }\n }\n }\n\n this.initialized = false;\n\n var rebuild = this.rebuild() || _nativePromiseOnly.default.resolve();\n\n return rebuild.then(function () {\n _this8.emit('formLoad', form);\n\n _this8.triggerRecaptcha(); // Make sure to trigger onChange after a render event occurs to speed up form rendering.\n\n\n setTimeout(function () {\n _this8.onChange(flags);\n\n _this8.formReadyResolve();\n }, 0);\n return _this8.formReady;\n });\n }\n /**\n * Gets the form object.\n *\n * @returns {Object} - The form JSON schema.\n */\n\n }, {\n key: \"form\",\n get: function get() {\n if (!this._form) {\n this._form = {\n components: []\n };\n }\n\n return this._form;\n }\n /**\n * Sets the form value.\n *\n * @alias setForm\n * @param {Object} form - The form schema object.\n */\n ,\n set: function set(form) {\n this.setForm(form);\n }\n /**\n * Returns the submission object that was set within this form.\n *\n * @returns {Object}\n */\n\n }, {\n key: \"submission\",\n get: function get() {\n return this.getValue();\n }\n /**\n * Sets the submission of a form.\n *\n * @example\n * import Webform from 'formiojs/Webform';\n * let form = new Webform(document.getElementById('formio'));\n * form.src = 'https://examples.form.io/example';\n * form.submission = {data: {\n * firstName: 'Joe',\n * lastName: 'Smith',\n * email: 'joe@example.com'\n * }};\n *\n * @param {Object} submission - The Form.io submission object.\n */\n ,\n set: function set(submission) {\n this.setSubmission(submission);\n }\n /**\n * Sets a submission and returns the promise when it is ready.\n * @param submission\n * @param flags\n * @return {Promise.}\n */\n\n }, {\n key: \"setSubmission\",\n value: function setSubmission(submission) {\n var _this9 = this;\n\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n flags = _objectSpread(_objectSpread({}, flags), {}, {\n fromSubmission: _lodash.default.has(flags, 'fromSubmission') ? flags.fromSubmission : true\n });\n return this.onSubmission = this.formReady.then(function (resolveFlags) {\n if (resolveFlags) {\n flags = _objectSpread(_objectSpread({}, flags), resolveFlags);\n }\n\n _this9.submissionSet = true;\n\n _this9.triggerChange(flags);\n\n _this9.setValue(submission, flags);\n\n return _this9.submissionReadyResolve(submission);\n }, function (err) {\n return _this9.submissionReadyReject(err);\n }).catch(function (err) {\n return _this9.submissionReadyReject(err);\n });\n }\n /**\n * Saves a submission draft.\n */\n\n }, {\n key: \"saveDraft\",\n value: function saveDraft() {\n var _this10 = this;\n\n if (!this.draftEnabled) {\n return;\n }\n\n if (!this.formio) {\n console.warn(this.t('saveDraftInstanceError'));\n return;\n }\n\n if (!_Formio.GlobalFormio.getUser()) {\n console.warn(this.t('saveDraftAuthError'));\n return;\n }\n\n var draft = (0, _utils.fastCloneDeep)(this.submission);\n draft.state = 'draft';\n\n if (!this.savingDraft) {\n this.emit('saveDraftBegin');\n this.savingDraft = true;\n this.formio.saveSubmission(draft).then(function (sub) {\n // Set id to submission to avoid creating new draft submission\n _this10.submission._id = sub._id;\n _this10.savingDraft = false;\n\n _this10.emit('saveDraft', sub);\n });\n }\n }\n /**\n * Restores a draft submission based on the user who is authenticated.\n *\n * @param {userId} - The user id where we need to restore the draft from.\n */\n\n }, {\n key: \"restoreDraft\",\n value: function restoreDraft(userId) {\n var _this11 = this;\n\n if (!this.formio) {\n console.warn(this.t('restoreDraftInstanceError'));\n return;\n }\n\n this.savingDraft = true;\n this.formio.loadSubmissions({\n params: {\n state: 'draft',\n owner: userId\n }\n }).then(function (submissions) {\n if (submissions.length > 0 && !_this11.options.skipDraftRestore) {\n var draft = (0, _utils.fastCloneDeep)(submissions[0]);\n return _this11.setSubmission(draft).then(function () {\n _this11.draftEnabled = true;\n _this11.savingDraft = false;\n\n _this11.emit('restoreDraft', draft);\n });\n } // Enable drafts so that we can keep track of changes.\n\n\n _this11.draftEnabled = true;\n _this11.savingDraft = false;\n\n _this11.emit('restoreDraft', null);\n });\n }\n }, {\n key: \"schema\",\n get: function get() {\n var schema = (0, _utils.fastCloneDeep)(_lodash.default.omit(this._form, ['components']));\n schema.components = [];\n this.eachComponent(function (component) {\n return schema.components.push(component.schema);\n });\n return schema;\n }\n }, {\n key: \"mergeData\",\n value: function mergeData(_this, _that) {\n _lodash.default.mergeWith(_this, _that, function (thisValue, thatValue) {\n if (Array.isArray(thisValue) && Array.isArray(thatValue) && thisValue.length !== thatValue.length) {\n return thatValue;\n }\n });\n }\n }, {\n key: \"setValue\",\n value: function setValue(submission) {\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n if (!submission || !submission.data) {\n submission = {\n data: {}\n };\n } // Metadata needs to be available before setValue\n\n\n this._submission.metadata = submission.metadata || {};\n this.editing = !!submission._id; // Set the timezone in the options if available.\n\n if (!this.options.submissionTimezone && submission.metadata && submission.metadata.timezone) {\n this.options.submissionTimezone = submission.metadata.timezone;\n }\n\n var changed = _get(_getPrototypeOf(Webform.prototype), \"setValue\", this).call(this, submission.data, flags);\n\n if (!flags.sanitize) {\n this.mergeData(this.data, submission.data);\n }\n\n submission.data = this.data;\n this._submission = submission;\n return changed;\n }\n }, {\n key: \"getValue\",\n value: function getValue() {\n if (!this._submission.data) {\n this._submission.data = {};\n }\n\n if (this.viewOnly) {\n return this._submission;\n }\n\n var submission = this._submission;\n submission.data = this.data;\n return this._submission;\n }\n /**\n * Build the form.\n */\n\n }, {\n key: \"init\",\n value: function init() {\n var _this12 = this;\n\n this._submission = this._submission || {\n data: {}\n }; // Remove any existing components.\n\n if (this.components && this.components.length) {\n this.destroyComponents();\n this.components = [];\n }\n\n if (this.component) {\n this.component.components = this.form ? this.form.components : [];\n } else {\n this.component = this.form;\n }\n\n this.component.type = 'form';\n this.component.input = false;\n this.addComponents();\n this.on('submitButton', function (options) {\n _this12.submit(false, options).catch(function (e) {\n return e !== false && console.log(e);\n });\n }, true);\n this.on('checkValidity', function (data) {\n return _this12.checkValidity(data, true, data);\n }, true);\n this.on('requestUrl', function (args) {\n return _this12.submitUrl(args.url, args.headers);\n }, true);\n this.on('resetForm', function () {\n return _this12.resetValue();\n }, true);\n this.on('deleteSubmission', function () {\n return _this12.deleteSubmission();\n }, true);\n this.on('refreshData', function () {\n return _this12.updateValue();\n }, true);\n this.executeFormController();\n return this.formReady;\n }\n }, {\n key: \"executeFormController\",\n value: function executeFormController() {\n var _this13 = this;\n\n // If no controller value or\n // hidden and set to clearOnHide (Don't calculate a value for a hidden field set to clear when hidden)\n if (!this.form || !this.form.controller || (!this.visible || this.component.hidden) && this.component.clearOnHide && !this.rootPristine) {\n return false;\n }\n\n this.formReady.then(function () {\n _this13.evaluate(_this13.form.controller, {\n components: _this13.components,\n instance: _this13\n });\n });\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n var deleteFromGlobal = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n this.off('submitButton');\n this.off('checkValidity');\n this.off('requestUrl');\n this.off('resetForm');\n this.off('deleteSubmission');\n this.off('refreshData');\n\n if (deleteFromGlobal) {\n this.emit('formDelete', this.id);\n delete _Formio.GlobalFormio.forms[this.id];\n }\n\n return _get(_getPrototypeOf(Webform.prototype), \"destroy\", this).call(this);\n }\n }, {\n key: \"build\",\n value: function build(element) {\n var _this14 = this;\n\n if (element || this.element) {\n return this.ready.then(function () {\n element = element || _this14.element;\n\n _get(_getPrototypeOf(Webform.prototype), \"build\", _this14).call(_this14, element);\n });\n }\n\n return this.ready;\n }\n }, {\n key: \"getClassName\",\n value: function getClassName() {\n var classes = 'formio-form';\n\n if (this.options.readOnly) {\n classes += ' formio-read-only';\n }\n\n return classes;\n }\n }, {\n key: \"render\",\n value: function render() {\n return _get(_getPrototypeOf(Webform.prototype), \"render\", this).call(this, this.renderTemplate('webform', {\n classes: this.getClassName(),\n children: this.renderComponents()\n }), this.builderMode ? 'builder' : 'form', true);\n }\n }, {\n key: \"redraw\",\n value: function redraw() {\n // Don't bother if we have not built yet.\n if (!this.element) {\n return _nativePromiseOnly.default.resolve();\n }\n\n this.clear();\n this.setContent(this.element, this.render());\n return this.attach(this.element);\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n var _this15 = this;\n\n this.element = element;\n this.loadRefs(element, {\n webform: 'single'\n });\n var childPromise = this.attachComponents(this.refs.webform);\n this.addEventListener(document, 'keydown', this.executeShortcuts);\n this.currentForm = this;\n this.hook('attachWebform', element, this);\n return childPromise.then(function () {\n _this15.emit('render', _this15.element);\n\n return _this15.setValue(_this15._submission, {\n noUpdateEvent: true\n });\n });\n }\n }, {\n key: \"hasRequiredFields\",\n value: function hasRequiredFields() {\n var result = false;\n (0, _formUtils.eachComponent)(this.form.components, function (component) {\n if (component.validate.required) {\n result = true;\n return true;\n }\n }, true);\n return result;\n }\n }, {\n key: \"resetValue\",\n value: function resetValue() {\n _lodash.default.each(this.getComponents(), function (comp) {\n return comp.resetValue();\n });\n\n this.setPristine(true);\n this.onChange();\n }\n /**\n * Sets a new alert to display in the error dialog of the form.\n *\n * @param {string} type - The type of alert to display. \"danger\", \"success\", \"warning\", etc.\n * @param {string} message - The message to show in the alert.\n * @param {Object} options\n */\n\n }, {\n key: \"setAlert\",\n value: function setAlert(type, message, options) {\n var _this16 = this;\n\n if (!type && this.submitted) {\n if (this.alert) {\n if (this.refs.errorRef && this.refs.errorRef.length) {\n this.refs.errorRef.forEach(function (el) {\n _this16.removeEventListener(el, 'click');\n\n _this16.removeEventListener(el, 'keypress');\n });\n }\n\n this.removeChild(this.alert);\n this.alert = null;\n }\n\n return;\n }\n\n if (this.options.noAlerts) {\n if (!message) {\n this.emit('error', false);\n }\n\n return;\n }\n\n if (this.alert) {\n try {\n if (this.refs.errorRef && this.refs.errorRef.length) {\n this.refs.errorRef.forEach(function (el) {\n _this16.removeEventListener(el, 'click');\n\n _this16.removeEventListener(el, 'keypress');\n });\n }\n\n this.removeChild(this.alert);\n this.alert = null;\n } catch (err) {// ignore\n }\n }\n\n if (message) {\n var attrs = {\n class: options && options.classes || \"alert alert-\".concat(type),\n id: \"error-list-\".concat(this.id)\n };\n var templateOptions = {\n message: message instanceof HTMLElement ? message.outerHTML : message,\n attrs: attrs,\n type: type\n };\n this.alert = (0, _utils.convertStringToHTMLElement)(this.renderTemplate('alert', templateOptions), \"#\".concat(attrs.id));\n }\n\n if (!this.alert) {\n return;\n }\n\n this.loadRefs(this.alert, {\n errorRef: 'multiple'\n });\n\n if (this.refs.errorRef && this.refs.errorRef.length) {\n this.refs.errorRef.forEach(function (el) {\n _this16.addEventListener(el, 'click', function (e) {\n var key = e.currentTarget.dataset.componentKey;\n\n _this16.focusOnComponent(key);\n });\n\n _this16.addEventListener(el, 'keydown', function (e) {\n if (e.keyCode === 13) {\n e.preventDefault();\n var key = e.currentTarget.dataset.componentKey;\n\n _this16.focusOnComponent(key);\n }\n });\n });\n }\n\n this.prepend(this.alert);\n }\n /**\n * Focus on selected component.\n *\n * @param {string} key - The key of selected component.\n * @returns {*}\n */\n\n }, {\n key: \"focusOnComponent\",\n value: function focusOnComponent(key) {\n if (key) {\n var component = this.getComponent(key);\n\n if (component) {\n component.focus();\n }\n }\n }\n /**\n * Show the errors of this form within the alert dialog.\n *\n * @param {Object} error - An optional additional error to display along with the component errors.\n * @returns {*}\n */\n\n /* eslint-disable no-unused-vars */\n\n }, {\n key: \"showErrors\",\n value: function showErrors(error, triggerEvent, onChange) {\n var _this17 = this;\n\n this.loading = false;\n var errors = this.errors;\n\n if (error) {\n if (Array.isArray(error)) {\n errors = errors.concat(error);\n } else {\n errors.push(error);\n }\n } else {\n errors = _get(_getPrototypeOf(Webform.prototype), \"errors\", this);\n }\n\n errors = errors.concat(this.customErrors);\n\n if (!errors.length) {\n this.setAlert(false);\n return;\n } // Mark any components as invalid if in a custom message.\n\n\n errors.forEach(function (err) {\n var _err$components = err.components,\n components = _err$components === void 0 ? [] : _err$components;\n\n if (err.component) {\n components.push(err.component);\n }\n\n if (err.path) {\n components.push(err.path);\n }\n\n components.forEach(function (path) {\n var originalPath = _this17._parentPath + (0, _utils.getStringFromComponentPath)(path);\n\n var component = _this17.getComponent(path, _lodash.default.identity, originalPath);\n\n if (err.fromServer) {\n if (component.serverErrors) {\n component.serverErrors.push(err);\n } else {\n component.serverErrors = [err];\n }\n }\n\n var components = _lodash.default.compact(Array.isArray(component) ? component : [component]);\n\n components.forEach(function (component) {\n return component.setCustomValidity(err.message, true);\n });\n });\n });\n var displayedErrors = [];\n errors.forEach(function (err) {\n if (err) {\n var createListItem = function createListItem(message, index) {\n var messageFromIndex = !_lodash.default.isUndefined(index) && err.messages && err.messages[index];\n var keyOrPath = messageFromIndex && messageFromIndex.formattedKeyOrPath || messageFromIndex.path || err.component && err.component.key || err.fromServer && err.path;\n var formattedKeyOrPath = keyOrPath ? (0, _utils.getStringFromComponentPath)(keyOrPath) : '';\n formattedKeyOrPath = _this17._parentPath + formattedKeyOrPath;\n\n if (typeof err !== 'string' && !err.formattedKeyOrPath) {\n err.formattedKeyOrPath = formattedKeyOrPath;\n }\n\n return {\n message: (0, _utils.unescapeHTML)(message),\n keyOrPath: formattedKeyOrPath\n };\n };\n\n err.messages = _lodash.default.uniqBy(err.messages, function (message) {\n return message.message;\n });\n\n if (err.messages && err.messages.length) {\n var component = err.component;\n err.messages.forEach(function (_ref, index) {\n var message = _ref.message,\n context = _ref.context,\n fromServer = _ref.fromServer;\n var text = context !== null && context !== void 0 && context.hasLabel || fromServer ? _this17.t('alertMessage', {\n message: _this17.t(message)\n }) : _this17.t('alertMessageWithLabel', {\n label: _this17.t(component.label),\n message: _this17.t(message)\n });\n displayedErrors.push(createListItem(text, index));\n });\n } else if (err) {\n var message = _lodash.default.isObject(err) ? _this17.t('alertMessage', {\n message: _this17.t(err.message || '')\n }) : _this17.t('alertMessage', {\n message: _this17.t(err)\n });\n displayedErrors.push(createListItem(message));\n }\n }\n });\n var errorsList = this.renderTemplate('errorsList', {\n errors: displayedErrors\n });\n this.root.setAlert('danger', errorsList);\n\n if (triggerEvent) {\n this.emit('error', errors);\n }\n\n return errors;\n }\n /* eslint-enable no-unused-vars */\n\n /**\n * Called when the submission has completed, or if the submission needs to be sent to an external library.\n *\n * @param {Object} submission - The submission object.\n * @param {boolean} saved - Whether or not this submission was saved to the server.\n * @returns {object} - The submission object.\n */\n\n }, {\n key: \"onSubmit\",\n value: function onSubmit(submission, saved) {\n var _this$triggerSaveDraf;\n\n this.loading = false;\n this.submitting = false;\n this.setPristine(true); // We want to return the submitted submission and setValue will mutate the submission so cloneDeep it here.\n\n this.setValue((0, _utils.fastCloneDeep)(submission), {\n noValidate: true,\n noCheck: true\n });\n this.setAlert('success', \"

\".concat(this.t('complete'), \"

\")); // Cancel triggered saveDraft to prevent overriding the submitted state\n\n if (this.draftEnabled && (_this$triggerSaveDraf = this.triggerSaveDraft) !== null && _this$triggerSaveDraf !== void 0 && _this$triggerSaveDraf.cancel) {\n this.triggerSaveDraft.cancel();\n }\n\n this.emit('submit', submission, saved);\n\n if (saved) {\n this.emit('submitDone', submission);\n }\n\n return submission;\n }\n }, {\n key: \"normalizeError\",\n value: function normalizeError(error) {\n if (error) {\n if (_typeof(error) === 'object' && 'details' in error) {\n error = error.details;\n }\n\n if (typeof error === 'string') {\n error = {\n message: error\n };\n }\n }\n\n return error;\n }\n /**\n * Called when an error occurs during the submission.\n *\n * @param {Object} error - The error that occured.\n */\n\n }, {\n key: \"onSubmissionError\",\n value: function onSubmissionError(error) {\n error = this.normalizeError(error);\n this.submitting = false;\n this.setPristine(false);\n this.emit('submitError', error); // Allow for silent cancellations (no error message, no submit button error state)\n\n if (error && error.silent) {\n this.emit('change', {\n isValid: true\n }, {\n silent: true\n });\n return false;\n }\n\n var errors = this.showErrors(error, true);\n\n if (this.root && this.root.alert) {\n this.scrollIntoView(this.root.alert);\n }\n\n return errors;\n }\n /**\n * Trigger the change event for this form.\n *\n * @param changed\n * @param flags\n */\n\n }, {\n key: \"onChange\",\n value: function onChange(flags, changed, modified, changes) {\n flags = flags || {};\n var isChangeEventEmitted = false; // For any change events, clear any custom errors for that component.\n\n if (changed && changed.component) {\n this.customErrors = this.customErrors.filter(function (err) {\n return err.component && err.component !== changed.component.key;\n });\n }\n\n _get(_getPrototypeOf(Webform.prototype), \"onChange\", this).call(this, flags, true);\n\n var value = _lodash.default.clone(this.submission);\n\n flags.changed = value.changed = changed;\n flags.changes = changes;\n\n if (modified && this.pristine) {\n this.pristine = false;\n }\n\n value.isValid = this.checkData(value.data, flags);\n this.loading = false;\n\n if (this.submitted) {\n this.showErrors();\n } // See if we need to save the draft of the form.\n\n\n if (modified && this.options.saveDraft) {\n this.triggerSaveDraft();\n }\n\n if (!flags || !flags.noEmit) {\n this.emit('change', value, flags, modified);\n isChangeEventEmitted = true;\n } // The form is initialized after the first change event occurs.\n\n\n if (isChangeEventEmitted && !this.initialized) {\n this.emit('initialized');\n this.initialized = true;\n }\n }\n }, {\n key: \"checkData\",\n value: function checkData(data) {\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n var valid = _get(_getPrototypeOf(Webform.prototype), \"checkData\", this).call(this, data, flags);\n\n if ((_lodash.default.isEmpty(flags) || flags.noValidate) && this.submitted) {\n this.showErrors();\n }\n\n return valid;\n }\n /**\n * Send a delete request to the server.\n */\n\n }, {\n key: \"deleteSubmission\",\n value: function deleteSubmission() {\n var _this18 = this;\n\n return this.formio.deleteSubmission().then(function () {\n _this18.emit('submissionDeleted', _this18.submission);\n\n _this18.resetValue();\n });\n }\n /**\n * Cancels the submission.\n *\n * @alias reset\n */\n\n }, {\n key: \"cancel\",\n value: function cancel(noconfirm) {\n var shouldReset = this.hook('beforeCancel', true);\n\n if (shouldReset && (noconfirm || confirm(this.t('confirmCancel')))) {\n this.resetValue();\n return true;\n } else {\n this.emit('cancelSubmit');\n return false;\n }\n }\n }, {\n key: \"setMetadata\",\n value: function setMetadata(submission) {\n // Add in metadata about client submitting the form\n submission.metadata = submission.metadata || {};\n\n _lodash.default.defaults(submission.metadata, {\n timezone: _lodash.default.get(this, '_submission.metadata.timezone', (0, _utils.currentTimezone)()),\n offset: parseInt(_lodash.default.get(this, '_submission.metadata.offset', (0, _moment.default)().utcOffset()), 10),\n origin: document.location.origin,\n referrer: document.referrer,\n browserName: navigator.appName,\n userAgent: navigator.userAgent,\n pathName: window.location.pathname,\n onLine: navigator.onLine\n });\n }\n }, {\n key: \"submitForm\",\n value: function submitForm() {\n var _this19 = this;\n\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n this.clearServerErrors();\n return new _nativePromiseOnly.default(function (resolve, reject) {\n // Read-only forms should never submit.\n if (_this19.options.readOnly) {\n return resolve({\n submission: _this19.submission,\n saved: false\n });\n }\n\n var submission = (0, _utils.fastCloneDeep)(_this19.submission || {});\n\n _this19.setMetadata(submission);\n\n submission.state = options.state || 'submitted';\n var isDraft = submission.state === 'draft';\n\n _this19.hook('beforeSubmit', _objectSpread(_objectSpread({}, submission), {}, {\n component: options.component\n }), function (err, data) {\n if (err) {\n return reject(err);\n }\n\n submission._vnote = data && data._vnote ? data._vnote : '';\n\n if (!isDraft && !submission.data) {\n return reject('Invalid Submission');\n }\n\n if (!isDraft && !_this19.checkValidity(submission.data, true)) {\n return reject();\n }\n\n _this19.everyComponent(function (comp) {\n var persistent = comp.component.persistent;\n\n if (persistent === 'client-only') {\n _lodash.default.unset(submission.data, comp.path);\n }\n });\n\n _this19.hook('customValidation', _objectSpread(_objectSpread({}, submission), {}, {\n component: options.component\n }), function (err) {\n if (err) {\n // If string is returned, cast to object.\n if (typeof err === 'string') {\n err = {\n message: err\n };\n } // Ensure err is an array.\n\n\n err = Array.isArray(err) ? err : [err]; // Set as custom errors.\n\n _this19.customErrors = err;\n return reject();\n }\n\n _this19.loading = true; // Use the form action to submit the form if available.\n\n if (_this19._form && _this19._form.action) {\n var method = submission.data._id && _this19._form.action.includes(submission.data._id) ? 'PUT' : 'POST';\n return _Formio.GlobalFormio.makeStaticRequest(_this19._form.action, method, submission, _this19.formio ? _this19.formio.options : {}).then(function (result) {\n return resolve({\n submission: result,\n saved: true\n });\n }).catch(function (error) {\n _this19.setServerErrors(error);\n\n return reject(error);\n });\n }\n\n var submitFormio = _this19.formio;\n\n if (_this19.nosubmit || !submitFormio) {\n return resolve({\n submission: submission,\n saved: false\n });\n } // If this is an actionUrl, then make sure to save the action and not the submission.\n\n\n var submitMethod = submitFormio.actionUrl ? 'saveAction' : 'saveSubmission';\n submitFormio[submitMethod](submission).then(function (result) {\n return resolve({\n submission: result,\n saved: true\n });\n }).catch(function (error) {\n _this19.setServerErrors(error);\n\n return reject(error);\n });\n });\n });\n });\n }\n }, {\n key: \"setServerErrors\",\n value: function setServerErrors(error) {\n if (error.details) {\n this.serverErrors = error.details.filter(function (err) {\n return err.level ? err.level === 'error' : err;\n }).map(function (err) {\n err.fromServer = true;\n return err;\n });\n }\n }\n }, {\n key: \"executeSubmit\",\n value: function executeSubmit(options) {\n var _this20 = this;\n\n this.submitted = true;\n this.submitting = true;\n return this.submitForm(options).then(function (_ref2) {\n var submission = _ref2.submission,\n saved = _ref2.saved;\n return _this20.onSubmit(submission, saved);\n }).then(function (results) {\n _this20.submissionInProcess = false;\n return results;\n }).catch(function (err) {\n _this20.submissionInProcess = false;\n return _nativePromiseOnly.default.reject(_this20.onSubmissionError(err));\n });\n }\n }, {\n key: \"clearServerErrors\",\n value: function clearServerErrors() {\n var _this$serverErrors,\n _this21 = this;\n\n (_this$serverErrors = this.serverErrors) === null || _this$serverErrors === void 0 ? void 0 : _this$serverErrors.forEach(function (error) {\n if (error.path) {\n var pathArray = (0, _utils.getArrayFromComponentPath)(error.path);\n\n var component = _this21.getComponent(pathArray, _lodash.default.identity, error.formattedKeyOrPath);\n\n if (component) {\n component.serverErrors = [];\n }\n }\n });\n this.serverErrors = [];\n }\n /**\n * Submits the form.\n *\n * @example\n * import Webform from 'formiojs/Webform';\n * let form = new Webform(document.getElementById('formio'));\n * form.src = 'https://examples.form.io/example';\n * form.submission = {data: {\n * firstName: 'Joe',\n * lastName: 'Smith',\n * email: 'joe@example.com'\n * }};\n * form.submit().then((submission) => {\n * console.log(submission);\n * });\n *\n * @param {boolean} before - If this submission occured from the before handlers.\n *\n * @returns {Promise} - A promise when the form is done submitting.\n */\n\n }, {\n key: \"submit\",\n value: function submit(before, options) {\n var _this22 = this;\n\n this.submissionInProcess = true;\n\n if (!before) {\n return this.beforeSubmit(options).then(function () {\n return _this22.executeSubmit(options);\n });\n } else {\n return this.executeSubmit(options);\n }\n }\n }, {\n key: \"submitUrl\",\n value: function submitUrl(URL, headers) {\n var _this23 = this;\n\n if (!URL) {\n return console.warn('Missing URL argument');\n }\n\n var submission = this.submission || {};\n var API_URL = URL;\n var settings = {\n method: 'POST',\n headers: {}\n };\n\n if (headers && headers.length > 0) {\n headers.map(function (e) {\n if (e.header !== '' && e.value !== '') {\n settings.headers[e.header] = _this23.interpolate(e.value, submission);\n }\n });\n }\n\n if (API_URL && settings) {\n _Formio.GlobalFormio.makeStaticRequest(API_URL, settings.method, submission, {\n headers: settings.headers\n }).then(function () {\n _this23.emit('requestDone');\n\n _this23.setAlert('success', '

Success

');\n }).catch(function (e) {\n _this23.showErrors(\"\".concat(e.statusText ? e.statusText : '', \" \").concat(e.status ? e.status : e));\n\n _this23.emit('error', \"\".concat(e.statusText ? e.statusText : '', \" \").concat(e.status ? e.status : e));\n\n console.error(\"\".concat(e.statusText ? e.statusText : '', \" \").concat(e.status ? e.status : e));\n\n _this23.setAlert('danger', \"

\".concat(e.statusText ? e.statusText : '', \" \").concat(e.status ? e.status : e, \"

\"));\n });\n } else {\n this.emit('error', 'You should add a URL to this button.');\n this.setAlert('warning', 'You should add a URL to this button.');\n return console.warn('You should add a URL to this button.');\n }\n }\n }, {\n key: \"triggerRecaptcha\",\n value: function triggerRecaptcha() {\n if (!this || !this.components) {\n return;\n }\n\n var recaptchaComponent = (0, _utils.searchComponents)(this.components, {\n 'component.type': 'recaptcha',\n 'component.eventType': 'formLoad'\n });\n\n if (recaptchaComponent.length > 0) {\n recaptchaComponent[0].verify(\"\".concat(this.form.name ? this.form.name : 'form', \"Load\"));\n }\n }\n }, {\n key: \"nosubmit\",\n get: function get() {\n return this._nosubmit || false;\n },\n set: function set(value) {\n this._nosubmit = !!value;\n this.emit('nosubmit', this._nosubmit);\n }\n }, {\n key: \"conditions\",\n get: function get() {\n var _this$schema$settings, _this$schema$settings2;\n\n return (_this$schema$settings = (_this$schema$settings2 = this.schema.settings) === null || _this$schema$settings2 === void 0 ? void 0 : _this$schema$settings2.conditions) !== null && _this$schema$settings !== void 0 ? _this$schema$settings : [];\n }\n }, {\n key: \"variables\",\n get: function get() {\n var _this$schema$settings3, _this$schema$settings4;\n\n return (_this$schema$settings3 = (_this$schema$settings4 = this.schema.settings) === null || _this$schema$settings4 === void 0 ? void 0 : _this$schema$settings4.variables) !== null && _this$schema$settings3 !== void 0 ? _this$schema$settings3 : [];\n }\n }]);\n\n return Webform;\n}(_NestedDataComponent2.default);\n\nexports[\"default\"] = Webform;\nWebform.setBaseUrl = _Formio.GlobalFormio.setBaseUrl;\nWebform.setApiUrl = _Formio.GlobalFormio.setApiUrl;\nWebform.setAppUrl = _Formio.GlobalFormio.setAppUrl;\n\n//# sourceURL=webpack://Formio/./lib/Webform.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptors.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-properties.js */ \"./node_modules/core-js/modules/es.object.define-properties.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.array.index-of.js */ \"./node_modules/core-js/modules/es.array.index-of.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n__webpack_require__(/*! core-js/modules/es.object.assign.js */ \"./node_modules/core-js/modules/es.object.assign.js\");\n__webpack_require__(/*! core-js/modules/web.timers.js */ \"./node_modules/core-js/modules/web.timers.js\");\n__webpack_require__(/*! core-js/modules/es.array.is-array.js */ \"./node_modules/core-js/modules/es.array.is-array.js\");\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n__webpack_require__(/*! core-js/modules/es.parse-int.js */ \"./node_modules/core-js/modules/es.parse-int.js\");\n__webpack_require__(/*! core-js/modules/es.array.includes.js */ \"./node_modules/core-js/modules/es.array.includes.js\");\n__webpack_require__(/*! core-js/modules/es.string.includes.js */ \"./node_modules/core-js/modules/es.string.includes.js\");\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nvar _moment = _interopRequireDefault(__webpack_require__(/*! moment */ \"./node_modules/moment/moment.js\"));\nvar _compareVersions = _interopRequireDefault(__webpack_require__(/*! compare-versions */ \"./node_modules/compare-versions/lib/esm/index.js\"));\nvar _EventEmitter = _interopRequireDefault(__webpack_require__(/*! ./EventEmitter */ \"./lib/EventEmitter.js\"));\nvar _i18next = _interopRequireDefault(__webpack_require__(/*! i18next */ \"./node_modules/i18next/dist/cjs/i18next.js\"));\nvar _i18n = _interopRequireDefault(__webpack_require__(/*! ./i18n */ \"./lib/i18n.js\"));\nvar _Formio = __webpack_require__(/*! ./Formio */ \"./lib/Formio.js\");\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\nvar _Components = _interopRequireDefault(__webpack_require__(/*! ./components/Components */ \"./lib/components/Components.js\"));\nvar _NestedDataComponent2 = _interopRequireDefault(__webpack_require__(/*! ./components/_classes/nesteddata/NestedDataComponent */ \"./lib/components/_classes/nesteddata/NestedDataComponent.js\"));\nvar _utils = __webpack_require__(/*! ./utils/utils */ \"./lib/utils/utils.js\");\nvar _formUtils = __webpack_require__(/*! ./utils/formUtils */ \"./lib/utils/formUtils.js\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\n// Initialize the available forms.\n_Formio.GlobalFormio.forms = {};\n\n// Allow people to register components.\n_Formio.GlobalFormio.registerComponent = _Components[\"default\"].setComponent;\nfunction getIconSet(icons) {\n if (icons === 'fontawesome') {\n return 'fa';\n }\n return icons || '';\n}\nfunction getOptions(options) {\n options = _lodash[\"default\"].defaults(options, {\n submitOnEnter: false,\n iconset: getIconSet(options && options.icons ? options.icons : _Formio.GlobalFormio.icons),\n i18next: _i18next[\"default\"],\n saveDraft: false,\n alwaysDirty: false,\n saveDraftThrottle: 5000,\n display: 'form',\n cdnUrl: _Formio.GlobalFormio.cdn.baseUrl\n });\n if (!options.events) {\n options.events = new _EventEmitter[\"default\"]();\n }\n return options;\n}\n\n/**\n * Renders a Form.io form within the webpage.\n */\nvar Webform = /*#__PURE__*/function (_NestedDataComponent) {\n _inherits(Webform, _NestedDataComponent);\n var _super = _createSuper(Webform);\n /**\n * Creates a new Form instance.\n *\n * @param {Object} options - The options to create a new form instance.\n * @param {boolean} options.saveDraft - Set this if you would like to enable the save draft feature.\n * @param {boolean} options.saveDraftThrottle - The throttle for the save draft feature.\n * @param {boolean} options.readOnly - Set this form to readOnly\n * @param {boolean} options.noAlerts - Set to true to disable the alerts dialog.\n * @param {boolean} options.i18n - The translation file for this rendering. @see https://github.com/formio/formio.js/blob/master/i18n.js\n * @param {boolean} options.template - Provides a way to inject custom logic into the creation of every element rendered within the form.\n */\n /* eslint-disable max-statements */\n function Webform() {\n var _this2;\n _classCallCheck(this, Webform);\n var element, options;\n if (arguments[0] instanceof HTMLElement || arguments[1]) {\n element = arguments[0];\n options = arguments[1];\n } else {\n options = arguments[0];\n }\n _this2 = _super.call(this, null, getOptions(options));\n _defineProperty(_assertThisInitialized(_this2), \"executeShortcuts\", function (event) {\n var target = event.target;\n if (!_this2.keyboardCatchableElement(target)) {\n return;\n }\n var ctrl = event.ctrlKey || event.metaKey;\n var keyCode = event.keyCode;\n var _char = '';\n if (65 <= keyCode && keyCode <= 90) {\n _char = String.fromCharCode(keyCode);\n } else if (keyCode === 13) {\n _char = 'Enter';\n } else if (keyCode === 27) {\n _char = 'Esc';\n }\n _lodash[\"default\"].each(_this2.shortcuts, function (shortcut) {\n if (shortcut.ctrl && !ctrl) {\n return;\n }\n if (shortcut.shortcut === _char) {\n shortcut.element.click();\n event.preventDefault();\n }\n });\n });\n _this2.element = element;\n\n // Keep track of all available forms globally.\n _Formio.GlobalFormio.forms[_this2.id] = _assertThisInitialized(_this2);\n\n // Set the base url.\n if (_this2.options.baseUrl) {\n _Formio.GlobalFormio.setBaseUrl(_this2.options.baseUrl);\n }\n\n /**\n * The i18n configuration for this component.\n */\n var i18n = _i18n[\"default\"];\n if (options && options.i18n && !options.i18nReady) {\n // Support legacy way of doing translations.\n if (options.i18n.resources) {\n i18n = options.i18n;\n } else {\n _lodash[\"default\"].each(options.i18n, function (lang, code) {\n if (code === 'options') {\n _lodash[\"default\"].merge(i18n, lang);\n } else if (!i18n.resources[code]) {\n // extend the default translations (validations, buttons etc.) in case they are not in the options.\n i18n.resources[code] = {\n translation: _lodash[\"default\"].assign((0, _utils.fastCloneDeep)(_i18n[\"default\"].resources.en.translation), lang)\n };\n } else {\n _lodash[\"default\"].assign(i18n.resources[code].translation, lang);\n }\n });\n }\n options.i18n = i18n;\n options.i18nReady = true;\n }\n if (options && options.i18n) {\n _this2.options.i18n = options.i18n;\n } else {\n _this2.options.i18n = i18n;\n }\n\n // Set the language.\n if (_this2.options.language) {\n _this2.options.i18n.lng = _this2.options.language;\n }\n\n /**\n * The type of this element.\n * @type {string}\n */\n _this2.type = 'form';\n _this2._src = '';\n _this2._loading = false;\n _this2._form = {};\n _this2.draftEnabled = false;\n _this2.savingDraft = true;\n if (_this2.options.saveDraftThrottle) {\n _this2.triggerSaveDraft = _lodash[\"default\"].throttle(_this2.saveDraft.bind(_assertThisInitialized(_this2)), _this2.options.saveDraftThrottle);\n } else {\n _this2.triggerSaveDraft = _this2.saveDraft.bind(_assertThisInitialized(_this2));\n }\n _this2.customErrors = [];\n\n /**\n * Determines if this form should submit the API on submit.\n * @type {boolean}\n */\n _this2.nosubmit = false;\n\n /**\n * Determines if the form has tried to be submitted, error or not.\n *\n * @type {boolean}\n */\n _this2.submitted = false;\n\n /**\n * Determines if the form is being submitted at the moment.\n *\n * @type {boolean}\n */\n _this2.submitting = false;\n\n /**\n * The Formio instance for this form.\n * @type {Formio}\n */\n _this2.formio = null;\n\n /**\n * The loader HTML element.\n * @type {HTMLElement}\n */\n _this2.loader = null;\n\n /**\n * The alert HTML element\n * @type {HTMLElement}\n */\n _this2.alert = null;\n\n /**\n * Promise that is triggered when the submission is done loading.\n * @type {Promise}\n */\n _this2.onSubmission = null;\n\n /**\n * Determines if this submission is explicitly set.\n * @type {boolean}\n */\n _this2.submissionSet = false;\n\n /**\n * Promise that executes when the form is ready and rendered.\n * @type {Promise}\n *\n * @example\n * import Webform from 'formiojs/Webform';\n * let form = new Webform(document.getElementById('formio'));\n * form.formReady.then(() => {\n * console.log('The form is ready!');\n * });\n * form.src = 'https://examples.form.io/example';\n */\n _this2.formReady = new _nativePromiseOnly[\"default\"](function (resolve, reject) {\n /**\n * Called when the formReady state of this form has been resolved.\n *\n * @type {function}\n */\n _this2.formReadyResolve = resolve;\n\n /**\n * Called when this form could not load and is rejected.\n *\n * @type {function}\n */\n _this2.formReadyReject = reject;\n });\n\n /**\n * Promise that executes when the submission is ready and rendered.\n * @type {Promise}\n *\n * @example\n * import Webform from 'formiojs/Webform';\n * let form = new Webform(document.getElementById('formio'));\n * form.submissionReady.then(() => {\n * console.log('The submission is ready!');\n * });\n * form.src = 'https://examples.form.io/example/submission/234234234234234243';\n */\n _this2.submissionReady = new _nativePromiseOnly[\"default\"](function (resolve, reject) {\n /**\n * Called when the formReady state of this form has been resolved.\n *\n * @type {function}\n */\n _this2.submissionReadyResolve = resolve;\n\n /**\n * Called when this form could not load and is rejected.\n *\n * @type {function}\n */\n _this2.submissionReadyReject = reject;\n });\n _this2.shortcuts = [];\n\n // Set language after everything is established.\n _this2.localize().then(function () {\n _this2.language = _this2.options.language;\n });\n\n // See if we need to restore the draft from a user.\n if (_this2.options.saveDraft && !_this2.options.skipDraftRestore) {\n var user = _Formio.GlobalFormio.getUser();\n // Only restore a draft if the submission isn't explicitly set.\n if (user && !_this2.submissionSet) {\n _this2.restoreDraft(user._id);\n }\n }\n _this2.component.clearOnHide = false;\n\n // Ensure the root is set to this component.\n _this2.root = _assertThisInitialized(_this2);\n _this2.localRoot = _assertThisInitialized(_this2);\n return _this2;\n }\n /* eslint-enable max-statements */\n _createClass(Webform, [{\n key: \"language\",\n get: function get() {\n return this.options.language;\n },\n set:\n /**\n * Sets the language for this form.\n *\n * @param lang\n * @return {Promise}\n */\n function set(lang) {\n var _this3 = this;\n this.options.language = lang;\n if (this.i18next.language === lang) {\n return;\n }\n try {\n this.i18next.changeLanguage(lang, function (err) {\n if (err) {\n return;\n }\n _this3.rebuild();\n _this3.emit('languageChanged');\n });\n } catch (err) {\n return;\n }\n }\n }, {\n key: \"emptyValue\",\n get: function get() {\n return null;\n }\n }, {\n key: \"componentContext\",\n value: function componentContext() {\n return this._data;\n }\n }, {\n key: \"componentComponents\",\n get: function get() {\n return this.form.components;\n }\n }, {\n key: \"shadowRoot\",\n get: function get() {\n return this.options.shadowRoot;\n }\n\n /**\n * Add a language for translations\n *\n * @param code\n * @param lang\n * @param active\n * @return {*}\n */\n }, {\n key: \"addLanguage\",\n value: function addLanguage(code, lang) {\n var active = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var translations = _lodash[\"default\"].assign((0, _utils.fastCloneDeep)(_i18n[\"default\"].resources.en.translation), lang);\n this.i18next.addResourceBundle(code, 'translation', translations, true, true);\n if (active) {\n this.language = code;\n }\n }\n\n /**\n * Perform the localization initialization.\n * @returns {*}\n */\n }, {\n key: \"localize\",\n value: function localize() {\n var _this4 = this;\n if (this.i18next.initialized) {\n return _nativePromiseOnly[\"default\"].resolve(this.i18next);\n }\n this.i18next.initialized = true;\n return new _nativePromiseOnly[\"default\"](function (resolve, reject) {\n try {\n _this4.i18next.init(_objectSpread(_objectSpread({}, _this4.options.i18n), {\n compatibilityJSON: 'v3'\n }), function (err) {\n // Get language but remove any ;q=1 that might exist on it.\n _this4.options.language = _this4.i18next.language.split(';')[0];\n if (err) {\n return reject(err);\n }\n resolve(_this4.i18next);\n });\n } catch (err) {\n return reject(err);\n }\n });\n }\n }, {\n key: \"keyboardCatchableElement\",\n value: function keyboardCatchableElement(element) {\n if (element.nodeName === 'TEXTAREA') {\n return false;\n }\n if (element.nodeName === 'INPUT') {\n return ['text', 'email', 'password'].indexOf(element.type) === -1;\n }\n return true;\n }\n }, {\n key: \"addShortcut\",\n value: function addShortcut(element, shortcut) {\n if (!shortcut || !/^([A-Z]|Enter|Esc)$/i.test(shortcut)) {\n return;\n }\n shortcut = _lodash[\"default\"].capitalize(shortcut);\n if (shortcut === 'Enter' || shortcut === 'Esc') {\n // Restrict Enter and Esc only for buttons\n if (element.tagName !== 'BUTTON') {\n return;\n }\n this.shortcuts.push({\n shortcut: shortcut,\n element: element\n });\n } else {\n this.shortcuts.push({\n ctrl: true,\n shortcut: shortcut,\n element: element\n });\n }\n }\n }, {\n key: \"removeShortcut\",\n value: function removeShortcut(element, shortcut) {\n if (!shortcut || !/^([A-Z]|Enter|Esc)$/i.test(shortcut)) {\n return;\n }\n _lodash[\"default\"].remove(this.shortcuts, {\n shortcut: shortcut,\n element: element\n });\n }\n\n /**\n * Get the embed source of the form.\n *\n * @returns {string}\n */\n }, {\n key: \"src\",\n get: function get() {\n return this._src;\n }\n\n /**\n * Loads the submission if applicable.\n */,\n set:\n /**\n * Set the Form source, which is typically the Form.io embed URL.\n *\n * @param {string} value - The value of the form embed url.\n *\n * @example\n * import Webform from 'formiojs/Webform';\n * let form = new Webform(document.getElementById('formio'));\n * form.formReady.then(() => {\n * console.log('The form is formReady!');\n * });\n * form.src = 'https://examples.form.io/example';\n */\n function set(value) {\n this.setSrc(value);\n }\n\n /**\n * Get the embed source of the form.\n *\n * @returns {string}\n */\n }, {\n key: \"loadSubmission\",\n value: function loadSubmission() {\n var _this5 = this;\n this.loadingSubmission = true;\n if (this.formio.submissionId) {\n this.onSubmission = this.formio.loadSubmission().then(function (submission) {\n return _this5.setSubmission(submission);\n }, function (err) {\n return _this5.submissionReadyReject(err);\n })[\"catch\"](function (err) {\n return _this5.submissionReadyReject(err);\n });\n } else {\n this.submissionReadyResolve();\n }\n return this.submissionReady;\n }\n\n /**\n * Set the src of the form renderer.\n *\n * @param value\n * @param options\n */\n }, {\n key: \"setSrc\",\n value: function setSrc(value, options) {\n var _this6 = this;\n if (this.setUrl(value, options)) {\n this.nosubmit = false;\n return this.formio.loadForm({\n params: {\n live: 1\n }\n }).then(function (form) {\n var setForm = _this6.setForm(form);\n _this6.loadSubmission();\n return setForm;\n })[\"catch\"](function (err) {\n console.warn(err);\n _this6.formReadyReject(err);\n });\n }\n return _nativePromiseOnly[\"default\"].resolve();\n }\n }, {\n key: \"url\",\n get: function get() {\n return this._src;\n }\n\n /**\n * Sets the url of the form renderer.\n *\n * @param value\n * @param options\n */,\n set:\n /**\n * Set the form source but don't initialize the form and submission from the url.\n *\n * @param {string} value - The value of the form embed url.\n */\n function set(value) {\n this.setUrl(value);\n }\n\n /**\n * Called when both the form and submission have been loaded.\n *\n * @returns {Promise} - The promise to trigger when both form and submission have loaded.\n */\n }, {\n key: \"setUrl\",\n value: function setUrl(value, options) {\n if (!value || typeof value !== 'string' || value === this._src) {\n return false;\n }\n this._src = value;\n this.nosubmit = true;\n this.formio = this.options.formio = new _Formio.GlobalFormio(value, options);\n if (this.type === 'form') {\n // Set the options source so this can be passed to other components.\n this.options.src = value;\n }\n return true;\n }\n }, {\n key: \"ready\",\n get: function get() {\n var _this7 = this;\n return this.formReady.then(function () {\n return _get(_getPrototypeOf(Webform.prototype), \"ready\", _this7).then(function () {\n return _this7.loadingSubmission ? _this7.submissionReady : true;\n });\n });\n }\n\n /**\n * Returns if this form is loading.\n *\n * @returns {boolean} - TRUE means the form is loading, FALSE otherwise.\n */\n }, {\n key: \"loading\",\n get: function get() {\n return this._loading;\n }\n\n /**\n * Set the loading state for this form, and also show the loader spinner.\n *\n * @param {boolean} loading - If this form should be \"loading\" or not.\n */,\n set: function set(loading) {\n if (this._loading !== loading) {\n this._loading = loading;\n if (!this.loader && loading) {\n this.loader = this.ce('div', {\n \"class\": 'loader-wrapper'\n });\n var spinner = this.ce('div', {\n \"class\": 'loader text-center'\n });\n this.loader.appendChild(spinner);\n }\n /* eslint-disable max-depth */\n if (this.loader) {\n try {\n if (loading) {\n this.prependTo(this.loader, this.wrapper);\n } else {\n this.removeChildFrom(this.loader, this.wrapper);\n }\n } catch (err) {\n // ingore\n }\n }\n /* eslint-enable max-depth */\n }\n }\n\n /**\n * Sets the JSON schema for the form to be rendered.\n *\n * @example\n * import Webform from 'formiojs/Webform';\n * let form = new Webform(document.getElementById('formio'));\n * form.setForm({\n * components: [\n * {\n * type: 'textfield',\n * key: 'firstName',\n * label: 'First Name',\n * placeholder: 'Enter your first name.',\n * input: true\n * },\n * {\n * type: 'textfield',\n * key: 'lastName',\n * label: 'Last Name',\n * placeholder: 'Enter your last name',\n * input: true\n * },\n * {\n * type: 'button',\n * action: 'submit',\n * label: 'Submit',\n * theme: 'primary'\n * }\n * ]\n * });\n *\n * @param {Object} form - The JSON schema of the form @see https://examples.form.io/example for an example JSON schema.\n * @param flags\n * @returns {*}\n */\n }, {\n key: \"setForm\",\n value: function setForm(form, flags) {\n var _this$_form$component,\n _this8 = this;\n var isFormAlreadySet = this._form && ((_this$_form$component = this._form.components) === null || _this$_form$component === void 0 ? void 0 : _this$_form$component.length);\n try {\n var _this$parent, _this$parent$componen;\n // Do not set the form again if it has been already set\n if (isFormAlreadySet && JSON.stringify(this._form) === JSON.stringify(form)) {\n return _nativePromiseOnly[\"default\"].resolve();\n }\n\n // Create the form.\n this._form = flags !== null && flags !== void 0 && flags.keepAsReference ? form : _lodash[\"default\"].cloneDeep(form);\n if (this.onSetForm) {\n this.onSetForm(_lodash[\"default\"].cloneDeep(this._form), form);\n }\n if ((_this$parent = this.parent) !== null && _this$parent !== void 0 && (_this$parent$componen = _this$parent.component) !== null && _this$parent$componen !== void 0 && _this$parent$componen.modalEdit) {\n return _nativePromiseOnly[\"default\"].resolve();\n }\n } catch (err) {\n console.warn(err);\n // If provided form is not a valid JSON object, do not set it too\n return _nativePromiseOnly[\"default\"].resolve();\n }\n\n // Allow the form to provide component overrides.\n if (form && form.settings && form.settings.components) {\n this.options.components = form.settings.components;\n }\n if (form && form.properties) {\n this.options.properties = form.properties;\n }\n if ('schema' in form && (0, _compareVersions[\"default\"])(form.schema, '1.x') > 0) {\n this.ready.then(function () {\n _this8.setAlert('alert alert-danger', 'Form schema is for a newer version, please upgrade your renderer. Some functionality may not work.');\n });\n }\n\n // See if they pass a module, and evaluate it if so.\n if (form && form.module) {\n var formModule = null;\n if (typeof form.module === 'string') {\n try {\n formModule = this.evaluate(\"return \".concat(form.module));\n } catch (err) {\n console.warn(err);\n }\n } else {\n formModule = form.module;\n }\n if (formModule) {\n _Formio.GlobalFormio.use(formModule);\n\n // Since we got here after instantiation, we need to manually apply form options.\n if (formModule.options && formModule.options.form) {\n this.options = Object.assign(this.options, formModule.options.form);\n }\n }\n }\n this.initialized = false;\n var rebuild = this.rebuild() || _nativePromiseOnly[\"default\"].resolve();\n return rebuild.then(function () {\n _this8.emit('formLoad', form);\n _this8.triggerRecaptcha();\n // Make sure to trigger onChange after a render event occurs to speed up form rendering.\n setTimeout(function () {\n _this8.onChange(flags);\n _this8.formReadyResolve();\n }, 0);\n return _this8.formReady;\n });\n }\n\n /**\n * Gets the form object.\n *\n * @returns {Object} - The form JSON schema.\n */\n }, {\n key: \"form\",\n get: function get() {\n if (!this._form) {\n this._form = {\n components: []\n };\n }\n return this._form;\n }\n\n /**\n * Sets the form value.\n *\n * @alias setForm\n * @param {Object} form - The form schema object.\n */,\n set: function set(form) {\n this.setForm(form);\n }\n\n /**\n * Returns the submission object that was set within this form.\n *\n * @returns {Object}\n */\n }, {\n key: \"submission\",\n get: function get() {\n return this.getValue();\n }\n\n /**\n * Sets the submission of a form.\n *\n * @example\n * import Webform from 'formiojs/Webform';\n * let form = new Webform(document.getElementById('formio'));\n * form.src = 'https://examples.form.io/example';\n * form.submission = {data: {\n * firstName: 'Joe',\n * lastName: 'Smith',\n * email: 'joe@example.com'\n * }};\n *\n * @param {Object} submission - The Form.io submission object.\n */,\n set: function set(submission) {\n this.setSubmission(submission);\n }\n\n /**\n * Sets a submission and returns the promise when it is ready.\n * @param submission\n * @param flags\n * @return {Promise.}\n */\n }, {\n key: \"setSubmission\",\n value: function setSubmission(submission) {\n var _this9 = this;\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n flags = _objectSpread(_objectSpread({}, flags), {}, {\n fromSubmission: _lodash[\"default\"].has(flags, 'fromSubmission') ? flags.fromSubmission : true\n });\n return this.onSubmission = this.formReady.then(function (resolveFlags) {\n if (resolveFlags) {\n flags = _objectSpread(_objectSpread({}, flags), resolveFlags);\n }\n _this9.submissionSet = true;\n _this9.triggerChange(flags);\n _this9.emit('beforeSetSubmission', submission);\n _this9.setValue(submission, flags);\n return _this9.submissionReadyResolve(submission);\n }, function (err) {\n return _this9.submissionReadyReject(err);\n })[\"catch\"](function (err) {\n return _this9.submissionReadyReject(err);\n });\n }\n\n /**\n * Saves a submission draft.\n */\n }, {\n key: \"saveDraft\",\n value: function saveDraft() {\n var _this10 = this;\n if (!this.draftEnabled) {\n return;\n }\n if (!this.formio) {\n console.warn(this.t('saveDraftInstanceError'));\n return;\n }\n if (!_Formio.GlobalFormio.getUser()) {\n console.warn(this.t('saveDraftAuthError'));\n return;\n }\n var draft = (0, _utils.fastCloneDeep)(this.submission);\n draft.state = 'draft';\n if (!this.savingDraft) {\n this.emit('saveDraftBegin');\n this.savingDraft = true;\n this.formio.saveSubmission(draft).then(function (sub) {\n // Set id to submission to avoid creating new draft submission\n _this10.submission._id = sub._id;\n _this10.savingDraft = false;\n _this10.emit('saveDraft', sub);\n });\n }\n }\n\n /**\n * Restores a draft submission based on the user who is authenticated.\n *\n * @param {userId} - The user id where we need to restore the draft from.\n */\n }, {\n key: \"restoreDraft\",\n value: function restoreDraft(userId) {\n var _this11 = this;\n if (!this.formio) {\n console.warn(this.t('restoreDraftInstanceError'));\n return;\n }\n this.savingDraft = true;\n this.formio.loadSubmissions({\n params: {\n state: 'draft',\n owner: userId\n }\n }).then(function (submissions) {\n if (submissions.length > 0 && !_this11.options.skipDraftRestore) {\n var draft = (0, _utils.fastCloneDeep)(submissions[0]);\n return _this11.setSubmission(draft).then(function () {\n _this11.draftEnabled = true;\n _this11.savingDraft = false;\n _this11.emit('restoreDraft', draft);\n });\n }\n // Enable drafts so that we can keep track of changes.\n _this11.draftEnabled = true;\n _this11.savingDraft = false;\n _this11.emit('restoreDraft', null);\n });\n }\n }, {\n key: \"schema\",\n get: function get() {\n var schema = (0, _utils.fastCloneDeep)(_lodash[\"default\"].omit(this._form, ['components']));\n schema.components = [];\n this.eachComponent(function (component) {\n return schema.components.push(component.schema);\n });\n return schema;\n }\n }, {\n key: \"mergeData\",\n value: function mergeData(_this, _that) {\n _lodash[\"default\"].mergeWith(_this, _that, function (thisValue, thatValue) {\n if (Array.isArray(thisValue) && Array.isArray(thatValue) && thisValue.length !== thatValue.length) {\n return thatValue;\n }\n });\n }\n }, {\n key: \"setValue\",\n value: function setValue(submission) {\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n if (!submission || !submission.data) {\n submission = {\n data: {}\n };\n }\n // Metadata needs to be available before setValue\n this._submission.metadata = submission.metadata || {};\n this.editing = !!submission._id;\n\n // Set the timezone in the options if available.\n if (!this.options.submissionTimezone && submission.metadata && submission.metadata.timezone) {\n this.options.submissionTimezone = submission.metadata.timezone;\n }\n var changed = _get(_getPrototypeOf(Webform.prototype), \"setValue\", this).call(this, submission.data, flags);\n if (!flags.sanitize) {\n this.mergeData(this.data, submission.data);\n }\n submission.data = this.data;\n this._submission = submission;\n return changed;\n }\n }, {\n key: \"getValue\",\n value: function getValue() {\n if (!this._submission.data) {\n this._submission.data = {};\n }\n if (this.viewOnly) {\n return this._submission;\n }\n var submission = this._submission;\n submission.data = this.data;\n return this._submission;\n }\n\n /**\n * Build the form.\n */\n }, {\n key: \"init\",\n value: function init() {\n var _this12 = this;\n this._submission = this._submission || {\n data: {}\n };\n\n // Remove any existing components.\n if (this.components && this.components.length) {\n this.destroyComponents();\n this.components = [];\n }\n if (this.component) {\n this.component.components = this.form ? this.form.components : [];\n } else {\n this.component = this.form;\n }\n this.component.type = 'form';\n this.component.input = false;\n this.addComponents();\n this.on('submitButton', function (options) {\n _this12.submit(false, options)[\"catch\"](function (e) {\n return e !== false && console.log(e);\n });\n }, true);\n this.on('checkValidity', function (data) {\n return _this12.checkValidity(data, true, data);\n }, true);\n this.on('requestUrl', function (args) {\n return _this12.submitUrl(args.url, args.headers);\n }, true);\n this.on('resetForm', function () {\n return _this12.resetValue();\n }, true);\n this.on('deleteSubmission', function () {\n return _this12.deleteSubmission();\n }, true);\n this.on('refreshData', function () {\n return _this12.updateValue();\n }, true);\n this.executeFormController();\n return this.formReady;\n }\n }, {\n key: \"executeFormController\",\n value: function executeFormController() {\n var _this13 = this;\n // If no controller value or\n // hidden and set to clearOnHide (Don't calculate a value for a hidden field set to clear when hidden)\n if (!this.form || !this.form.controller || (!this.visible || this.component.hidden) && this.component.clearOnHide && !this.rootPristine) {\n return false;\n }\n this.formReady.then(function () {\n _this13.evaluate(_this13.form.controller, {\n components: _this13.components,\n instance: _this13\n });\n });\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n var deleteFromGlobal = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n this.off('submitButton');\n this.off('checkValidity');\n this.off('requestUrl');\n this.off('resetForm');\n this.off('deleteSubmission');\n this.off('refreshData');\n if (deleteFromGlobal) {\n this.emit('formDelete', this.id);\n delete _Formio.GlobalFormio.forms[this.id];\n }\n return _get(_getPrototypeOf(Webform.prototype), \"destroy\", this).call(this);\n }\n }, {\n key: \"build\",\n value: function build(element) {\n var _this14 = this;\n if (element || this.element) {\n return this.ready.then(function () {\n element = element || _this14.element;\n _get(_getPrototypeOf(Webform.prototype), \"build\", _this14).call(_this14, element);\n });\n }\n return this.ready;\n }\n }, {\n key: \"getClassName\",\n value: function getClassName() {\n var classes = 'formio-form';\n if (this.options.readOnly) {\n classes += ' formio-read-only';\n }\n return classes;\n }\n }, {\n key: \"render\",\n value: function render() {\n return _get(_getPrototypeOf(Webform.prototype), \"render\", this).call(this, this.renderTemplate('webform', {\n classes: this.getClassName(),\n children: this.renderComponents()\n }), this.builderMode ? 'builder' : 'form', true);\n }\n }, {\n key: \"redraw\",\n value: function redraw() {\n // Don't bother if we have not built yet.\n if (!this.element) {\n return _nativePromiseOnly[\"default\"].resolve();\n }\n this.clear();\n this.setContent(this.element, this.render());\n return this.attach(this.element);\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n var _this15 = this;\n this.element = element;\n this.loadRefs(element, {\n webform: 'single'\n });\n var childPromise = this.attachComponents(this.refs.webform);\n this.addEventListener(document, 'keydown', this.executeShortcuts);\n this.currentForm = this;\n this.hook('attachWebform', element, this);\n return childPromise.then(function () {\n _this15.emit('render', _this15.element);\n return _this15.setValue(_this15._submission, {\n noUpdateEvent: true\n });\n });\n }\n }, {\n key: \"hasRequiredFields\",\n value: function hasRequiredFields() {\n var result = false;\n (0, _formUtils.eachComponent)(this.form.components, function (component) {\n if (component.validate.required) {\n result = true;\n return true;\n }\n }, true);\n return result;\n }\n }, {\n key: \"resetValue\",\n value: function resetValue() {\n _lodash[\"default\"].each(this.getComponents(), function (comp) {\n return comp.resetValue();\n });\n this.setPristine(true);\n this.onChange();\n }\n\n /**\n * Sets a new alert to display in the error dialog of the form.\n *\n * @param {string} type - The type of alert to display. \"danger\", \"success\", \"warning\", etc.\n * @param {string} message - The message to show in the alert.\n * @param {Object} options\n */\n }, {\n key: \"setAlert\",\n value: function setAlert(type, message, options) {\n var _this16 = this;\n if (!type && this.submitted) {\n if (this.alert) {\n if (this.refs.errorRef && this.refs.errorRef.length) {\n this.refs.errorRef.forEach(function (el) {\n _this16.removeEventListener(el, 'click');\n _this16.removeEventListener(el, 'keypress');\n });\n }\n this.removeChild(this.alert);\n this.alert = null;\n }\n return;\n }\n if (this.options.noAlerts) {\n if (!message) {\n this.emit('error', false);\n }\n return;\n }\n if (this.alert) {\n try {\n if (this.refs.errorRef && this.refs.errorRef.length) {\n this.refs.errorRef.forEach(function (el) {\n _this16.removeEventListener(el, 'click');\n _this16.removeEventListener(el, 'keypress');\n });\n }\n this.removeChild(this.alert);\n this.alert = null;\n } catch (err) {\n // ignore\n }\n }\n if (message) {\n var attrs = {\n \"class\": options && options.classes || \"alert alert-\".concat(type),\n id: \"error-list-\".concat(this.id)\n };\n var templateOptions = {\n message: message instanceof HTMLElement ? message.outerHTML : message,\n attrs: attrs,\n type: type\n };\n this.alert = (0, _utils.convertStringToHTMLElement)(this.renderTemplate('alert', templateOptions), \"#\".concat(attrs.id));\n }\n if (!this.alert) {\n return;\n }\n this.loadRefs(this.alert, {\n errorRef: 'multiple'\n });\n if (this.refs.errorRef && this.refs.errorRef.length) {\n this.refs.errorRef.forEach(function (el) {\n _this16.addEventListener(el, 'click', function (e) {\n var key = e.currentTarget.dataset.componentKey;\n _this16.focusOnComponent(key);\n });\n _this16.addEventListener(el, 'keydown', function (e) {\n if (e.keyCode === 13) {\n e.preventDefault();\n var key = e.currentTarget.dataset.componentKey;\n _this16.focusOnComponent(key);\n }\n });\n });\n }\n this.prepend(this.alert);\n }\n\n /**\n * Focus on selected component.\n *\n * @param {string} key - The key of selected component.\n * @returns {*}\n */\n }, {\n key: \"focusOnComponent\",\n value: function focusOnComponent(key) {\n if (key) {\n var component = this.getComponent(key);\n if (component) {\n component.focus();\n }\n }\n }\n\n /**\n * Show the errors of this form within the alert dialog.\n *\n * @param {Object} error - An optional additional error to display along with the component errors.\n * @returns {*}\n */\n /* eslint-disable no-unused-vars */\n }, {\n key: \"showErrors\",\n value: function showErrors(error, triggerEvent, onChange) {\n var _this17 = this;\n this.loading = false;\n var errors = this.errors;\n if (error) {\n if (Array.isArray(error)) {\n errors = errors.concat(error);\n } else {\n errors.push(error);\n }\n } else {\n errors = _get(_getPrototypeOf(Webform.prototype), \"errors\", this);\n }\n errors = errors.concat(this.customErrors);\n errors = errors.concat(this.serverErrors || []);\n if (!errors.length) {\n this.setAlert(false);\n return;\n }\n\n // Mark any components as invalid if in a custom message.\n errors.forEach(function (err) {\n var _err$components = err.components,\n components = _err$components === void 0 ? [] : _err$components;\n if (err.component) {\n components.push(err.component);\n }\n if (err.path) {\n components.push(err.path);\n }\n components.forEach(function (path) {\n var originalPath = _this17._parentPath + (0, _utils.getStringFromComponentPath)(path);\n var component = _this17.getComponent(path, _lodash[\"default\"].identity, originalPath);\n if (err.fromServer) {\n if (component.serverErrors) {\n component.serverErrors.push(err);\n } else {\n component.serverErrors = [err];\n }\n }\n var components = _lodash[\"default\"].compact(Array.isArray(component) ? component : [component]);\n components.forEach(function (component) {\n return component.setCustomValidity(err.message, true);\n });\n });\n });\n var displayedErrors = [];\n errors.forEach(function (err) {\n if (err) {\n var createListItem = function createListItem(message, index) {\n var messageFromIndex = !_lodash[\"default\"].isUndefined(index) && err.messages && err.messages[index];\n var keyOrPath = messageFromIndex && messageFromIndex.formattedKeyOrPath || messageFromIndex.path || err.component && err.component.key || err.fromServer && err.path;\n var formattedKeyOrPath = keyOrPath ? (0, _utils.getStringFromComponentPath)(keyOrPath) : '';\n formattedKeyOrPath = _this17._parentPath + formattedKeyOrPath;\n if (typeof err !== 'string' && !err.formattedKeyOrPath) {\n err.formattedKeyOrPath = formattedKeyOrPath;\n }\n return {\n message: (0, _utils.unescapeHTML)(message),\n keyOrPath: formattedKeyOrPath\n };\n };\n err.messages = _lodash[\"default\"].uniqBy(err.messages, function (message) {\n return message.message;\n });\n if (err.messages && err.messages.length) {\n var component = err.component;\n err.messages.forEach(function (_ref, index) {\n var message = _ref.message,\n context = _ref.context,\n fromServer = _ref.fromServer;\n var text = context !== null && context !== void 0 && context.hasLabel || fromServer ? _this17.t('alertMessage', {\n message: _this17.t(message)\n }) : _this17.t('alertMessageWithLabel', {\n label: _this17.t(component.label),\n message: _this17.t(message)\n });\n displayedErrors.push(createListItem(text, index));\n });\n } else if (err) {\n var message = _lodash[\"default\"].isObject(err) ? _this17.t('alertMessage', {\n message: _this17.t(err.message || '')\n }) : _this17.t('alertMessage', {\n message: _this17.t(err)\n });\n displayedErrors.push(createListItem(message));\n }\n }\n });\n var errorsList = this.renderTemplate('errorsList', {\n errors: displayedErrors\n });\n this.root.setAlert('danger', errorsList);\n if (triggerEvent) {\n this.emit('error', errors);\n }\n return errors;\n }\n /* eslint-enable no-unused-vars */\n\n /**\n * Called when the submission has completed, or if the submission needs to be sent to an external library.\n *\n * @param {Object} submission - The submission object.\n * @param {boolean} saved - Whether or not this submission was saved to the server.\n * @returns {object} - The submission object.\n */\n }, {\n key: \"onSubmit\",\n value: function onSubmit(submission, saved) {\n var _this$triggerSaveDraf;\n this.loading = false;\n this.submitting = false;\n this.setPristine(true);\n // We want to return the submitted submission and setValue will mutate the submission so cloneDeep it here.\n this.setValue((0, _utils.fastCloneDeep)(submission), {\n noValidate: true,\n noCheck: true\n });\n this.setAlert('success', \"

\".concat(this.t('complete'), \"

\"));\n // Cancel triggered saveDraft to prevent overriding the submitted state\n if (this.draftEnabled && (_this$triggerSaveDraf = this.triggerSaveDraft) !== null && _this$triggerSaveDraf !== void 0 && _this$triggerSaveDraf.cancel) {\n this.triggerSaveDraft.cancel();\n }\n this.emit('submit', submission, saved);\n if (saved) {\n this.emit('submitDone', submission);\n }\n return submission;\n }\n }, {\n key: \"normalizeError\",\n value: function normalizeError(error) {\n if (error) {\n if (_typeof(error) === 'object' && 'details' in error) {\n error = error.details;\n }\n if (typeof error === 'string') {\n error = {\n message: error\n };\n }\n }\n return error;\n }\n\n /**\n * Called when an error occurs during the submission.\n *\n * @param {Object} error - The error that occured.\n */\n }, {\n key: \"onSubmissionError\",\n value: function onSubmissionError(error) {\n error = this.normalizeError(error);\n this.submitting = false;\n this.setPristine(false);\n this.emit('submitError', error);\n\n // Allow for silent cancellations (no error message, no submit button error state)\n if (error && error.silent) {\n this.emit('change', {\n isValid: true\n }, {\n silent: true\n });\n return false;\n }\n var errors;\n if (this.submitted) {\n errors = this.showErrors();\n } else {\n errors = this.showErrors(error, true);\n }\n if (this.root && this.root.alert) {\n this.scrollIntoView(this.root.alert);\n }\n return errors;\n }\n\n /**\n * Trigger the change event for this form.\n *\n * @param changed\n * @param flags\n */\n }, {\n key: \"onChange\",\n value: function onChange(flags, changed, modified, changes) {\n flags = flags || {};\n var isChangeEventEmitted = false;\n // For any change events, clear any custom errors for that component.\n if (changed && changed.component) {\n this.customErrors = this.customErrors.filter(function (err) {\n return err.component && err.component !== changed.component.key;\n });\n }\n _get(_getPrototypeOf(Webform.prototype), \"onChange\", this).call(this, flags, true);\n var value = _lodash[\"default\"].clone(this.submission);\n flags.changed = value.changed = changed;\n flags.changes = changes;\n if (modified && this.pristine) {\n this.pristine = false;\n }\n value.isValid = this.checkData(value.data, flags);\n this.loading = false;\n if (this.submitted) {\n this.showErrors();\n }\n\n // See if we need to save the draft of the form.\n if (modified && this.options.saveDraft) {\n this.triggerSaveDraft();\n }\n if (!flags || !flags.noEmit) {\n this.emit('change', value, flags, modified);\n isChangeEventEmitted = true;\n }\n\n // The form is initialized after the first change event occurs.\n if (isChangeEventEmitted && !this.initialized) {\n this.emit('initialized');\n this.initialized = true;\n }\n }\n }, {\n key: \"checkData\",\n value: function checkData(data) {\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var valid = _get(_getPrototypeOf(Webform.prototype), \"checkData\", this).call(this, data, flags);\n if ((_lodash[\"default\"].isEmpty(flags) || flags.noValidate) && this.submitted) {\n this.showErrors();\n }\n return valid;\n }\n\n /**\n * Send a delete request to the server.\n */\n }, {\n key: \"deleteSubmission\",\n value: function deleteSubmission() {\n var _this18 = this;\n return this.formio.deleteSubmission().then(function () {\n _this18.emit('submissionDeleted', _this18.submission);\n _this18.resetValue();\n });\n }\n\n /**\n * Cancels the submission.\n *\n * @alias reset\n */\n }, {\n key: \"cancel\",\n value: function cancel(noconfirm) {\n var shouldReset = this.hook('beforeCancel', true);\n if (shouldReset && (noconfirm || confirm(this.t('confirmCancel')))) {\n this.resetValue();\n return true;\n } else {\n this.emit('cancelSubmit');\n return false;\n }\n }\n }, {\n key: \"setMetadata\",\n value: function setMetadata(submission) {\n // Add in metadata about client submitting the form\n submission.metadata = submission.metadata || {};\n _lodash[\"default\"].defaults(submission.metadata, {\n timezone: _lodash[\"default\"].get(this, '_submission.metadata.timezone', (0, _utils.currentTimezone)()),\n offset: parseInt(_lodash[\"default\"].get(this, '_submission.metadata.offset', (0, _moment[\"default\"])().utcOffset()), 10),\n origin: document.location.origin,\n referrer: document.referrer,\n browserName: navigator.appName,\n userAgent: navigator.userAgent,\n pathName: window.location.pathname,\n onLine: navigator.onLine\n });\n }\n }, {\n key: \"submitForm\",\n value: function submitForm() {\n var _this19 = this;\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n this.clearServerErrors();\n return new _nativePromiseOnly[\"default\"](function (resolve, reject) {\n // Read-only forms should never submit.\n if (_this19.options.readOnly) {\n return resolve({\n submission: _this19.submission,\n saved: false\n });\n }\n var submission = (0, _utils.fastCloneDeep)(_this19.submission || {});\n _this19.setMetadata(submission);\n submission.state = options.state || 'submitted';\n var isDraft = submission.state === 'draft';\n _this19.hook('beforeSubmit', _objectSpread(_objectSpread({}, submission), {}, {\n component: options.component\n }), function (err, data) {\n if (err) {\n return reject(err);\n }\n submission._vnote = data && data._vnote ? data._vnote : '';\n if (!isDraft && !submission.data) {\n return reject('Invalid Submission');\n }\n if (!isDraft && !_this19.checkValidity(submission.data, true)) {\n return reject();\n }\n _this19.everyComponent(function (comp) {\n var persistent = comp.component.persistent;\n if (persistent === 'client-only') {\n _lodash[\"default\"].unset(submission.data, comp.path);\n }\n });\n _this19.hook('customValidation', _objectSpread(_objectSpread({}, submission), {}, {\n component: options.component\n }), function (err) {\n if (err) {\n // If string is returned, cast to object.\n if (typeof err === 'string') {\n err = {\n message: err\n };\n }\n\n // Ensure err is an array.\n err = Array.isArray(err) ? err : [err];\n\n // Set as custom errors.\n _this19.customErrors = err;\n return reject();\n }\n _this19.loading = true;\n\n // Use the form action to submit the form if available.\n if (_this19._form && _this19._form.action) {\n var method = submission.data._id && _this19._form.action.includes(submission.data._id) ? 'PUT' : 'POST';\n return _Formio.GlobalFormio.makeStaticRequest(_this19._form.action, method, submission, _this19.formio ? _this19.formio.options : {}).then(function (result) {\n return resolve({\n submission: result,\n saved: true\n });\n })[\"catch\"](function (error) {\n _this19.setServerErrors(error);\n return reject(error);\n });\n }\n var submitFormio = _this19.formio;\n if (_this19.nosubmit || !submitFormio) {\n return resolve({\n submission: submission,\n saved: false\n });\n }\n // If this is an actionUrl, then make sure to save the action and not the submission.\n var submitMethod = submitFormio.actionUrl ? 'saveAction' : 'saveSubmission';\n submitFormio[submitMethod](submission).then(function (result) {\n return resolve({\n submission: result,\n saved: true\n });\n })[\"catch\"](function (error) {\n _this19.setServerErrors(error);\n return reject(error);\n });\n });\n });\n });\n }\n }, {\n key: \"setServerErrors\",\n value: function setServerErrors(error) {\n if (error.details) {\n this.serverErrors = error.details.filter(function (err) {\n return err.level ? err.level === 'error' : err;\n }).map(function (err) {\n err.fromServer = true;\n return err;\n });\n } else if (typeof error === 'string') {\n this.serverErrors = [{\n fromServer: true,\n level: 'error',\n message: error\n }];\n }\n }\n }, {\n key: \"executeSubmit\",\n value: function executeSubmit(options) {\n var _this20 = this;\n this.submitted = true;\n this.submitting = true;\n return this.submitForm(options).then(function (_ref2) {\n var submission = _ref2.submission,\n saved = _ref2.saved;\n return _this20.onSubmit(submission, saved);\n }).then(function (results) {\n _this20.submissionInProcess = false;\n return results;\n })[\"catch\"](function (err) {\n _this20.submissionInProcess = false;\n return _nativePromiseOnly[\"default\"].reject(_this20.onSubmissionError(err));\n });\n }\n }, {\n key: \"clearServerErrors\",\n value: function clearServerErrors() {\n var _this$serverErrors,\n _this21 = this;\n (_this$serverErrors = this.serverErrors) === null || _this$serverErrors === void 0 ? void 0 : _this$serverErrors.forEach(function (error) {\n if (error.path) {\n var pathArray = (0, _utils.getArrayFromComponentPath)(error.path);\n var component = _this21.getComponent(pathArray, _lodash[\"default\"].identity, error.formattedKeyOrPath);\n if (component) {\n component.serverErrors = [];\n }\n }\n });\n this.serverErrors = [];\n }\n\n /**\n * Submits the form.\n *\n * @example\n * import Webform from 'formiojs/Webform';\n * let form = new Webform(document.getElementById('formio'));\n * form.src = 'https://examples.form.io/example';\n * form.submission = {data: {\n * firstName: 'Joe',\n * lastName: 'Smith',\n * email: 'joe@example.com'\n * }};\n * form.submit().then((submission) => {\n * console.log(submission);\n * });\n *\n * @param {boolean} before - If this submission occured from the before handlers.\n *\n * @returns {Promise} - A promise when the form is done submitting.\n */\n }, {\n key: \"submit\",\n value: function submit(before, options) {\n var _this22 = this;\n this.submissionInProcess = true;\n if (!before) {\n return this.beforeSubmit(options).then(function () {\n return _this22.executeSubmit(options);\n });\n } else {\n return this.executeSubmit(options);\n }\n }\n }, {\n key: \"submitUrl\",\n value: function submitUrl(URL, headers) {\n var _this23 = this;\n if (!URL) {\n return console.warn('Missing URL argument');\n }\n var submission = this.submission || {};\n var API_URL = URL;\n var settings = {\n method: 'POST',\n headers: {}\n };\n if (headers && headers.length > 0) {\n headers.map(function (e) {\n if (e.header !== '' && e.value !== '') {\n settings.headers[e.header] = _this23.interpolate(e.value, submission);\n }\n });\n }\n if (API_URL && settings) {\n _Formio.GlobalFormio.makeStaticRequest(API_URL, settings.method, submission, {\n headers: settings.headers\n }).then(function () {\n _this23.emit('requestDone');\n _this23.setAlert('success', '

Success

');\n })[\"catch\"](function (e) {\n _this23.showErrors(\"\".concat(e.statusText ? e.statusText : '', \" \").concat(e.status ? e.status : e));\n _this23.emit('error', \"\".concat(e.statusText ? e.statusText : '', \" \").concat(e.status ? e.status : e));\n console.error(\"\".concat(e.statusText ? e.statusText : '', \" \").concat(e.status ? e.status : e));\n _this23.setAlert('danger', \"

\".concat(e.statusText ? e.statusText : '', \" \").concat(e.status ? e.status : e, \"

\"));\n });\n } else {\n this.emit('error', 'You should add a URL to this button.');\n this.setAlert('warning', 'You should add a URL to this button.');\n return console.warn('You should add a URL to this button.');\n }\n }\n }, {\n key: \"triggerRecaptcha\",\n value: function triggerRecaptcha() {\n if (!this || !this.components) {\n return;\n }\n var recaptchaComponent = (0, _utils.searchComponents)(this.components, {\n 'component.type': 'recaptcha',\n 'component.eventType': 'formLoad'\n });\n if (recaptchaComponent.length > 0) {\n recaptchaComponent[0].verify(\"\".concat(this.form.name ? this.form.name : 'form', \"Load\"));\n }\n }\n }, {\n key: \"nosubmit\",\n get: function get() {\n return this._nosubmit || false;\n },\n set: function set(value) {\n this._nosubmit = !!value;\n this.emit('nosubmit', this._nosubmit);\n }\n }, {\n key: \"conditions\",\n get: function get() {\n var _this$schema$settings, _this$schema$settings2;\n return (_this$schema$settings = (_this$schema$settings2 = this.schema.settings) === null || _this$schema$settings2 === void 0 ? void 0 : _this$schema$settings2.conditions) !== null && _this$schema$settings !== void 0 ? _this$schema$settings : [];\n }\n }, {\n key: \"variables\",\n get: function get() {\n var _this$schema$settings3, _this$schema$settings4;\n return (_this$schema$settings3 = (_this$schema$settings4 = this.schema.settings) === null || _this$schema$settings4 === void 0 ? void 0 : _this$schema$settings4.variables) !== null && _this$schema$settings3 !== void 0 ? _this$schema$settings3 : [];\n }\n }]);\n return Webform;\n}(_NestedDataComponent2[\"default\"]);\nexports[\"default\"] = Webform;\nWebform.setBaseUrl = _Formio.GlobalFormio.setBaseUrl;\nWebform.setApiUrl = _Formio.GlobalFormio.setApiUrl;\nWebform.setAppUrl = _Formio.GlobalFormio.setAppUrl;\n\n//# sourceURL=webpack://Formio/./lib/Webform.js?"); /***/ }), @@ -114,7 +125,7 @@ eval("\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptors.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.sort.js */ \"./node_modules/core-js/modules/es.array.sort.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.includes.js */ \"./node_modules/core-js/modules/es.array.includes.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.includes.js */ \"./node_modules/core-js/modules/es.string.includes.js\");\n\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.slice.js */ \"./node_modules/core-js/modules/es.array.slice.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.match.js */ \"./node_modules/core-js/modules/es.string.match.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.join.js */ \"./node_modules/core-js/modules/es.array.join.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.from.js */ \"./node_modules/core-js/modules/es.array.from.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.find.js */ \"./node_modules/core-js/modules/es.array.find.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.find-index.js */ \"./node_modules/core-js/modules/es.array.find-index.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.splice.js */ \"./node_modules/core-js/modules/es.array.splice.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.map.js */ \"./node_modules/core-js/modules/es.map.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.starts-with.js */ \"./node_modules/core-js/modules/es.string.starts-with.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.flags.js */ \"./node_modules/core-js/modules/es.regexp.flags.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\nvar _Webform = _interopRequireDefault(__webpack_require__(/*! ./Webform */ \"./lib/Webform.js\"));\n\nvar _Component2 = _interopRequireDefault(__webpack_require__(/*! ./components/_classes/component/Component */ \"./lib/components/_classes/component/Component.js\"));\n\nvar _tippy = _interopRequireDefault(__webpack_require__(/*! tippy.js */ \"./node_modules/tippy.js/dist/tippy.esm.js\"));\n\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\n\nvar _Components = _interopRequireDefault(__webpack_require__(/*! ./components/Components */ \"./lib/components/Components.js\"));\n\nvar _Formio = __webpack_require__(/*! ./Formio */ \"./lib/Formio.js\");\n\nvar _utils = __webpack_require__(/*! ./utils/utils */ \"./lib/utils/utils.js\");\n\nvar _formUtils = __webpack_require__(/*! ./utils/formUtils */ \"./lib/utils/formUtils.js\");\n\nvar _builder = _interopRequireDefault(__webpack_require__(/*! ./utils/builder */ \"./lib/utils/builder.js\"));\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n__webpack_require__(/*! ./components/builder */ \"./lib/components/builder.js\");\n\nvar Templates = _Formio.GlobalFormio.Templates;\n\nif (!Templates) {\n Templates = (__webpack_require__(/*! ./templates/Templates */ \"./lib/templates/Templates.js\")[\"default\"]);\n}\n\nvar dragula;\n\nif (typeof window !== 'undefined') {\n // Import from \"dist\" because it would require and \"global\" would not be defined in Angular apps.\n dragula = __webpack_require__(/*! dragula/dist/dragula */ \"./node_modules/dragula/dist/dragula.js\");\n}\n\nvar WebformBuilder = /*#__PURE__*/function (_Component) {\n _inherits(WebformBuilder, _Component);\n\n var _super = _createSuper(WebformBuilder);\n\n // eslint-disable-next-line max-statements\n function WebformBuilder() {\n var _this;\n\n _classCallCheck(this, WebformBuilder);\n\n var element, options;\n\n if (arguments[0] instanceof HTMLElement || arguments[1]) {\n element = arguments[0];\n options = arguments[1];\n } else {\n options = arguments[0];\n } // Reset skipInit in case PDFBuilder has set it.\n\n\n options.skipInit = false;\n options.display = options.display || 'form';\n _this = _super.call(this, null, options);\n _this.element = element;\n _this.builderHeight = 0;\n _this.schemas = {};\n _this.repeatablePaths = [];\n _this.sideBarScroll = _lodash.default.get(_this.options, 'sideBarScroll', true);\n _this.sideBarScrollOffset = _lodash.default.get(_this.options, 'sideBarScrollOffset', 0);\n _this.dragDropEnabled = true; // Setup the builder options.\n\n _this.builder = _lodash.default.defaultsDeep({}, _this.options.builder, _this.defaultGroups); // Turn off if explicitely said to do so...\n\n _lodash.default.each(_this.defaultGroups, function (config, key) {\n if (config === false) {\n _this.builder[key] = false;\n }\n }); // Add the groups.\n\n\n _this.groups = {};\n _this.groupOrder = [];\n\n var _loop = function _loop(group) {\n if (_this.builder[group]) {\n _this.builder[group].key = group;\n _this.groups[group] = _this.builder[group];\n _this.groups[group].components = _this.groups[group].components || {};\n _this.groups[group].componentOrder = _this.groups[group].componentOrder || [];\n _this.groups[group].subgroups = Object.keys(_this.groups[group].groups || {}).map(function (groupKey) {\n _this.groups[group].groups[groupKey].componentOrder = Object.keys(_this.groups[group].groups[groupKey].components).map(function (key) {\n return key;\n });\n return _this.groups[group].groups[groupKey];\n });\n\n _this.groupOrder.push(_this.groups[group]);\n }\n };\n\n for (var group in _this.builder) {\n _loop(group);\n }\n\n _this.groupOrder = _this.groupOrder.filter(function (group) {\n return group && !group.ignore;\n }).sort(function (a, b) {\n return a.weight - b.weight;\n }).map(function (group) {\n return group.key;\n });\n\n for (var type in _Components.default.components) {\n var component = _Components.default.components[type];\n\n if (component.builderInfo && component.builderInfo.schema) {\n _this.schemas[type] = component.builderInfo.schema;\n component.type = type;\n var builderInfo = component.builderInfo;\n builderInfo.key = component.type;\n\n _this.addBuilderComponentInfo(builderInfo);\n }\n } // Filter out any extra components.\n // Add the components in each group.\n\n\n for (var _group in _this.groups) {\n var info = _this.groups[_group];\n\n for (var key in info.components) {\n var compKey = _group === 'resource' ? \"component-\".concat(key) : key;\n var comp = info.components[compKey];\n\n if (comp === true && _Components.default.components[key] && _Components.default.components[key].builderInfo) {\n comp = _Components.default.components[key].builderInfo;\n }\n\n if (comp && comp.schema) {\n _this.schemas[key] = comp.schema;\n info.components[compKey] = comp;\n info.components[compKey].key = key;\n } else {\n // Do not include this component in the components array.\n delete info.components[compKey];\n }\n } // Order the components.\n\n\n _this.orderComponents(info);\n }\n\n _this.options.hooks = _this.options.hooks || {};\n\n _this.options.hooks.renderComponent = function (html, _ref) {\n var _self$component;\n\n var component = _ref.component,\n self = _ref.self;\n\n if (self.type === 'form' && !self.key) {\n var template = _this.hook('renderComponentFormTemplate', html.replace('formio-component-form', '')); // The main webform shouldn't have this class as it adds extra styles.\n\n\n return template;\n }\n\n if (_this.options.disabled && _this.options.disabled.includes(self.key) || self.parent.noDragDrop) {\n return html;\n }\n\n return _this.renderTemplate('builderComponent', {\n html: html,\n disableBuilderActions: self === null || self === void 0 ? void 0 : (_self$component = self.component) === null || _self$component === void 0 ? void 0 : _self$component.disableBuilderActions,\n childComponent: component\n });\n };\n\n _this.options.hooks.renderComponents = function (html, _ref2) {\n var components = _ref2.components,\n self = _ref2.self;\n\n // if Datagrid and already has a component, don't make it droppable.\n if (self.type === 'datagrid' && components.length > 0 || self.noDragDrop) {\n return html;\n }\n\n if (!components || !components.length && !components.nodrop || self.type === 'form' && components.length <= 1 && (components.length === 0 || components[0].type === 'button')) {\n html = _this.renderTemplate('builderPlaceholder', {\n position: 0\n }) + html;\n }\n\n return _this.renderTemplate('builderComponents', {\n key: self.key,\n type: self.type,\n html: html\n });\n };\n\n _this.options.hooks.renderInput = function (html, _ref3) {\n var self = _ref3.self;\n\n if (self.type === 'hidden') {\n return html + self.name;\n }\n\n return html;\n };\n\n _this.options.hooks.renderLoading = function (html, _ref4) {\n var self = _ref4.self;\n\n if (self.type === 'form' && self.key) {\n return self.name;\n }\n\n return html;\n };\n\n _this.options.hooks.attachComponents = function (element, components, container, component) {\n // Don't attach if no element was found or component doesn't participate in drag'n'drop.\n if (!element) {\n return;\n }\n\n if (component.noDragDrop) {\n return element;\n } // Attach container and component to element for later reference.\n\n\n var containerElement = element.querySelector(\"[ref=\\\"\".concat(component.component.key, \"-container\\\"]\")) || element;\n containerElement.formioContainer = container;\n containerElement.formioComponent = component; // Add container to draggable list.\n\n if (_this.dragula && _this.allowDrop(element)) {\n _this.dragula.containers.push(containerElement);\n } // If this is an existing datagrid element, don't make it draggable.\n\n\n if ((component.type === 'datagrid' || component.type === 'datamap') && components.length > 0) {\n return element;\n } // Since we added a wrapper, need to return the original element so that we can find the components inside it.\n\n\n return element.children[0];\n };\n\n _this.options.hooks.attachDatagrid = function (element, component) {\n component.loadRefs(element, _defineProperty({}, \"\".concat(component.key, \"-container\"), 'single'));\n var dataGridContainer = component.refs[\"\".concat(component.key, \"-container\")];\n\n if (dataGridContainer) {\n component.attachComponents(dataGridContainer.parentNode, [], component.component.components);\n } // Need to set up horizontal rearrangement of fields.\n\n };\n\n _this.options.hooks.attachComponent = _this.attachComponent.bind(_assertThisInitialized(_this)); // Load resources tagged as 'builder'\n\n var query = {\n params: {\n type: 'resource',\n limit: 1000000,\n select: '_id,title,name,components'\n }\n };\n\n if (_this.options && _this.options.resourceTag) {\n query.params.tags = [_this.options.resourceTag];\n } else if (!_this.options || !_this.options.hasOwnProperty('resourceTag')) {\n query.params.tags = ['builder'];\n }\n\n var formio = new _Formio.GlobalFormio(_Formio.GlobalFormio.projectUrl);\n var isResourcesDisabled = _this.options.builder && _this.options.builder.resource === false;\n formio.loadProject().then(function (project) {\n if (project && (_lodash.default.get(project, 'settings.addConfigToForms', false) || _lodash.default.get(project, 'addConfigToForms', false))) {\n var config = project.config || {};\n _this.options.formConfig = config;\n var pathToFormConfig = 'webform._form.config';\n\n var webformConfig = _lodash.default.get(_assertThisInitialized(_this), pathToFormConfig);\n\n if (_this.webform && !webformConfig) {\n _lodash.default.set(_assertThisInitialized(_this), pathToFormConfig, config);\n }\n }\n }).catch(function (err) {\n console.warn(\"Could not load project settings: \".concat(err.message || err));\n });\n\n if (!formio.noProject && !isResourcesDisabled) {\n var resourceOptions = _this.options.builder && _this.options.builder.resource;\n formio.loadForms(query).then(function (resources) {\n if (resources.length) {\n _this.builder.resource = {\n title: resourceOptions ? resourceOptions.title : 'Existing Resource Fields',\n key: 'resource',\n weight: resourceOptions ? resourceOptions.weight : 50,\n subgroups: [],\n components: [],\n componentOrder: []\n };\n _this.groups.resource = {\n title: resourceOptions ? resourceOptions.title : 'Existing Resource Fields',\n key: 'resource',\n weight: resourceOptions ? resourceOptions.weight : 50,\n subgroups: [],\n components: [],\n componentOrder: []\n };\n\n if (!_this.groupOrder.includes('resource')) {\n _this.groupOrder.push('resource');\n }\n\n _this.addExistingResourceFields(resources);\n }\n });\n } // Notify components if they need to modify their render.\n\n\n _this.options.attachMode = 'builder';\n _this.webform = _this.webform || _this.createForm(_this.options);\n _this.pathComponentsMapping = {};\n _this.arrayDataComponentPaths = [];\n _this.nestedDataComponents = [];\n _this.arrayDataComponents = [];\n return _this;\n }\n\n _createClass(WebformBuilder, [{\n key: \"allowDrop\",\n value: function allowDrop() {\n return true;\n }\n }, {\n key: \"addExistingResourceFields\",\n value: function addExistingResourceFields(resources) {\n var _this2 = this;\n\n _lodash.default.each(resources, function (resource, index) {\n var resourceKey = \"resource-\".concat(resource.name);\n var subgroup = {\n key: resourceKey,\n title: resource.title,\n components: [],\n componentOrder: [],\n default: index === 0\n };\n (0, _formUtils.eachComponent)(resource.components, function (component) {\n if (component.type === 'button') return;\n if (_this2.options && _this2.options.resourceFilter && (!component.tags || component.tags.indexOf(_this2.options.resourceFilter) === -1)) return;\n var componentName = component.label;\n\n if (!componentName && component.key) {\n componentName = _lodash.default.upperFirst(component.key);\n }\n\n subgroup.componentOrder.push(\"component-\".concat(component.key));\n subgroup.components[\"component-\".concat(component.key)] = _lodash.default.merge((0, _utils.fastCloneDeep)(_Components.default.components[component.type] ? _Components.default.components[component.type].builderInfo : _Components.default.components['unknown'].builderInfo), {\n key: component.key,\n title: componentName,\n group: 'resource',\n subgroup: resourceKey\n }, {\n schema: _objectSpread(_objectSpread({}, component), {}, {\n label: component.label,\n key: component.key,\n lockKey: true,\n source: !_this2.options.noSource ? resource._id : undefined,\n isNew: true\n })\n });\n }, true);\n\n _this2.groups.resource.subgroups.push(subgroup);\n });\n\n this.triggerRedraw();\n }\n }, {\n key: \"attachTooltip\",\n value: function attachTooltip(component, title) {\n return (0, _tippy.default)(component, {\n allowHTML: true,\n trigger: 'mouseenter focus',\n placement: 'top',\n delay: [200, 0],\n zIndex: 10000,\n content: title\n });\n }\n }, {\n key: \"attachComponent\",\n value: function attachComponent(element, component) {\n var _this3 = this;\n\n // Add component to element for later reference.\n element.formioComponent = component;\n component.loadRefs(element, {\n removeComponent: 'single',\n editComponent: 'single',\n moveComponent: 'single',\n copyComponent: 'single',\n pasteComponent: 'single',\n editJson: 'single'\n });\n\n if (component.refs.copyComponent) {\n this.attachTooltip(component.refs.copyComponent, this.t('Copy'));\n component.addEventListener(component.refs.copyComponent, 'click', function () {\n return _this3.copyComponent(component);\n });\n }\n\n if (component.refs.pasteComponent) {\n var pasteToolTip = this.attachTooltip(component.refs.pasteComponent, this.t('Paste below'));\n component.addEventListener(component.refs.pasteComponent, 'click', function () {\n pasteToolTip.hide();\n\n _this3.pasteComponent(component);\n });\n }\n\n if (component.refs.moveComponent) {\n this.attachTooltip(component.refs.moveComponent, this.t('Move'));\n }\n\n var parent = this.getParentElement(element);\n\n if (component.refs.editComponent) {\n this.attachTooltip(component.refs.editComponent, this.t('Edit'));\n component.addEventListener(component.refs.editComponent, 'click', function () {\n return _this3.editComponent(component.schema, parent, false, false, component.component, {\n inDataGrid: component.isInDataGrid\n });\n });\n }\n\n if (component.refs.editJson) {\n this.attachTooltip(component.refs.editJson, this.t('Edit JSON'));\n component.addEventListener(component.refs.editJson, 'click', function () {\n return _this3.editComponent(component.schema, parent, false, true, component.component);\n });\n }\n\n if (component.refs.removeComponent) {\n this.attachTooltip(component.refs.removeComponent, this.t('Remove'));\n component.addEventListener(component.refs.removeComponent, 'click', function () {\n return _this3.removeComponent(component.schema, parent, component.component);\n });\n }\n\n return element;\n }\n }, {\n key: \"createForm\",\n value: function createForm(options) {\n this.webform = new _Webform.default(this.element, options);\n\n if (this.element) {\n this.loadRefs(this.element, {\n form: 'single'\n });\n\n if (this.refs.form) {\n this.webform.element = this.refs.form;\n }\n }\n\n return this.webform;\n }\n /**\n * Called when everything is ready.\n *\n * @returns {Promise} - Wait for webform to be ready.\n */\n\n }, {\n key: \"ready\",\n get: function get() {\n return this.webform.ready;\n }\n }, {\n key: \"defaultGroups\",\n get: function get() {\n return {\n basic: {\n title: 'Basic',\n weight: 0,\n default: true\n },\n advanced: {\n title: 'Advanced',\n weight: 10\n },\n layout: {\n title: 'Layout',\n weight: 20\n },\n data: {\n title: 'Data',\n weight: 30\n },\n premium: {\n title: 'Premium',\n weight: 40\n }\n };\n }\n }, {\n key: \"redraw\",\n value: function redraw() {\n return _Webform.default.prototype.redraw.call(this);\n }\n }, {\n key: \"form\",\n get: function get() {\n return this.webform.form;\n },\n set: function set(value) {\n this.setForm(value);\n }\n }, {\n key: \"schema\",\n get: function get() {\n return this.webform.schema;\n }\n }, {\n key: \"container\",\n get: function get() {\n return this.webform.form.components;\n }\n /**\n * When a component sets its api key, we need to check if it is unique within its namespace. Find the namespace root\n * so we can calculate this correctly.\n * @param component\n */\n\n }, {\n key: \"findNamespaceRoot\",\n value: function findNamespaceRoot(component) {\n var path = (0, _utils.getArrayFromComponentPath)(component.path); // First get the component with nested parents.\n\n var comp = this.webform.getComponent(path);\n comp = Array.isArray(comp) ? comp[0] : comp;\n var namespaceKey = this.recurseNamespace(comp); // If there is no key, it is the root form.\n\n if (!namespaceKey || this.form.key === namespaceKey) {\n return this.form.components;\n }\n\n var componentSchema = component.component; // If the current component is the namespace, we don't need to find it again.\n\n if (namespaceKey === component.key) {\n return [].concat(_toConsumableArray(componentSchema.components), [componentSchema]);\n } // Get the namespace component so we have the original object.\n\n\n var namespaceComponent = (0, _formUtils.getComponent)(this.form.components, namespaceKey, true);\n return namespaceComponent ? namespaceComponent.components : comp.components;\n }\n }, {\n key: \"recurseNamespace\",\n value: function recurseNamespace(component) {\n // If there is no parent, we are at the root level.\n if (!component) {\n return null;\n } // Some components are their own namespace.\n\n\n if (['address', 'container', 'datagrid', 'editgrid', 'dynamicWizard', 'tree'].includes(component.type) || component.tree || component.arrayTree) {\n return component.key;\n } // Anything else, keep going up.\n\n\n return this.recurseNamespace(component.parent);\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this4 = this;\n\n return this.renderTemplate('builder', {\n sidebar: this.renderTemplate('builderSidebar', {\n scrollEnabled: this.sideBarScroll,\n groupOrder: this.groupOrder,\n groupId: \"builder-sidebar-\".concat(this.id),\n groups: this.groupOrder.map(function (groupKey) {\n return _this4.renderTemplate('builderSidebarGroup', {\n group: _this4.groups[groupKey],\n groupKey: groupKey,\n groupId: \"builder-sidebar-\".concat(_this4.id),\n subgroups: _this4.groups[groupKey].subgroups.map(function (group) {\n return _this4.renderTemplate('builderSidebarGroup', {\n group: group,\n groupKey: group.key,\n groupId: \"group-container-\".concat(groupKey),\n subgroups: []\n });\n })\n });\n })\n }),\n form: this.webform.render()\n });\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n var _this5 = this;\n\n this.on('change', function (form) {\n _this5.populateRecaptchaSettings(form);\n });\n return _get(_getPrototypeOf(WebformBuilder.prototype), \"attach\", this).call(this, element).then(function () {\n _this5.loadRefs(element, {\n form: 'single',\n sidebar: 'single',\n 'sidebar-search': 'single',\n 'sidebar-groups': 'single',\n 'container': 'multiple',\n 'sidebar-anchor': 'multiple',\n 'sidebar-group': 'multiple',\n 'sidebar-container': 'multiple'\n });\n\n if (_this5.sideBarScroll && Templates.current.handleBuilderSidebarScroll) {\n Templates.current.handleBuilderSidebarScroll.call(_this5, _this5);\n } // Add the paste status in form\n\n\n if (typeof window !== 'undefined' && window.sessionStorage) {\n var data = window.sessionStorage.getItem('formio.clipboard');\n\n if (data) {\n _this5.addClass(_this5.refs.form, 'builder-paste-mode');\n }\n }\n\n if (!(0, _utils.bootstrapVersion)(_this5.options)) {\n // Initialize\n _this5.refs['sidebar-group'].forEach(function (group) {\n group.style.display = group.getAttribute('data-default') === 'true' ? 'inherit' : 'none';\n }); // Click event\n\n\n _this5.refs['sidebar-anchor'].forEach(function (anchor, index) {\n _this5.addEventListener(anchor, 'click', function () {\n var clickedParentId = anchor.getAttribute('data-parent').slice('#builder-sidebar-'.length);\n var clickedId = anchor.getAttribute('data-target').slice('#group-'.length);\n\n _this5.refs['sidebar-group'].forEach(function (group, groupIndex) {\n var openByDefault = group.getAttribute('data-default') === 'true';\n var groupId = group.getAttribute('id').slice('group-'.length);\n var groupParent = group.getAttribute('data-parent').slice('#builder-sidebar-'.length);\n group.style.display = openByDefault && groupParent === clickedId || groupId === clickedParentId || groupIndex === index ? 'inherit' : 'none';\n });\n }, true);\n });\n }\n\n _this5.addEventListener(_this5.refs['sidebar-search'], 'input', _lodash.default.debounce(function (e) {\n var searchString = e.target.value;\n\n _this5.searchFields(searchString);\n }, 300));\n\n if (_this5.dragDropEnabled) {\n _this5.initDragula();\n }\n\n if (_this5.refs.form) {\n return _this5.webform.attach(_this5.refs.form);\n }\n });\n }\n }, {\n key: \"searchFields\",\n value: function searchFields() {\n var _this6 = this;\n\n var searchString = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n var searchValue = searchString.toLowerCase();\n var sidebar = this.refs['sidebar'];\n var sidebarGroups = this.refs['sidebar-groups'];\n\n if (!sidebar || !sidebarGroups) {\n return;\n }\n\n var filterGroupBy = function filterGroupBy(group) {\n var searchValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n\n var result = _lodash.default.toPlainObject(group);\n\n var _result$subgroups = result.subgroups,\n subgroups = _result$subgroups === void 0 ? [] : _result$subgroups,\n components = result.components;\n var filteredComponents = [];\n\n for (var key in components) {\n var isMatchedToTitle = components[key].title.toLowerCase().match(searchValue);\n var isMatchedToKey = components[key].key.toLowerCase().match(searchValue);\n\n if (isMatchedToTitle || isMatchedToKey) {\n filteredComponents.push(components[key]);\n }\n }\n\n _this6.orderComponents(result, filteredComponents);\n\n if (searchValue) {\n result.default = true;\n }\n\n if (result.componentOrder.length || subgroups.length) {\n return result;\n }\n\n return null;\n };\n\n var filterGroupOrder = function filterGroupOrder(groupOrder, searchValue) {\n var result = _lodash.default.cloneDeep(groupOrder);\n\n return result.filter(function (key) {\n return filterGroupBy(_this6.groups[key], searchValue);\n });\n };\n\n var filterSubgroups = function filterSubgroups(groups, searchValue) {\n var result = _lodash.default.clone(groups);\n\n return result.map(function (subgroup) {\n return filterGroupBy(subgroup, searchValue);\n }).filter(function (subgroup) {\n return !_lodash.default.isNull(subgroup);\n });\n };\n\n var toTemplate = function toTemplate(groupKey) {\n return {\n group: filterGroupBy(_this6.groups[groupKey], searchValue),\n groupKey: groupKey,\n groupId: sidebar.id || sidebarGroups.id,\n subgroups: filterSubgroups(_this6.groups[groupKey].subgroups, searchValue).map(function (group) {\n return _this6.renderTemplate('builderSidebarGroup', {\n group: group,\n groupKey: group.key,\n groupId: \"group-container-\".concat(groupKey),\n subgroups: []\n });\n })\n };\n };\n\n sidebarGroups.innerHTML = filterGroupOrder(this.groupOrder, searchValue).map(function (groupKey) {\n return _this6.renderTemplate('builderSidebarGroup', toTemplate(groupKey));\n }).join('');\n this.loadRefs(this.element, {\n 'sidebar-groups': 'single',\n 'sidebar-anchor': 'multiple',\n 'sidebar-group': 'multiple',\n 'sidebar-container': 'multiple'\n });\n this.updateDragAndDrop();\n\n if (searchValue === '') {\n this.triggerRedraw();\n }\n }\n }, {\n key: \"orderComponents\",\n value: function orderComponents(groupInfo, foundComponents) {\n var components = foundComponents || groupInfo.components;\n var isResource = groupInfo.key.indexOf('resource-') === 0;\n\n if (components) {\n groupInfo.componentOrder = Object.keys(components).map(function (key) {\n return components[key];\n }).filter(function (component) {\n return component && !component.ignore && !component.ignoreForForm;\n }).sort(function (a, b) {\n return a.weight - b.weight;\n }).map(function (component) {\n return isResource ? \"component-\".concat(component.key) : component.key;\n });\n }\n }\n }, {\n key: \"updateDragAndDrop\",\n value: function updateDragAndDrop() {\n if (this.dragDropEnabled) {\n this.initDragula();\n }\n\n if (this.refs.form) {\n return this.webform.attach(this.refs.form);\n }\n }\n }, {\n key: \"initDragula\",\n value: function initDragula() {\n var _this7 = this;\n\n var options = this.options;\n\n if (this.dragula) {\n this.dragula.destroy();\n }\n\n var containersArray = Array.prototype.slice.call(this.refs['sidebar-container']).filter(function (item) {\n return item.id !== 'group-container-resource';\n });\n\n if (!dragula) {\n return;\n }\n\n this.dragula = dragula(containersArray, {\n moves: function moves(el) {\n var moves = true;\n var list = Array.from(el.classList).filter(function (item) {\n return item.indexOf('formio-component-') === 0;\n });\n list.forEach(function (item) {\n var key = item.slice('formio-component-'.length);\n\n if (options.disabled && options.disabled.includes(key)) {\n moves = false;\n }\n });\n\n if (el.classList.contains('no-drag')) {\n moves = false;\n }\n\n return moves;\n },\n copy: function copy(el) {\n return el.classList.contains('drag-copy');\n },\n accepts: function accepts(el, target) {\n return !el.contains(target) && !target.classList.contains('no-drop');\n }\n }).on('drop', function (element, target, source, sibling) {\n return _this7.onDrop(element, target, source, sibling);\n });\n }\n }, {\n key: \"detach\",\n value: function detach() {\n if (this.dragula) {\n this.dragula.destroy();\n }\n\n this.dragula = null;\n\n if (this.sideBarScroll && Templates.current.clearBuilderSidebarScroll) {\n Templates.current.clearBuilderSidebarScroll.call(this, this);\n }\n\n _get(_getPrototypeOf(WebformBuilder.prototype), \"detach\", this).call(this);\n }\n }, {\n key: \"getComponentInfo\",\n value: function getComponentInfo(key, group) {\n var info; // This is a new component\n\n if (this.schemas.hasOwnProperty(key)) {\n info = (0, _utils.fastCloneDeep)(this.schemas[key]);\n } else if (this.groups.hasOwnProperty(group)) {\n var groupComponents = this.groups[group].components;\n\n if (groupComponents.hasOwnProperty(key)) {\n info = (0, _utils.fastCloneDeep)(groupComponents[key].schema);\n }\n } else if (group.slice(0, group.indexOf('-')) === 'resource') {\n // This is an existing resource field.\n var resourceGroups = this.groups.resource.subgroups;\n\n var resourceGroup = _lodash.default.find(resourceGroups, {\n key: group\n });\n\n if (resourceGroup && resourceGroup.components.hasOwnProperty(\"component-\".concat(key))) {\n info = (0, _utils.fastCloneDeep)(resourceGroup.components[\"component-\".concat(key)].schema);\n }\n } else if (group === 'searchFields') {\n //Search components go into this group\n var _resourceGroups = this.groups.resource.subgroups;\n\n for (var ix = 0; ix < _resourceGroups.length; ix++) {\n var _resourceGroup = _resourceGroups[ix];\n\n if (_resourceGroup.components.hasOwnProperty(\"component-\".concat(key))) {\n info = (0, _utils.fastCloneDeep)(_resourceGroup.components[\"component-\".concat(key)].schema);\n break;\n }\n }\n }\n\n if (info) {\n info.key = this.generateKey(info);\n }\n\n return info;\n }\n }, {\n key: \"getComponentsPath\",\n value: function getComponentsPath(component, parent) {\n // Get path to the component in the parent component.\n var path = 'components';\n var columnIndex = 0;\n var tableRowIndex = 0;\n var tableColumnIndex = 0;\n var tabIndex = 0;\n\n switch (parent.type) {\n case 'table':\n tableRowIndex = _lodash.default.findIndex(parent.rows, function (row) {\n return row.some(function (column) {\n return column.components.some(function (comp) {\n return comp.key === component.key;\n });\n });\n });\n tableColumnIndex = _lodash.default.findIndex(parent.rows[tableRowIndex], function (column) {\n return column.components.some(function (comp) {\n return comp.key === component.key;\n });\n });\n path = \"rows[\".concat(tableRowIndex, \"][\").concat(tableColumnIndex, \"].components\");\n break;\n\n case 'columns':\n columnIndex = _lodash.default.findIndex(parent.columns, function (column) {\n return column.components.some(function (comp) {\n return comp.key === component.key;\n });\n });\n path = \"columns[\".concat(columnIndex, \"].components\");\n break;\n\n case 'tabs':\n tabIndex = _lodash.default.findIndex(parent.components, function (tab) {\n return tab.components.some(function (comp) {\n return comp.key === component.key;\n });\n });\n path = \"components[\".concat(tabIndex, \"].components\");\n break;\n }\n\n return path;\n }\n /* eslint-disable max-statements */\n\n }, {\n key: \"onDrop\",\n value: function onDrop(element, target, source, sibling) {\n var _this$groups$group,\n _this8 = this;\n\n if (!target) {\n return;\n } // If you try to drop within itself.\n\n\n if (element.contains(target)) {\n return;\n }\n\n var key = element.getAttribute('data-key');\n var type = element.getAttribute('data-type');\n var group = element.getAttribute('data-group');\n var info, isNew, path, index;\n\n if (key && group) {\n // This is a new component.\n info = this.getComponentInfo(key, group);\n\n if (!info && type) {\n info = this.getComponentInfo(type, group);\n }\n\n isNew = true;\n } else if (source.formioContainer) {\n index = _lodash.default.findIndex(source.formioContainer, {\n key: element.formioComponent.component.key\n });\n\n if (index !== -1) {\n // Grab and remove the component from the source container.\n info = source.formioContainer.splice(_lodash.default.findIndex(source.formioContainer, {\n key: element.formioComponent.component.key\n }), 1); // Since splice returns an array of one object, we need to destructure it.\n\n info = info[0];\n }\n } // If we haven't found the component, stop.\n\n\n if (!info) {\n return;\n } // Show an error if siblings are disabled for a component and such a component already exists.\n\n\n var compKey = group === 'resource' ? \"component-\".concat(key) : key;\n var draggableComponent = ((_this$groups$group = this.groups[group]) === null || _this$groups$group === void 0 ? void 0 : _this$groups$group.components[compKey]) || {};\n\n if (draggableComponent.disableSiblings) {\n var isCompAlreadyExists = false;\n (0, _formUtils.eachComponent)(this.webform.components, function (component) {\n if (component.type === draggableComponent.schema.type) {\n isCompAlreadyExists = true;\n return;\n }\n }, true);\n\n if (isCompAlreadyExists) {\n this.webform.redraw();\n this.webform.setAlert('danger', \"You cannot add more than one \".concat(draggableComponent.key, \" component to one page.\"));\n return;\n }\n }\n\n if (target !== source) {\n // Ensure the key remains unique in its new container.\n _builder.default.uniquify(this.findNamespaceRoot(target.formioComponent), info);\n }\n\n var parent = target.formioComponent; // Insert in the new container.\n\n if (target.formioContainer) {\n if (sibling) {\n if (!sibling.getAttribute('data-noattach')) {\n index = _lodash.default.findIndex(target.formioContainer, {\n key: _lodash.default.get(sibling, 'formioComponent.component.key')\n });\n index = index === -1 ? 0 : index;\n } else {\n index = sibling.getAttribute('data-position');\n }\n\n if (index !== -1) {\n target.formioContainer.splice(index, 0, info);\n }\n } else {\n target.formioContainer.push(info);\n }\n\n path = this.getComponentsPath(info, parent.component);\n index = _lodash.default.findIndex(_lodash.default.get(parent.schema, path), {\n key: info.key\n });\n\n if (index === -1) {\n index = 0;\n }\n }\n\n if (parent && parent.addChildComponent) {\n parent.addChildComponent(info, element, target, source, sibling);\n }\n\n var componentInDataGrid = parent.type === 'datagrid';\n\n if (isNew && !this.options.noNewEdit && !info.noNewEdit) {\n this.editComponent(info, target, isNew, null, null, {\n inDataGrid: componentInDataGrid\n });\n } // Only rebuild the parts needing to be rebuilt.\n\n\n var rebuild;\n\n if (target !== source) {\n if (source.formioContainer && source.contains(target)) {\n rebuild = source.formioComponent.rebuild();\n } else if (target.contains(source)) {\n rebuild = target.formioComponent.rebuild();\n } else {\n if (source.formioContainer) {\n rebuild = source.formioComponent.rebuild();\n }\n\n rebuild = target.formioComponent.rebuild();\n }\n } else {\n // If they are the same, only rebuild one.\n rebuild = target.formioComponent.rebuild();\n }\n\n if (!rebuild) {\n rebuild = _nativePromiseOnly.default.resolve();\n }\n\n return rebuild.then(function () {\n _this8.emit('addComponent', info, parent, path, index, isNew && !_this8.options.noNewEdit && !info.noNewEdit);\n\n if (!isNew || _this8.options.noNewEdit || info.noNewEdit) {\n _this8.emit('change', _this8.form);\n }\n });\n }\n }, {\n key: \"setForm\",\n value: function setForm(form) {\n var _this9 = this;\n\n if (!form.components) {\n form.components = [];\n }\n\n var isShowSubmitButton = !this.options.noDefaultSubmitButton && !form.components.length; // Ensure there is at least a submit button.\n\n if (isShowSubmitButton) {\n form.components.push({\n type: 'button',\n label: 'Submit',\n key: 'submit',\n size: 'md',\n block: false,\n action: 'submit',\n disableOnInvalid: true,\n theme: 'primary'\n });\n }\n\n if (this.webform) {\n var shouldRebuild = !this.webform.form.components || form.components.length !== this.webform.form.components.length;\n return this.webform.setForm(form, {\n keepAsReference: true\n }).then(function () {\n if (_this9.refs.form) {\n _this9.builderHeight = _this9.refs.form.offsetHeight;\n }\n\n if (!shouldRebuild) {\n return _this9.form;\n }\n\n return _this9.rebuild().then(function () {\n return _this9.form;\n });\n });\n }\n\n return _nativePromiseOnly.default.resolve(form);\n }\n }, {\n key: \"populateRecaptchaSettings\",\n value: function populateRecaptchaSettings(form) {\n //populate isEnabled for recaptcha form settings\n var isRecaptchaEnabled = false;\n\n if (this.form.components) {\n (0, _formUtils.eachComponent)(form.components, function (component) {\n if (isRecaptchaEnabled) {\n return;\n }\n\n if (component.type === 'recaptcha') {\n isRecaptchaEnabled = true;\n return false;\n }\n });\n\n if (isRecaptchaEnabled) {\n _lodash.default.set(form, 'settings.recaptcha.isEnabled', true);\n } else if (_lodash.default.get(form, 'settings.recaptcha.isEnabled')) {\n _lodash.default.set(form, 'settings.recaptcha.isEnabled', false);\n }\n }\n }\n }, {\n key: \"removeComponent\",\n value: function removeComponent(component, parent, original) {\n var _this10 = this;\n\n if (!parent) {\n return;\n }\n\n var remove = true;\n var removingComponentsGroup = !component.skipRemoveConfirm && (Array.isArray(component.components) && component.components.length || Array.isArray(component.rows) && component.rows.length || Array.isArray(component.columns) && component.columns.length);\n\n if (this.options.alwaysConfirmComponentRemoval || removingComponentsGroup) {\n var message = removingComponentsGroup ? 'Removing this component will also remove all of its children. Are you sure you want to do this?' : 'Are you sure you want to remove this component?';\n remove = window.confirm(this.t(message));\n }\n\n if (!original) {\n original = parent.formioContainer.find(function (comp) {\n return comp.id === component.id;\n });\n }\n\n var index = parent.formioContainer ? parent.formioContainer.indexOf(original) : 0;\n\n if (remove && index !== -1) {\n var path = this.getComponentsPath(component, parent.formioComponent.component);\n\n if (parent.formioContainer) {\n parent.formioContainer.splice(index, 1);\n } else if (parent.formioComponent && parent.formioComponent.removeChildComponent) {\n parent.formioComponent.removeChildComponent(component);\n }\n\n var rebuild = parent.formioComponent.rebuild() || _nativePromiseOnly.default.resolve();\n\n rebuild.then(function () {\n _this10.emit('removeComponent', component, parent.formioComponent.schema, path, index);\n\n _this10.emit('change', _this10.form);\n });\n }\n\n return remove;\n }\n }, {\n key: \"replaceDoubleQuotes\",\n value: function replaceDoubleQuotes(data) {\n var fieldsToRemoveDoubleQuotes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n\n if (data) {\n fieldsToRemoveDoubleQuotes.forEach(function (key) {\n if (data[key]) {\n data[key] = data[key].replace(/\"/g, \"'\");\n }\n });\n return data;\n }\n }\n }, {\n key: \"updateComponent\",\n value: function updateComponent(component, changed) {\n var _this11 = this;\n\n // Update the preview.\n if (this.preview) {\n this.preview.form = {\n components: [_lodash.default.omit(_objectSpread({}, component), ['hidden', 'conditional', 'calculateValue', 'logic', 'autofocus', 'customConditional'])],\n config: this.options.formConfig || {}\n };\n var fieldsToRemoveDoubleQuotes = ['label', 'tooltip', 'placeholder'];\n this.preview.form.components.forEach(function (component) {\n return _this11.replaceDoubleQuotes(component, fieldsToRemoveDoubleQuotes);\n });\n var previewElement = this.componentEdit.querySelector('[ref=\"preview\"]');\n\n if (previewElement) {\n this.setContent(previewElement, this.preview.render());\n this.preview.attach(previewElement);\n }\n } // Change the \"default value\" field to be reflective of this component.\n\n\n var defaultValueComponent = (0, _formUtils.getComponent)(this.editForm.components, 'defaultValue', true);\n\n if (defaultValueComponent && component.type !== 'hidden') {\n var defaultChanged = changed && (changed.component && changed.component.key === 'defaultValue' || changed.instance && defaultValueComponent.hasComponent && defaultValueComponent.hasComponent(changed.instance));\n\n if (!defaultChanged) {\n _lodash.default.assign(defaultValueComponent.component, _lodash.default.omit(_objectSpread({}, component), ['key', 'label', 'placeholder', 'tooltip', 'hidden', 'autofocus', 'validate', 'disabled', 'defaultValue', 'customDefaultValue', 'calculateValue', 'conditional', 'customConditional', 'id']));\n\n var parentComponent = defaultValueComponent.parent;\n var tabIndex = -1;\n var index = -1;\n parentComponent.tabs.some(function (tab, tIndex) {\n tab.some(function (comp, compIndex) {\n if (comp.id === defaultValueComponent.id) {\n tabIndex = tIndex;\n index = compIndex;\n return true;\n }\n\n return false;\n });\n });\n\n if (tabIndex !== -1 && index !== -1 && changed && changed.value) {\n var sibling = parentComponent.tabs[tabIndex][index + 1];\n parentComponent.removeComponent(defaultValueComponent);\n var newComp = parentComponent.addComponent(defaultValueComponent.component, defaultValueComponent.data, sibling);\n\n _lodash.default.pull(newComp.validators, 'required');\n\n parentComponent.tabs[tabIndex].splice(index, 1, newComp);\n\n newComp.checkValidity = function () {\n return true;\n };\n\n newComp.build(defaultValueComponent.element);\n }\n } else {\n var dataPath = changed.instance._data.key;\n var path = (0, _utils.getArrayFromComponentPath)(changed.instance.path);\n path.shift();\n\n if (path.length) {\n path.unshift(component.key);\n dataPath = (0, _utils.getStringFromComponentPath)(path);\n }\n\n _lodash.default.set(this.preview._data, dataPath, changed.value);\n\n _lodash.default.set(this.webform._data, dataPath, changed.value);\n }\n } // Called when we update a component.\n\n\n this.emit('updateComponent', component);\n }\n }, {\n key: \"findRepeatablePaths\",\n value: function findRepeatablePaths() {\n var repeatablePaths = [];\n var keys = new Map();\n (0, _formUtils.eachComponent)(this.form.components, function (comp, path) {\n if (!comp.key) {\n return;\n }\n\n if (keys.has(comp.key)) {\n if (keys.get(comp.key).includes(path)) {\n repeatablePaths.push(path);\n } else {\n keys.set(comp.key, [].concat(_toConsumableArray(keys.get(comp.key)), [path]));\n }\n } else {\n keys.set(comp.key, [path]);\n }\n }, true);\n return repeatablePaths;\n }\n }, {\n key: \"highlightInvalidComponents\",\n value: function highlightInvalidComponents() {\n var repeatablePaths = this.findRepeatablePaths();\n var hasInvalidComponents = false;\n this.webform.everyComponent(function (comp) {\n var _comp$error, _comp$error$message;\n\n var path = comp.path;\n\n if (repeatablePaths.includes(path)) {\n comp.setCustomValidity(\"API Key is not unique: \".concat(comp.key));\n hasInvalidComponents = true;\n } else if ((_comp$error = comp.error) !== null && _comp$error !== void 0 && (_comp$error$message = _comp$error.message) !== null && _comp$error$message !== void 0 && _comp$error$message.startsWith('API Key is not unique')) {\n comp.setCustomValidity('');\n }\n });\n this.emit('builderFormValidityChange', hasInvalidComponents);\n }\n /**\n * Called when a new component is saved.\n *\n * @param parent\n * @param component\n * @return {boolean}\n */\n\n }, {\n key: \"saveComponent\",\n value: function saveComponent(component, parent, isNew, original) {\n var _this12 = this;\n\n this.editForm.detach();\n var parentContainer = parent ? parent.formioContainer : this.container;\n var parentComponent = parent ? parent.formioComponent : this;\n this.dialog.close();\n var path = parentContainer ? this.getComponentsPath(component, parentComponent.component) : '';\n\n if (!original) {\n original = parent.formioContainer.find(function (comp) {\n return comp.id === component.id;\n });\n }\n\n var index = parentContainer ? parentContainer.indexOf(original) : 0;\n\n if (index !== -1) {\n var submissionData = this.editForm.submission.data;\n submissionData = submissionData.componentJson || submissionData;\n var fieldsToRemoveDoubleQuotes = ['label', 'tooltip', 'placeholder'];\n this.replaceDoubleQuotes(submissionData, fieldsToRemoveDoubleQuotes);\n this.hook('beforeSaveComponentSettings', submissionData);\n var comp = null;\n parentComponent.getComponents().forEach(function (component) {\n if (component.component.key === original.key) {\n comp = component;\n }\n });\n var originalComp = comp.component;\n var originalComponentSchema = comp.schema;\n var isParentSaveChildMethod = this.isParentSaveChildMethod(parent.formioComponent);\n\n if (parentContainer && !isParentSaveChildMethod) {\n parentContainer[index] = submissionData;\n\n if (comp) {\n comp.component = submissionData;\n }\n } else if (isParentSaveChildMethod) {\n parent.formioComponent.saveChildComponent(submissionData);\n }\n\n var rebuild = parentComponent.rebuild() || _nativePromiseOnly.default.resolve();\n\n return rebuild.then(function () {\n var schema = parentContainer ? parentContainer[index] : comp ? comp.schema : [];\n\n _this12.emitSaveComponentEvent(schema, originalComp, parentComponent.schema, path, index, isNew, originalComponentSchema);\n\n _this12.emit('change', _this12.form);\n\n _this12.highlightInvalidComponents();\n });\n }\n\n this.highlightInvalidComponents();\n return _nativePromiseOnly.default.resolve();\n }\n }, {\n key: \"emitSaveComponentEvent\",\n value: function emitSaveComponentEvent(schema, originalComp, parentComponentSchema, path, index, isNew, originalComponentSchema) {\n this.emit('saveComponent', schema, originalComp, parentComponentSchema, path, index, isNew, originalComponentSchema);\n }\n }, {\n key: \"editComponent\",\n value: function editComponent(component, parent, isNew, isJsonEdit, original) {\n var _this13 = this;\n\n var flags = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {};\n\n if (!component.key) {\n return;\n }\n\n var saved = false;\n var componentCopy = (0, _utils.fastCloneDeep)(component);\n var ComponentClass = _Components.default.components[componentCopy.type];\n var isCustom = ComponentClass === undefined;\n isJsonEdit = isJsonEdit || isCustom;\n ComponentClass = isCustom ? _Components.default.components.unknown : ComponentClass; // Make sure we only have one dialog open at a time.\n\n if (this.dialog) {\n this.dialog.close();\n this.highlightInvalidComponents();\n } // This is the render step.\n\n\n var editFormOptions = _lodash.default.clone(_lodash.default.get(this, 'options.editForm', {}));\n\n if (this.editForm) {\n this.editForm.destroy();\n } // Allow editForm overrides per component.\n\n\n var overrides = _lodash.default.get(this.options, \"editForm.\".concat(componentCopy.type), {}); // Pass along the form being edited.\n\n\n editFormOptions.editForm = this.form;\n editFormOptions.editComponent = component;\n editFormOptions.flags = flags;\n this.hook('editComponentParentInstance', editFormOptions, parent);\n this.editForm = new _Webform.default(_objectSpread(_objectSpread({}, _lodash.default.omit(this.options, ['hooks', 'builder', 'events', 'attachMode', 'skipInit'])), {}, {\n language: this.options.language\n }, editFormOptions));\n this.hook('editFormProperties', parent);\n this.editForm.form = isJsonEdit && !isCustom ? {\n components: [{\n type: 'textarea',\n as: 'json',\n editor: 'ace',\n weight: 10,\n input: true,\n key: 'componentJson',\n label: 'Component JSON',\n tooltip: 'Edit the JSON for this component.'\n }, {\n type: 'checkbox',\n key: 'showFullSchema',\n label: 'Full Schema'\n }]\n } : ComponentClass.editForm(_lodash.default.cloneDeep(overrides));\n var instanceOptions = {};\n this.hook('instanceOptionsPreview', instanceOptions);\n var instance = new ComponentClass(componentCopy, instanceOptions);\n var schema = this.hook('builderComponentSchema', component, instance);\n this.editForm.submission = isJsonEdit ? {\n data: {\n componentJson: schema,\n showFullSchema: this.options.showFullJsonSchema\n }\n } : {\n data: instance.component\n };\n\n if (this.preview) {\n this.preview.destroy();\n }\n\n if (!ComponentClass.builderInfo.hasOwnProperty('preview') || ComponentClass.builderInfo.preview) {\n this.preview = new _Webform.default(_lodash.default.omit(_objectSpread(_objectSpread({}, this.options), {}, {\n preview: true\n }), ['hooks', 'builder', 'events', 'attachMode', 'calculateValue']));\n this.hook('previewFormSettitngs', schema, isJsonEdit);\n }\n\n this.componentEdit = this.ce('div', {\n 'class': 'component-edit-container'\n });\n this.setContent(this.componentEdit, this.renderTemplate('builderEditForm', {\n componentInfo: ComponentClass.builderInfo,\n editForm: this.editForm.render(),\n preview: this.preview ? this.preview.render() : false,\n helplinks: this.helplinks\n }));\n this.dialog = this.createModal(this.componentEdit, _lodash.default.get(this.options, 'dialogAttr', {})); // This is the attach step.\n\n this.editForm.attach(this.componentEdit.querySelector('[ref=\"editForm\"]'));\n this.hook('editFormWrapper');\n this.updateComponent(componentCopy);\n this.editForm.on('change', function (event) {\n if (event.changed) {\n if (event.changed.component && event.changed.component.key === 'showFullSchema') {\n var value = event.changed.value;\n _this13.editForm.submission = {\n data: {\n componentJson: value ? instance.component : component,\n showFullSchema: value\n }\n };\n return;\n } // See if this is a manually modified key. Treat custom component keys as manually modified\n\n\n if (event.changed.component && event.changed.component.key === 'key' || isJsonEdit) {\n componentCopy.keyModified = true;\n }\n\n var isComponentLabelChanged = false;\n\n if (event.changed.instance) {\n isComponentLabelChanged = ['label', 'title'].includes(event.changed.instance.path);\n } else if (event.changed.component) {\n isComponentLabelChanged = ['label', 'title'].includes(event.changed.component.key);\n }\n\n if (isComponentLabelChanged) {\n // Ensure this component has a key.\n if (isNew) {\n if (!event.data.keyModified) {\n _this13.editForm.everyComponent(function (component) {\n if (component.key === 'key' && component.parent.component.key === 'tabs') {\n component.setValue(_this13.updateComponentKey(event.data));\n return false;\n }\n });\n }\n\n if (_this13.form) {\n var formComponents = _this13.findNamespaceRoot(parent.formioComponent); // excluding component which key uniqueness is to be checked to prevent the comparing of the same keys\n\n\n formComponents = formComponents.filter(function (comp) {\n return editFormOptions.editComponent.id !== comp.id;\n }); // Set a unique key for this component.\n\n _builder.default.uniquify(formComponents, event.data);\n }\n }\n } // Update the component.\n\n\n _this13.updateComponent(event.data.componentJson || event.data, event.changed);\n }\n });\n var cancelButtons = this.componentEdit.querySelectorAll('[ref=\"cancelButton\"]');\n cancelButtons.forEach(function (cancelButton) {\n _this13.addEventListener(cancelButton, 'click', function (event) {\n event.preventDefault();\n\n _this13.editForm.detach();\n\n _this13.emit('cancelComponent', component);\n\n _this13.dialog.close();\n\n _this13.highlightInvalidComponents();\n });\n });\n var removeButtons = this.componentEdit.querySelectorAll('[ref=\"removeButton\"]');\n removeButtons.forEach(function (removeButton) {\n _this13.addEventListener(removeButton, 'click', function (event) {\n event.preventDefault(); // Since we are already removing the component, don't trigger another remove.\n\n saved = true;\n\n _this13.editForm.detach();\n\n _this13.removeComponent(component, parent, original);\n\n _this13.dialog.close();\n\n _this13.highlightInvalidComponents();\n });\n });\n var saveButtons = this.componentEdit.querySelectorAll('[ref=\"saveButton\"]');\n saveButtons.forEach(function (saveButton) {\n _this13.addEventListener(saveButton, 'click', function (event) {\n event.preventDefault();\n\n if (!_this13.editForm.checkValidity(_this13.editForm.data, true, _this13.editForm.data)) {\n _this13.editForm.setPristine(false);\n\n _this13.editForm.showErrors();\n\n return false;\n }\n\n saved = true;\n\n _this13.saveComponent(component, parent, isNew, original);\n });\n });\n\n var dialogClose = function dialogClose() {\n _this13.editForm.destroy(true);\n\n if (_this13.preview) {\n _this13.preview.destroy(true);\n\n _this13.preview = null;\n }\n\n if (isNew && !saved) {\n _this13.removeComponent(component, parent, original);\n\n _this13.highlightInvalidComponents();\n } // Clean up.\n\n\n _this13.removeEventListener(_this13.dialog, 'close', dialogClose);\n\n _this13.dialog = null;\n };\n\n this.addEventListener(this.dialog, 'close', dialogClose); // Called when we edit a component.\n\n this.emit('editComponent', component);\n }\n }, {\n key: \"updateComponentKey\",\n value: function updateComponentKey(data) {\n return _lodash.default.camelCase(data.title || data.label || data.placeholder || data.type).replace(/^[0-9]*/, '');\n }\n /**\n * Creates copy of component schema and stores it under sessionStorage.\n * @param {Component} component\n * @return {*}\n */\n\n }, {\n key: \"copyComponent\",\n value: function copyComponent(component) {\n if (!window.sessionStorage) {\n return console.warn('Session storage is not supported in this browser.');\n }\n\n this.addClass(this.refs.form, 'builder-paste-mode');\n window.sessionStorage.setItem('formio.clipboard', JSON.stringify(component.schema));\n }\n /**\n * Paste copied component after the current component.\n * @param {Component} component\n * @return {*}\n */\n\n }, {\n key: \"pasteComponent\",\n value: function pasteComponent(component) {\n if (!window.sessionStorage) {\n return console.warn('Session storage is not supported in this browser.');\n }\n\n this.removeClass(this.refs.form, 'builder-paste-mode');\n\n if (window.sessionStorage) {\n var data = window.sessionStorage.getItem('formio.clipboard');\n\n if (data) {\n var schema = JSON.parse(data);\n var parent = this.getParentElement(component.element);\n\n if (parent) {\n _builder.default.uniquify(this.findNamespaceRoot(parent.formioComponent), schema);\n\n var path = '';\n var index = 0;\n var isParentSaveChildMethod = this.isParentSaveChildMethod(parent.formioComponent);\n\n if (parent.formioContainer && !isParentSaveChildMethod) {\n index = parent.formioContainer.indexOf(component.component);\n path = this.getComponentsPath(schema, parent.formioComponent.component);\n parent.formioContainer.splice(index + 1, 0, schema);\n } else if (isParentSaveChildMethod) {\n parent.formioComponent.saveChildComponent(schema, false);\n }\n\n parent.formioComponent.rebuild();\n this.emitSaveComponentEvent(schema, schema, parent.formioComponent.component, path, index + 1, true, schema);\n }\n\n this.emit('change', this.form);\n }\n }\n }\n }, {\n key: \"isParentSaveChildMethod\",\n value: function isParentSaveChildMethod(parentComp) {\n return !!(parentComp && parentComp.saveChildComponent);\n }\n }, {\n key: \"getParentElement\",\n value: function getParentElement(element) {\n var container = element;\n\n do {\n container = container.parentNode;\n } while (container && !container.formioComponent);\n\n return container;\n }\n }, {\n key: \"addBuilderComponentInfo\",\n value: function addBuilderComponentInfo(component) {\n if (!component || !component.group || !this.groups[component.group]) {\n return;\n }\n\n component = _lodash.default.clone(component);\n var groupInfo = this.groups[component.group];\n\n if (!groupInfo.components.hasOwnProperty(component.key)) {\n groupInfo.components[component.key] = component;\n }\n\n return component;\n }\n }, {\n key: \"init\",\n value: function init() {\n if (this.webform) {\n this.webform.init();\n }\n\n return _get(_getPrototypeOf(WebformBuilder.prototype), \"init\", this).call(this);\n }\n }, {\n key: \"clear\",\n value: function clear() {\n if (this.webform.initialized) {\n this.webform.clear();\n }\n }\n }, {\n key: \"destroy\",\n value: function destroy(deleteFromGlobal) {\n if (this.webform.initialized) {\n this.webform.destroy(deleteFromGlobal);\n }\n\n _get(_getPrototypeOf(WebformBuilder.prototype), \"destroy\", this).call(this, deleteFromGlobal);\n }\n }, {\n key: \"addBuilderGroup\",\n value: function addBuilderGroup(name, group) {\n if (!this.groups[name]) {\n this.groups[name] = group;\n this.groupOrder.push(name);\n this.triggerRedraw();\n } else {\n this.updateBuilderGroup(name, group);\n }\n }\n }, {\n key: \"updateBuilderGroup\",\n value: function updateBuilderGroup(name, group) {\n if (this.groups[name]) {\n this.groups[name] = group;\n this.triggerRedraw();\n }\n }\n }, {\n key: \"generateKey\",\n value: function generateKey(info) {\n return _lodash.default.camelCase(info.key || info.title || info.label || info.placeholder || info.type);\n }\n }]);\n\n return WebformBuilder;\n}(_Component2.default);\n\nexports[\"default\"] = WebformBuilder;\n\n//# sourceURL=webpack://Formio/./lib/WebformBuilder.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptors.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-properties.js */ \"./node_modules/core-js/modules/es.object.define-properties.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n__webpack_require__(/*! core-js/modules/es.array.sort.js */ \"./node_modules/core-js/modules/es.array.sort.js\");\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n__webpack_require__(/*! core-js/modules/es.array.includes.js */ \"./node_modules/core-js/modules/es.array.includes.js\");\n__webpack_require__(/*! core-js/modules/es.string.includes.js */ \"./node_modules/core-js/modules/es.string.includes.js\");\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n__webpack_require__(/*! core-js/modules/es.array.index-of.js */ \"./node_modules/core-js/modules/es.array.index-of.js\");\n__webpack_require__(/*! core-js/modules/es.array.is-array.js */ \"./node_modules/core-js/modules/es.array.is-array.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.array.slice.js */ \"./node_modules/core-js/modules/es.array.slice.js\");\n__webpack_require__(/*! core-js/modules/es.string.match.js */ \"./node_modules/core-js/modules/es.string.match.js\");\n__webpack_require__(/*! core-js/modules/es.array.join.js */ \"./node_modules/core-js/modules/es.array.join.js\");\n__webpack_require__(/*! core-js/modules/es.array.from.js */ \"./node_modules/core-js/modules/es.array.from.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.find.js */ \"./node_modules/core-js/modules/es.array.find.js\");\n__webpack_require__(/*! core-js/modules/es.array.find-index.js */ \"./node_modules/core-js/modules/es.array.find-index.js\");\n__webpack_require__(/*! core-js/modules/es.array.some.js */ \"./node_modules/core-js/modules/es.array.some.js\");\n__webpack_require__(/*! core-js/modules/es.array.splice.js */ \"./node_modules/core-js/modules/es.array.splice.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.map.js */ \"./node_modules/core-js/modules/es.map.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.starts-with.js */ \"./node_modules/core-js/modules/es.string.starts-with.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.flags.js */ \"./node_modules/core-js/modules/es.regexp.flags.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\nvar _Webform = _interopRequireDefault(__webpack_require__(/*! ./Webform */ \"./lib/Webform.js\"));\nvar _Component2 = _interopRequireDefault(__webpack_require__(/*! ./components/_classes/component/Component */ \"./lib/components/_classes/component/Component.js\"));\nvar _tippy = _interopRequireDefault(__webpack_require__(/*! tippy.js */ \"./node_modules/tippy.js/dist/tippy.esm.js\"));\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\nvar _Components = _interopRequireDefault(__webpack_require__(/*! ./components/Components */ \"./lib/components/Components.js\"));\nvar _Formio = __webpack_require__(/*! ./Formio */ \"./lib/Formio.js\");\nvar _utils = __webpack_require__(/*! ./utils/utils */ \"./lib/utils/utils.js\");\nvar _formUtils = __webpack_require__(/*! ./utils/formUtils */ \"./lib/utils/formUtils.js\");\nvar _builder = _interopRequireDefault(__webpack_require__(/*! ./utils/builder */ \"./lib/utils/builder.js\"));\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nvar _domAutoscroller = _interopRequireDefault(__webpack_require__(/*! dom-autoscroller */ \"./node_modules/dom-autoscroller/dist/bundle.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\n__webpack_require__(/*! ./components/builder */ \"./lib/components/builder.js\");\nvar Templates = _Formio.GlobalFormio.Templates;\nif (!Templates) {\n Templates = (__webpack_require__(/*! ./templates/Templates */ \"./lib/templates/Templates.js\")[\"default\"]);\n}\nvar dragula;\nif (typeof window !== 'undefined') {\n // Import from \"dist\" because it would require and \"global\" would not be defined in Angular apps.\n dragula = __webpack_require__(/*! dragula/dist/dragula */ \"./node_modules/dragula/dist/dragula.js\");\n}\nvar WebformBuilder = /*#__PURE__*/function (_Component) {\n _inherits(WebformBuilder, _Component);\n var _super = _createSuper(WebformBuilder);\n // eslint-disable-next-line max-statements\n function WebformBuilder() {\n var _this;\n _classCallCheck(this, WebformBuilder);\n var element, options;\n if (arguments[0] instanceof HTMLElement || arguments[1]) {\n element = arguments[0];\n options = arguments[1];\n } else {\n options = arguments[0];\n }\n // Reset skipInit in case PDFBuilder has set it.\n options.skipInit = false;\n options.display = options.display || 'form';\n _this = _super.call(this, null, options);\n _defineProperty(_assertThisInitialized(_this), \"moveHandler\", function (e) {\n e.stopPropagation();\n e.preventDefault();\n if (e.keyCode === 38) {\n _this.updateComponentPlacement(true);\n }\n if (e.keyCode === 40) {\n _this.updateComponentPlacement(false);\n }\n if (e.keyCode === 13) {\n _this.stopMoving(_this.selectedElement);\n }\n });\n _this.element = element;\n _this.builderHeight = 0;\n _this.schemas = {};\n _this.repeatablePaths = [];\n _this.sideBarScroll = _lodash[\"default\"].get(_this.options, 'sideBarScroll', true);\n _this.sideBarScrollOffset = _lodash[\"default\"].get(_this.options, 'sideBarScrollOffset', 0);\n _this.dragDropEnabled = true;\n\n // Setup the builder options.\n _this.builder = _lodash[\"default\"].defaultsDeep({}, _this.options.builder, _this.defaultGroups);\n\n // Turn off if explicitely said to do so...\n _lodash[\"default\"].each(_this.defaultGroups, function (config, key) {\n if (config === false) {\n _this.builder[key] = false;\n }\n });\n\n // Add the groups.////\n _this.groups = {};\n _this.groupOrder = [];\n var _loop = function _loop(group) {\n if (_this.builder[group]) {\n _this.builder[group].key = group;\n _this.groups[group] = _this.builder[group];\n _this.groups[group].components = _this.groups[group].components || {};\n _this.groups[group].componentOrder = _this.groups[group].componentOrder || [];\n _this.groups[group].subgroups = Object.keys(_this.groups[group].groups || {}).map(function (groupKey) {\n _this.groups[group].groups[groupKey].componentOrder = Object.keys(_this.groups[group].groups[groupKey].components).map(function (key) {\n return key;\n });\n return _this.groups[group].groups[groupKey];\n });\n _this.groupOrder.push(_this.groups[group]);\n }\n };\n for (var group in _this.builder) {\n _loop(group);\n }\n _this.groupOrder = _this.groupOrder.filter(function (group) {\n return group && !group.ignore;\n }).sort(function (a, b) {\n return a.weight - b.weight;\n }).map(function (group) {\n return group.key;\n });\n for (var type in _Components[\"default\"].components) {\n var component = _Components[\"default\"].components[type];\n if (component.builderInfo && component.builderInfo.schema) {\n _this.schemas[type] = component.builderInfo.schema;\n component.type = type;\n var builderInfo = component.builderInfo;\n builderInfo.key = component.type;\n _this.addBuilderComponentInfo(builderInfo);\n }\n }\n\n // Filter out any extra components.\n // Add the components in each group.\n for (var _group in _this.groups) {\n var info = _this.groups[_group];\n for (var key in info.components) {\n var compKey = _group === 'resource' ? \"component-\".concat(key) : key;\n var comp = info.components[compKey];\n if (comp === true && _Components[\"default\"].components[key] && _Components[\"default\"].components[key].builderInfo) {\n comp = _Components[\"default\"].components[key].builderInfo;\n }\n if (comp && comp.schema) {\n _this.schemas[key] = comp.schema;\n info.components[compKey] = comp;\n info.components[compKey].key = key;\n } else {\n // Do not include this component in the components array.\n delete info.components[compKey];\n }\n }\n\n // Order the components.\n _this.orderComponents(info);\n }\n _this.options.hooks = _this.options.hooks || {};\n _this.options.hooks.renderComponent = function (html, _ref) {\n var _self$component;\n var component = _ref.component,\n self = _ref.self;\n if (self.type === 'form' && !self.key) {\n var template = _this.hook('renderComponentFormTemplate', html.replace('formio-component-form', ''));\n // The main webform shouldn't have this class as it adds extra styles.\n return template;\n }\n if (_this.options.disabled && _this.options.disabled.includes(self.key) || self.parent.noDragDrop) {\n return html;\n }\n return _this.renderTemplate('builderComponent', {\n html: html,\n disableBuilderActions: self === null || self === void 0 ? void 0 : (_self$component = self.component) === null || _self$component === void 0 ? void 0 : _self$component.disableBuilderActions,\n childComponent: component\n });\n };\n _this.options.hooks.renderComponents = function (html, _ref2) {\n var components = _ref2.components,\n self = _ref2.self;\n // if Datagrid and already has a component, don't make it droppable.\n if (self.type === 'datagrid' && components.length > 0 || self.noDragDrop) {\n return html;\n }\n if (!components || !components.length && !components.nodrop || self.type === 'form' && components.length <= 1 && (components.length === 0 || components[0].type === 'button')) {\n html = _this.renderTemplate('builderPlaceholder', {\n position: 0\n }) + html;\n }\n return _this.renderTemplate('builderComponents', {\n key: self.key,\n type: self.type,\n html: html\n });\n };\n _this.options.hooks.renderInput = function (html, _ref3) {\n var self = _ref3.self;\n if (self.type === 'hidden') {\n return html + self.name;\n }\n return html;\n };\n _this.options.hooks.renderLoading = function (html, _ref4) {\n var self = _ref4.self;\n if (self.type === 'form' && self.key) {\n return self.name;\n }\n return html;\n };\n _this.options.hooks.attachComponents = function (element, components, container, component) {\n // Don't attach if no element was found or component doesn't participate in drag'n'drop.\n if (!element) {\n return;\n }\n if (component.noDragDrop) {\n return element;\n }\n // Attach container and component to element for later reference.\n var containerElement = element.querySelector(\"[ref=\\\"\".concat(component.component.key, \"-container\\\"]\")) || element;\n containerElement.formioContainer = container;\n containerElement.formioComponent = component;\n\n // Add container to draggable list.\n if (_this.dragula && _this.allowDrop(element)) {\n _this.dragula.containers.push(containerElement);\n }\n\n // If this is an existing datagrid element, don't make it draggable.\n if ((component.type === 'datagrid' || component.type === 'datamap') && components.length > 0) {\n return element;\n }\n\n // Since we added a wrapper, need to return the original element so that we can find the components inside it.\n return element.children[0];\n };\n _this.options.hooks.attachDatagrid = function (element, component) {\n component.loadRefs(element, _defineProperty({}, \"\".concat(component.key, \"-container\"), 'single'));\n var dataGridContainer = component.refs[\"\".concat(component.key, \"-container\")];\n if (dataGridContainer) {\n component.attachComponents(dataGridContainer.parentNode, [], component.component.components);\n }\n // Need to set up horizontal rearrangement of fields.\n };\n\n _this.options.hooks.attachComponent = _this.attachComponent.bind(_assertThisInitialized(_this));\n\n // Load resources tagged as 'builder'\n var query = {\n params: {\n type: 'resource',\n limit: 1000000,\n select: '_id,title,name,components'\n }\n };\n if (_this.options && _this.options.resourceTag) {\n query.params.tags = [_this.options.resourceTag];\n } else if (!_this.options || !_this.options.hasOwnProperty('resourceTag')) {\n query.params.tags = ['builder'];\n }\n var formio = new _Formio.GlobalFormio(_Formio.GlobalFormio.projectUrl);\n var isResourcesDisabled = _this.options.builder && _this.options.builder.resource === false;\n formio.loadProject().then(function (project) {\n if (project && (_lodash[\"default\"].get(project, 'settings.addConfigToForms', false) || _lodash[\"default\"].get(project, 'addConfigToForms', false))) {\n var config = project.config || {};\n _this.options.formConfig = config;\n var pathToFormConfig = 'webform._form.config';\n var webformConfig = _lodash[\"default\"].get(_assertThisInitialized(_this), pathToFormConfig);\n if (_this.webform && !webformConfig) {\n _lodash[\"default\"].set(_assertThisInitialized(_this), pathToFormConfig, config);\n }\n }\n })[\"catch\"](function (err) {\n console.warn(\"Could not load project settings: \".concat(err.message || err));\n });\n if (!formio.noProject && !isResourcesDisabled) {\n var resourceOptions = _this.options.builder && _this.options.builder.resource;\n formio.loadForms(query).then(function (resources) {\n if (resources.length) {\n _this.builder.resource = {\n title: resourceOptions ? resourceOptions.title : 'Existing Resource Fields',\n key: 'resource',\n weight: resourceOptions ? resourceOptions.weight : 50,\n subgroups: [],\n components: [],\n componentOrder: []\n };\n _this.groups.resource = {\n title: resourceOptions ? resourceOptions.title : 'Existing Resource Fields',\n key: 'resource',\n weight: resourceOptions ? resourceOptions.weight : 50,\n subgroups: [],\n components: [],\n componentOrder: []\n };\n if (!_this.groupOrder.includes('resource')) {\n _this.groupOrder.push('resource');\n }\n _this.addExistingResourceFields(resources);\n }\n });\n }\n\n // Notify components if they need to modify their render.\n _this.options.attachMode = 'builder';\n _this.webform = _this.webform || _this.createForm(_this.options);\n _this.pathComponentsMapping = {};\n _this.arrayDataComponentPaths = [];\n _this.nestedDataComponents = [];\n _this.arrayDataComponents = [];\n return _this;\n }\n _createClass(WebformBuilder, [{\n key: \"allowDrop\",\n value: function allowDrop() {\n return true;\n }\n }, {\n key: \"addExistingResourceFields\",\n value: function addExistingResourceFields(resources) {\n var _this2 = this;\n _lodash[\"default\"].each(resources, function (resource, index) {\n var resourceKey = \"resource-\".concat(resource.name);\n var subgroup = {\n key: resourceKey,\n title: resource.title,\n components: [],\n componentOrder: [],\n \"default\": index === 0\n };\n (0, _formUtils.eachComponent)(resource.components, function (component) {\n if (component.type === 'button') return;\n if (_this2.options && _this2.options.resourceFilter && (!component.tags || component.tags.indexOf(_this2.options.resourceFilter) === -1)) return;\n var componentName = component.label;\n if (!componentName && component.key) {\n componentName = _lodash[\"default\"].upperFirst(component.key);\n }\n subgroup.componentOrder.push(\"component-\".concat(component.key));\n subgroup.components[\"component-\".concat(component.key)] = _lodash[\"default\"].merge((0, _utils.fastCloneDeep)(_Components[\"default\"].components[component.type] ? _Components[\"default\"].components[component.type].builderInfo : _Components[\"default\"].components['unknown'].builderInfo), {\n key: component.key,\n title: componentName,\n group: 'resource',\n subgroup: resourceKey\n }, {\n schema: _objectSpread(_objectSpread({}, component), {}, {\n label: component.label,\n key: component.key,\n lockKey: true,\n source: !_this2.options.noSource ? resource._id : undefined,\n isNew: true\n })\n });\n }, true);\n _this2.groups.resource.subgroups.push(subgroup);\n });\n this.triggerRedraw();\n }\n }, {\n key: \"attachTooltip\",\n value: function attachTooltip(component, title) {\n return (0, _tippy[\"default\"])(component, {\n allowHTML: true,\n trigger: 'mouseenter focus',\n placement: 'top',\n delay: [200, 0],\n zIndex: 10000,\n content: title\n });\n }\n }, {\n key: \"attachComponent\",\n value: function attachComponent(element, component) {\n var _this3 = this;\n // Add component to element for later reference.\n element.formioComponent = component;\n component.loadRefs(element, {\n removeComponent: 'single',\n editComponent: 'single',\n moveComponent: 'single',\n copyComponent: 'single',\n pasteComponent: 'single',\n editJson: 'single'\n });\n if (component.refs.copyComponent) {\n this.attachTooltip(component.refs.copyComponent, this.t('Copy'));\n component.addEventListener(component.refs.copyComponent, 'click', function () {\n return _this3.copyComponent(component);\n });\n }\n if (component.refs.pasteComponent) {\n var pasteToolTip = this.attachTooltip(component.refs.pasteComponent, this.t('Paste below'));\n component.addEventListener(component.refs.pasteComponent, 'click', function () {\n pasteToolTip.hide();\n _this3.pasteComponent(component);\n });\n }\n if (component.refs.moveComponent) {\n this.attachTooltip(component.refs.moveComponent, this.t('Move'));\n if (this.keyboardActionsEnabled) {\n component.addEventListener(component.refs.moveComponent, 'click', function () {\n _this3.moveComponent(component);\n });\n }\n }\n var parent = this.getParentElement(element);\n if (component.refs.editComponent) {\n this.attachTooltip(component.refs.editComponent, this.t('Edit'));\n component.addEventListener(component.refs.editComponent, 'click', function () {\n return _this3.editComponent(component.schema, parent, false, false, component.component, {\n inDataGrid: component.isInDataGrid\n });\n });\n }\n if (component.refs.editJson) {\n this.attachTooltip(component.refs.editJson, this.t('Edit JSON'));\n component.addEventListener(component.refs.editJson, 'click', function () {\n return _this3.editComponent(component.schema, parent, false, true, component.component);\n });\n }\n if (component.refs.removeComponent) {\n this.attachTooltip(component.refs.removeComponent, this.t('Remove'));\n component.addEventListener(component.refs.removeComponent, 'click', function () {\n return _this3.removeComponent(component.schema, parent, component.component);\n });\n }\n return element;\n }\n }, {\n key: \"createForm\",\n value: function createForm(options) {\n this.webform = new _Webform[\"default\"](this.element, options);\n if (this.element) {\n this.loadRefs(this.element, {\n form: 'single'\n });\n if (this.refs.form) {\n this.webform.element = this.refs.form;\n }\n }\n return this.webform;\n }\n\n /**\n * Called when everything is ready.\n *\n * @returns {Promise} - Wait for webform to be ready.\n */\n }, {\n key: \"ready\",\n get: function get() {\n return this.webform.ready;\n }\n }, {\n key: \"defaultGroups\",\n get: function get() {\n return {\n basic: {\n title: 'Basic',\n weight: 0,\n \"default\": true\n },\n advanced: {\n title: 'Advanced',\n weight: 10\n },\n layout: {\n title: 'Layout',\n weight: 20\n },\n data: {\n title: 'Data',\n weight: 30\n },\n premium: {\n title: 'Premium',\n weight: 40\n }\n };\n }\n }, {\n key: \"redraw\",\n value: function redraw() {\n return _Webform[\"default\"].prototype.redraw.call(this);\n }\n }, {\n key: \"form\",\n get: function get() {\n return this.webform.form;\n },\n set: function set(value) {\n this.setForm(value);\n }\n }, {\n key: \"schema\",\n get: function get() {\n return this.webform.schema;\n }\n }, {\n key: \"container\",\n get: function get() {\n return this.webform.form.components;\n }\n\n /**\n * When a component sets its api key, we need to check if it is unique within its namespace. Find the namespace root\n * so we can calculate this correctly.\n * @param component\n */\n }, {\n key: \"findNamespaceRoot\",\n value: function findNamespaceRoot(component) {\n var path = (0, _utils.getArrayFromComponentPath)(component.path);\n // First get the component with nested parents.\n var comp = this.webform.getComponent(path);\n comp = Array.isArray(comp) ? comp[0] : comp;\n var namespaceKey = this.recurseNamespace(comp);\n\n // If there is no key, it is the root form.\n if (!namespaceKey || this.form.key === namespaceKey) {\n return this.form.components;\n }\n var componentSchema = component.component;\n // If the current component is the namespace, we don't need to find it again.\n if (namespaceKey === component.key) {\n return [].concat(_toConsumableArray(componentSchema.components), [componentSchema]);\n }\n\n // Get the namespace component so we have the original object.\n var namespaceComponent = (0, _formUtils.getComponent)(this.form.components, namespaceKey, true);\n return namespaceComponent ? namespaceComponent.components : comp.components;\n }\n }, {\n key: \"recurseNamespace\",\n value: function recurseNamespace(component) {\n // If there is no parent, we are at the root level.\n if (!component) {\n return null;\n }\n\n // Some components are their own namespace.\n if (['address', 'container', 'datagrid', 'editgrid', 'dynamicWizard', 'tree'].includes(component.type) || component.tree || component.arrayTree) {\n return component.key;\n }\n\n // Anything else, keep going up.\n return this.recurseNamespace(component.parent);\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this4 = this;\n return this.renderTemplate('builder', {\n sidebar: this.renderTemplate('builderSidebar', {\n scrollEnabled: this.sideBarScroll,\n groupOrder: this.groupOrder,\n groupId: \"builder-sidebar-\".concat(this.id),\n groups: this.groupOrder.map(function (groupKey) {\n return _this4.renderTemplate('builderSidebarGroup', {\n group: _this4.groups[groupKey],\n groupKey: groupKey,\n groupId: \"builder-sidebar-\".concat(_this4.id),\n subgroups: _this4.groups[groupKey].subgroups.map(function (group) {\n return _this4.renderTemplate('builderSidebarGroup', {\n group: group,\n groupKey: group.key,\n groupId: \"group-container-\".concat(groupKey),\n subgroups: []\n });\n }),\n keyboardActionsEnabled: _this4.keyboardActionsEnabled\n });\n })\n }),\n form: this.webform.render()\n });\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n var _this5 = this;\n this.on('change', function (form) {\n _this5.populateRecaptchaSettings(form);\n });\n return _get(_getPrototypeOf(WebformBuilder.prototype), \"attach\", this).call(this, element).then(function () {\n _this5.loadRefs(element, {\n form: 'single',\n sidebar: 'single',\n 'sidebar-search': 'single',\n 'sidebar-groups': 'single',\n 'container': 'multiple',\n 'sidebar-anchor': 'multiple',\n 'sidebar-group': 'multiple',\n 'sidebar-container': 'multiple',\n 'sidebar-component': 'multiple'\n });\n if (_this5.sideBarScroll && Templates.current.handleBuilderSidebarScroll) {\n Templates.current.handleBuilderSidebarScroll.call(_this5, _this5);\n }\n\n // Add the paste status in form\n if (typeof window !== 'undefined' && window.sessionStorage) {\n var data = window.sessionStorage.getItem('formio.clipboard');\n if (data) {\n _this5.addClass(_this5.refs.form, 'builder-paste-mode');\n }\n }\n if (!(0, _utils.bootstrapVersion)(_this5.options)) {\n // Initialize\n _this5.refs['sidebar-group'].forEach(function (group) {\n group.style.display = group.getAttribute('data-default') === 'true' ? 'inherit' : 'none';\n });\n\n // Click event\n _this5.refs['sidebar-anchor'].forEach(function (anchor, index) {\n _this5.addEventListener(anchor, 'click', function () {\n var clickedParentId = anchor.getAttribute('data-parent').slice('#builder-sidebar-'.length);\n var clickedId = anchor.getAttribute('data-target').slice('#group-'.length);\n _this5.refs['sidebar-group'].forEach(function (group, groupIndex) {\n var openByDefault = group.getAttribute('data-default') === 'true';\n var groupId = group.getAttribute('id').slice('group-'.length);\n var groupParent = group.getAttribute('data-parent').slice('#builder-sidebar-'.length);\n group.style.display = openByDefault && groupParent === clickedId || groupId === clickedParentId || groupIndex === index ? 'inherit' : 'none';\n });\n }, true);\n });\n }\n if (_this5.keyboardActionsEnabled) {\n _this5.refs['sidebar-component'].forEach(function (component) {\n _this5.addEventListener(component, 'keydown', function (event) {\n if (event.keyCode === 13) {\n _this5.addNewComponent(component);\n }\n });\n });\n }\n _this5.addEventListener(_this5.refs['sidebar-search'], 'input', _lodash[\"default\"].debounce(function (e) {\n var searchString = e.target.value;\n _this5.searchFields(searchString);\n }, 300));\n if (_this5.dragDropEnabled) {\n _this5.initDragula();\n }\n var drake = _this5.dragula;\n if (_this5.refs.form) {\n (0, _domAutoscroller[\"default\"])([window], {\n margin: 20,\n maxSpeed: 6,\n scrollWhenOutside: true,\n autoScroll: function autoScroll() {\n return this.down && (drake === null || drake === void 0 ? void 0 : drake.dragging);\n }\n });\n return _this5.webform.attach(_this5.refs.form);\n }\n });\n }\n }, {\n key: \"searchFields\",\n value: function searchFields() {\n var _this6 = this;\n var searchString = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n var searchValue = searchString.toLowerCase();\n var sidebar = this.refs['sidebar'];\n var sidebarGroups = this.refs['sidebar-groups'];\n if (!sidebar || !sidebarGroups) {\n return;\n }\n var filterGroupBy = function filterGroupBy(group) {\n var searchValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n var result = _lodash[\"default\"].toPlainObject(group);\n var _result$subgroups = result.subgroups,\n subgroups = _result$subgroups === void 0 ? [] : _result$subgroups,\n components = result.components;\n var filteredComponents = [];\n for (var key in components) {\n var isMatchedToTitle = components[key].title.toLowerCase().match(searchValue);\n var isMatchedToKey = components[key].key.toLowerCase().match(searchValue);\n if (isMatchedToTitle || isMatchedToKey) {\n filteredComponents.push(components[key]);\n }\n }\n _this6.orderComponents(result, filteredComponents);\n if (searchValue) {\n result[\"default\"] = true;\n }\n if (result.componentOrder.length || subgroups.length) {\n return result;\n }\n return null;\n };\n var filterGroupOrder = function filterGroupOrder(groupOrder, searchValue) {\n var result = _lodash[\"default\"].cloneDeep(groupOrder);\n return result.filter(function (key) {\n return filterGroupBy(_this6.groups[key], searchValue);\n });\n };\n var filterSubgroups = function filterSubgroups(groups, searchValue) {\n var result = _lodash[\"default\"].clone(groups);\n return result.map(function (subgroup) {\n return filterGroupBy(subgroup, searchValue);\n }).filter(function (subgroup) {\n return !_lodash[\"default\"].isNull(subgroup);\n });\n };\n var toTemplate = function toTemplate(groupKey) {\n return {\n group: filterGroupBy(_this6.groups[groupKey], searchValue),\n groupKey: groupKey,\n groupId: sidebar.id || sidebarGroups.id,\n subgroups: filterSubgroups(_this6.groups[groupKey].subgroups, searchValue).map(function (group) {\n return _this6.renderTemplate('builderSidebarGroup', {\n group: group,\n groupKey: group.key,\n groupId: \"group-container-\".concat(groupKey),\n subgroups: []\n });\n })\n };\n };\n sidebarGroups.innerHTML = filterGroupOrder(this.groupOrder, searchValue).map(function (groupKey) {\n return _this6.renderTemplate('builderSidebarGroup', toTemplate(groupKey));\n }).join('');\n this.loadRefs(this.element, {\n 'sidebar-groups': 'single',\n 'sidebar-anchor': 'multiple',\n 'sidebar-group': 'multiple',\n 'sidebar-container': 'multiple'\n });\n this.updateDragAndDrop();\n if (searchValue === '') {\n this.triggerRedraw();\n }\n }\n }, {\n key: \"orderComponents\",\n value: function orderComponents(groupInfo, foundComponents) {\n var components = foundComponents || groupInfo.components;\n var isResource = groupInfo.key.indexOf('resource-') === 0;\n if (components) {\n groupInfo.componentOrder = Object.keys(components).map(function (key) {\n return components[key];\n }).filter(function (component) {\n return component && !component.ignore && !component.ignoreForForm;\n }).sort(function (a, b) {\n return a.weight - b.weight;\n }).map(function (component) {\n return isResource ? \"component-\".concat(component.key) : component.key;\n });\n }\n }\n }, {\n key: \"updateDragAndDrop\",\n value: function updateDragAndDrop() {\n if (this.dragDropEnabled) {\n this.initDragula();\n }\n if (this.refs.form) {\n return this.webform.attach(this.refs.form);\n }\n }\n }, {\n key: \"initDragula\",\n value: function initDragula() {\n var _this7 = this;\n var options = this.options;\n if (this.dragula) {\n this.dragula.destroy();\n }\n var containersArray = Array.prototype.slice.call(this.refs['sidebar-container']).filter(function (item) {\n return item.id !== 'group-container-resource';\n });\n if (!dragula) {\n return;\n }\n this.dragula = dragula(containersArray, {\n moves: function moves(el) {\n var moves = true;\n var list = Array.from(el.classList).filter(function (item) {\n return item.indexOf('formio-component-') === 0;\n });\n list.forEach(function (item) {\n var key = item.slice('formio-component-'.length);\n if (options.disabled && options.disabled.includes(key)) {\n moves = false;\n }\n });\n if (el.classList.contains('no-drag')) {\n moves = false;\n }\n return moves;\n },\n copy: function copy(el) {\n return el.classList.contains('drag-copy');\n },\n accepts: function accepts(el, target) {\n return !el.contains(target) && !target.classList.contains('no-drop');\n }\n }).on('drop', function (element, target, source, sibling) {\n return _this7.onDrop(element, target, source, sibling);\n });\n }\n }, {\n key: \"detach\",\n value: function detach() {\n if (this.dragula) {\n this.dragula.destroy();\n }\n this.dragula = null;\n if (this.sideBarScroll && Templates.current.clearBuilderSidebarScroll) {\n Templates.current.clearBuilderSidebarScroll.call(this, this);\n }\n _get(_getPrototypeOf(WebformBuilder.prototype), \"detach\", this).call(this);\n }\n }, {\n key: \"getComponentInfo\",\n value: function getComponentInfo(key, group) {\n var info;\n // This is a new component\n if (this.schemas.hasOwnProperty(key)) {\n info = (0, _utils.fastCloneDeep)(this.schemas[key]);\n } else if (this.groups.hasOwnProperty(group)) {\n var groupComponents = this.groups[group].components;\n if (groupComponents.hasOwnProperty(key)) {\n info = (0, _utils.fastCloneDeep)(groupComponents[key].schema);\n }\n } else if (group.slice(0, group.indexOf('-')) === 'resource') {\n // This is an existing resource field.\n var resourceGroups = this.groups.resource.subgroups;\n var resourceGroup = _lodash[\"default\"].find(resourceGroups, {\n key: group\n });\n if (resourceGroup && resourceGroup.components.hasOwnProperty(\"component-\".concat(key))) {\n info = (0, _utils.fastCloneDeep)(resourceGroup.components[\"component-\".concat(key)].schema);\n }\n } else if (group === 'searchFields') {\n //Search components go into this group\n var _resourceGroups = this.groups.resource.subgroups;\n for (var ix = 0; ix < _resourceGroups.length; ix++) {\n var _resourceGroup = _resourceGroups[ix];\n if (_resourceGroup.components.hasOwnProperty(\"component-\".concat(key))) {\n info = (0, _utils.fastCloneDeep)(_resourceGroup.components[\"component-\".concat(key)].schema);\n break;\n }\n }\n }\n if (info) {\n info.key = this.generateKey(info);\n }\n return info;\n }\n }, {\n key: \"getComponentsPath\",\n value: function getComponentsPath(component, parent) {\n // Get path to the component in the parent component.\n var path = 'components';\n var columnIndex = 0;\n var tableRowIndex = 0;\n var tableColumnIndex = 0;\n var tabIndex = 0;\n switch (parent.type) {\n case 'table':\n tableRowIndex = _lodash[\"default\"].findIndex(parent.rows, function (row) {\n return row.some(function (column) {\n return column.components.some(function (comp) {\n return comp.key === component.key;\n });\n });\n });\n tableColumnIndex = _lodash[\"default\"].findIndex(parent.rows[tableRowIndex], function (column) {\n return column.components.some(function (comp) {\n return comp.key === component.key;\n });\n });\n path = \"rows[\".concat(tableRowIndex, \"][\").concat(tableColumnIndex, \"].components\");\n break;\n case 'columns':\n columnIndex = _lodash[\"default\"].findIndex(parent.columns, function (column) {\n return column.components.some(function (comp) {\n return comp.key === component.key;\n });\n });\n path = \"columns[\".concat(columnIndex, \"].components\");\n break;\n case 'tabs':\n tabIndex = _lodash[\"default\"].findIndex(parent.components, function (tab) {\n return tab.components.some(function (comp) {\n return comp.key === component.key;\n });\n });\n path = \"components[\".concat(tabIndex, \"].components\");\n break;\n }\n return path;\n }\n\n /* eslint-disable max-statements */\n }, {\n key: \"onDrop\",\n value: function onDrop(element, target, source, sibling) {\n var _this$groups$group,\n _this8 = this;\n if (!target) {\n return;\n }\n\n // If you try to drop within itself.\n if (element.contains(target)) {\n return;\n }\n var key = element.getAttribute('data-key');\n var type = element.getAttribute('data-type');\n var group = element.getAttribute('data-group');\n var info, isNew, path, index;\n if (key && group) {\n // This is a new component.\n info = this.getComponentInfo(key, group);\n if (!info && type) {\n info = this.getComponentInfo(type, group);\n }\n isNew = true;\n } else if (source.formioContainer) {\n index = _lodash[\"default\"].findIndex(source.formioContainer, {\n key: element.formioComponent.component.key\n });\n if (index !== -1) {\n // Grab and remove the component from the source container.\n info = source.formioContainer.splice(_lodash[\"default\"].findIndex(source.formioContainer, {\n key: element.formioComponent.component.key\n }), 1);\n\n // Since splice returns an array of one object, we need to destructure it.\n info = info[0];\n }\n }\n\n // If we haven't found the component, stop.\n if (!info) {\n return;\n }\n\n // Show an error if siblings are disabled for a component and such a component already exists.\n var compKey = group === 'resource' ? \"component-\".concat(key) : key;\n var draggableComponent = ((_this$groups$group = this.groups[group]) === null || _this$groups$group === void 0 ? void 0 : _this$groups$group.components[compKey]) || {};\n if (draggableComponent.disableSiblings) {\n var isCompAlreadyExists = false;\n (0, _formUtils.eachComponent)(this.webform.components, function (component) {\n if (component.type === draggableComponent.schema.type) {\n isCompAlreadyExists = true;\n return;\n }\n }, true);\n if (isCompAlreadyExists) {\n this.webform.redraw();\n this.webform.setAlert('danger', \"You cannot add more than one \".concat(draggableComponent.key, \" component to one page.\"));\n return;\n }\n }\n if (target !== source) {\n // Ensure the key remains unique in its new container.\n _builder[\"default\"].uniquify(this.findNamespaceRoot(target.formioComponent), info);\n }\n var parent = target.formioComponent;\n\n // Insert in the new container.\n if (target.formioContainer) {\n if (sibling) {\n if (!sibling.getAttribute('data-noattach')) {\n index = _lodash[\"default\"].findIndex(target.formioContainer, {\n key: _lodash[\"default\"].get(sibling, 'formioComponent.component.key')\n });\n index = index === -1 ? 0 : index;\n } else {\n index = sibling.getAttribute('data-position');\n }\n if (index !== -1) {\n target.formioContainer.splice(index, 0, info);\n }\n } else {\n target.formioContainer.push(info);\n }\n path = this.getComponentsPath(info, parent.component);\n index = _lodash[\"default\"].findIndex(_lodash[\"default\"].get(parent.schema, path), {\n key: info.key\n });\n if (index === -1) {\n index = 0;\n }\n }\n if (parent && parent.addChildComponent) {\n parent.addChildComponent(info, element, target, source, sibling);\n }\n var componentInDataGrid = parent.type === 'datagrid';\n if (isNew && !this.options.noNewEdit && !info.noNewEdit) {\n this.editComponent(info, target, isNew, null, null, {\n inDataGrid: componentInDataGrid\n });\n }\n\n // Only rebuild the parts needing to be rebuilt.\n var rebuild;\n if (target !== source) {\n if (source.formioContainer && source.contains(target)) {\n rebuild = source.formioComponent.rebuild();\n } else if (target.contains(source)) {\n rebuild = target.formioComponent.rebuild();\n } else {\n if (source.formioContainer) {\n rebuild = source.formioComponent.rebuild();\n }\n rebuild = target.formioComponent.rebuild();\n }\n } else {\n // If they are the same, only rebuild one.\n rebuild = target.formioComponent.rebuild();\n }\n if (!rebuild) {\n rebuild = _nativePromiseOnly[\"default\"].resolve();\n }\n return rebuild.then(function () {\n _this8.emit('addComponent', info, parent, path, index, isNew && !_this8.options.noNewEdit && !info.noNewEdit);\n if (!isNew || _this8.options.noNewEdit || info.noNewEdit) {\n _this8.emit('change', _this8.form);\n }\n });\n }\n }, {\n key: \"setForm\",\n value: function setForm(form) {\n var _this$options$propert,\n _this9 = this;\n if (!form.components) {\n form.components = [];\n }\n if (form && form.properties) {\n this.options.properties = form.properties;\n }\n this.keyboardActionsEnabled = _lodash[\"default\"].get(this.options, 'keyboardBuilder', false) || ((_this$options$propert = this.options.properties) === null || _this$options$propert === void 0 ? void 0 : _this$options$propert.keyboardBuilder);\n var isShowSubmitButton = !this.options.noDefaultSubmitButton && !form.components.length;\n\n // Ensure there is at least a submit button.\n if (isShowSubmitButton) {\n form.components.push({\n type: 'button',\n label: 'Submit',\n key: 'submit',\n size: 'md',\n block: false,\n action: 'submit',\n disableOnInvalid: true,\n theme: 'primary'\n });\n }\n if (this.webform) {\n var shouldRebuild = !this.webform.form.components || form.components.length !== this.webform.form.components.length;\n return this.webform.setForm(form, {\n keepAsReference: true\n }).then(function () {\n if (_this9.refs.form) {\n _this9.builderHeight = _this9.refs.form.offsetHeight;\n }\n if (!shouldRebuild) {\n return _this9.form;\n }\n return _this9.rebuild().then(function () {\n return _this9.form;\n });\n });\n }\n return _nativePromiseOnly[\"default\"].resolve(form);\n }\n }, {\n key: \"populateRecaptchaSettings\",\n value: function populateRecaptchaSettings(form) {\n //populate isEnabled for recaptcha form settings\n var isRecaptchaEnabled = false;\n if (this.form.components) {\n (0, _formUtils.eachComponent)(form.components, function (component) {\n if (isRecaptchaEnabled) {\n return;\n }\n if (component.type === 'recaptcha') {\n isRecaptchaEnabled = true;\n return false;\n }\n });\n if (isRecaptchaEnabled) {\n _lodash[\"default\"].set(form, 'settings.recaptcha.isEnabled', true);\n } else if (_lodash[\"default\"].get(form, 'settings.recaptcha.isEnabled')) {\n _lodash[\"default\"].set(form, 'settings.recaptcha.isEnabled', false);\n }\n }\n }\n }, {\n key: \"removeComponent\",\n value: function removeComponent(component, parent, original) {\n var _this10 = this;\n if (!parent) {\n return;\n }\n var remove = true;\n var removingComponentsGroup = !component.skipRemoveConfirm && (Array.isArray(component.components) && component.components.length || Array.isArray(component.rows) && component.rows.length || Array.isArray(component.columns) && component.columns.length);\n if (this.options.alwaysConfirmComponentRemoval || removingComponentsGroup) {\n var message = removingComponentsGroup ? 'Removing this component will also remove all of its children. Are you sure you want to do this?' : 'Are you sure you want to remove this component?';\n remove = window.confirm(this.t(message));\n }\n if (!original) {\n original = parent.formioContainer.find(function (comp) {\n return comp.id === component.id;\n });\n }\n var index = parent.formioContainer ? parent.formioContainer.indexOf(original) : 0;\n if (remove && index !== -1) {\n var path = this.getComponentsPath(component, parent.formioComponent.component);\n if (parent.formioContainer) {\n parent.formioContainer.splice(index, 1);\n } else if (parent.formioComponent && parent.formioComponent.removeChildComponent) {\n parent.formioComponent.removeChildComponent(component);\n }\n var rebuild = parent.formioComponent.rebuild() || _nativePromiseOnly[\"default\"].resolve();\n rebuild.then(function () {\n _this10.emit('removeComponent', component, parent.formioComponent.schema, path, index);\n _this10.emit('change', _this10.form);\n });\n }\n return remove;\n }\n }, {\n key: \"replaceDoubleQuotes\",\n value: function replaceDoubleQuotes(data) {\n var fieldsToRemoveDoubleQuotes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n if (data) {\n fieldsToRemoveDoubleQuotes.forEach(function (key) {\n if (data[key]) {\n data[key] = data[key].replace(/\"/g, \"'\");\n }\n });\n return data;\n }\n }\n }, {\n key: \"updateComponent\",\n value: function updateComponent(component, changed) {\n var _this11 = this;\n // Update the preview.\n if (this.preview) {\n this.preview.form = {\n components: [_lodash[\"default\"].omit(_objectSpread({}, component), ['hidden', 'conditional', 'calculateValue', 'logic', 'autofocus', 'customConditional'])],\n config: this.options.formConfig || {}\n };\n var fieldsToRemoveDoubleQuotes = ['label', 'tooltip'];\n this.preview.form.components.forEach(function (component) {\n return _this11.replaceDoubleQuotes(component, fieldsToRemoveDoubleQuotes);\n });\n var previewElement = this.componentEdit.querySelector('[ref=\"preview\"]');\n if (previewElement) {\n this.setContent(previewElement, this.preview.render());\n this.preview.attach(previewElement);\n }\n }\n\n // Change the \"default value\" field to be reflective of this component.\n var defaultValueComponent = (0, _formUtils.getComponent)(this.editForm.components, 'defaultValue', true);\n if (defaultValueComponent && component.type !== 'hidden') {\n var defaultChanged = changed && (changed.component && changed.component.key === 'defaultValue' || changed.instance && defaultValueComponent.hasComponent && defaultValueComponent.hasComponent(changed.instance));\n if (!defaultChanged) {\n _lodash[\"default\"].assign(defaultValueComponent.component, _lodash[\"default\"].omit(_objectSpread({}, component), ['key', 'label', 'placeholder', 'tooltip', 'hidden', 'autofocus', 'validate', 'disabled', 'defaultValue', 'customDefaultValue', 'calculateValue', 'conditional', 'customConditional', 'id']));\n var parentComponent = defaultValueComponent.parent;\n var tabIndex = -1;\n var index = -1;\n parentComponent.tabs.some(function (tab, tIndex) {\n tab.some(function (comp, compIndex) {\n if (comp.id === defaultValueComponent.id) {\n tabIndex = tIndex;\n index = compIndex;\n return true;\n }\n return false;\n });\n });\n if (tabIndex !== -1 && index !== -1 && changed && changed.value) {\n var sibling = parentComponent.tabs[tabIndex][index + 1];\n parentComponent.removeComponent(defaultValueComponent);\n var newComp = parentComponent.addComponent(defaultValueComponent.component, defaultValueComponent.data, sibling);\n _lodash[\"default\"].pull(newComp.validators, 'required');\n parentComponent.tabs[tabIndex].splice(index, 1, newComp);\n newComp.checkValidity = function () {\n return true;\n };\n newComp.build(defaultValueComponent.element);\n }\n } else {\n var dataPath = changed.instance._data.key;\n var path = (0, _utils.getArrayFromComponentPath)(changed.instance.path);\n path.shift();\n if (path.length) {\n path.unshift(component.key);\n dataPath = (0, _utils.getStringFromComponentPath)(path);\n }\n _lodash[\"default\"].set(this.preview._data, dataPath, changed.value);\n _lodash[\"default\"].set(this.webform._data, dataPath, changed.value);\n }\n }\n\n // Called when we update a component.\n this.emit('updateComponent', component);\n }\n }, {\n key: \"findRepeatablePaths\",\n value: function findRepeatablePaths() {\n var repeatablePaths = [];\n var keys = new Map();\n (0, _formUtils.eachComponent)(this.form.components, function (comp, path) {\n if (!comp.key) {\n return;\n }\n if (keys.has(comp.key)) {\n if (keys.get(comp.key).includes(path)) {\n repeatablePaths.push(path);\n } else {\n keys.set(comp.key, [].concat(_toConsumableArray(keys.get(comp.key)), [path]));\n }\n } else {\n keys.set(comp.key, [path]);\n }\n }, true);\n return repeatablePaths;\n }\n }, {\n key: \"highlightInvalidComponents\",\n value: function highlightInvalidComponents() {\n var repeatablePaths = this.findRepeatablePaths();\n var hasInvalidComponents = false;\n this.webform.everyComponent(function (comp) {\n var _comp$error, _comp$error$message;\n var path = comp.path;\n if (repeatablePaths.includes(path)) {\n comp.setCustomValidity(\"API Key is not unique: \".concat(comp.key));\n hasInvalidComponents = true;\n } else if ((_comp$error = comp.error) !== null && _comp$error !== void 0 && (_comp$error$message = _comp$error.message) !== null && _comp$error$message !== void 0 && _comp$error$message.startsWith('API Key is not unique')) {\n comp.setCustomValidity('');\n }\n });\n this.emit('builderFormValidityChange', hasInvalidComponents);\n }\n\n /**\n * Called when a new component is saved.\n *\n * @param parent\n * @param component\n * @return {boolean}\n */\n }, {\n key: \"saveComponent\",\n value: function saveComponent(component, parent, isNew, original) {\n var _this12 = this;\n this.editForm.detach();\n var parentContainer = parent ? parent.formioContainer : this.container;\n var parentComponent = parent ? parent.formioComponent : this;\n this.dialog.close();\n var path = parentContainer ? this.getComponentsPath(component, parentComponent.component) : '';\n if (!original) {\n original = parent.formioContainer.find(function (comp) {\n return comp.id === component.id;\n });\n }\n var index = parentContainer ? parentContainer.indexOf(original) : 0;\n if (index !== -1) {\n var submissionData = this.editForm.submission.data;\n submissionData = submissionData.componentJson || submissionData;\n var fieldsToRemoveDoubleQuotes = ['label', 'tooltip'];\n this.replaceDoubleQuotes(submissionData, fieldsToRemoveDoubleQuotes);\n this.hook('beforeSaveComponentSettings', submissionData);\n var comp = null;\n parentComponent.getComponents().forEach(function (component) {\n if (component.component.key === original.key) {\n comp = component;\n }\n });\n var originalComp = comp.component;\n var originalComponentSchema = comp.schema;\n var isParentSaveChildMethod = this.isParentSaveChildMethod(parent.formioComponent);\n if (parentContainer && !isParentSaveChildMethod) {\n parentContainer[index] = submissionData;\n if (comp) {\n comp.component = submissionData;\n }\n } else if (isParentSaveChildMethod) {\n parent.formioComponent.saveChildComponent(submissionData);\n }\n var rebuild = parentComponent.rebuild() || _nativePromiseOnly[\"default\"].resolve();\n return rebuild.then(function () {\n var schema = parentContainer ? parentContainer[index] : comp ? comp.schema : [];\n _this12.emitSaveComponentEvent(schema, originalComp, parentComponent.schema, path, index, isNew, originalComponentSchema);\n _this12.emit('change', _this12.form);\n _this12.highlightInvalidComponents();\n if (_this12.isComponentCreated) {\n var _component = parent.formioComponent.components[0];\n _this12.moveComponent(_component);\n _this12.isComponentCreated = false;\n }\n });\n }\n this.highlightInvalidComponents();\n return _nativePromiseOnly[\"default\"].resolve();\n }\n }, {\n key: \"emitSaveComponentEvent\",\n value: function emitSaveComponentEvent(schema, originalComp, parentComponentSchema, path, index, isNew, originalComponentSchema) {\n this.emit('saveComponent', schema, originalComp, parentComponentSchema, path, index, isNew, originalComponentSchema);\n }\n }, {\n key: \"editComponent\",\n value: function editComponent(component, parent, isNew, isJsonEdit, original) {\n var _this13 = this;\n var flags = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {};\n if (!component.key) {\n return;\n }\n var saved = false;\n var componentCopy = (0, _utils.fastCloneDeep)(component);\n var ComponentClass = _Components[\"default\"].components[componentCopy.type];\n var isCustom = ComponentClass === undefined;\n isJsonEdit = isJsonEdit || isCustom;\n ComponentClass = isCustom ? _Components[\"default\"].components.unknown : ComponentClass;\n // Make sure we only have one dialog open at a time.\n if (this.dialog) {\n this.dialog.close();\n this.highlightInvalidComponents();\n }\n\n // This is the render step.\n var editFormOptions = _lodash[\"default\"].clone(_lodash[\"default\"].get(this, 'options.editForm', {}));\n if (this.editForm) {\n this.editForm.destroy();\n }\n\n // Allow editForm overrides per component.\n var overrides = _lodash[\"default\"].get(this.options, \"editForm.\".concat(componentCopy.type), {});\n\n // Pass along the form being edited.\n editFormOptions.editForm = this.form;\n editFormOptions.editComponent = component;\n editFormOptions.flags = flags;\n this.hook('editComponentParentInstance', editFormOptions, parent);\n this.editForm = new _Webform[\"default\"](_objectSpread(_objectSpread({}, _lodash[\"default\"].omit(this.options, ['hooks', 'builder', 'events', 'attachMode', 'skipInit'])), {}, {\n language: this.options.language\n }, editFormOptions));\n this.hook('editFormProperties', parent);\n this.editForm.form = isJsonEdit && !isCustom ? {\n components: [{\n type: 'textarea',\n as: 'json',\n editor: 'ace',\n weight: 10,\n input: true,\n key: 'componentJson',\n label: 'Component JSON',\n tooltip: 'Edit the JSON for this component.'\n }, {\n type: 'checkbox',\n key: 'showFullSchema',\n label: 'Full Schema'\n }]\n } : ComponentClass.editForm(_lodash[\"default\"].cloneDeep(overrides));\n var instanceOptions = {};\n this.hook('instanceOptionsPreview', instanceOptions);\n var instance = new ComponentClass(componentCopy, instanceOptions);\n var schema = this.hook('builderComponentSchema', component, instance);\n this.editForm.submission = isJsonEdit ? {\n data: {\n componentJson: schema,\n showFullSchema: this.options.showFullJsonSchema\n }\n } : {\n data: instance.component\n };\n if (this.preview) {\n this.preview.destroy();\n }\n if (!ComponentClass.builderInfo.hasOwnProperty('preview') || ComponentClass.builderInfo.preview) {\n this.preview = new _Webform[\"default\"](_lodash[\"default\"].omit(_objectSpread(_objectSpread({}, this.options), {}, {\n preview: true\n }), ['hooks', 'builder', 'events', 'attachMode', 'calculateValue']));\n this.hook('previewFormSettitngs', schema, isJsonEdit);\n }\n this.componentEdit = this.ce('div', {\n 'class': 'component-edit-container'\n });\n this.setContent(this.componentEdit, this.renderTemplate('builderEditForm', {\n componentInfo: ComponentClass.builderInfo,\n editForm: this.editForm.render(),\n preview: this.preview ? this.preview.render() : false,\n helplinks: this.helplinks\n }));\n this.dialog = this.createModal(this.componentEdit, _lodash[\"default\"].get(this.options, 'dialogAttr', {}));\n\n // This is the attach step.\n this.editForm.attach(this.componentEdit.querySelector('[ref=\"editForm\"]'));\n this.hook('editFormWrapper');\n this.updateComponent(componentCopy);\n this.editForm.on('change', function (event) {\n if (event.changed) {\n if (event.changed.component && event.changed.component.key === 'showFullSchema') {\n var value = event.changed.value;\n _this13.editForm.submission = {\n data: {\n componentJson: value ? instance.component : component,\n showFullSchema: value\n }\n };\n return;\n }\n // See if this is a manually modified key. Treat custom component keys as manually modified\n if (event.changed.component && event.changed.component.key === 'key' || isJsonEdit) {\n componentCopy.keyModified = true;\n }\n var isComponentLabelChanged = false;\n if (event.changed.instance) {\n isComponentLabelChanged = ['label', 'title'].includes(event.changed.instance.path);\n } else if (event.changed.component) {\n isComponentLabelChanged = ['label', 'title'].includes(event.changed.component.key);\n }\n if (isComponentLabelChanged) {\n // Ensure this component has a key.\n if (isNew) {\n if (!event.data.keyModified) {\n _this13.editForm.everyComponent(function (component) {\n if (component.key === 'key' && component.parent.component.key === 'tabs') {\n component.setValue(_this13.updateComponentKey(event.data));\n return false;\n }\n });\n }\n if (_this13.form) {\n var formComponents = _this13.findNamespaceRoot(parent.formioComponent);\n // excluding component which key uniqueness is to be checked to prevent the comparing of the same keys\n formComponents = formComponents.filter(function (comp) {\n return editFormOptions.editComponent.id !== comp.id;\n });\n\n // Set a unique key for this component.\n _builder[\"default\"].uniquify(formComponents, event.data);\n }\n }\n }\n\n // Update the component.\n _this13.updateComponent(event.data.componentJson || event.data, event.changed);\n }\n });\n var cancelButtons = this.componentEdit.querySelectorAll('[ref=\"cancelButton\"]');\n cancelButtons.forEach(function (cancelButton) {\n _this13.addEventListener(cancelButton, 'click', function (event) {\n event.preventDefault();\n _this13.editForm.detach();\n _this13.emit('cancelComponent', component);\n _this13.dialog.close();\n _this13.highlightInvalidComponents();\n });\n });\n var removeButtons = this.componentEdit.querySelectorAll('[ref=\"removeButton\"]');\n removeButtons.forEach(function (removeButton) {\n _this13.addEventListener(removeButton, 'click', function (event) {\n event.preventDefault();\n // Since we are already removing the component, don't trigger another remove.\n saved = true;\n _this13.editForm.detach();\n _this13.removeComponent(component, parent, original);\n _this13.dialog.close();\n _this13.highlightInvalidComponents();\n });\n });\n var saveButtons = this.componentEdit.querySelectorAll('[ref=\"saveButton\"]');\n saveButtons.forEach(function (saveButton) {\n _this13.addEventListener(saveButton, 'click', function (event) {\n event.preventDefault();\n if (!_this13.editForm.checkValidity(_this13.editForm.data, true, _this13.editForm.data)) {\n _this13.editForm.setPristine(false);\n _this13.editForm.showErrors();\n return false;\n }\n saved = true;\n _this13.saveComponent(component, parent, isNew, original);\n });\n });\n var dialogClose = function dialogClose() {\n _this13.editForm.destroy(true);\n if (_this13.preview) {\n _this13.preview.destroy(true);\n _this13.preview = null;\n }\n if (isNew && !saved) {\n _this13.removeComponent(component, parent, original);\n _this13.highlightInvalidComponents();\n }\n // Clean up.\n _this13.removeEventListener(_this13.dialog, 'close', dialogClose);\n _this13.dialog = null;\n };\n this.addEventListener(this.dialog, 'close', dialogClose);\n\n // Called when we edit a component.\n this.emit('editComponent', component);\n }\n }, {\n key: \"updateComponentKey\",\n value: function updateComponentKey(data) {\n return _lodash[\"default\"].camelCase(data.title || data.label || data.placeholder || data.type).replace(/^[0-9]*/, '');\n }\n }, {\n key: \"moveComponent\",\n value: function moveComponent(component) {\n component.element.focus();\n component.element.classList.add('builder-selected');\n this.selectedElement = component;\n this.removeEventListener(component.element, 'keydown');\n this.addEventListener(component.element, 'keydown', this.moveHandler.bind(this));\n }\n }, {\n key: \"updateComponentPlacement\",\n value: function updateComponentPlacement(direction) {\n var component = this.selectedElement;\n var index, info;\n var step = direction ? -1 : 1;\n if (component) {\n var element = component.element;\n var sibling = direction ? element.previousElementSibling : element.nextElementSibling;\n var source = element.parentNode;\n var containerLength = source.formioContainer.length;\n if (containerLength && containerLength <= 1) {\n return;\n }\n if (source.formioContainer) {\n index = _lodash[\"default\"].findIndex(source.formioContainer, {\n key: element.formioComponent.component.key\n });\n if (index !== -1) {\n info = source.formioContainer.splice(_lodash[\"default\"].findIndex(source.formioContainer, {\n key: element.formioComponent.component.key\n }), 1);\n info = info[0];\n source.removeChild(element);\n }\n }\n var len = source.formioComponent.components.length;\n index = index === -1 ? 0 : index + step;\n if (index === -1) {\n source.formioContainer.push(info);\n source.appendChild(element);\n } else if (index === len) {\n var key = source.formioContainer[0].key;\n index = _lodash[\"default\"].findIndex(source.formioComponent.components, {\n key: key\n });\n var firstElement = source.formioComponent.components[index].element;\n source.formioContainer.splice(0, 0, info);\n source.insertBefore(element, firstElement);\n } else if (index !== -1) {\n source.formioContainer.splice(index, 0, info);\n direction ? source.insertBefore(element, sibling) : source.insertBefore(element, sibling.nextElementSibling);\n }\n element.focus();\n }\n }\n }, {\n key: \"stopMoving\",\n value: function stopMoving(comp) {\n var parent = comp.element.parentNode;\n parent.formioComponent.rebuild();\n }\n }, {\n key: \"addNewComponent\",\n value: function addNewComponent(element) {\n var _source$formioCompone,\n _this14 = this;\n var source = document.querySelector('.formio-builder-form');\n var key = element.getAttribute('data-key');\n var group = element.getAttribute('data-group');\n var isNew = true;\n var info;\n if (key && group) {\n info = this.getComponentInfo(key, group);\n }\n if (isNew && !this.options.noNewEdit && !info.noNewEdit) {\n _builder[\"default\"].uniquify(this.findNamespaceRoot(source.formioComponent), info);\n this.editComponent(info, source, isNew, null, null);\n }\n var firstComponent = (_source$formioCompone = source.formioComponent.components[0]) === null || _source$formioCompone === void 0 ? void 0 : _source$formioCompone.element;\n if (firstComponent) {\n source.formioContainer.splice(0, 0, info);\n } else {\n source.formioContainer.push(info);\n }\n source.formioComponent.rebuild().then(function () {\n _this14.isComponentCreated = true;\n });\n }\n\n /**\n * Creates copy of component schema and stores it under sessionStorage.\n * @param {Component} component\n * @return {*}\n */\n }, {\n key: \"copyComponent\",\n value: function copyComponent(component) {\n if (!window.sessionStorage) {\n return console.warn('Session storage is not supported in this browser.');\n }\n this.addClass(this.refs.form, 'builder-paste-mode');\n window.sessionStorage.setItem('formio.clipboard', JSON.stringify(component.schema));\n }\n\n /**\n * Paste copied component after the current component.\n * @param {Component} component\n * @return {*}\n */\n }, {\n key: \"pasteComponent\",\n value: function pasteComponent(component) {\n if (!window.sessionStorage) {\n return console.warn('Session storage is not supported in this browser.');\n }\n this.removeClass(this.refs.form, 'builder-paste-mode');\n if (window.sessionStorage) {\n var data = window.sessionStorage.getItem('formio.clipboard');\n if (data) {\n var schema = JSON.parse(data);\n var parent = this.getParentElement(component.element);\n if (parent) {\n _builder[\"default\"].uniquify(this.findNamespaceRoot(parent.formioComponent), schema);\n var path = '';\n var index = 0;\n var isParentSaveChildMethod = this.isParentSaveChildMethod(parent.formioComponent);\n if (parent.formioContainer && !isParentSaveChildMethod) {\n index = parent.formioContainer.indexOf(component.component);\n path = this.getComponentsPath(schema, parent.formioComponent.component);\n parent.formioContainer.splice(index + 1, 0, schema);\n } else if (isParentSaveChildMethod) {\n parent.formioComponent.saveChildComponent(schema, false);\n }\n parent.formioComponent.rebuild();\n this.emitSaveComponentEvent(schema, schema, parent.formioComponent.component, path, index + 1, true, schema);\n }\n this.emit('change', this.form);\n }\n }\n }\n }, {\n key: \"isParentSaveChildMethod\",\n value: function isParentSaveChildMethod(parentComp) {\n return !!(parentComp && parentComp.saveChildComponent);\n }\n }, {\n key: \"getParentElement\",\n value: function getParentElement(element) {\n var container = element;\n do {\n container = container.parentNode;\n } while (container && !container.formioComponent);\n return container;\n }\n }, {\n key: \"addBuilderComponentInfo\",\n value: function addBuilderComponentInfo(component) {\n if (!component || !component.group || !this.groups[component.group]) {\n return;\n }\n component = _lodash[\"default\"].clone(component);\n var groupInfo = this.groups[component.group];\n if (!groupInfo.components.hasOwnProperty(component.key)) {\n groupInfo.components[component.key] = component;\n }\n return component;\n }\n }, {\n key: \"init\",\n value: function init() {\n if (this.webform) {\n this.webform.init();\n }\n return _get(_getPrototypeOf(WebformBuilder.prototype), \"init\", this).call(this);\n }\n }, {\n key: \"clear\",\n value: function clear() {\n if (this.webform.initialized) {\n this.webform.clear();\n }\n }\n }, {\n key: \"destroy\",\n value: function destroy(deleteFromGlobal) {\n if (this.webform.initialized) {\n this.webform.destroy(deleteFromGlobal);\n }\n _get(_getPrototypeOf(WebformBuilder.prototype), \"destroy\", this).call(this, deleteFromGlobal);\n }\n }, {\n key: \"addBuilderGroup\",\n value: function addBuilderGroup(name, group) {\n if (!this.groups[name]) {\n this.groups[name] = group;\n this.groupOrder.push(name);\n this.triggerRedraw();\n } else {\n this.updateBuilderGroup(name, group);\n }\n }\n }, {\n key: \"updateBuilderGroup\",\n value: function updateBuilderGroup(name, group) {\n if (this.groups[name]) {\n this.groups[name] = group;\n this.triggerRedraw();\n }\n }\n }, {\n key: \"generateKey\",\n value: function generateKey(info) {\n return info.key || _lodash[\"default\"].camelCase(info.title || info.label || info.placeholder || info.type);\n }\n }]);\n return WebformBuilder;\n}(_Component2[\"default\"]);\nexports[\"default\"] = WebformBuilder;\n\n//# sourceURL=webpack://Formio/./lib/WebformBuilder.js?"); /***/ }), @@ -125,7 +136,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptors.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.from.js */ \"./node_modules/core-js/modules/es.array.from.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.slice.js */ \"./node_modules/core-js/modules/es.array.slice.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.includes.js */ \"./node_modules/core-js/modules/es.array.includes.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.includes.js */ \"./node_modules/core-js/modules/es.string.includes.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.find.js */ \"./node_modules/core-js/modules/es.array.find.js\");\n\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.split.js */ \"./node_modules/core-js/modules/es.string.split.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.find-index.js */ \"./node_modules/core-js/modules/es.array.find-index.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nvar _Webform2 = _interopRequireDefault(__webpack_require__(/*! ./Webform */ \"./lib/Webform.js\"));\n\nvar _Formio = __webpack_require__(/*! ./Formio */ \"./lib/Formio.js\");\n\nvar _utils = __webpack_require__(/*! ./utils/utils */ \"./lib/utils/utils.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { 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\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar Wizard = /*#__PURE__*/function (_Webform) {\n _inherits(Wizard, _Webform);\n\n var _super = _createSuper(Wizard);\n\n /**\n * Constructor for wizard based forms\n * @param element Dom element to place this wizard.\n * @param {Object} options Options object, supported options are:\n * - breadcrumbSettings.clickable: true (default) determines if the breadcrumb bar is clickable or not\n * - buttonSettings.show*(Previous, Next, Cancel): true (default) determines if the button is shown or not\n * - allowPrevious: false (default) determines if the breadcrumb bar is clickable or not for visited tabs\n */\n function Wizard() {\n var _this;\n\n _classCallCheck(this, Wizard);\n\n var element, options;\n\n if (arguments[0] instanceof HTMLElement || arguments[1]) {\n element = arguments[0];\n options = arguments[1] || {};\n } else {\n options = arguments[0] || {};\n }\n\n options.display = 'wizard';\n _this = _super.call(this, element, options);\n _this.pages = [];\n _this.prefixComps = [];\n _this.suffixComps = [];\n _this.components = [];\n _this.originalComponents = [];\n _this.page = 0;\n _this.currentPanel = null;\n _this.currentPanels = null;\n _this.currentNextPage = 0;\n _this._seenPages = [0];\n _this.subWizards = [];\n _this.allPages = [];\n _this.lastPromise = _nativePromiseOnly.default.resolve();\n _this.enabledIndex = 0;\n _this.editMode = false;\n _this.originalOptions = _lodash.default.cloneDeep(_this.options);\n return _this;\n }\n\n _createClass(Wizard, [{\n key: \"isLastPage\",\n value: function isLastPage() {\n var next = this.getNextPage();\n\n if (_lodash.default.isNumber(next)) {\n return next === -1;\n }\n\n return _lodash.default.isNull(next);\n }\n }, {\n key: \"getPages\",\n value: function getPages() {\n var _this2 = this;\n\n var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var _args$all = args.all,\n all = _args$all === void 0 ? false : _args$all;\n var pages = this.hasExtraPages ? this.components : this.pages;\n var filteredPages = pages.filter(all ? _lodash.default.identity : function (p, index) {\n return _this2._seenPages.includes(index);\n });\n return filteredPages;\n }\n }, {\n key: \"hasExtraPages\",\n get: function get() {\n return !_lodash.default.isEmpty(this.subWizards);\n }\n }, {\n key: \"data\",\n get: function get() {\n return _get(_getPrototypeOf(Wizard.prototype), \"data\", this);\n },\n set: function set(value) {\n var _this3 = this;\n\n this._data = value;\n\n _lodash.default.each(this.getPages({\n all: true\n }), function (component) {\n component.data = _this3.componentContext(component);\n });\n }\n }, {\n key: \"localData\",\n get: function get() {\n var _this$pages$this$page, _this$pages$this$page2;\n\n return ((_this$pages$this$page = this.pages[this.page]) === null || _this$pages$this$page === void 0 ? void 0 : (_this$pages$this$page2 = _this$pages$this$page.root) === null || _this$pages$this$page2 === void 0 ? void 0 : _this$pages$this$page2.submission.data) || this.submission.data;\n }\n }, {\n key: \"checkConditions\",\n value: function checkConditions(data, flags, row) {\n var visible = _get(_getPrototypeOf(Wizard.prototype), \"checkConditions\", this).call(this, data, flags, row);\n\n this.establishPages(data);\n return visible;\n }\n }, {\n key: \"getComponents\",\n value: function getComponents() {\n return this.submitting ? this.getPages({\n all: this.isLastPage()\n }) : _get(_getPrototypeOf(Wizard.prototype), \"getComponents\", this).call(this);\n }\n }, {\n key: \"resetValue\",\n value: function resetValue() {\n this.getPages({\n all: true\n }).forEach(function (page) {\n return page.resetValue();\n });\n this.setPristine(true);\n }\n }, {\n key: \"init\",\n value: function init() {\n var _this$pages,\n _this4 = this;\n\n // Check for and initlize button settings object\n this.options.buttonSettings = _lodash.default.defaults(this.options.buttonSettings, {\n showPrevious: true,\n showNext: true,\n showSubmit: true,\n showCancel: !this.options.readOnly\n });\n\n if (!this.isSecondInit) {\n var _this$options, _this$options$breadcr;\n\n this.isClickableDefined = (_this$options = this.options) === null || _this$options === void 0 ? void 0 : (_this$options$breadcr = _this$options.breadcrumbSettings) === null || _this$options$breadcr === void 0 ? void 0 : _this$options$breadcr.hasOwnProperty('clickable');\n this.isSecondInit = true;\n }\n\n this.options.breadcrumbSettings = _lodash.default.defaults(this.options.breadcrumbSettings, {\n clickable: true\n });\n this.options.allowPrevious = this.options.allowPrevious || false;\n this.page = 0;\n\n var onReady = _get(_getPrototypeOf(Wizard.prototype), \"init\", this).call(this);\n\n this.setComponentSchema();\n\n if ((_this$pages = this.pages) !== null && _this$pages !== void 0 && _this$pages[this.page]) {\n this.component = this.pages[this.page].component;\n }\n\n this.on('subWizardsUpdated', function (subForm) {\n var subWizard = _this4.subWizards.find(function (subWizard) {\n var _subWizard$subForm;\n\n return (subForm === null || subForm === void 0 ? void 0 : subForm.id) && ((_subWizard$subForm = subWizard.subForm) === null || _subWizard$subForm === void 0 ? void 0 : _subWizard$subForm.id) === (subForm === null || subForm === void 0 ? void 0 : subForm.id);\n });\n\n if (_this4.subWizards.length && subWizard) {\n subWizard.subForm.setValue(subForm._submission, {}, true);\n\n _this4.establishPages();\n\n _this4.redraw();\n }\n });\n return onReady;\n }\n }, {\n key: \"wizardKey\",\n get: function get() {\n return \"wizard-\".concat(this.id);\n }\n }, {\n key: \"wizard\",\n get: function get() {\n return this.form;\n },\n set: function set(form) {\n this.setForm(form);\n }\n }, {\n key: \"buttons\",\n get: function get() {\n var _this5 = this;\n\n var buttons = {};\n [{\n name: 'cancel',\n method: 'cancel'\n }, {\n name: 'previous',\n method: 'prevPage'\n }, {\n name: 'next',\n method: 'nextPage'\n }, {\n name: 'submit',\n method: 'submit'\n }].forEach(function (button) {\n if (_this5.hasButton(button.name)) {\n buttons[button.name] = button;\n }\n });\n return buttons;\n }\n }, {\n key: \"buttonOrder\",\n get: function get() {\n var _this$options$propert, _this$options$propert2, _this$options$propert3;\n\n var defaultButtonOrder = ['cancel', 'previous', 'next', 'submit'];\n return (_this$options$propert = (_this$options$propert2 = this.options.properties) === null || _this$options$propert2 === void 0 ? void 0 : (_this$options$propert3 = _this$options$propert2.wizardButtonOrder) === null || _this$options$propert3 === void 0 ? void 0 : _this$options$propert3.toLowerCase().split(', ')) !== null && _this$options$propert !== void 0 ? _this$options$propert : defaultButtonOrder;\n }\n }, {\n key: \"renderContext\",\n get: function get() {\n var _this$root, _this$root$component;\n\n return {\n disableWizardSubmit: this.form.disableWizardSubmit,\n wizardKey: this.wizardKey,\n isBreadcrumbClickable: this.isBreadcrumbClickable(),\n isSubForm: !!this.parent && !((_this$root = this.root) !== null && _this$root !== void 0 && (_this$root$component = _this$root.component) !== null && _this$root$component !== void 0 && _this$root$component.type) === 'wizard',\n panels: this.allPages.length ? this.allPages.map(function (page) {\n return page.component;\n }) : this.pages.map(function (page) {\n return page.component;\n }),\n buttons: this.buttons,\n currentPage: this.page,\n buttonOrder: this.buttonOrder\n };\n }\n }, {\n key: \"prepareNavigationSettings\",\n value: function prepareNavigationSettings(ctx) {\n var currentPanel = this.currentPanel;\n\n if (currentPanel && currentPanel.buttonSettings) {\n Object.keys(currentPanel.buttonSettings).forEach(function () {\n Object.keys(ctx.buttons).forEach(function (key) {\n if (typeof currentPanel.buttonSettings[key] !== 'undefined' && !currentPanel.buttonSettings[key] || ctx.isSubForm) {\n ctx.buttons[key] = null;\n }\n });\n });\n }\n\n return this.renderTemplate('wizardNav', ctx);\n }\n }, {\n key: \"prepareHeaderSettings\",\n value: function prepareHeaderSettings(ctx, headerType) {\n if (this.currentPanel && this.currentPanel.breadcrumb === 'none' || ctx.isSubForm) {\n return null;\n }\n\n return this.renderTemplate(headerType, ctx);\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this6 = this;\n\n var ctx = this.renderContext;\n\n if (this.component.key) {\n ctx.panels.map(function (panel) {\n if (panel.key === _this6.component.key) {\n _this6.currentPanel = panel;\n ctx.wizardPageTooltip = _this6.getFormattedTooltip(panel.tooltip);\n }\n });\n }\n\n var wizardNav = this.prepareNavigationSettings(ctx);\n var wizardHeaderType = \"wizardHeader\".concat(_lodash.default.get(this.form, 'settings.wizardHeaderType', ''));\n\n var wizardHeaderLocation = _lodash.default.get(this.form, 'settings.wizardHeaderLocation', 'left');\n\n var wizardHeader = this.prepareHeaderSettings(ctx, wizardHeaderType);\n return this.renderTemplate('wizard', _objectSpread(_objectSpread({}, ctx), {}, {\n className: _get(_getPrototypeOf(Wizard.prototype), \"getClassName\", this).call(this),\n wizardHeader: wizardHeader,\n wizardHeaderType: wizardHeaderType,\n wizardHeaderLocation: wizardHeaderLocation,\n wizardNav: wizardNav,\n components: this.renderComponents([].concat(_toConsumableArray(this.prefixComps), _toConsumableArray(this.currentPage.components), _toConsumableArray(this.suffixComps)))\n }), this.builderMode ? 'builder' : 'form');\n }\n }, {\n key: \"redrawNavigation\",\n value: function redrawNavigation() {\n if (this.element) {\n var navElement = this.element.querySelector(\"#\".concat(this.wizardKey, \"-nav\"));\n\n if (navElement) {\n var _this$loadRefs;\n\n this.detachNav();\n navElement.outerHTML = this.renderTemplate('wizardNav', this.renderContext);\n navElement = this.element.querySelector(\"#\".concat(this.wizardKey, \"-nav\"));\n this.loadRefs(navElement, (_this$loadRefs = {}, _defineProperty(_this$loadRefs, \"\".concat(this.wizardKey, \"-cancel\"), 'single'), _defineProperty(_this$loadRefs, \"\".concat(this.wizardKey, \"-previous\"), 'single'), _defineProperty(_this$loadRefs, \"\".concat(this.wizardKey, \"-next\"), 'single'), _defineProperty(_this$loadRefs, \"\".concat(this.wizardKey, \"-submit\"), 'single'), _this$loadRefs));\n this.attachNav();\n }\n }\n }\n }, {\n key: \"redrawHeader\",\n value: function redrawHeader() {\n if (this.element) {\n var headerElement = this.element.querySelector(\"#\".concat(this.wizardKey, \"-header\"));\n\n if (headerElement) {\n var _this$loadRefs2;\n\n this.detachHeader();\n headerElement.outerHTML = this.renderTemplate(\"wizardHeader\".concat(_lodash.default.get(this.form, 'settings.wizardHeaderType', '')), this.renderContext);\n headerElement = this.element.querySelector(\"#\".concat(this.wizardKey, \"-header\"));\n this.loadRefs(headerElement, (_this$loadRefs2 = {}, _defineProperty(_this$loadRefs2, \"\".concat(this.wizardKey, \"-link\"), 'multiple'), _defineProperty(_this$loadRefs2, \"\".concat(this.wizardKey, \"-tooltip\"), 'multiple'), _this$loadRefs2));\n this.attachHeader();\n }\n }\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n var _this$loadRefs3,\n _this7 = this;\n\n this.element = element;\n this.loadRefs(element, (_this$loadRefs3 = {}, _defineProperty(_this$loadRefs3, this.wizardKey, 'single'), _defineProperty(_this$loadRefs3, \"\".concat(this.wizardKey, \"-header\"), 'single'), _defineProperty(_this$loadRefs3, \"\".concat(this.wizardKey, \"-cancel\"), 'single'), _defineProperty(_this$loadRefs3, \"\".concat(this.wizardKey, \"-previous\"), 'single'), _defineProperty(_this$loadRefs3, \"\".concat(this.wizardKey, \"-next\"), 'single'), _defineProperty(_this$loadRefs3, \"\".concat(this.wizardKey, \"-submit\"), 'single'), _defineProperty(_this$loadRefs3, \"\".concat(this.wizardKey, \"-link\"), 'multiple'), _defineProperty(_this$loadRefs3, \"\".concat(this.wizardKey, \"-tooltip\"), 'multiple'), _this$loadRefs3));\n\n if ((this.options.readOnly || this.editMode) && !this.enabledIndex) {\n var _this$pages2;\n\n this.enabledIndex = ((_this$pages2 = this.pages) === null || _this$pages2 === void 0 ? void 0 : _this$pages2.length) - 1;\n }\n\n this.hook('attachWebform', element, this);\n var promises = this.attachComponents(this.refs[this.wizardKey], [].concat(_toConsumableArray(this.prefixComps), _toConsumableArray(this.currentPage.components), _toConsumableArray(this.suffixComps)));\n this.attachNav();\n this.attachHeader();\n return promises.then(function () {\n _this7.emit('render', {\n component: _this7.currentPage,\n page: _this7.page\n });\n\n if (_this7.component.scrollToTop) {\n _this7.scrollPageToTop();\n }\n });\n }\n }, {\n key: \"scrollPageToTop\",\n value: function scrollPageToTop() {\n var _this$refs;\n\n var pageTop = (_this$refs = this.refs[\"\".concat(this.wizardKey, \"-header\")]) !== null && _this$refs !== void 0 ? _this$refs : this.refs[this.wizardKey];\n\n if (!pageTop) {\n return;\n }\n\n if ('scrollIntoView' in pageTop) {\n pageTop.scrollIntoView(true);\n } else {\n this.scrollIntoView(pageTop);\n }\n }\n }, {\n key: \"isBreadcrumbClickable\",\n value: function isBreadcrumbClickable() {\n var _this8 = this;\n\n var currentPage = null;\n this.pages.map(function (page) {\n if (_lodash.default.isEqual(_this8.currentPage.component, page.component)) {\n currentPage = page;\n }\n });\n return this.isClickableDefined ? this.options.breadcrumbSettings.clickable : _lodash.default.get(currentPage, 'component.breadcrumbClickable', true);\n }\n }, {\n key: \"isAllowPrevious\",\n value: function isAllowPrevious() {\n var _this9 = this;\n\n var currentPage = null;\n this.pages.map(function (page) {\n if (_lodash.default.isEqual(_this9.currentPage.component, page.component)) {\n currentPage = page;\n }\n });\n return _lodash.default.get(currentPage.component, 'allowPrevious', this.options.allowPrevious);\n }\n }, {\n key: \"handleNaviageteOnEnter\",\n value: function handleNaviageteOnEnter(event) {\n if (event.keyCode === 13) {\n var clickEvent = new CustomEvent('click');\n var buttonElement = this.refs[\"\".concat(this.wizardKey, \"-\").concat(this.buttons.next.name)];\n\n if (buttonElement) {\n buttonElement.dispatchEvent(clickEvent);\n }\n }\n }\n }, {\n key: \"handleSaveOnEnter\",\n value: function handleSaveOnEnter(event) {\n if (event.keyCode === 13) {\n var clickEvent = new CustomEvent('click');\n var buttonElement = this.refs[\"\".concat(this.wizardKey, \"-\").concat(this.buttons.submit.name)];\n\n if (buttonElement) {\n buttonElement.dispatchEvent(clickEvent);\n }\n }\n }\n }, {\n key: \"attachNav\",\n value: function attachNav() {\n var _this10 = this;\n\n if (this.component.navigateOnEnter) {\n this.addEventListener(document, 'keyup', this.handleNaviageteOnEnter.bind(this));\n }\n\n if (this.component.saveOnEnter) {\n this.addEventListener(document, 'keyup', this.handleSaveOnEnter.bind(this));\n }\n\n _lodash.default.each(this.buttons, function (button) {\n var buttonElement = _this10.refs[\"\".concat(_this10.wizardKey, \"-\").concat(button.name)];\n\n _this10.addEventListener(buttonElement, 'click', function (event) {\n event.preventDefault(); // Disable the button until done.\n\n buttonElement.setAttribute('disabled', 'disabled');\n\n _this10.setLoading(buttonElement, true); // Call the button method, then re-enable the button.\n\n\n _this10[button.method]().then(function () {\n buttonElement.removeAttribute('disabled');\n\n _this10.setLoading(buttonElement, false);\n }).catch(function () {\n buttonElement.removeAttribute('disabled');\n\n _this10.setLoading(buttonElement, false);\n });\n });\n });\n }\n }, {\n key: \"emitWizardPageSelected\",\n value: function emitWizardPageSelected(index) {\n this.emit('wizardPageSelected', this.pages[index], index);\n }\n }, {\n key: \"attachHeader\",\n value: function attachHeader() {\n var _this11 = this;\n\n var isAllowPrevious = this.isAllowPrevious();\n this.attachTooltips(this.refs[\"\".concat(this.wizardKey, \"-tooltip\")], this.currentPanel.tooltip);\n\n if (this.isBreadcrumbClickable() || isAllowPrevious) {\n var _this$refs2;\n\n (_this$refs2 = this.refs[\"\".concat(this.wizardKey, \"-link\")]) === null || _this$refs2 === void 0 ? void 0 : _this$refs2.forEach(function (link, index) {\n if (!isAllowPrevious || index <= _this11.enabledIndex) {\n _this11.addEventListener(link, 'click', function (event) {\n _this11.emit('wizardNavigationClicked', _this11.pages[index]);\n\n event.preventDefault();\n return _this11.setPage(index).then(function () {\n _this11.emitWizardPageSelected(index);\n });\n });\n }\n });\n }\n }\n }, {\n key: \"detachNav\",\n value: function detachNav() {\n var _this12 = this;\n\n if (this.component.navigateOnEnter) {\n this.removeEventListener(document, 'keyup', this.handleNaviageteOnEnter.bind(this));\n }\n\n if (this.component.saveOnEnter) {\n this.removeEventListener(document, 'keyup', this.handleSaveOnEnter.bind(this));\n }\n\n _lodash.default.each(this.buttons, function (button) {\n _this12.removeEventListener(_this12.refs[\"\".concat(_this12.wizardKey, \"-\").concat(button.name)], 'click');\n });\n }\n }, {\n key: \"detachHeader\",\n value: function detachHeader() {\n var _this13 = this;\n\n if (this.refs[\"\".concat(this.wizardKey, \"-link\")]) {\n this.refs[\"\".concat(this.wizardKey, \"-link\")].forEach(function (link) {\n _this13.removeEventListener(link, 'click');\n });\n }\n }\n }, {\n key: \"transformPages\",\n value: function transformPages() {\n var _this14 = this;\n\n var allComponents = [];\n var components = this.getSortedComponents(this);\n var defferedComponents = [];\n this.allPages = []; // Get all components including all nested components and line up in the correct order\n\n var getAllComponents = function getAllComponents(nestedComp, compsArr) {\n var pushAllowed = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n var nestedPages = [];\n var dataArrayComponents = ['datagrid', 'editgrid', 'dynamicWizard'];\n var currentComponents = nestedComp !== null && nestedComp !== void 0 && nestedComp.subForm ? _this14.getSortedComponents(nestedComp.subForm) : (nestedComp === null || nestedComp === void 0 ? void 0 : nestedComp.components) || [];\n var visibleComponents = currentComponents.filter(function (comp) {\n return comp._visible;\n });\n var filteredComponents = visibleComponents.filter(function (comp) {\n return !dataArrayComponents.includes(comp.component.type) && (comp.type !== 'form' || comp.isNestedWizard);\n });\n var additionalComponents = currentComponents.filter(function (comp) {\n var _comp$subForm;\n\n return ((_comp$subForm = comp.subForm) === null || _comp$subForm === void 0 ? void 0 : _comp$subForm._form.display) !== 'wizard';\n });\n var hasNested = false;\n (0, _utils.eachComponent)(filteredComponents, function (comp) {\n if (comp && comp.component) {\n if (comp.component.type === 'panel' && comp !== null && comp !== void 0 && comp.parent.wizard && !getAllComponents(comp, compsArr, false)) {\n if (pushAllowed) {\n _this14.setRootPanelId(comp);\n\n nestedPages.push(comp);\n }\n\n hasNested = true;\n }\n\n if (comp.isNestedWizard && comp.subForm) {\n var hasNestedForm = getAllComponents(comp, nestedPages, pushAllowed);\n\n if (!hasNested) {\n hasNested = hasNestedForm;\n }\n }\n }\n }, true);\n\n if (nestedComp.component.type === 'panel') {\n if (!hasNested && pushAllowed) {\n _this14.setRootPanelId(nestedComp);\n\n compsArr.push(nestedComp);\n }\n\n if (hasNested && additionalComponents.length) {\n var newComp = _lodash.default.clone(nestedComp);\n\n newComp.components = additionalComponents;\n\n _this14.setRootPanelId(newComp);\n\n defferedComponents.push(newComp);\n }\n }\n\n if (pushAllowed) {\n compsArr.push.apply(compsArr, _toConsumableArray(defferedComponents).concat(nestedPages));\n defferedComponents = [];\n }\n\n return hasNested;\n };\n\n components.forEach(function (component) {\n if (component.visible) {\n getAllComponents(component, allComponents);\n }\n }, []); // recalculate pages only for root wizards, including the situation when the wizard is in a wrapper\n\n if (this.localRoot && this.id === this.localRoot.id) {\n allComponents.forEach(function (comp, index) {\n comp.eachComponent(function (component) {\n component.page = index;\n });\n });\n }\n\n this.allPages = allComponents;\n }\n }, {\n key: \"getSortedComponents\",\n value: function getSortedComponents(_ref) {\n var components = _ref.components,\n originalComponents = _ref.originalComponents;\n // sorts components if they were shuffled after the conditional logic\n var currentComponents = [];\n var currentPages = [];\n\n if (components && components.length) {\n components.map(function (page) {\n if (page.component.type === 'panel') {\n currentPages[page.component.key || page.component.title] = page;\n }\n });\n }\n\n originalComponents === null || originalComponents === void 0 ? void 0 : originalComponents.forEach(function (item) {\n if (!item.key) {\n item.key = item.title;\n }\n\n if (currentPages[item.key]) {\n currentComponents.push(currentPages[item.key]);\n }\n });\n return currentComponents;\n }\n }, {\n key: \"findRootPanel\",\n value: function findRootPanel(component) {\n var _component$parent;\n\n return (_component$parent = component.parent) !== null && _component$parent !== void 0 && _component$parent.parent ? this.findRootPanel(component.parent) : component;\n }\n }, {\n key: \"setRootPanelId\",\n value: function setRootPanelId(component) {\n var _component$parent2;\n\n if (component.rootPanelId && component.rootPanelId !== component.id) {\n return;\n }\n\n var parent = (_component$parent2 = component.parent) !== null && _component$parent2 !== void 0 && _component$parent2.parent ? this.findRootPanel(component.parent) : component;\n component.rootPanelId = parent.id;\n }\n }, {\n key: \"establishPages\",\n value: function establishPages() {\n var _this15 = this;\n\n var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.data;\n this.pages = [];\n this.prefixComps = [];\n this.suffixComps = [];\n var visible = [];\n var currentPages = {};\n\n var pageOptions = _objectSpread(_objectSpread({}, _lodash.default.clone(this.options)), this.parent ? {\n root: this\n } : {});\n\n if (this.components && this.components.length) {\n this.components.forEach(function (page) {\n if (page.component.type === 'panel') {\n currentPages[page.component.key || page.component.title] = page;\n }\n });\n }\n\n if (this.originalComponents) {\n this.originalComponents.forEach(function (item) {\n if (item.type === 'panel') {\n if (!item.key) {\n item.key = item.title;\n }\n\n var page = currentPages[item.key];\n var forceShow = _this15.options.show ? _this15.options.show[item.key] : false;\n var forceHide = _this15.options.hide ? _this15.options.hide[item.key] : false;\n var isVisible = !page ? (0, _utils.checkCondition)(item, data, data, _this15.component, _this15) && !item.hidden : page.visible;\n\n if (forceShow) {\n isVisible = true;\n } else if (forceHide) {\n isVisible = false;\n }\n\n if (isVisible) {\n visible.push(item);\n\n if (page) {\n _this15.pages.push(page);\n }\n }\n\n if (!page && isVisible) {\n page = _this15.createComponent(item, pageOptions);\n page.visible = isVisible;\n\n _this15.pages.push(page);\n\n page.eachComponent(function (component) {\n component.page = _this15.pages.length - 1;\n });\n }\n } else if (item.type !== 'button') {\n if (!_this15.pages.length) {\n _this15.prefixComps.push(_this15.createComponent(item, pageOptions));\n } else {\n _this15.suffixComps.push(_this15.createComponent(item, pageOptions));\n }\n }\n });\n }\n\n if (this.pages.length) {\n this.emit('pagesChanged');\n }\n\n this.transformPages();\n\n if (this.allPages && this.allPages.length) {\n this.updatePages();\n }\n\n return visible;\n }\n }, {\n key: \"updatePages\",\n value: function updatePages() {\n this.pages = this.allPages;\n }\n }, {\n key: \"addComponents\",\n value: function addComponents() {\n this.establishPages();\n }\n }, {\n key: \"setPage\",\n value: function setPage(num) {\n var _this16 = this;\n\n if (num === this.page) {\n return _nativePromiseOnly.default.resolve();\n }\n\n if (num >= 0 && num < this.pages.length) {\n this.page = num;\n this.pageFieldLogic(num);\n this.getNextPage();\n var parentNum = num;\n\n if (this.hasExtraPages) {\n var pageFromPages = this.pages[num];\n var pageFromComponents = this.components[num];\n\n if (!pageFromComponents || (pageFromPages === null || pageFromPages === void 0 ? void 0 : pageFromPages.id) !== pageFromComponents.id) {\n parentNum = this.components.findIndex(function (comp) {\n var _this16$pages, _this16$pages$parentN;\n\n return comp.id === ((_this16$pages = _this16.pages) === null || _this16$pages === void 0 ? void 0 : (_this16$pages$parentN = _this16$pages[parentNum]) === null || _this16$pages$parentN === void 0 ? void 0 : _this16$pages$parentN.rootPanelId);\n });\n }\n }\n\n if (!this._seenPages.includes(parentNum)) {\n this._seenPages = this._seenPages.concat(parentNum);\n }\n\n this.redraw().then(function () {\n _this16.checkData(_this16.submission.data);\n });\n return _nativePromiseOnly.default.resolve();\n } else if (!this.pages.length) {\n this.redraw();\n return _nativePromiseOnly.default.resolve();\n }\n\n return _nativePromiseOnly.default.reject('Page not found');\n }\n }, {\n key: \"pageFieldLogic\",\n value: function pageFieldLogic(page) {\n var _this$pages3;\n\n if ((_this$pages3 = this.pages) !== null && _this$pages3 !== void 0 && _this$pages3[page]) {\n // Handle field logic on pages.\n this.component = this.pages[page].component;\n this.originalComponent = (0, _utils.fastCloneDeep)(this.component);\n this.fieldLogic(this.data); // If disabled changed, be sure to distribute the setting.\n\n this.disabled = this.shouldDisabled;\n }\n }\n }, {\n key: \"currentPage\",\n get: function get() {\n return this.pages && this.pages.length >= this.page ? this.pages[this.page] : {\n components: []\n };\n }\n }, {\n key: \"getNextPage\",\n value: function getNextPage() {\n var _this$pages4;\n\n if ((_this$pages4 = this.pages) !== null && _this$pages4 !== void 0 && _this$pages4[this.page]) {\n var data = this.submission.data;\n var form = this.pages[this.page].component; // Check conditional nextPage\n\n if (form) {\n var page = this.pages.length > this.page + 1 && !this.showAllErrors ? this.page + 1 : -1;\n\n if (form.nextPage) {\n var next = this.evaluate(form.nextPage, {\n next: page,\n data: data,\n page: page,\n form: form\n }, 'next');\n\n if (next === null) {\n this.currentNextPage = null;\n return null;\n }\n\n var pageNum = parseInt(next, 10);\n\n if (!isNaN(parseInt(pageNum, 10)) && isFinite(pageNum)) {\n this.currentNextPage = pageNum;\n return pageNum;\n }\n\n this.currentNextPage = this.getPageIndexByKey(next);\n return this.currentNextPage;\n }\n\n this.currentNextPage = page;\n return page;\n }\n\n this.currentNextPage = null;\n }\n\n return null;\n }\n }, {\n key: \"getPreviousPage\",\n value: function getPreviousPage() {\n return this.page - 1;\n }\n }, {\n key: \"beforeSubmit\",\n value: function beforeSubmit() {\n var pages = this.getPages();\n return _nativePromiseOnly.default.all(pages.map(function (page) {\n page.options.beforeSubmit = true;\n return page.beforeSubmit();\n }));\n }\n }, {\n key: \"beforePage\",\n value: function beforePage(next) {\n var _this17 = this;\n\n return new _nativePromiseOnly.default(function (resolve, reject) {\n _this17.hook(next ? 'beforeNext' : 'beforePrev', _this17.currentPage, _this17.submission, function (err) {\n if (err) {\n _this17.showErrors(err, true);\n\n reject(err);\n }\n\n var form = _this17.currentPage;\n\n if (form) {\n form.beforePage(next).then(resolve).catch(reject);\n } else {\n resolve();\n }\n });\n });\n }\n }, {\n key: \"emitNextPage\",\n value: function emitNextPage() {\n this.emit('nextPage', {\n page: this.page,\n submission: this.submission\n });\n }\n }, {\n key: \"nextPage\",\n value: function nextPage() {\n var _this18 = this;\n\n // Read-only forms should not worry about validation before going to next page, nor should they submit.\n if (this.options.readOnly) {\n return this.beforePage(true).then(function () {\n return _this18.setPage(_this18.getNextPage()).then(function () {\n _this18.emitNextPage();\n });\n });\n } // Validate the form, before go to the next page\n\n\n if (this.checkValidity(this.localData, true, this.localData, true)) {\n this.checkData(this.submission.data);\n return this.beforePage(true).then(function () {\n return _this18.setPage(_this18.getNextPage()).then(function () {\n if (!(_this18.options.readOnly || _this18.editMode) && _this18.enabledIndex < _this18.page) {\n _this18.enabledIndex = _this18.page;\n\n _this18.redraw();\n }\n\n _this18.emitNextPage();\n });\n });\n } else {\n this.currentPage.components.forEach(function (comp) {\n return comp.setPristine(false);\n });\n return _nativePromiseOnly.default.reject(this.showErrors([], true));\n }\n }\n }, {\n key: \"emitPrevPage\",\n value: function emitPrevPage() {\n this.emit('prevPage', {\n page: this.page,\n submission: this.submission\n });\n }\n }, {\n key: \"prevPage\",\n value: function prevPage() {\n var _this19 = this;\n\n return this.beforePage().then(function () {\n return _this19.setPage(_this19.getPreviousPage()).then(function () {\n _this19.emitPrevPage();\n });\n });\n }\n }, {\n key: \"cancel\",\n value: function cancel(noconfirm) {\n var _this20 = this;\n\n if (this.options.readOnly) {\n return _nativePromiseOnly.default.resolve();\n }\n\n if (_get(_getPrototypeOf(Wizard.prototype), \"cancel\", this).call(this, noconfirm)) {\n this.setPristine(true);\n return this.setPage(0).then(function () {\n if (_this20.enabledIndex) {\n _this20.enabledIndex = 0;\n }\n\n _this20.onChange();\n\n _this20.redraw();\n\n return _this20.page;\n });\n }\n\n return _nativePromiseOnly.default.resolve();\n }\n }, {\n key: \"getPageIndexByKey\",\n value: function getPageIndexByKey(key) {\n var pageIndex = this.page;\n this.pages.forEach(function (page, index) {\n if (page.component.key === key) {\n pageIndex = index;\n return false;\n }\n });\n return pageIndex;\n }\n }, {\n key: \"schema\",\n get: function get() {\n return this.wizard;\n }\n }, {\n key: \"setComponentSchema\",\n value: function setComponentSchema() {\n var _this21 = this;\n\n var pageKeys = {};\n this.originalComponents = [];\n this.component.components.map(function (item) {\n if (item.type === 'panel') {\n item.key = (0, _utils.uniqueKey)(pageKeys, item.key || 'panel');\n pageKeys[item.key] = true;\n\n if (_this21.wizard.full) {\n _this21.options.show = _this21.options.show || {};\n _this21.options.show[item.key] = true;\n } else if (_this21.wizard.hasOwnProperty('full') && !_lodash.default.isEqual(_this21.originalOptions.show, _this21.options.show)) {\n _this21.options.show = _objectSpread({}, _this21.originalOptions.show || {});\n }\n }\n\n _this21.originalComponents.push(_lodash.default.clone(item));\n });\n\n if (!Object.keys(pageKeys).length) {\n var newPage = {\n type: 'panel',\n title: 'Page 1',\n label: 'Page 1',\n key: 'page1',\n components: this.component.components\n };\n this.component.components = [newPage];\n this.originalComponents.push(_lodash.default.clone(newPage));\n }\n }\n }, {\n key: \"setForm\",\n value: function setForm(form, flags) {\n if (!form) {\n return;\n }\n\n return _get(_getPrototypeOf(Wizard.prototype), \"setForm\", this).call(this, form, flags);\n }\n }, {\n key: \"onSetForm\",\n value: function onSetForm(clonedForm, initialForm) {\n this.component.components = (this._parentPath ? initialForm.components : clonedForm.components) || [];\n this.setComponentSchema();\n }\n }, {\n key: \"setEditMode\",\n value: function setEditMode(submission) {\n if (!this.editMode && submission._id && !this.options.readOnly) {\n this.editMode = true;\n this.redraw();\n }\n }\n }, {\n key: \"setValue\",\n value: function setValue(submission) {\n var _this22 = this;\n\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var ignoreEstablishment = arguments.length > 2 ? arguments[2] : undefined;\n this._submission = submission;\n\n if (flags && flags.fromSubmission && (this.options.readOnly || this.editMode) && !this.isHtmlRenderMode()) {\n this._data = submission.data;\n }\n\n if (!ignoreEstablishment) {\n this.establishPages(submission.data);\n }\n\n var changed = this.getPages({\n all: true\n }).reduce(function (changed, page) {\n return _this22.setNestedValue(page, submission.data, flags, changed) || changed;\n }, false);\n\n if (changed) {\n this.pageFieldLogic(this.page);\n }\n\n this.setEditMode(submission);\n return changed;\n }\n }, {\n key: \"isClickable\",\n value: function isClickable(page, index) {\n return this.page !== index && (0, _utils.firstNonNil)([_lodash.default.get(page, 'breadcrumbClickable'), this.options.breadcrumbSettings.clickable]);\n }\n }, {\n key: \"hasButton\",\n value: function hasButton(name) {\n var nextPage = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getNextPage();\n\n // get page options with global options as default values\n var _$get = _lodash.default.get(this.currentPage, 'component.buttonSettings', {}),\n _$get$previous = _$get.previous,\n previous = _$get$previous === void 0 ? this.options.buttonSettings.showPrevious : _$get$previous,\n _$get$cancel = _$get.cancel,\n cancel = _$get$cancel === void 0 ? this.options.buttonSettings.showCancel : _$get$cancel,\n _$get$submit = _$get.submit,\n submit = _$get$submit === void 0 ? this.options.buttonSettings.showSubmit : _$get$submit,\n _$get$next = _$get.next,\n next = _$get$next === void 0 ? this.options.buttonSettings.showNext : _$get$next;\n\n switch (name) {\n case 'previous':\n return previous && this.getPreviousPage() > -1;\n\n case 'next':\n return next && nextPage !== null && nextPage !== -1;\n\n case 'cancel':\n return cancel && !this.options.readOnly;\n\n case 'submit':\n return submit && !this.options.readOnly && (nextPage === null || this.page === this.pages.length - 1);\n\n default:\n return true;\n }\n }\n }, {\n key: \"pageId\",\n value: function pageId(page) {\n if (page.key) {\n // Some panels have the same key....\n return \"\".concat(page.key, \"-\").concat(page.title);\n } else if (page.components && page.components.length > 0) {\n return this.pageId(page.components[0]);\n } else {\n return page.title;\n }\n }\n }, {\n key: \"onChange\",\n value: function onChange(flags, changed, modified, changes) {\n var _this23 = this;\n\n _get(_getPrototypeOf(Wizard.prototype), \"onChange\", this).call(this, flags, changed, modified, changes);\n\n if (this.alert && !this.submitted) {\n this.checkValidity(this.localData, false, this.localData, true);\n this.showErrors([], true, true);\n } // If the pages change, need to redraw the header.\n\n\n var currentPanels;\n var panels;\n var currentNextPage = this.currentNextPage;\n\n if (this.hasExtraPages) {\n currentPanels = this.pages.map(function (page) {\n return page.component.key;\n });\n this.establishPages();\n panels = this.pages.map(function (page) {\n return page.component.key;\n });\n } else {\n var _this$currentPanel, _this$currentPanels;\n\n currentPanels = this.currentPanels || this.pages.map(function (page) {\n return page.component.key;\n });\n panels = this.establishPages().map(function (panel) {\n return panel.key;\n });\n this.currentPanels = panels;\n\n if ((_this$currentPanel = this.currentPanel) !== null && _this$currentPanel !== void 0 && _this$currentPanel.key && (_this$currentPanels = this.currentPanels) !== null && _this$currentPanels !== void 0 && _this$currentPanels.length) {\n this.setPage(this.currentPanels.findIndex(function (panel) {\n return panel === _this23.currentPanel.key;\n }));\n }\n }\n\n if (!_lodash.default.isEqual(panels, currentPanels) || flags && flags.fromSubmission) {\n this.redrawHeader();\n } // If the next page changes, then make sure to redraw navigation.\n\n\n if (currentNextPage !== this.getNextPage()) {\n this.redrawNavigation();\n }\n }\n }, {\n key: \"redraw\",\n value: function redraw() {\n var _this$parent, _this$parent$componen;\n\n if ((_this$parent = this.parent) !== null && _this$parent !== void 0 && (_this$parent$componen = _this$parent.component) !== null && _this$parent$componen !== void 0 && _this$parent$componen.modalEdit) {\n return this.parent.redraw();\n }\n\n return _get(_getPrototypeOf(Wizard.prototype), \"redraw\", this).call(this);\n }\n }, {\n key: \"checkValidity\",\n value: function checkValidity(data, dirty, row, currentPageOnly) {\n if (!this.checkCondition(row, data)) {\n this.setCustomValidity('');\n return true;\n }\n\n var components = !currentPageOnly || this.isLastPage() ? this.getComponents() : this.currentPage.components;\n return components.reduce(function (check, comp) {\n return comp.checkValidity(data, dirty, row) && check;\n }, true);\n }\n }, {\n key: \"errors\",\n get: function get() {\n if (!this.isLastPage()) {\n return this.currentPage.errors;\n }\n\n return _get(_getPrototypeOf(Wizard.prototype), \"errors\", this);\n }\n }, {\n key: \"focusOnComponent\",\n value: function focusOnComponent(key) {\n var _this24 = this;\n\n var pageIndex = 0;\n\n var _this$pages$filter = this.pages.filter(function (page, index) {\n var hasComponent = false;\n page.getComponent(key, function (comp) {\n if (comp.path === key) {\n pageIndex = index;\n hasComponent = true;\n }\n });\n return hasComponent;\n }),\n _this$pages$filter2 = _slicedToArray(_this$pages$filter, 1),\n page = _this$pages$filter2[0];\n\n if (page && page !== this.currentPage) {\n return this.setPage(pageIndex).then(function () {\n _this24.checkValidity(_this24.submission.data, true, _this24.submission.data);\n\n _this24.showErrors();\n\n _get(_getPrototypeOf(Wizard.prototype), \"focusOnComponent\", _this24).call(_this24, key);\n });\n }\n\n return _get(_getPrototypeOf(Wizard.prototype), \"focusOnComponent\", this).call(this, key);\n }\n }]);\n\n return Wizard;\n}(_Webform2.default);\n\nexports[\"default\"] = Wizard;\nWizard.setBaseUrl = _Formio.GlobalFormio.setBaseUrl;\nWizard.setApiUrl = _Formio.GlobalFormio.setApiUrl;\nWizard.setAppUrl = _Formio.GlobalFormio.setAppUrl;\n\n//# sourceURL=webpack://Formio/./lib/Wizard.js?"); +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptors.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-properties.js */ \"./node_modules/core-js/modules/es.object.define-properties.js\");\n__webpack_require__(/*! core-js/modules/es.array.is-array.js */ \"./node_modules/core-js/modules/es.array.is-array.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.from.js */ \"./node_modules/core-js/modules/es.array.from.js\");\n__webpack_require__(/*! core-js/modules/es.array.slice.js */ \"./node_modules/core-js/modules/es.array.slice.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.array.includes.js */ \"./node_modules/core-js/modules/es.array.includes.js\");\n__webpack_require__(/*! core-js/modules/es.string.includes.js */ \"./node_modules/core-js/modules/es.string.includes.js\");\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.array.find.js */ \"./node_modules/core-js/modules/es.array.find.js\");\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.array.find-index.js */ \"./node_modules/core-js/modules/es.array.find-index.js\");\n__webpack_require__(/*! core-js/modules/es.parse-int.js */ \"./node_modules/core-js/modules/es.parse-int.js\");\n__webpack_require__(/*! core-js/modules/es.array.reduce.js */ \"./node_modules/core-js/modules/es.array.reduce.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nvar _Webform2 = _interopRequireDefault(__webpack_require__(/*! ./Webform */ \"./lib/Webform.js\"));\nvar _Formio = __webpack_require__(/*! ./Formio */ \"./lib/Formio.js\");\nvar _utils = __webpack_require__(/*! ./utils/utils */ \"./lib/utils/utils.js\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : \"undefined\" != typeof Symbol && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) { ; } } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i[\"return\"] && (_r = _i[\"return\"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar Wizard = /*#__PURE__*/function (_Webform) {\n _inherits(Wizard, _Webform);\n var _super = _createSuper(Wizard);\n /**\n * Constructor for wizard based forms\n * @param element Dom element to place this wizard.\n * @param {Object} options Options object, supported options are:\n * - breadcrumbSettings.clickable: true (default) determines if the breadcrumb bar is clickable or not\n * - buttonSettings.show*(Previous, Next, Cancel): true (default) determines if the button is shown or not\n * - allowPrevious: false (default) determines if the breadcrumb bar is clickable or not for visited tabs\n */\n function Wizard() {\n var _this;\n _classCallCheck(this, Wizard);\n var element, options;\n if (arguments[0] instanceof HTMLElement || arguments[1]) {\n element = arguments[0];\n options = arguments[1] || {};\n } else {\n options = arguments[0] || {};\n }\n options.display = 'wizard';\n _this = _super.call(this, element, options);\n _this.pages = [];\n _this.prefixComps = [];\n _this.suffixComps = [];\n _this.components = [];\n _this.originalComponents = [];\n _this.page = 0;\n _this.currentPanel = null;\n _this.currentPanels = null;\n _this.currentNextPage = 0;\n _this._seenPages = [0];\n _this.subWizards = [];\n _this.allPages = [];\n _this.lastPromise = _nativePromiseOnly[\"default\"].resolve();\n _this.enabledIndex = 0;\n _this.editMode = false;\n _this.originalOptions = _lodash[\"default\"].cloneDeep(_this.options);\n return _this;\n }\n _createClass(Wizard, [{\n key: \"isLastPage\",\n value: function isLastPage() {\n var next = this.getNextPage();\n if (_lodash[\"default\"].isNumber(next)) {\n return next === -1;\n }\n return _lodash[\"default\"].isNull(next);\n }\n }, {\n key: \"getPages\",\n value: function getPages() {\n var _this2 = this;\n var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var _args$all = args.all,\n all = _args$all === void 0 ? false : _args$all;\n var pages = this.hasExtraPages ? this.components : this.pages;\n var filteredPages = pages.filter(all ? _lodash[\"default\"].identity : function (p, index) {\n return _this2._seenPages.includes(index);\n });\n return filteredPages;\n }\n }, {\n key: \"hasExtraPages\",\n get: function get() {\n return !_lodash[\"default\"].isEmpty(this.subWizards);\n }\n }, {\n key: \"data\",\n get: function get() {\n return _get(_getPrototypeOf(Wizard.prototype), \"data\", this);\n },\n set: function set(value) {\n var _this3 = this;\n this._data = value;\n _lodash[\"default\"].each(this.getPages({\n all: true\n }), function (component) {\n component.data = _this3.componentContext(component);\n });\n }\n }, {\n key: \"localData\",\n get: function get() {\n var _this$pages$this$page, _this$pages$this$page2;\n return ((_this$pages$this$page = this.pages[this.page]) === null || _this$pages$this$page === void 0 ? void 0 : (_this$pages$this$page2 = _this$pages$this$page.root) === null || _this$pages$this$page2 === void 0 ? void 0 : _this$pages$this$page2.submission.data) || this.submission.data;\n }\n }, {\n key: \"checkConditions\",\n value: function checkConditions(data, flags, row) {\n var visible = _get(_getPrototypeOf(Wizard.prototype), \"checkConditions\", this).call(this, data, flags, row);\n this.establishPages(data);\n return visible;\n }\n }, {\n key: \"getComponents\",\n value: function getComponents() {\n return this.submitting ? this.getPages({\n all: this.isLastPage()\n }) : _get(_getPrototypeOf(Wizard.prototype), \"getComponents\", this).call(this);\n }\n }, {\n key: \"resetValue\",\n value: function resetValue() {\n this.getPages({\n all: true\n }).forEach(function (page) {\n return page.resetValue();\n });\n this.setPristine(true);\n }\n }, {\n key: \"init\",\n value: function init() {\n var _this$pages,\n _this4 = this;\n // Check for and initlize button settings object\n this.options.buttonSettings = _lodash[\"default\"].defaults(this.options.buttonSettings, {\n showPrevious: true,\n showNext: true,\n showSubmit: true,\n showCancel: !this.options.readOnly\n });\n if (!this.isSecondInit) {\n var _this$options, _this$options$breadcr;\n this.isClickableDefined = (_this$options = this.options) === null || _this$options === void 0 ? void 0 : (_this$options$breadcr = _this$options.breadcrumbSettings) === null || _this$options$breadcr === void 0 ? void 0 : _this$options$breadcr.hasOwnProperty('clickable');\n this.isSecondInit = true;\n }\n this.options.breadcrumbSettings = _lodash[\"default\"].defaults(this.options.breadcrumbSettings, {\n clickable: true\n });\n this.options.allowPrevious = this.options.allowPrevious || false;\n this.page = 0;\n var onReady = _get(_getPrototypeOf(Wizard.prototype), \"init\", this).call(this);\n this.setComponentSchema();\n if ((_this$pages = this.pages) !== null && _this$pages !== void 0 && _this$pages[this.page]) {\n this.component = this.pages[this.page].component;\n }\n this.on('subWizardsUpdated', function (subForm) {\n var subWizard = _this4.subWizards.find(function (subWizard) {\n var _subWizard$subForm;\n return (subForm === null || subForm === void 0 ? void 0 : subForm.id) && ((_subWizard$subForm = subWizard.subForm) === null || _subWizard$subForm === void 0 ? void 0 : _subWizard$subForm.id) === (subForm === null || subForm === void 0 ? void 0 : subForm.id);\n });\n if (_this4.subWizards.length && subWizard) {\n subWizard.subForm.setValue(subForm._submission, {}, true);\n _this4.establishPages();\n _this4.redraw();\n }\n });\n return onReady;\n }\n }, {\n key: \"wizardKey\",\n get: function get() {\n return \"wizard-\".concat(this.id);\n }\n }, {\n key: \"wizard\",\n get: function get() {\n return this.form;\n },\n set: function set(form) {\n this.setForm(form);\n }\n }, {\n key: \"buttons\",\n get: function get() {\n var _this5 = this;\n var buttons = {};\n [{\n name: 'cancel',\n method: 'cancel'\n }, {\n name: 'previous',\n method: 'prevPage'\n }, {\n name: 'next',\n method: 'nextPage'\n }, {\n name: 'submit',\n method: 'submit'\n }].forEach(function (button) {\n if (_this5.hasButton(button.name)) {\n buttons[button.name] = button;\n }\n });\n return buttons;\n }\n }, {\n key: \"buttonOrder\",\n get: function get() {\n var _this$options$propert, _this$options$propert2, _this$options$propert3;\n var defaultButtonOrder = ['cancel', 'previous', 'next', 'submit'];\n return (_this$options$propert = (_this$options$propert2 = this.options.properties) === null || _this$options$propert2 === void 0 ? void 0 : (_this$options$propert3 = _this$options$propert2.wizardButtonOrder) === null || _this$options$propert3 === void 0 ? void 0 : _this$options$propert3.toLowerCase().split(', ')) !== null && _this$options$propert !== void 0 ? _this$options$propert : defaultButtonOrder;\n }\n }, {\n key: \"renderContext\",\n get: function get() {\n var _this$root, _this$root$component;\n return {\n disableWizardSubmit: this.form.disableWizardSubmit,\n wizardKey: this.wizardKey,\n isBreadcrumbClickable: this.isBreadcrumbClickable(),\n isSubForm: !!this.parent && !((_this$root = this.root) !== null && _this$root !== void 0 && (_this$root$component = _this$root.component) !== null && _this$root$component !== void 0 && _this$root$component.type) === 'wizard',\n panels: this.allPages.length ? this.allPages.map(function (page) {\n return page.component;\n }) : this.pages.map(function (page) {\n return page.component;\n }),\n buttons: this.buttons,\n currentPage: this.page,\n buttonOrder: this.buttonOrder\n };\n }\n }, {\n key: \"prepareNavigationSettings\",\n value: function prepareNavigationSettings(ctx) {\n var currentPanel = this.currentPanel;\n if (currentPanel && currentPanel.buttonSettings) {\n Object.keys(currentPanel.buttonSettings).forEach(function () {\n Object.keys(ctx.buttons).forEach(function (key) {\n if (typeof currentPanel.buttonSettings[key] !== 'undefined' && !currentPanel.buttonSettings[key] || ctx.isSubForm) {\n ctx.buttons[key] = null;\n }\n });\n });\n }\n return this.renderTemplate('wizardNav', ctx);\n }\n }, {\n key: \"prepareHeaderSettings\",\n value: function prepareHeaderSettings(ctx, headerType) {\n if (this.currentPanel && this.currentPanel.breadcrumb === 'none' || ctx.isSubForm) {\n return null;\n }\n return this.renderTemplate(headerType, ctx);\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this6 = this;\n var ctx = this.renderContext;\n if (this.component.key) {\n ctx.panels.map(function (panel) {\n if (panel.key === _this6.component.key) {\n _this6.currentPanel = panel;\n ctx.wizardPageTooltip = _this6.getFormattedTooltip(panel.tooltip);\n }\n });\n }\n var wizardNav = this.prepareNavigationSettings(ctx);\n var wizardHeaderType = \"wizardHeader\".concat(_lodash[\"default\"].get(this.form, 'settings.wizardHeaderType', ''));\n var wizardHeaderLocation = _lodash[\"default\"].get(this.form, 'settings.wizardHeaderLocation', 'left');\n var wizardHeader = this.prepareHeaderSettings(ctx, wizardHeaderType);\n return this.renderTemplate('wizard', _objectSpread(_objectSpread({}, ctx), {}, {\n className: _get(_getPrototypeOf(Wizard.prototype), \"getClassName\", this).call(this),\n wizardHeader: wizardHeader,\n wizardHeaderType: wizardHeaderType,\n wizardHeaderLocation: wizardHeaderLocation,\n wizardNav: wizardNav,\n components: this.renderComponents([].concat(_toConsumableArray(this.prefixComps), _toConsumableArray(this.currentPage.components), _toConsumableArray(this.suffixComps)))\n }), this.builderMode ? 'builder' : 'form');\n }\n }, {\n key: \"redrawNavigation\",\n value: function redrawNavigation() {\n if (this.element) {\n var navElement = this.element.querySelector(\"#\".concat(this.wizardKey, \"-nav\"));\n if (navElement) {\n var _this$loadRefs;\n this.detachNav();\n navElement.outerHTML = this.renderTemplate('wizardNav', this.renderContext);\n navElement = this.element.querySelector(\"#\".concat(this.wizardKey, \"-nav\"));\n this.loadRefs(navElement, (_this$loadRefs = {}, _defineProperty(_this$loadRefs, \"\".concat(this.wizardKey, \"-cancel\"), 'single'), _defineProperty(_this$loadRefs, \"\".concat(this.wizardKey, \"-previous\"), 'single'), _defineProperty(_this$loadRefs, \"\".concat(this.wizardKey, \"-next\"), 'single'), _defineProperty(_this$loadRefs, \"\".concat(this.wizardKey, \"-submit\"), 'single'), _this$loadRefs));\n this.attachNav();\n }\n }\n }\n }, {\n key: \"redrawHeader\",\n value: function redrawHeader() {\n if (this.element) {\n var headerElement = this.element.querySelector(\"#\".concat(this.wizardKey, \"-header\"));\n if (headerElement) {\n var _this$loadRefs2;\n this.detachHeader();\n headerElement.outerHTML = this.renderTemplate(\"wizardHeader\".concat(_lodash[\"default\"].get(this.form, 'settings.wizardHeaderType', '')), this.renderContext);\n headerElement = this.element.querySelector(\"#\".concat(this.wizardKey, \"-header\"));\n this.loadRefs(headerElement, (_this$loadRefs2 = {}, _defineProperty(_this$loadRefs2, \"\".concat(this.wizardKey, \"-link\"), 'multiple'), _defineProperty(_this$loadRefs2, \"\".concat(this.wizardKey, \"-tooltip\"), 'multiple'), _this$loadRefs2));\n this.attachHeader();\n }\n }\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n var _this$loadRefs3,\n _this7 = this;\n this.element = element;\n this.loadRefs(element, (_this$loadRefs3 = {}, _defineProperty(_this$loadRefs3, this.wizardKey, 'single'), _defineProperty(_this$loadRefs3, \"\".concat(this.wizardKey, \"-header\"), 'single'), _defineProperty(_this$loadRefs3, \"\".concat(this.wizardKey, \"-cancel\"), 'single'), _defineProperty(_this$loadRefs3, \"\".concat(this.wizardKey, \"-previous\"), 'single'), _defineProperty(_this$loadRefs3, \"\".concat(this.wizardKey, \"-next\"), 'single'), _defineProperty(_this$loadRefs3, \"\".concat(this.wizardKey, \"-submit\"), 'single'), _defineProperty(_this$loadRefs3, \"\".concat(this.wizardKey, \"-link\"), 'multiple'), _defineProperty(_this$loadRefs3, \"\".concat(this.wizardKey, \"-tooltip\"), 'multiple'), _this$loadRefs3));\n if ((this.options.readOnly || this.editMode) && !this.enabledIndex) {\n var _this$pages2;\n this.enabledIndex = ((_this$pages2 = this.pages) === null || _this$pages2 === void 0 ? void 0 : _this$pages2.length) - 1;\n }\n this.hook('attachWebform', element, this);\n var promises = this.attachComponents(this.refs[this.wizardKey], [].concat(_toConsumableArray(this.prefixComps), _toConsumableArray(this.currentPage.components), _toConsumableArray(this.suffixComps)));\n this.attachNav();\n this.attachHeader();\n return promises.then(function () {\n _this7.emit('render', {\n component: _this7.currentPage,\n page: _this7.page\n });\n if (_this7.component.scrollToTop) {\n _this7.scrollPageToTop();\n }\n });\n }\n }, {\n key: \"scrollPageToTop\",\n value: function scrollPageToTop() {\n var _this$refs;\n var pageTop = (_this$refs = this.refs[\"\".concat(this.wizardKey, \"-header\")]) !== null && _this$refs !== void 0 ? _this$refs : this.refs[this.wizardKey];\n if (!pageTop) {\n return;\n }\n if ('scrollIntoView' in pageTop) {\n pageTop.scrollIntoView(true);\n } else {\n this.scrollIntoView(pageTop);\n }\n }\n }, {\n key: \"isBreadcrumbClickable\",\n value: function isBreadcrumbClickable() {\n var _this8 = this;\n var currentPage = null;\n this.pages.map(function (page) {\n if (_lodash[\"default\"].isEqual(_this8.currentPage.component, page.component)) {\n currentPage = page;\n }\n });\n return this.isClickableDefined ? this.options.breadcrumbSettings.clickable : _lodash[\"default\"].get(currentPage, 'component.breadcrumbClickable', true);\n }\n }, {\n key: \"isAllowPrevious\",\n value: function isAllowPrevious() {\n var _this9 = this;\n var currentPage = null;\n this.pages.map(function (page) {\n if (_lodash[\"default\"].isEqual(_this9.currentPage.component, page.component)) {\n currentPage = page;\n }\n });\n return _lodash[\"default\"].get(currentPage.component, 'allowPrevious', this.options.allowPrevious);\n }\n }, {\n key: \"handleNaviageteOnEnter\",\n value: function handleNaviageteOnEnter(event) {\n if (event.keyCode === 13) {\n var clickEvent = new CustomEvent('click');\n var buttonElement = this.refs[\"\".concat(this.wizardKey, \"-\").concat(this.buttons.next.name)];\n if (buttonElement) {\n buttonElement.dispatchEvent(clickEvent);\n }\n }\n }\n }, {\n key: \"handleSaveOnEnter\",\n value: function handleSaveOnEnter(event) {\n if (event.keyCode === 13) {\n var clickEvent = new CustomEvent('click');\n var buttonElement = this.refs[\"\".concat(this.wizardKey, \"-\").concat(this.buttons.submit.name)];\n if (buttonElement) {\n buttonElement.dispatchEvent(clickEvent);\n }\n }\n }\n }, {\n key: \"attachNav\",\n value: function attachNav() {\n var _this10 = this;\n if (this.component.navigateOnEnter) {\n this.addEventListener(document, 'keyup', this.handleNaviageteOnEnter.bind(this));\n }\n if (this.component.saveOnEnter) {\n this.addEventListener(document, 'keyup', this.handleSaveOnEnter.bind(this));\n }\n _lodash[\"default\"].each(this.buttons, function (button) {\n var buttonElement = _this10.refs[\"\".concat(_this10.wizardKey, \"-\").concat(button.name)];\n _this10.addEventListener(buttonElement, 'click', function (event) {\n event.preventDefault();\n\n // Disable the button until done.\n buttonElement.setAttribute('disabled', 'disabled');\n _this10.setLoading(buttonElement, true);\n\n // Call the button method, then re-enable the button.\n _this10[button.method]().then(function () {\n buttonElement.removeAttribute('disabled');\n _this10.setLoading(buttonElement, false);\n })[\"catch\"](function () {\n buttonElement.removeAttribute('disabled');\n _this10.setLoading(buttonElement, false);\n });\n });\n });\n }\n }, {\n key: \"emitWizardPageSelected\",\n value: function emitWizardPageSelected(index) {\n this.emit('wizardPageSelected', this.pages[index], index);\n }\n }, {\n key: \"attachHeader\",\n value: function attachHeader() {\n var _this11 = this;\n var isAllowPrevious = this.isAllowPrevious();\n this.attachTooltips(this.refs[\"\".concat(this.wizardKey, \"-tooltip\")], this.currentPanel.tooltip);\n if (this.isBreadcrumbClickable() || isAllowPrevious) {\n var _this$refs2;\n (_this$refs2 = this.refs[\"\".concat(this.wizardKey, \"-link\")]) === null || _this$refs2 === void 0 ? void 0 : _this$refs2.forEach(function (link, index) {\n if (!isAllowPrevious || index <= _this11.enabledIndex) {\n _this11.addEventListener(link, 'click', function (event) {\n _this11.emit('wizardNavigationClicked', _this11.pages[index]);\n event.preventDefault();\n return _this11.setPage(index).then(function () {\n _this11.emitWizardPageSelected(index);\n });\n });\n }\n });\n }\n }\n }, {\n key: \"detachNav\",\n value: function detachNav() {\n var _this12 = this;\n if (this.component.navigateOnEnter) {\n this.removeEventListener(document, 'keyup', this.handleNaviageteOnEnter.bind(this));\n }\n if (this.component.saveOnEnter) {\n this.removeEventListener(document, 'keyup', this.handleSaveOnEnter.bind(this));\n }\n _lodash[\"default\"].each(this.buttons, function (button) {\n _this12.removeEventListener(_this12.refs[\"\".concat(_this12.wizardKey, \"-\").concat(button.name)], 'click');\n });\n }\n }, {\n key: \"detachHeader\",\n value: function detachHeader() {\n var _this13 = this;\n if (this.refs[\"\".concat(this.wizardKey, \"-link\")]) {\n this.refs[\"\".concat(this.wizardKey, \"-link\")].forEach(function (link) {\n _this13.removeEventListener(link, 'click');\n });\n }\n }\n }, {\n key: \"transformPages\",\n value: function transformPages() {\n var _this14 = this;\n var allComponents = [];\n var components = this.getSortedComponents(this);\n var defferedComponents = [];\n this.allPages = [];\n\n // Get all components including all nested components and line up in the correct order\n var getAllComponents = function getAllComponents(nestedComp, compsArr) {\n var pushAllowed = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n var nestedPages = [];\n var dataArrayComponents = ['datagrid', 'editgrid', 'dynamicWizard'];\n var currentComponents = nestedComp !== null && nestedComp !== void 0 && nestedComp.subForm ? _this14.getSortedComponents(nestedComp.subForm) : (nestedComp === null || nestedComp === void 0 ? void 0 : nestedComp.components) || [];\n var visibleComponents = currentComponents.filter(function (comp) {\n return comp._visible;\n });\n var filteredComponents = visibleComponents.filter(function (comp) {\n return !dataArrayComponents.includes(comp.component.type) && (comp.type !== 'form' || comp.isNestedWizard);\n });\n var additionalComponents = currentComponents.filter(function (comp) {\n var _comp$subForm;\n return ((_comp$subForm = comp.subForm) === null || _comp$subForm === void 0 ? void 0 : _comp$subForm._form.display) !== 'wizard';\n });\n var hasNested = false;\n (0, _utils.eachComponent)(filteredComponents, function (comp) {\n if (comp && comp.component) {\n if (comp.component.type === 'panel' && comp !== null && comp !== void 0 && comp.parent.wizard && !getAllComponents(comp, compsArr, false)) {\n if (pushAllowed) {\n _this14.setRootPanelId(comp);\n nestedPages.push(comp);\n }\n hasNested = true;\n }\n if (comp.isNestedWizard && comp.subForm) {\n var hasNestedForm = getAllComponents(comp, nestedPages, pushAllowed);\n if (!hasNested) {\n hasNested = hasNestedForm;\n }\n }\n }\n }, true);\n if (nestedComp.component.type === 'panel') {\n if (!hasNested && pushAllowed) {\n _this14.setRootPanelId(nestedComp);\n compsArr.push(nestedComp);\n }\n if (hasNested && additionalComponents.length) {\n var newComp = _lodash[\"default\"].clone(nestedComp);\n newComp.components = additionalComponents;\n _this14.setRootPanelId(newComp);\n defferedComponents.push(newComp);\n }\n }\n if (pushAllowed) {\n compsArr.push.apply(compsArr, _toConsumableArray(defferedComponents).concat(nestedPages));\n defferedComponents = [];\n }\n return hasNested;\n };\n components.forEach(function (component) {\n if (component.visible) {\n getAllComponents(component, allComponents);\n }\n }, []);\n\n // recalculate pages only for root wizards, including the situation when the wizard is in a wrapper\n if (this.localRoot && this.id === this.localRoot.id) {\n allComponents.forEach(function (comp, index) {\n comp.eachComponent(function (component) {\n component.page = index;\n });\n });\n }\n this.allPages = allComponents;\n }\n }, {\n key: \"getSortedComponents\",\n value: function getSortedComponents(_ref) {\n var components = _ref.components,\n originalComponents = _ref.originalComponents;\n // sorts components if they were shuffled after the conditional logic\n var currentComponents = [];\n var currentPages = [];\n if (components && components.length) {\n components.map(function (page) {\n if (page.component.type === 'panel') {\n currentPages[page.component.key || page.component.title] = page;\n }\n });\n }\n originalComponents === null || originalComponents === void 0 ? void 0 : originalComponents.forEach(function (item) {\n if (!item.key) {\n item.key = item.title;\n }\n if (currentPages[item.key]) {\n currentComponents.push(currentPages[item.key]);\n }\n });\n return currentComponents;\n }\n }, {\n key: \"findRootPanel\",\n value: function findRootPanel(component) {\n var _component$parent;\n return (_component$parent = component.parent) !== null && _component$parent !== void 0 && _component$parent.parent ? this.findRootPanel(component.parent) : component;\n }\n }, {\n key: \"setRootPanelId\",\n value: function setRootPanelId(component) {\n var _component$parent2;\n if (component.rootPanelId && component.rootPanelId !== component.id) {\n return;\n }\n var parent = (_component$parent2 = component.parent) !== null && _component$parent2 !== void 0 && _component$parent2.parent ? this.findRootPanel(component.parent) : component;\n component.rootPanelId = parent.id;\n }\n }, {\n key: \"establishPages\",\n value: function establishPages() {\n var _this15 = this;\n var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.data;\n this.pages = [];\n this.prefixComps = [];\n this.suffixComps = [];\n var visible = [];\n var currentPages = {};\n var pageOptions = _objectSpread(_objectSpread({}, _lodash[\"default\"].clone(this.options)), this.parent ? {\n root: this\n } : {});\n if (this.components && this.components.length) {\n this.components.forEach(function (page) {\n if (page.component.type === 'panel') {\n currentPages[page.component.key || page.component.title] = page;\n }\n });\n }\n if (this.originalComponents) {\n this.originalComponents.forEach(function (item) {\n if (item.type === 'panel') {\n if (!item.key) {\n item.key = item.title;\n }\n var page = currentPages[item.key];\n var forceShow = _this15.options.show ? _this15.options.show[item.key] : false;\n var forceHide = _this15.options.hide ? _this15.options.hide[item.key] : false;\n var isVisible = !page ? (0, _utils.checkCondition)(item, data, data, _this15.component, _this15) && !item.hidden : page.visible;\n if (forceShow) {\n isVisible = true;\n } else if (forceHide) {\n isVisible = false;\n }\n if (isVisible) {\n visible.push(item);\n if (page) {\n _this15.pages.push(page);\n }\n }\n if (!page && isVisible) {\n page = _this15.createComponent(item, pageOptions);\n page.visible = isVisible;\n _this15.pages.push(page);\n page.eachComponent(function (component) {\n component.page = _this15.pages.length - 1;\n });\n }\n } else if (item.type !== 'button') {\n if (!_this15.pages.length) {\n _this15.prefixComps.push(_this15.createComponent(item, pageOptions));\n } else {\n _this15.suffixComps.push(_this15.createComponent(item, pageOptions));\n }\n }\n });\n }\n if (this.pages.length) {\n this.emit('pagesChanged');\n }\n this.transformPages();\n if (this.allPages && this.allPages.length) {\n this.updatePages();\n }\n return visible;\n }\n }, {\n key: \"updatePages\",\n value: function updatePages() {\n this.pages = this.allPages;\n }\n }, {\n key: \"addComponents\",\n value: function addComponents() {\n this.establishPages();\n }\n }, {\n key: \"setPage\",\n value: function setPage(num) {\n var _this16 = this;\n if (num === this.page) {\n return _nativePromiseOnly[\"default\"].resolve();\n }\n if (num >= 0 && num < this.pages.length) {\n this.page = num;\n this.pageFieldLogic(num);\n this.getNextPage();\n var parentNum = num;\n if (this.hasExtraPages) {\n var pageFromPages = this.pages[num];\n var pageFromComponents = this.components[num];\n if (!pageFromComponents || (pageFromPages === null || pageFromPages === void 0 ? void 0 : pageFromPages.id) !== pageFromComponents.id) {\n parentNum = this.components.findIndex(function (comp) {\n var _this16$pages, _this16$pages$parentN;\n return comp.id === ((_this16$pages = _this16.pages) === null || _this16$pages === void 0 ? void 0 : (_this16$pages$parentN = _this16$pages[parentNum]) === null || _this16$pages$parentN === void 0 ? void 0 : _this16$pages$parentN.rootPanelId);\n });\n }\n }\n if (!this._seenPages.includes(parentNum)) {\n this._seenPages = this._seenPages.concat(parentNum);\n }\n this.redraw().then(function () {\n _this16.checkData(_this16.submission.data);\n });\n return _nativePromiseOnly[\"default\"].resolve();\n } else if (!this.pages.length) {\n this.redraw();\n return _nativePromiseOnly[\"default\"].resolve();\n }\n return _nativePromiseOnly[\"default\"].reject('Page not found');\n }\n }, {\n key: \"pageFieldLogic\",\n value: function pageFieldLogic(page) {\n var _this$pages3;\n if ((_this$pages3 = this.pages) !== null && _this$pages3 !== void 0 && _this$pages3[page]) {\n // Handle field logic on pages.\n this.component = this.pages[page].component;\n this.originalComponent = (0, _utils.fastCloneDeep)(this.component);\n this.fieldLogic(this.data);\n // If disabled changed, be sure to distribute the setting.\n this.disabled = this.shouldDisabled;\n }\n }\n }, {\n key: \"currentPage\",\n get: function get() {\n return this.pages && this.pages.length >= this.page ? this.pages[this.page] : {\n components: []\n };\n }\n }, {\n key: \"getNextPage\",\n value: function getNextPage() {\n var _this$pages4;\n if ((_this$pages4 = this.pages) !== null && _this$pages4 !== void 0 && _this$pages4[this.page]) {\n var data = this.submission.data;\n var form = this.pages[this.page].component;\n // Check conditional nextPage\n if (form) {\n var page = this.pages.length > this.page + 1 && !this.showAllErrors ? this.page + 1 : -1;\n if (form.nextPage) {\n var next = this.evaluate(form.nextPage, {\n next: page,\n data: data,\n page: page,\n form: form\n }, 'next');\n if (next === null) {\n this.currentNextPage = null;\n return null;\n }\n var pageNum = parseInt(next, 10);\n if (!isNaN(parseInt(pageNum, 10)) && isFinite(pageNum)) {\n this.currentNextPage = pageNum;\n return pageNum;\n }\n this.currentNextPage = this.getPageIndexByKey(next);\n return this.currentNextPage;\n }\n this.currentNextPage = page;\n return page;\n }\n this.currentNextPage = null;\n }\n return null;\n }\n }, {\n key: \"getPreviousPage\",\n value: function getPreviousPage() {\n return this.page - 1;\n }\n }, {\n key: \"beforeSubmit\",\n value: function beforeSubmit() {\n var pages = this.getPages();\n return _nativePromiseOnly[\"default\"].all(pages.map(function (page) {\n page.options.beforeSubmit = true;\n return page.beforeSubmit();\n }));\n }\n }, {\n key: \"beforePage\",\n value: function beforePage(next) {\n var _this17 = this;\n return new _nativePromiseOnly[\"default\"](function (resolve, reject) {\n _this17.hook(next ? 'beforeNext' : 'beforePrev', _this17.currentPage, _this17.submission, function (err) {\n if (err) {\n _this17.showErrors(err, true);\n reject(err);\n }\n var form = _this17.currentPage;\n if (form) {\n form.beforePage(next).then(resolve)[\"catch\"](reject);\n } else {\n resolve();\n }\n });\n });\n }\n }, {\n key: \"emitNextPage\",\n value: function emitNextPage() {\n this.emit('nextPage', {\n page: this.page,\n submission: this.submission\n });\n }\n }, {\n key: \"nextPage\",\n value: function nextPage() {\n var _this18 = this;\n // Read-only forms should not worry about validation before going to next page, nor should they submit.\n if (this.options.readOnly) {\n return this.beforePage(true).then(function () {\n return _this18.setPage(_this18.getNextPage()).then(function () {\n _this18.emitNextPage();\n });\n });\n }\n\n // Validate the form, before go to the next page\n if (this.checkValidity(this.localData, true, this.localData, true)) {\n this.checkData(this.submission.data);\n return this.beforePage(true).then(function () {\n return _this18.setPage(_this18.getNextPage()).then(function () {\n if (!(_this18.options.readOnly || _this18.editMode) && _this18.enabledIndex < _this18.page) {\n _this18.enabledIndex = _this18.page;\n _this18.redraw();\n }\n _this18.emitNextPage();\n });\n });\n } else {\n this.currentPage.components.forEach(function (comp) {\n return comp.setPristine(false);\n });\n this.scrollIntoView(this.element);\n return _nativePromiseOnly[\"default\"].reject(this.showErrors([], true));\n }\n }\n }, {\n key: \"emitPrevPage\",\n value: function emitPrevPage() {\n this.emit('prevPage', {\n page: this.page,\n submission: this.submission\n });\n }\n }, {\n key: \"prevPage\",\n value: function prevPage() {\n var _this19 = this;\n return this.beforePage().then(function () {\n return _this19.setPage(_this19.getPreviousPage()).then(function () {\n _this19.emitPrevPage();\n });\n });\n }\n }, {\n key: \"cancel\",\n value: function cancel(noconfirm) {\n var _this20 = this;\n if (this.options.readOnly) {\n return _nativePromiseOnly[\"default\"].resolve();\n }\n if (_get(_getPrototypeOf(Wizard.prototype), \"cancel\", this).call(this, noconfirm)) {\n this.setPristine(true);\n return this.setPage(0).then(function () {\n if (_this20.enabledIndex) {\n _this20.enabledIndex = 0;\n }\n _this20.onChange();\n _this20.redraw();\n return _this20.page;\n });\n }\n return _nativePromiseOnly[\"default\"].resolve();\n }\n }, {\n key: \"getPageIndexByKey\",\n value: function getPageIndexByKey(key) {\n var pageIndex = this.page;\n this.pages.forEach(function (page, index) {\n if (page.component.key === key) {\n pageIndex = index;\n return false;\n }\n });\n return pageIndex;\n }\n }, {\n key: \"schema\",\n get: function get() {\n return this.wizard;\n }\n }, {\n key: \"setComponentSchema\",\n value: function setComponentSchema() {\n var _this21 = this;\n var pageKeys = {};\n this.originalComponents = [];\n this.component.components.map(function (item) {\n if (item.type === 'panel') {\n item.key = (0, _utils.uniqueKey)(pageKeys, item.key || 'panel');\n pageKeys[item.key] = true;\n if (_this21.wizard.full) {\n _this21.options.show = _this21.options.show || {};\n _this21.options.show[item.key] = true;\n } else if (_this21.wizard.hasOwnProperty('full') && !_lodash[\"default\"].isEqual(_this21.originalOptions.show, _this21.options.show)) {\n _this21.options.show = _objectSpread({}, _this21.originalOptions.show || {});\n }\n }\n _this21.originalComponents.push(_lodash[\"default\"].clone(item));\n });\n if (!Object.keys(pageKeys).length) {\n var newPage = {\n type: 'panel',\n title: 'Page 1',\n label: 'Page 1',\n key: 'page1',\n components: this.component.components\n };\n this.component.components = [newPage];\n this.originalComponents.push(_lodash[\"default\"].clone(newPage));\n }\n }\n }, {\n key: \"setForm\",\n value: function setForm(form, flags) {\n if (!form) {\n return;\n }\n return _get(_getPrototypeOf(Wizard.prototype), \"setForm\", this).call(this, form, flags);\n }\n }, {\n key: \"onSetForm\",\n value: function onSetForm(clonedForm, initialForm) {\n this.component.components = (this._parentPath ? initialForm.components : clonedForm.components) || [];\n this.setComponentSchema();\n }\n }, {\n key: \"setEditMode\",\n value: function setEditMode(submission) {\n if (!this.editMode && submission._id && !this.options.readOnly) {\n this.editMode = true;\n this.redraw();\n }\n }\n }, {\n key: \"setValue\",\n value: function setValue(submission) {\n var _this22 = this;\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var ignoreEstablishment = arguments.length > 2 ? arguments[2] : undefined;\n this._submission = submission;\n if (flags && flags.fromSubmission && (this.options.readOnly || this.editMode) && !this.isHtmlRenderMode() || flags && flags.fromSubmission && (this.prefixComps.length || this.suffixComps.length) && submission._id) {\n this._data = submission.data;\n }\n if (!ignoreEstablishment) {\n this.establishPages(submission.data);\n }\n var changed = this.getPages({\n all: true\n }).reduce(function (changed, page) {\n return _this22.setNestedValue(page, submission.data, flags, changed) || changed;\n }, false);\n if (changed) {\n this.pageFieldLogic(this.page);\n }\n this.setEditMode(submission);\n return changed;\n }\n }, {\n key: \"isClickable\",\n value: function isClickable(page, index) {\n return this.page !== index && (0, _utils.firstNonNil)([_lodash[\"default\"].get(page, 'breadcrumbClickable'), this.options.breadcrumbSettings.clickable]);\n }\n }, {\n key: \"hasButton\",\n value: function hasButton(name) {\n var nextPage = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.getNextPage();\n // get page options with global options as default values\n var _$get = _lodash[\"default\"].get(this.currentPage, 'component.buttonSettings', {}),\n _$get$previous = _$get.previous,\n previous = _$get$previous === void 0 ? this.options.buttonSettings.showPrevious : _$get$previous,\n _$get$cancel = _$get.cancel,\n cancel = _$get$cancel === void 0 ? this.options.buttonSettings.showCancel : _$get$cancel,\n _$get$submit = _$get.submit,\n submit = _$get$submit === void 0 ? this.options.buttonSettings.showSubmit : _$get$submit,\n _$get$next = _$get.next,\n next = _$get$next === void 0 ? this.options.buttonSettings.showNext : _$get$next;\n switch (name) {\n case 'previous':\n return previous && this.getPreviousPage() > -1;\n case 'next':\n return next && nextPage !== null && nextPage !== -1;\n case 'cancel':\n return cancel && !this.options.readOnly;\n case 'submit':\n return submit && !this.options.readOnly && (nextPage === null || this.page === this.pages.length - 1);\n default:\n return true;\n }\n }\n }, {\n key: \"pageId\",\n value: function pageId(page) {\n if (page.key) {\n // Some panels have the same key....\n return \"\".concat(page.key, \"-\").concat(page.title);\n } else if (page.components && page.components.length > 0) {\n return this.pageId(page.components[0]);\n } else {\n return page.title;\n }\n }\n }, {\n key: \"onChange\",\n value: function onChange(flags, changed, modified, changes) {\n var _this23 = this;\n _get(_getPrototypeOf(Wizard.prototype), \"onChange\", this).call(this, flags, changed, modified, changes);\n if (this.alert && !this.submitted) {\n this.checkValidity(this.localData, false, this.localData, true);\n this.showErrors([], true, true);\n }\n\n // If the pages change, need to redraw the header.\n var currentPanels;\n var panels;\n var currentNextPage = this.currentNextPage;\n if (this.hasExtraPages) {\n currentPanels = this.pages.map(function (page) {\n return page.component.key;\n });\n this.establishPages();\n panels = this.pages.map(function (page) {\n return page.component.key;\n });\n } else {\n var _this$currentPanel, _this$currentPanels;\n currentPanels = this.currentPanels || this.pages.map(function (page) {\n return page.component.key;\n });\n panels = this.establishPages().map(function (panel) {\n return panel.key;\n });\n this.currentPanels = panels;\n if ((_this$currentPanel = this.currentPanel) !== null && _this$currentPanel !== void 0 && _this$currentPanel.key && (_this$currentPanels = this.currentPanels) !== null && _this$currentPanels !== void 0 && _this$currentPanels.length) {\n this.setPage(this.currentPanels.findIndex(function (panel) {\n return panel === _this23.currentPanel.key;\n }));\n }\n }\n if (!_lodash[\"default\"].isEqual(panels, currentPanels) || flags && flags.fromSubmission) {\n this.redrawHeader();\n }\n\n // If the next page changes, then make sure to redraw navigation.\n if (currentNextPage !== this.getNextPage()) {\n this.redrawNavigation();\n }\n if (this.options.readOnly && (this.prefixComps.length || this.suffixComps.length)) {\n this.redraw();\n }\n }\n }, {\n key: \"redraw\",\n value: function redraw() {\n var _this$parent, _this$parent$componen;\n if ((_this$parent = this.parent) !== null && _this$parent !== void 0 && (_this$parent$componen = _this$parent.component) !== null && _this$parent$componen !== void 0 && _this$parent$componen.modalEdit) {\n return this.parent.redraw();\n }\n return _get(_getPrototypeOf(Wizard.prototype), \"redraw\", this).call(this);\n }\n }, {\n key: \"checkValidity\",\n value: function checkValidity(data, dirty, row, currentPageOnly) {\n if (!this.checkCondition(row, data)) {\n this.setCustomValidity('');\n return true;\n }\n var components = !currentPageOnly || this.isLastPage() ? this.getComponents() : this.currentPage.components;\n return components.reduce(function (check, comp) {\n return comp.checkValidity(data, dirty, row) && check;\n }, true);\n }\n }, {\n key: \"errors\",\n get: function get() {\n if (!this.isLastPage()) {\n return this.currentPage.errors;\n }\n return _get(_getPrototypeOf(Wizard.prototype), \"errors\", this);\n }\n }, {\n key: \"focusOnComponent\",\n value: function focusOnComponent(key) {\n var _this24 = this;\n var pageIndex = 0;\n var _this$pages$filter = this.pages.filter(function (page, index) {\n var hasComponent = false;\n page.getComponent(key, function (comp) {\n if (comp.path === key) {\n pageIndex = index;\n hasComponent = true;\n }\n });\n return hasComponent;\n }),\n _this$pages$filter2 = _slicedToArray(_this$pages$filter, 1),\n page = _this$pages$filter2[0];\n if (page && page !== this.currentPage) {\n return this.setPage(pageIndex).then(function () {\n _this24.checkValidity(_this24.submission.data, true, _this24.submission.data);\n _this24.showErrors();\n _get(_getPrototypeOf(Wizard.prototype), \"focusOnComponent\", _this24).call(_this24, key);\n });\n }\n return _get(_getPrototypeOf(Wizard.prototype), \"focusOnComponent\", this).call(this, key);\n }\n }]);\n return Wizard;\n}(_Webform2[\"default\"]);\nexports[\"default\"] = Wizard;\nWizard.setBaseUrl = _Formio.GlobalFormio.setBaseUrl;\nWizard.setApiUrl = _Formio.GlobalFormio.setApiUrl;\nWizard.setAppUrl = _Formio.GlobalFormio.setAppUrl;\n\n//# sourceURL=webpack://Formio/./lib/Wizard.js?"); /***/ }), @@ -136,7 +147,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.array.find-index.js */ \"./node_modules/core-js/modules/es.array.find-index.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.includes.js */ \"./node_modules/core-js/modules/es.array.includes.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.includes.js */ \"./node_modules/core-js/modules/es.string.includes.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.sort.js */ \"./node_modules/core-js/modules/es.array.sort.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.splice.js */ \"./node_modules/core-js/modules/es.array.splice.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.find.js */ \"./node_modules/core-js/modules/es.array.find.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\nvar _WebformBuilder2 = _interopRequireDefault(__webpack_require__(/*! ./WebformBuilder */ \"./lib/WebformBuilder.js\"));\n\nvar _Webform = _interopRequireDefault(__webpack_require__(/*! ./Webform */ \"./lib/Webform.js\"));\n\nvar _builder = _interopRequireDefault(__webpack_require__(/*! ./utils/builder */ \"./lib/utils/builder.js\"));\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nvar _utils = __webpack_require__(/*! ./utils/utils */ \"./lib/utils/utils.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar WizardBuilder = /*#__PURE__*/function (_WebformBuilder) {\n _inherits(WizardBuilder, _WebformBuilder);\n\n var _super = _createSuper(WizardBuilder);\n\n function WizardBuilder() {\n var _this;\n\n _classCallCheck(this, WizardBuilder);\n\n var element, options;\n\n if (arguments[0] instanceof HTMLElement || arguments[1]) {\n element = arguments[0];\n options = arguments[1];\n } else {\n options = arguments[0];\n } // Reset skipInit in case PDFBuilder has set it.\n\n\n options.skipInit = false;\n options.display = 'wizard';\n _this = _super.call(this, element, options);\n _this._form = {\n components: [_this.getPageConfig(1)]\n };\n _this.page = 0; // Need to create a component order for each group.\n\n var _loop = function _loop(group) {\n if (_this.groups[group] && _this.groups[group].components) {\n _this.groups[group].componentOrder = Object.keys(_this.groups[group].components).map(function (key) {\n return _this.groups[group].components[key];\n }).filter(function (component) {\n return component && !component.ignore;\n }).sort(function (a, b) {\n return a.weight - b.weight;\n }).map(function (component) {\n return component.key;\n });\n }\n };\n\n for (var group in _this.groups) {\n _loop(group);\n }\n\n _this.options.hooks.attachPanel = function (element, component) {\n if (component.refs.removeComponent) {\n _this.addEventListener(component.refs.removeComponent, 'click', function () {\n var pageIndex = _this.pages.findIndex(function (page) {\n return page.key === component.key;\n });\n\n var componentIndex = _this._form.components.findIndex(function (comp) {\n return comp.key === component.key;\n });\n\n if (pageIndex !== -1) {\n _this.removePage(pageIndex, componentIndex);\n }\n });\n }\n };\n\n var originalRenderComponentsHook = _this.options.hooks.renderComponents;\n\n _this.options.hooks.renderComponents = function (html, _ref) {\n var components = _ref.components,\n self = _ref.self;\n\n if (self.type === 'form' && !self.root) {\n return html;\n } else {\n return originalRenderComponentsHook(html, {\n components: components,\n self: self\n });\n }\n };\n\n var originalAttachComponentsHook = _this.options.hooks.attachComponents;\n\n _this.options.hooks.attachComponents = function (element, components, container, component) {\n if (component.type === 'form' && !component.root) {\n return element;\n }\n\n return originalAttachComponentsHook(element, components, container, component);\n }; // Wizard pages don't replace themselves in the right array. Do that here.\n\n\n _this.on('saveComponent', function (component, originalComponent) {\n var webformComponents = _this.webform.components.map(function (_ref2) {\n var component = _ref2.component;\n return component;\n });\n\n if (_this._form.components.includes(originalComponent)) {\n _this._form.components[_this._form.components.indexOf(originalComponent)] = component;\n\n _this.rebuild();\n } else if (webformComponents.includes(originalComponent)) {\n _this._form.components.push(component);\n\n _this.rebuild();\n } else {\n // Fallback to look for panel based on key.\n var formComponentIndex = _this._form.components.findIndex(function (comp) {\n return originalComponent.key === comp.key;\n });\n\n if (formComponentIndex !== -1) {\n _this._form.components[formComponentIndex] = component;\n\n _this.rebuild();\n }\n }\n }, true);\n\n return _this;\n }\n\n _createClass(WizardBuilder, [{\n key: \"allowDrop\",\n value: function allowDrop(element) {\n return this.webform && this.webform.refs && this.webform.refs.webform === element ? false : true;\n }\n }, {\n key: \"pages\",\n get: function get() {\n return _lodash.default.filter(this._form.components, {\n type: 'panel'\n });\n }\n }, {\n key: \"currentPage\",\n get: function get() {\n var pages = this.pages;\n return pages && pages.length >= this.page ? pages[this.page] : null;\n }\n }, {\n key: \"form\",\n get: function get() {\n return this._form;\n },\n set: function set(value) {\n this._form = value;\n\n if (!this._form.components || !Array.isArray(this._form.components)) {\n this._form.components = [];\n }\n\n if (this.pages.length === 0) {\n var components = this._form.components.filter(function (component) {\n return component.type !== 'button';\n });\n\n this._form.components = [this.getPageConfig(1, components)];\n }\n\n this.rebuild();\n }\n }, {\n key: \"schema\",\n get: function get() {\n _lodash.default.assign(this.currentPage, this.webform._form.components[0]);\n\n var webform = new _Webform.default(this.options);\n webform.setForm(this._form, {\n noEmit: true\n });\n return webform.schema;\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n\n return this.renderTemplate('builderWizard', {\n sidebar: this.renderTemplate('builderSidebar', {\n scrollEnabled: this.sideBarScroll,\n groupOrder: this.groupOrder,\n groupId: \"builder-sidebar-\".concat(this.id),\n groups: this.groupOrder.map(function (groupKey) {\n return _this2.renderTemplate('builderSidebarGroup', {\n group: _this2.groups[groupKey],\n groupKey: groupKey,\n groupId: \"builder-sidebar-\".concat(_this2.id),\n subgroups: _this2.groups[groupKey].subgroups.map(function (group) {\n return _this2.renderTemplate('builderSidebarGroup', {\n group: group,\n groupKey: group.key,\n groupId: \"group-container-\".concat(groupKey),\n subgroups: []\n });\n })\n });\n })\n }),\n pages: this.pages,\n form: this.webform.render()\n });\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n var _this3 = this;\n\n this.loadRefs(element, {\n addPage: 'multiple',\n gotoPage: 'multiple'\n });\n this.refs.addPage.forEach(function (link) {\n _this3.addEventListener(link, 'click', function (event) {\n event.preventDefault();\n\n _this3.addPage();\n });\n });\n this.refs.gotoPage.forEach(function (link, index) {\n _this3.addEventListener(link, 'click', function (event) {\n event.preventDefault();\n\n _this3.setPage(index);\n });\n });\n return _get(_getPrototypeOf(WizardBuilder.prototype), \"attach\", this).call(this, element);\n }\n }, {\n key: \"rebuild\",\n value: function rebuild() {\n var page = this.currentPage;\n this.webform.setForm({\n display: 'form',\n type: 'form',\n components: page ? [page] : []\n }, {\n keepAsReference: true\n });\n return this.redraw();\n }\n }, {\n key: \"addPage\",\n value: function addPage(page) {\n var newPage = page && page.schema ? (0, _utils.fastCloneDeep)(page.schema) : this.getPageConfig(this.pages.length + 1);\n\n _builder.default.uniquify(this._form.components, newPage);\n\n this._form.components.push(newPage);\n\n this.emitSaveComponentEvent(newPage, newPage, this._form, 'components', this._form.components.length - 1, true, newPage);\n this.emit('change', this._form);\n return this.rebuild();\n }\n }, {\n key: \"removePage\",\n value: function removePage(pageIndex, componentIndex) {\n this._form.components.splice(componentIndex, 1);\n\n this.emit('change', this._form);\n\n if (pageIndex === this.pages.length) {\n // If the last page is removed.\n if (pageIndex === 0) {\n this._form.components.push(this.getPageConfig(1));\n\n return this.rebuild();\n } else {\n return this.setPage(pageIndex - 1);\n }\n } else {\n return this.rebuild();\n }\n }\n }, {\n key: \"setPage\",\n value: function setPage(index) {\n if (index === this.page) {\n return;\n }\n\n this.page = index;\n return this.rebuild();\n }\n }, {\n key: \"getPageConfig\",\n value: function getPageConfig(index) {\n var components = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n return {\n title: \"Page \".concat(index),\n label: \"Page \".concat(index),\n type: 'panel',\n key: \"page\".concat(index),\n components: components\n };\n }\n }, {\n key: \"pasteComponent\",\n value: function pasteComponent(component) {\n if (component instanceof WizardBuilder) {\n return;\n }\n\n if (this._form.components.find(function (comp) {\n return _lodash.default.isEqual(component.component, comp);\n })) {\n this.addPage(component);\n } else {\n return _get(_getPrototypeOf(WizardBuilder.prototype), \"pasteComponent\", this).call(this, component);\n }\n }\n }]);\n\n return WizardBuilder;\n}(_WebformBuilder2.default);\n\nexports[\"default\"] = WizardBuilder;\n\n//# sourceURL=webpack://Formio/./lib/WizardBuilder.js?"); +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n__webpack_require__(/*! core-js/modules/es.array.includes.js */ \"./node_modules/core-js/modules/es.array.includes.js\");\n__webpack_require__(/*! core-js/modules/es.string.includes.js */ \"./node_modules/core-js/modules/es.string.includes.js\");\n__webpack_require__(/*! core-js/modules/es.array.index-of.js */ \"./node_modules/core-js/modules/es.array.index-of.js\");\n__webpack_require__(/*! core-js/modules/es.array.find-index.js */ \"./node_modules/core-js/modules/es.array.find-index.js\");\n__webpack_require__(/*! core-js/modules/es.array.sort.js */ \"./node_modules/core-js/modules/es.array.sort.js\");\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n__webpack_require__(/*! core-js/modules/es.array.is-array.js */ \"./node_modules/core-js/modules/es.array.is-array.js\");\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.array.splice.js */ \"./node_modules/core-js/modules/es.array.splice.js\");\n__webpack_require__(/*! core-js/modules/es.array.find.js */ \"./node_modules/core-js/modules/es.array.find.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _WebformBuilder2 = _interopRequireDefault(__webpack_require__(/*! ./WebformBuilder */ \"./lib/WebformBuilder.js\"));\nvar _Webform = _interopRequireDefault(__webpack_require__(/*! ./Webform */ \"./lib/Webform.js\"));\nvar _builder = _interopRequireDefault(__webpack_require__(/*! ./utils/builder */ \"./lib/utils/builder.js\"));\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nvar _utils = __webpack_require__(/*! ./utils/utils */ \"./lib/utils/utils.js\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar dragula;\nif (typeof window !== 'undefined') {\n // Import from \"dist\" because it would require and \"global\" would not be defined in Angular apps.\n dragula = __webpack_require__(/*! dragula/dist/dragula */ \"./node_modules/dragula/dist/dragula.js\");\n}\nvar WizardBuilder = /*#__PURE__*/function (_WebformBuilder) {\n _inherits(WizardBuilder, _WebformBuilder);\n var _super = _createSuper(WizardBuilder);\n function WizardBuilder() {\n var _this;\n _classCallCheck(this, WizardBuilder);\n var element, options;\n if (arguments[0] instanceof HTMLElement || arguments[1]) {\n element = arguments[0];\n options = arguments[1];\n } else {\n options = arguments[0];\n }\n // Reset skipInit in case PDFBuilder has set it.\n options.skipInit = false;\n options.display = 'wizard';\n _this = _super.call(this, element, options);\n _this._form = {\n components: [_this.getPageConfig(1)]\n };\n _this.page = 0;\n\n // Need to create a component order for each group.\n var _loop = function _loop(group) {\n if (_this.groups[group] && _this.groups[group].components) {\n _this.groups[group].componentOrder = Object.keys(_this.groups[group].components).map(function (key) {\n return _this.groups[group].components[key];\n }).filter(function (component) {\n return component && !component.ignore;\n }).sort(function (a, b) {\n return a.weight - b.weight;\n }).map(function (component) {\n return component.key;\n });\n }\n };\n for (var group in _this.groups) {\n _loop(group);\n }\n var originalRenderComponentsHook = _this.options.hooks.renderComponents;\n _this.options.hooks.renderComponents = function (html, _ref) {\n var components = _ref.components,\n self = _ref.self;\n if (self.type === 'form' && !self.root) {\n return html;\n } else {\n return originalRenderComponentsHook(html, {\n components: components,\n self: self\n });\n }\n };\n var originalAttachComponentsHook = _this.options.hooks.attachComponents;\n _this.options.hooks.attachComponents = function (element, components, container, component) {\n if (component.type === 'form' && !component.root) {\n return element;\n }\n return originalAttachComponentsHook(element, components, container, component);\n };\n\n // Wizard pages don't replace themselves in the right array. Do that here.\n _this.on('saveComponent', function (component, originalComponent) {\n var webformComponents = _this.webform.components.map(function (_ref2) {\n var component = _ref2.component;\n return component;\n });\n if (_this._form.components.includes(originalComponent)) {\n _this._form.components[_this._form.components.indexOf(originalComponent)] = component;\n _this.rebuild();\n } else if (webformComponents.includes(originalComponent)) {\n _this._form.components.push(component);\n _this.rebuild();\n } else {\n // Fallback to look for panel based on key.\n var formComponentIndex = _this._form.components.findIndex(function (comp) {\n return originalComponent.key === comp.key;\n });\n if (formComponentIndex !== -1) {\n _this._form.components[formComponentIndex] = component;\n _this.rebuild();\n }\n }\n }, true);\n return _this;\n }\n _createClass(WizardBuilder, [{\n key: \"removeComponent\",\n value: function removeComponent(component, parent, original) {\n var remove = _get(_getPrototypeOf(WizardBuilder.prototype), \"removeComponent\", this).call(this, component, parent, original);\n // If user agrees to remove the whole group of the components and it could be a Wizard page, find it and remove\n if (remove && component.type === 'panel') {\n var pageIndex = this.pages.findIndex(function (page) {\n return page.key === component.key;\n });\n var componentIndex = this._form.components.findIndex(function (comp) {\n return comp.key === component.key;\n });\n if (pageIndex !== -1) {\n this.removePage(pageIndex, componentIndex);\n }\n }\n return remove;\n }\n }, {\n key: \"allowDrop\",\n value: function allowDrop(element) {\n return this.webform && this.webform.refs && this.webform.refs.webform === element ? false : true;\n }\n }, {\n key: \"pages\",\n get: function get() {\n return _lodash[\"default\"].filter(this._form.components, {\n type: 'panel'\n });\n }\n }, {\n key: \"currentPage\",\n get: function get() {\n var pages = this.pages;\n return pages && pages.length >= this.page ? pages[this.page] : null;\n }\n }, {\n key: \"form\",\n get: function get() {\n return this._form;\n },\n set: function set(value) {\n this._form = value;\n if (!this._form.components || !Array.isArray(this._form.components)) {\n this._form.components = [];\n }\n if (this.pages.length === 0) {\n var components = this._form.components.filter(function (component) {\n return component.type !== 'button';\n });\n this._form.components = [this.getPageConfig(1, components)];\n }\n this.rebuild();\n }\n }, {\n key: \"schema\",\n get: function get() {\n _lodash[\"default\"].assign(this.currentPage, this.webform._form.components[0]);\n var webform = new _Webform[\"default\"](this.options);\n webform.setForm(this._form, {\n noEmit: true\n });\n return webform.schema;\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this2 = this;\n return this.renderTemplate('builderWizard', {\n sidebar: this.renderTemplate('builderSidebar', {\n scrollEnabled: this.sideBarScroll,\n groupOrder: this.groupOrder,\n groupId: \"builder-sidebar-\".concat(this.id),\n groups: this.groupOrder.map(function (groupKey) {\n return _this2.renderTemplate('builderSidebarGroup', {\n group: _this2.groups[groupKey],\n groupKey: groupKey,\n groupId: \"builder-sidebar-\".concat(_this2.id),\n subgroups: _this2.groups[groupKey].subgroups.map(function (group) {\n return _this2.renderTemplate('builderSidebarGroup', {\n group: group,\n groupKey: group.key,\n groupId: \"group-container-\".concat(groupKey),\n subgroups: []\n });\n })\n });\n })\n }),\n pages: this.pages,\n form: this.webform.render()\n });\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n var _this3 = this;\n this.loadRefs(element, {\n addPage: 'multiple',\n gotoPage: 'multiple'\n });\n this.refs.gotoPage.forEach(function (page, index) {\n page.parentNode.dragInfo = {\n index: index\n };\n });\n if (dragula) {\n this.navigationDragula = dragula([this.element.querySelector('.wizard-pages')], {\n // Don't move Add Page button\n moves: function moves(el) {\n return !el.classList.contains('wizard-add-page');\n },\n // Don't allow dragging components after Add Page button\n accepts: function accepts(el, target, source, sibling) {\n return sibling ? true : false;\n }\n }).on('drop', this.onReorder.bind(this));\n }\n this.refs.addPage.forEach(function (link) {\n _this3.addEventListener(link, 'click', function (event) {\n event.preventDefault();\n _this3.addPage();\n });\n });\n this.refs.gotoPage.forEach(function (link, index) {\n _this3.addEventListener(link, 'click', function (event) {\n event.preventDefault();\n _this3.setPage(index);\n });\n });\n return _get(_getPrototypeOf(WizardBuilder.prototype), \"attach\", this).call(this, element);\n }\n }, {\n key: \"detach\",\n value: function detach() {\n if (this.navigationDragula) {\n this.navigationDragula.destroy();\n }\n this.navigationDragula = null;\n _get(_getPrototypeOf(WizardBuilder.prototype), \"detach\", this).call(this);\n }\n }, {\n key: \"rebuild\",\n value: function rebuild() {\n var _this$_form;\n var page = this.currentPage;\n this.webform.setForm({\n display: 'form',\n type: 'form',\n components: page ? [page] : [],\n controller: ((_this$_form = this._form) === null || _this$_form === void 0 ? void 0 : _this$_form.controller) || ''\n }, {\n keepAsReference: true\n });\n return this.redraw();\n }\n }, {\n key: \"addPage\",\n value: function addPage(page) {\n var newPage = page && page.schema ? (0, _utils.fastCloneDeep)(page.schema) : this.getPageConfig(this.pages.length + 1);\n _builder[\"default\"].uniquify(this._form.components, newPage);\n this._form.components.push(newPage);\n this.emitSaveComponentEvent(newPage, newPage, this._form, 'components', this._form.components.length - 1, true, newPage);\n this.emit('change', this._form);\n return this.rebuild();\n }\n }, {\n key: \"removePage\",\n value: function removePage(pageIndex, componentIndex) {\n this._form.components.splice(componentIndex, 1);\n this.emit('change', this._form);\n if (pageIndex === this.pages.length) {\n // If the last page is removed.\n if (pageIndex === 0) {\n this._form.components.push(this.getPageConfig(1));\n return this.rebuild();\n } else {\n return this.setPage(pageIndex - 1);\n }\n } else {\n return this.rebuild();\n }\n }\n }, {\n key: \"onReorder\",\n value: function onReorder(element, _target, _source, sibling) {\n var _this4 = this;\n var isSiblingAnAddPageButton = sibling === null || sibling === void 0 ? void 0 : sibling.classList.contains('wizard-add-page');\n // We still can paste before Add Page button\n if (!element.dragInfo || sibling && !sibling.dragInfo && !isSiblingAnAddPageButton) {\n console.warn('There is no Drag Info available for either dragged or sibling element');\n return;\n }\n var oldPosition = element.dragInfo.index;\n //should drop at next sibling position; no next sibling means drop to last position\n var newPosition = sibling && sibling.dragInfo ? sibling.dragInfo.index : this.pages.length;\n var movedBelow = newPosition > oldPosition;\n var formComponents = (0, _utils.fastCloneDeep)(this._form.components);\n var draggedRowData = this._form.components[oldPosition];\n\n //insert element at new position\n formComponents.splice(newPosition, 0, draggedRowData);\n //remove element from old position (if was moved above, after insertion it's at +1 index)\n formComponents.splice(movedBelow ? oldPosition : oldPosition + 1, 1);\n this._form.components = (0, _utils.fastCloneDeep)(formComponents);\n return this.rebuild().then(function () {\n _this4.emit('change', _this4._form);\n });\n }\n }, {\n key: \"setPage\",\n value: function setPage(index) {\n if (index === this.page) {\n return;\n }\n this.page = index;\n return this.rebuild();\n }\n }, {\n key: \"getPageConfig\",\n value: function getPageConfig(index) {\n var components = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n return {\n title: \"Page \".concat(index),\n label: \"Page \".concat(index),\n type: 'panel',\n key: \"page\".concat(index),\n components: components\n };\n }\n }, {\n key: \"pasteComponent\",\n value: function pasteComponent(component) {\n if (component instanceof WizardBuilder) {\n return;\n }\n if (this._form.components.find(function (comp) {\n return _lodash[\"default\"].isEqual(component.component, comp);\n })) {\n this.addPage(component);\n } else {\n return _get(_getPrototypeOf(WizardBuilder.prototype), \"pasteComponent\", this).call(this, component);\n }\n }\n }]);\n return WizardBuilder;\n}(_WebformBuilder2[\"default\"]);\nexports[\"default\"] = WizardBuilder;\n\n//# sourceURL=webpack://Formio/./lib/WizardBuilder.js?"); /***/ }), @@ -147,7 +158,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\nvar _Element2 = _interopRequireDefault(__webpack_require__(/*! ../Element */ \"./lib/Element.js\"));\n\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar FormioAddon = /*#__PURE__*/function (_Element) {\n _inherits(FormioAddon, _Element);\n\n var _super = _createSuper(FormioAddon);\n\n function FormioAddon(settings, componentInstance) {\n var _this;\n\n _classCallCheck(this, FormioAddon);\n\n _this = _super.call(this, settings);\n _this.namespace = 'formio.plugin';\n _this.component = componentInstance || {};\n _this.settings = _lodash.default.merge({}, _this.defaultSettings, settings || {});\n return _this;\n }\n\n _createClass(FormioAddon, [{\n key: \"defaultSettings\",\n get: function get() {\n return FormioAddon.info.defaultSettings;\n }\n }, {\n key: \"element\",\n get: function get() {\n return this._element;\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n this._element = element;\n return _nativePromiseOnly.default.resolve();\n }\n }, {\n key: \"destroy\",\n value: function destroy() {}\n }], [{\n key: \"info\",\n get: function get() {\n return {\n supportedComponents: [],\n name: 'formioAddon',\n components: [],\n label: 'Formio Addon',\n defaultSettings: {}\n };\n }\n }]);\n\n return FormioAddon;\n}(_Element2.default);\n\nexports[\"default\"] = FormioAddon;\n\n//# sourceURL=webpack://Formio/./lib/addons/FormioAddon.js?"); +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _Element2 = _interopRequireDefault(__webpack_require__(/*! ../Element */ \"./lib/Element.js\"));\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar FormioAddon = /*#__PURE__*/function (_Element) {\n _inherits(FormioAddon, _Element);\n var _super = _createSuper(FormioAddon);\n function FormioAddon(settings, componentInstance) {\n var _this;\n _classCallCheck(this, FormioAddon);\n _this = _super.call(this, settings);\n _this.namespace = 'formio.plugin';\n _this.component = componentInstance || {};\n _this.settings = _lodash[\"default\"].merge({}, _this.defaultSettings, settings || {});\n return _this;\n }\n _createClass(FormioAddon, [{\n key: \"defaultSettings\",\n get: function get() {\n return FormioAddon.info.defaultSettings;\n }\n }, {\n key: \"element\",\n get: function get() {\n return this._element;\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n this._element = element;\n return _nativePromiseOnly[\"default\"].resolve();\n }\n }, {\n key: \"destroy\",\n value: function destroy() {}\n }], [{\n key: \"info\",\n get: function get() {\n return {\n supportedComponents: [],\n name: 'formioAddon',\n components: [],\n label: 'Formio Addon',\n defaultSettings: {}\n };\n }\n }]);\n return FormioAddon;\n}(_Element2[\"default\"]);\nexports[\"default\"] = FormioAddon;\n\n//# sourceURL=webpack://Formio/./lib/addons/FormioAddon.js?"); /***/ }), @@ -158,7 +169,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _utils = _interopRequireDefault(__webpack_require__(/*! ../../components/_classes/component/editForm/utils */ \"./lib/components/_classes/component/editForm/utils.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = [{\n label: 'Strength Levels',\n reorder: false,\n addAnotherPosition: 'bottom',\n layoutFixed: false,\n enableRowGroups: false,\n initEmpty: false,\n tableView: false,\n defaultValue: [{}],\n key: 'levels',\n type: 'editgrid',\n input: true,\n components: [{\n label: 'Name',\n tableView: true,\n validate: {\n required: true\n },\n key: 'name',\n type: 'textfield',\n input: true\n }, {\n label: 'Max Entropy',\n description: \"Specifies the top boundary of the password's entropy(strength) which belongth to this level.\\nCommon entropy values are:\\n
    \\n
  • < 28 bits = Very Weak;
  • \\n
  • 28 - 35 bits = Weak; should keep out most people;
  • \\n
  • 36 - 59 bits = Reasonable; fairly secure passwords for network and company passwords;
  • \\n
  • 60 - 127 bits = Strong; can be good for guarding financial information;
  • \\n
  • > 128 bits = Very Strong; often overkill;
  • \\n
\\n\",\n mask: false,\n spellcheck: true,\n tableView: false,\n delimiter: false,\n requireDecimal: false,\n inputFormat: 'plain',\n validate: {\n required: true,\n min: 1,\n max: 128\n },\n key: 'maxEntropy',\n type: 'number',\n input: true\n }, {\n label: 'Style',\n tooltip: 'Specifies the backgounf color style using bootstrap classes',\n tableView: true,\n data: {\n values: [{\n label: 'Danger',\n value: 'danger'\n }, {\n label: 'Warning',\n value: 'warning'\n }, {\n label: 'Info',\n value: 'info'\n }, {\n label: 'Success',\n value: 'success'\n }]\n },\n selectThreshold: 0.3,\n validate: {\n onlyAvailableItems: false\n },\n key: 'style',\n type: 'select',\n indexeddb: {\n filter: {}\n },\n input: true\n }, {\n label: 'Color',\n placeholder: '#0079c0',\n tooltip: 'Specifies a color of the indicator element',\n tableView: true,\n key: 'color',\n type: 'textfield',\n input: true\n }]\n}, {\n label: 'Update On',\n tableView: true,\n data: {\n values: [{\n label: 'Strength Level Change',\n value: 'levelChange'\n }, {\n label: 'Entropy Change',\n value: 'entropyChange'\n }]\n },\n selectThreshold: 0.3,\n validate: {\n onlyAvailableItems: false\n },\n key: 'updateOn',\n type: 'select',\n indexeddb: {\n filter: {}\n },\n input: true\n}, {\n label: 'Rules',\n reorder: false,\n addAnotherPosition: 'bottom',\n layoutFixed: false,\n enableRowGroups: false,\n initEmpty: false,\n tableView: false,\n defaultValue: [{}],\n key: 'rulesSettings',\n type: 'datagrid',\n input: true,\n components: [{\n label: 'Name',\n tableView: true,\n data: {\n values: [{\n label: 'Length',\n value: 'length'\n }, {\n label: 'Lower Case',\n value: 'lowerCase'\n }, {\n label: 'Upper Case',\n value: 'upperCase'\n }, {\n label: 'Numeric',\n value: 'numeric'\n }, {\n label: 'Symbols',\n value: 'symbols'\n }]\n },\n selectThreshold: 0.3,\n validate: {\n required: true,\n onlyAvailableItems: false\n },\n key: 'name',\n type: 'select',\n indexeddb: {\n filter: {}\n },\n input: true\n }, {\n label: 'Error Message',\n tableView: true,\n key: 'errorMessage',\n type: 'textfield',\n input: true\n }, {\n label: 'Required',\n tableView: false,\n key: 'required',\n type: 'checkbox',\n input: true,\n defaultValue: false\n }]\n}, {\n label: 'Custom Rules',\n tableView: false,\n rowDrafts: false,\n key: 'customRules',\n type: 'editgrid',\n input: true,\n components: [{\n label: 'Name',\n tableView: true,\n validate: {\n required: true\n },\n key: 'name',\n type: 'textfield',\n input: true\n }, _utils.default.javaScriptValue('Check', 'check', '', 1100, '

Example:

valid = !value.includes(data.email) ? true : \"Password should not be variation of the email\";

', '', '', true), {\n label: 'Increase Characters Pool Size',\n description: 'Set this to amount of characters that may be used in the password if there is a specific group of characters is used.\\nE.g., if your validation checks if there is any numeric symbol in the password, then you should set it to 10 (there are 10 possible numbers).\\n',\n mask: false,\n spellcheck: true,\n tableView: false,\n delimiter: false,\n requireDecimal: false,\n inputFormat: 'plain',\n key: 'increaseCharactersPoolSize',\n type: 'number',\n input: true\n }, {\n label: 'Required',\n tooltip: 'Check if this check is required to proceed',\n tableView: false,\n key: 'required',\n type: 'checkbox',\n input: true,\n defaultValue: false\n }]\n}, _utils.default.javaScriptValue('Is Valid', 'isValid', '', 1100, '

Example:

valid = entropy > maxEntropy / 2 ;

', '', 'entropyCurrent entropy bits of the password.' + 'levelCurrent strength level of the password.', true), {\n label: 'Required',\n description: \"Check this if you don't want to allow submitting password which does not correspond to the minimal strength requirements.\",\n tableView: false,\n key: 'required',\n type: 'checkbox',\n input: true,\n defaultValue: false\n}, {\n label: 'Black List',\n tooltip: 'Add words to search in the password. If there are some words from that list were found, the entropy of the password will be recalculated.\\n',\n tableView: true,\n multiple: true,\n key: 'blackList',\n type: 'textfield',\n input: true\n}, _utils.default.javaScriptValue('Custom Blacklisted Words', 'customBlackListedWords', '', 1100, '

Example:

values = [ data.name, data.dataOfBirth, data.favoriteColor ];

', '', '', true), {\n label: 'Disable Blacklisted Words',\n tooltip: 'Check if you want to disable submitting passwords containing words form the clack list',\n tableView: false,\n key: 'disableBlacklistedWords',\n type: 'checkbox',\n input: true,\n defaultValue: false\n}, {\n label: 'Location',\n hideLabel: false,\n tableView: false,\n key: 'location',\n type: 'container',\n input: true,\n components: [{\n label: 'Insert',\n tooltip: 'Specifies where the indicator will be inserted: before or aftre an element',\n tableView: true,\n data: {\n values: [{\n label: 'Before',\n value: 'before'\n }, {\n label: 'After',\n value: 'after'\n }]\n },\n selectThreshold: 0.3,\n validate: {\n onlyAvailableItems: false\n },\n key: 'insert',\n type: 'select',\n indexeddb: {\n filter: {}\n },\n input: true\n }, {\n label: 'Selector',\n placeholder: \"[ref='element']\",\n description: 'Specifies the selector of the element which will be used as a reference to insert the indicator template',\n tableView: true,\n key: 'selector',\n type: 'textfield',\n input: true\n }]\n}, {\n label: 'Template',\n editor: 'ace',\n tableView: true,\n key: 'template',\n type: 'textarea',\n input: true,\n as: 'html'\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/addons/PasswordStrength/PasswordStrengthAddon.form.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _utils = _interopRequireDefault(__webpack_require__(/*! ../../components/_classes/component/editForm/utils */ \"./lib/components/_classes/component/editForm/utils.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = [{\n label: 'Strength Levels',\n reorder: false,\n addAnotherPosition: 'bottom',\n layoutFixed: false,\n enableRowGroups: false,\n initEmpty: false,\n tableView: false,\n defaultValue: [{}],\n key: 'levels',\n type: 'editgrid',\n input: true,\n components: [{\n label: 'Name',\n tableView: true,\n validate: {\n required: true\n },\n key: 'name',\n type: 'textfield',\n input: true\n }, {\n label: 'Max Entropy',\n description: \"Specifies the top boundary of the password's entropy(strength) which belongs to this level.\\nCommon entropy values are:\\n
    \\n
  • < 28 bits = Very Weak;
  • \\n
  • 28 - 35 bits = Weak; should keep out most people;
  • \\n
  • 36 - 59 bits = Reasonable; fairly secure passwords for network and company passwords;
  • \\n
  • 60 - 127 bits = Strong; can be good for guarding financial information;
  • \\n
  • > 128 bits = Very Strong; often overkill;
  • \\n
\\n\",\n mask: false,\n spellcheck: true,\n tableView: false,\n delimiter: false,\n requireDecimal: false,\n inputFormat: 'plain',\n validate: {\n required: true,\n min: 1,\n max: 128\n },\n key: 'maxEntropy',\n type: 'number',\n input: true\n }, {\n label: 'Style',\n tooltip: 'Specifies the background color style using bootstrap classes',\n tableView: true,\n data: {\n values: [{\n label: 'Danger',\n value: 'danger'\n }, {\n label: 'Warning',\n value: 'warning'\n }, {\n label: 'Info',\n value: 'info'\n }, {\n label: 'Success',\n value: 'success'\n }]\n },\n selectThreshold: 0.3,\n validate: {\n onlyAvailableItems: false\n },\n key: 'style',\n type: 'select',\n indexeddb: {\n filter: {}\n },\n input: true\n }, {\n label: 'Color',\n placeholder: '#0079c0',\n tooltip: 'Specifies a color of the indicator element',\n tableView: true,\n key: 'color',\n type: 'textfield',\n input: true\n }]\n}, {\n label: 'Update On',\n tableView: true,\n data: {\n values: [{\n label: 'Strength Level Change',\n value: 'levelChange'\n }, {\n label: 'Entropy Change',\n value: 'entropyChange'\n }]\n },\n selectThreshold: 0.3,\n validate: {\n onlyAvailableItems: false\n },\n key: 'updateOn',\n type: 'select',\n indexeddb: {\n filter: {}\n },\n input: true\n}, {\n label: 'Rules',\n reorder: false,\n addAnotherPosition: 'bottom',\n layoutFixed: false,\n enableRowGroups: false,\n initEmpty: false,\n tableView: false,\n defaultValue: [{}],\n key: 'rulesSettings',\n type: 'datagrid',\n input: true,\n components: [{\n label: 'Name',\n tableView: true,\n data: {\n values: [{\n label: 'Length',\n value: 'length'\n }, {\n label: 'Lower Case',\n value: 'lowerCase'\n }, {\n label: 'Upper Case',\n value: 'upperCase'\n }, {\n label: 'Numeric',\n value: 'numeric'\n }, {\n label: 'Symbols',\n value: 'symbols'\n }]\n },\n selectThreshold: 0.3,\n validate: {\n required: true,\n onlyAvailableItems: false\n },\n key: 'name',\n type: 'select',\n indexeddb: {\n filter: {}\n },\n input: true\n }, {\n label: 'Error Message',\n tableView: true,\n key: 'errorMessage',\n type: 'textfield',\n input: true\n }, {\n label: 'Required',\n tableView: false,\n key: 'required',\n type: 'checkbox',\n input: true,\n defaultValue: false\n }]\n}, {\n label: 'Custom Rules',\n tableView: false,\n rowDrafts: false,\n key: 'customRules',\n type: 'editgrid',\n input: true,\n components: [{\n label: 'Name',\n tableView: true,\n validate: {\n required: true\n },\n key: 'name',\n type: 'textfield',\n input: true\n }, _utils[\"default\"].javaScriptValue('Check', 'check', '', 1100, '

Example:

valid = !value.includes(data.email) ? true : \"Password should not be variation of the email\";

', '', '', true), {\n label: 'Increase Characters Pool Size',\n description: 'Set this to amount of characters that may be used in the password if there is a specific group of characters is used.\\nE.g., if your validation checks if there is any numeric symbol in the password, then you should set it to 10 (there are 10 possible numbers).\\n',\n mask: false,\n spellcheck: true,\n tableView: false,\n delimiter: false,\n requireDecimal: false,\n inputFormat: 'plain',\n key: 'increaseCharactersPoolSize',\n type: 'number',\n input: true\n }, {\n label: 'Required',\n tooltip: 'Check if this check is required to proceed',\n tableView: false,\n key: 'required',\n type: 'checkbox',\n input: true,\n defaultValue: false\n }]\n}, _utils[\"default\"].javaScriptValue('Is Valid', 'isValid', '', 1100, '

Example:

valid = entropy > maxEntropy / 2 ;

', '', 'entropyCurrent entropy bits of the password.' + 'levelCurrent strength level of the password.', true), {\n label: 'Required',\n description: \"Check this if you don't want to allow submitting password which does not correspond to the minimal strength requirements.\",\n tableView: false,\n key: 'required',\n type: 'checkbox',\n input: true,\n defaultValue: false\n}, {\n label: 'Black List',\n tooltip: 'Add words to search in the password. If there are some words from that list were found, the entropy of the password will be recalculated.\\n',\n tableView: true,\n multiple: true,\n key: 'blackList',\n type: 'textfield',\n input: true\n}, _utils[\"default\"].javaScriptValue('Custom Blacklisted Words', 'customBlackListedWords', '', 1100, '

Example:

values = [ data.name, data.dataOfBirth, data.favoriteColor ];

', '', '', true), {\n label: 'Disable Blacklisted Words',\n tooltip: 'Check if you want to disable submitting passwords containing words form the clack list',\n tableView: false,\n key: 'disableBlacklistedWords',\n type: 'checkbox',\n input: true,\n defaultValue: false\n}, {\n label: 'Location',\n hideLabel: false,\n tableView: false,\n key: 'location',\n type: 'container',\n input: true,\n components: [{\n label: 'Insert',\n tooltip: 'Specifies where the indicator will be inserted: before or aftre an element',\n tableView: true,\n data: {\n values: [{\n label: 'Before',\n value: 'before'\n }, {\n label: 'After',\n value: 'after'\n }]\n },\n selectThreshold: 0.3,\n validate: {\n onlyAvailableItems: false\n },\n key: 'insert',\n type: 'select',\n indexeddb: {\n filter: {}\n },\n input: true\n }, {\n label: 'Selector',\n placeholder: \"[ref='element']\",\n description: 'Specifies the selector of the element which will be used as a reference to insert the indicator template',\n tableView: true,\n key: 'selector',\n type: 'textfield',\n input: true\n }]\n}, {\n label: 'Template',\n editor: 'ace',\n tableView: true,\n key: 'template',\n type: 'textarea',\n input: true,\n as: 'html'\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/addons/PasswordStrength/PasswordStrengthAddon.form.js?"); /***/ }), @@ -169,7 +180,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.from.js */ \"./node_modules/core-js/modules/es.array.from.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.slice.js */ \"./node_modules/core-js/modules/es.array.slice.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.array.sort.js */ \"./node_modules/core-js/modules/es.array.sort.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n\n__webpack_require__(/*! core-js/modules/es.math.log2.js */ \"./node_modules/core-js/modules/es.math.log2.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.constructor.js */ \"./node_modules/core-js/modules/es.regexp.constructor.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.join.js */ \"./node_modules/core-js/modules/es.array.join.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nvar _FormioAddon2 = _interopRequireDefault(__webpack_require__(/*! ../FormioAddon */ \"./lib/addons/FormioAddon.js\"));\n\nvar _PasswordStrengthAddon = _interopRequireDefault(__webpack_require__(/*! ./PasswordStrengthAddon.form */ \"./lib/addons/PasswordStrength/PasswordStrengthAddon.form.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar PasswordStrengthAddon = /*#__PURE__*/function (_FormioAddon) {\n _inherits(PasswordStrengthAddon, _FormioAddon);\n\n var _super = _createSuper(PasswordStrengthAddon);\n\n function PasswordStrengthAddon(settings, componentInstance) {\n var _this;\n\n _classCallCheck(this, PasswordStrengthAddon);\n\n _this = _super.call(this, settings, componentInstance);\n _this._entropy = 0; // Set initial value of entropy\n\n _this.levels = _toConsumableArray(_this.settings.levels || _this.defaultSettings.levels);\n\n _this.levels.sort(function (a, b) {\n return a.maxEntropy - b.maxEntropy;\n }); // Sort levels from the lowest one to the highest\n\n\n _this.level = _this.levels[0]; // Set currnt level to the lowest one\n\n _this.maxEntropy = _this.levels[_this.levels.length - 1].maxEntropy; // Set maximal amount of security points based on the highest level\n\n return _this;\n }\n\n _createClass(PasswordStrengthAddon, [{\n key: \"defaultSettings\",\n get: function get() {\n return PasswordStrengthAddon.info.defaultSettings;\n }\n }, {\n key: \"rules\",\n get: function get() {\n var _this2 = this;\n\n return {\n length: {\n check: function check(value, options) {\n var minLength = options.minLength || _this2.component.component.validate.minLength || 6;\n\n if (value.length < minLength) {\n return \"Value must be longer than \".concat(minLength, \" characters\");\n }\n\n return true;\n }\n },\n upperCase: {\n check: function check(value) {\n if (/[A-Z]/g.test(value)) {\n return true;\n }\n\n return 'Value must contain uppercased alphabetical characters';\n },\n increaseCharactersPoolSize: 26\n },\n numeric: {\n check: function check(value) {\n if (/[0-9]/g.test(value)) {\n return true;\n }\n\n return 'Value must contain numeric characters';\n },\n increaseCharactersPoolSize: 10\n },\n lowerCase: {\n check: function check(value) {\n if (/[a-z]/g.test(value)) {\n return true;\n }\n\n return 'Value must contain lowercased alphabetical characters';\n },\n increaseCharactersPoolSize: 26\n },\n symbols: {\n check: function check(value) {\n if (/[ `!@#$%^&*()_+\\-=[\\]{};':\"\\\\|,.<>/?~]/.test(value)) {\n return true;\n }\n\n return 'Value must contain symbols';\n },\n increaseCharactersPoolSize: 32\n }\n };\n }\n }, {\n key: \"charactersPoolLength\",\n get: function get() {\n return this._charactersPoolLength;\n },\n set: function set(value) {\n this._charactersPoolLength = value;\n }\n }, {\n key: \"level\",\n get: function get() {\n return this._level || this.getLevel();\n },\n set: function set(level) {\n this._level = level;\n }\n }, {\n key: \"entropy\",\n get: function get() {\n return this._entropy;\n },\n set: function set(value) {\n var oldLevel = this.getLevel();\n var updateOnEntropyChange = this.settings.updateOn === 'entropyChange' && this._entropy !== value;\n this._entropy = value;\n this.level = this.getLevel();\n var updateOnLevelChange = this.settings.updateOn === 'levelChange' && oldLevel.name !== this.level.name;\n\n if (updateOnLevelChange || updateOnEntropyChange) {\n this.updateView();\n }\n }\n }, {\n key: \"dictionarySize\",\n get: function get() {\n return this.settings.dictionarySize || 171476;\n }\n }, {\n key: \"template\",\n get: function get() {\n return this.settings.template;\n }\n }, {\n key: \"tooltip\",\n get: function get() {\n var _this$level, _this$level2;\n\n return ((_this$level = this.level) === null || _this$level === void 0 ? void 0 : _this$level.tooltip) || \"\".concat((_this$level2 = this.level) === null || _this$level2 === void 0 ? void 0 : _this$level2.name, \" strongness\");\n }\n }, {\n key: \"rulesSettings\",\n get: function get() {\n return this.settings.rulesSettings || [];\n }\n }, {\n key: \"customRules\",\n get: function get() {\n return this.settings.customRules || [];\n }\n }, {\n key: \"log2\",\n value: function log2(value) {\n if (typeof Math.log2 === 'function') {\n return Math.log2(value);\n }\n\n return Math.log(value) * Math.LOG2E;\n }\n }, {\n key: \"calculatePasswordEntropy\",\n value: function calculatePasswordEntropy(passwordLength, charactersPoolSize) {\n return !passwordLength || !charactersPoolSize ? 0 : this.log2(Math.pow(charactersPoolSize, passwordLength));\n }\n }, {\n key: \"calculatePasswordEntropyWords\",\n value: function calculatePasswordEntropyWords(wordsCount) {\n return !this.dictionarySize ? 0 : this.log2(this.dictionarySize) * wordsCount;\n }\n }, {\n key: \"render\",\n value: function render() {\n var view = this.component.interpolate(this.template, {\n entropy: this.entropy,\n maxEntropy: this.maxEntropy,\n level: this.level,\n levelName: this.level.name.replace(' ', '-').toLowerCase(),\n levels: this.levels,\n readOnly: this.component.options.readOnly,\n pristine: this.component.pristine,\n t: this.t.bind(this),\n tooltip: this.tooltip\n });\n return this.component.sanitize(view);\n }\n }, {\n key: \"checkBlackList\",\n value: function checkBlackList(value) {\n var blackList = _toConsumableArray(this.settings.blackList);\n\n var customBlacklistedWords = this.settings.customBlacklistedWords;\n\n if (customBlacklistedWords && typeof customBlacklistedWords === 'string') {\n customBlacklistedWords = this.evaluate(customBlacklistedWords, this.component.evalContext({\n value: value\n }), 'values');\n\n if (customBlacklistedWords && customBlacklistedWords.length) {\n blackList.push.apply(blackList, _toConsumableArray(customBlacklistedWords));\n }\n }\n\n var restValue = value;\n var blacklistedWords = [];\n\n for (var i = 0; i < blackList.length; i++) {\n var word = blackList[i];\n var regExp = new RegExp(\"\".concat(word), 'gi');\n\n if (regExp.test(value)) {\n blacklistedWords.push(word);\n restValue = restValue.replace(regExp, '');\n } // If less the 3 symboles left, just stop iterating\n\n\n if (restValue.length < 3) {\n break;\n }\n }\n\n if (blacklistedWords.length) {\n // If there are some random characters except of blacklisted words in the password,\n // calculate the entropy for them\n var _ref = restValue.length ? this.performChecks(restValue) : 0,\n charactersPoolSize = _ref.charactersPoolSize;\n\n var entropyOfNonblacklistedValue = this.calculatePasswordEntropy(restValue.length, charactersPoolSize); // Calculate the entropy if the biggest part of the password could be picked up from dictionary words\n\n var dictionaryCheckEntropy = this.calculatePasswordEntropyWords(blacklistedWords.length);\n var entropy = dictionaryCheckEntropy + entropyOfNonblacklistedValue;\n return {\n entropy: entropy,\n blacklistedWords: blacklistedWords\n };\n }\n\n return true;\n }\n /**\n * Determines is a password is secure enough to submit\n * @return {boolean}\n */\n\n }, {\n key: \"isValid\",\n value: function isValid() {\n var isValidCheck = this.settings.isValid;\n\n if (isValidCheck && typeof isValidCheck === 'string') {\n var valid = this.evaluate(isValidCheck, this.component.evalContext({\n entropy: this.entropy,\n level: this.level\n }), 'valid');\n return valid;\n }\n\n return this.entropy >= Math.round(this.maxEntropy / 2);\n }\n /**\n * Handles the result of check and constructs a new error object or returns an amount of points to add to the current entropy\n * @param {boolean|number} valid - Determines if the validation was failed or an amount of points if it was passed\n * @param {*} validation - Validation configuration\n * @param {string} value - Value which was validated\n * @param {string} message - Message which should be shown if validation was not passed\n */\n\n }, {\n key: \"handleRuleCheckResult\",\n value: function handleRuleCheckResult(valid, validation, message, errors) {\n if (valid !== true) {\n errors.push({\n validation: validation.name,\n message: message,\n level: validation.required ? 'error' : 'warning'\n });\n } else if (validation.increaseCharactersPoolSize) {\n return validation.increaseCharactersPoolSize;\n }\n\n return 0;\n }\n }, {\n key: \"performChecks\",\n value: function performChecks(value) {\n var _this3 = this;\n\n var errors = [];\n var charactersPoolSize = 0;\n this.rulesSettings.forEach(function (settings) {\n if (_this3.rules[settings.name]) {\n var rule = _lodash.default.merge({}, _this3.rules[settings.name], settings);\n\n var valid = rule.check(value, settings.options || {});\n var message = settings.message || valid;\n charactersPoolSize += _this3.handleRuleCheckResult(valid, rule, message, errors);\n }\n });\n this.customRules.forEach(function (rule) {\n if (rule.check && typeof rule.check === 'string') {\n var valid = _this3.evaluate(rule.check, _this3.component.evalContext({\n value: value\n }), 'valid');\n\n var message = typeof valid === 'string' ? valid : \"Password does not meet \".concat(rule.name, \" validation\");\n charactersPoolSize += _this3.handleRuleCheckResult(valid, rule, message, errors);\n }\n });\n return {\n charactersPoolSize: charactersPoolSize,\n errors: errors\n };\n }\n /**\n * Performs checks to validate password security\n * @param {string} value - Suggested password\n */\n\n }, {\n key: \"checkValidity\",\n value: function checkValidity(value) {\n var _this$settings$blackL;\n\n var passwordLength = value.length;\n\n var _this$performChecks = this.performChecks(value),\n charactersPoolSize = _this$performChecks.charactersPoolSize,\n errors = _this$performChecks.errors;\n\n this.errors = errors;\n var entropy = this.calculatePasswordEntropy(passwordLength, charactersPoolSize);\n var blackListCheck = (_this$settings$blackL = this.settings.blackList) !== null && _this$settings$blackL !== void 0 && _this$settings$blackL.length || this.settings.customBlacklistedWords ? this.checkBlackList(value) : null; // If there were found some words from the black list\n\n if (blackListCheck && blackListCheck !== true) {\n this.handleBlackListCheckResult(blackListCheck); // Select the mininal entropy based on the dictionary check or symbolic check\n\n this.entropy = Math.min(entropy, blackListCheck.entropy);\n } else {\n this.entropy = entropy;\n }\n\n var isValid = this.isValid();\n\n if (!isValid) {\n this.errors.push({\n message: 'Password is not strong enough',\n level: this.settings.required ? 'error' : 'warning'\n });\n }\n\n return !this.errors.length;\n }\n }, {\n key: \"handleBlackListCheckResult\",\n value: function handleBlackListCheckResult(result) {\n var blacklistedWords = result.blacklistedWords;\n var isRequired = this.settings.disableBlacklistedWords;\n var message = \"Password \".concat(isRequired ? 'must' : 'should', \" not include common words: \").concat(blacklistedWords.join(', '));\n var validation = {\n name: 'blacklist',\n required: isRequired\n };\n this.handleRuleCheckResult(false, validation, message, this.errors);\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n var _this4 = this;\n\n _get(_getPrototypeOf(PasswordStrengthAddon.prototype), \"attach\", this).call(this, element);\n\n var container = this.component.ce('div', {\n ref: 'passwordStrengthIndicator'\n });\n var inserted = this.insertContainer(element, container);\n\n if (!inserted) {\n this.component.append(container);\n }\n\n this._element = container;\n this.component.on('redraw', function () {\n return _this4.updateView();\n });\n this.component.on('componentError', function () {\n return _this4.updateView();\n });\n this.updateView();\n }\n }, {\n key: \"insertContainer\",\n value: function insertContainer(element, container) {\n var _this$settings$locati, _this$settings$locati2;\n\n if (!element || !container) {\n return false;\n }\n\n var insert = (_this$settings$locati = this.settings.location) === null || _this$settings$locati === void 0 ? void 0 : _this$settings$locati.insert;\n var selector = (_this$settings$locati2 = this.settings.location) === null || _this$settings$locati2 === void 0 ? void 0 : _this$settings$locati2.selector;\n var reference;\n\n if (selector) {\n reference = element.querySelector(selector);\n }\n\n if (reference) {\n var parent = reference.parentNode;\n\n switch (insert) {\n case 'after':\n if (parent) {\n parent.insertBefore(container, reference.nextSibling || null);\n return true;\n }\n\n return false;\n\n case 'before':\n if (parent) {\n parent.insertBefore(container, reference);\n return true;\n }\n\n return false;\n\n default:\n console.warn(\"Unknown insert option: \".concat(insert));\n return false;\n }\n } else {\n console.warn(\"No elements found using selector: \".concat(selector));\n return false;\n }\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n _get(_getPrototypeOf(PasswordStrengthAddon.prototype), \"destroy\", this).call(this);\n }\n /**\n * Finds the level which one the passed entropy suits\n * @param {number} entropy - Points of password's security\n */\n\n }, {\n key: \"getLevel\",\n value: function getLevel() {\n var entropy = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.entropy;\n var lowestLevel = this.levels[0];\n var prevMaxEntropy = lowestLevel.maxEntropy;\n\n if (entropy <= lowestLevel.maxEntropy) {\n return lowestLevel;\n }\n\n if (entropy >= this.maxEntropy) {\n return this.levels[this.levels.length - 1];\n } // Iterate through levels and find the one which the passed entropy belongs to\n\n\n for (var i = 1; i < this.levels.length; i++) {\n var level = this.levels[i];\n\n if (entropy > prevMaxEntropy && entropy <= level.maxEntropy) {\n return level;\n }\n\n prevMaxEntropy = level.maxEntropy;\n }\n\n return lowestLevel;\n }\n /**\n * Update the current view of the password's security indicator\n */\n\n }, {\n key: \"updateView\",\n value: function updateView() {\n if (!this.element) {\n return;\n }\n\n var view = this.render();\n this.element.innerHTML = view;\n }\n }], [{\n key: \"info\",\n get: function get() {\n return {\n supportedComponents: ['password'],\n name: 'passwordStrength',\n components: _PasswordStrengthAddon.default,\n label: 'Password Strength',\n defaultSettings: {\n rulesSettings: [{\n name: 'length',\n required: false,\n message: 'Value should be longer'\n }, {\n name: 'upperCase',\n required: false,\n message: 'Value should have uppercase letters'\n }, {\n name: 'numeric',\n required: false,\n message: 'Value should have numeric symbols'\n }, {\n name: 'lowerCase',\n required: false,\n message: 'Value should be have lowercase letters'\n }, {\n name: 'symbols',\n required: false,\n message: 'Value should have symbols'\n }],\n updateOn: 'levelChange',\n required: true,\n levels: [{\n name: 'Low',\n maxEntropy: 28,\n style: 'danger'\n }, {\n name: 'Medium',\n maxEntropy: 45,\n style: 'warning'\n }, {\n name: 'High',\n maxEntropy: 59,\n style: 'info'\n }, {\n name: 'Very High',\n maxEntropy: 85,\n style: 'success'\n }],\n blackList: [],\n template: \"\\n
\\n {% if (!ctx.readOnly && !ctx.pristine) { %}\\n
\\n {% } %}\\n \\n \",\n location: {\n insert: 'after',\n selector: '[ref=\"element\"]'\n }\n }\n };\n }\n }]);\n\n return PasswordStrengthAddon;\n}(_FormioAddon2.default);\n\nexports[\"default\"] = PasswordStrengthAddon;\n\n//# sourceURL=webpack://Formio/./lib/addons/PasswordStrength/PasswordStrengthAddon.js?"); +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.array.is-array.js */ \"./node_modules/core-js/modules/es.array.is-array.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.from.js */ \"./node_modules/core-js/modules/es.array.from.js\");\n__webpack_require__(/*! core-js/modules/es.array.slice.js */ \"./node_modules/core-js/modules/es.array.slice.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.array.sort.js */ \"./node_modules/core-js/modules/es.array.sort.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n__webpack_require__(/*! core-js/modules/es.math.log2.js */ \"./node_modules/core-js/modules/es.math.log2.js\");\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.constructor.js */ \"./node_modules/core-js/modules/es.regexp.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.array.join.js */ \"./node_modules/core-js/modules/es.array.join.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nvar _FormioAddon2 = _interopRequireDefault(__webpack_require__(/*! ../FormioAddon */ \"./lib/addons/FormioAddon.js\"));\nvar _PasswordStrengthAddon = _interopRequireDefault(__webpack_require__(/*! ./PasswordStrengthAddon.form */ \"./lib/addons/PasswordStrength/PasswordStrengthAddon.form.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar PasswordStrengthAddon = /*#__PURE__*/function (_FormioAddon) {\n _inherits(PasswordStrengthAddon, _FormioAddon);\n var _super = _createSuper(PasswordStrengthAddon);\n function PasswordStrengthAddon(settings, componentInstance) {\n var _this;\n _classCallCheck(this, PasswordStrengthAddon);\n _this = _super.call(this, settings, componentInstance);\n _this._entropy = 0; // Set initial value of entropy\n _this.levels = _toConsumableArray(_this.settings.levels || _this.defaultSettings.levels);\n _this.levels.sort(function (a, b) {\n return a.maxEntropy - b.maxEntropy;\n }); // Sort levels from the lowest one to the highest\n _this.level = _this.levels[0]; // Set currnt level to the lowest one\n _this.maxEntropy = _this.levels[_this.levels.length - 1].maxEntropy; // Set maximal amount of security points based on the highest level\n return _this;\n }\n _createClass(PasswordStrengthAddon, [{\n key: \"defaultSettings\",\n get: function get() {\n return PasswordStrengthAddon.info.defaultSettings;\n }\n }, {\n key: \"rules\",\n get: function get() {\n var _this2 = this;\n return {\n length: {\n check: function check(value, options) {\n var minLength = options.minLength || _this2.component.component.validate.minLength || 6;\n if (value.length < minLength) {\n return \"Value must be longer than \".concat(minLength, \" characters\");\n }\n return true;\n }\n },\n upperCase: {\n check: function check(value) {\n if (/[A-Z]/g.test(value)) {\n return true;\n }\n return 'Value must contain uppercased alphabetical characters';\n },\n increaseCharactersPoolSize: 26\n },\n numeric: {\n check: function check(value) {\n if (/[0-9]/g.test(value)) {\n return true;\n }\n return 'Value must contain numeric characters';\n },\n increaseCharactersPoolSize: 10\n },\n lowerCase: {\n check: function check(value) {\n if (/[a-z]/g.test(value)) {\n return true;\n }\n return 'Value must contain lowercased alphabetical characters';\n },\n increaseCharactersPoolSize: 26\n },\n symbols: {\n check: function check(value) {\n if (/[ `!@#$%^&*()_+\\-=[\\]{};':\"\\\\|,.<>/?~]/.test(value)) {\n return true;\n }\n return 'Value must contain symbols';\n },\n increaseCharactersPoolSize: 32\n }\n };\n }\n }, {\n key: \"charactersPoolLength\",\n get: function get() {\n return this._charactersPoolLength;\n },\n set: function set(value) {\n this._charactersPoolLength = value;\n }\n }, {\n key: \"level\",\n get: function get() {\n return this._level || this.getLevel();\n },\n set: function set(level) {\n this._level = level;\n }\n }, {\n key: \"entropy\",\n get: function get() {\n return this._entropy;\n },\n set: function set(value) {\n var oldLevel = this.getLevel();\n var updateOnEntropyChange = this.settings.updateOn === 'entropyChange' && this._entropy !== value;\n this._entropy = value;\n this.level = this.getLevel();\n var updateOnLevelChange = this.settings.updateOn === 'levelChange' && oldLevel.name !== this.level.name;\n if (updateOnLevelChange || updateOnEntropyChange) {\n this.updateView();\n }\n }\n }, {\n key: \"dictionarySize\",\n get: function get() {\n return this.settings.dictionarySize || 171476;\n }\n }, {\n key: \"template\",\n get: function get() {\n return this.settings.template;\n }\n }, {\n key: \"tooltip\",\n get: function get() {\n var _this$level, _this$level2;\n return ((_this$level = this.level) === null || _this$level === void 0 ? void 0 : _this$level.tooltip) || \"\".concat((_this$level2 = this.level) === null || _this$level2 === void 0 ? void 0 : _this$level2.name, \" strongness\");\n }\n }, {\n key: \"rulesSettings\",\n get: function get() {\n return this.settings.rulesSettings || [];\n }\n }, {\n key: \"customRules\",\n get: function get() {\n return this.settings.customRules || [];\n }\n }, {\n key: \"log2\",\n value: function log2(value) {\n if (typeof Math.log2 === 'function') {\n return Math.log2(value);\n }\n return Math.log(value) * Math.LOG2E;\n }\n }, {\n key: \"calculatePasswordEntropy\",\n value: function calculatePasswordEntropy(passwordLength, charactersPoolSize) {\n return !passwordLength || !charactersPoolSize ? 0 : this.log2(Math.pow(charactersPoolSize, passwordLength));\n }\n }, {\n key: \"calculatePasswordEntropyWords\",\n value: function calculatePasswordEntropyWords(wordsCount) {\n return !this.dictionarySize ? 0 : this.log2(this.dictionarySize) * wordsCount;\n }\n }, {\n key: \"render\",\n value: function render() {\n var view = this.component.interpolate(this.template, {\n entropy: this.entropy,\n maxEntropy: this.maxEntropy,\n level: this.level,\n levelName: this.level.name.replace(' ', '-').toLowerCase(),\n levels: this.levels,\n readOnly: this.component.options.readOnly,\n pristine: this.component.pristine,\n t: this.t.bind(this),\n tooltip: this.tooltip\n });\n return this.component.sanitize(view);\n }\n }, {\n key: \"checkBlackList\",\n value: function checkBlackList(value) {\n var blackList = _toConsumableArray(this.settings.blackList);\n var customBlacklistedWords = this.settings.customBlacklistedWords;\n if (customBlacklistedWords && typeof customBlacklistedWords === 'string') {\n customBlacklistedWords = this.evaluate(customBlacklistedWords, this.component.evalContext({\n value: value\n }), 'values');\n if (customBlacklistedWords && customBlacklistedWords.length) {\n blackList.push.apply(blackList, _toConsumableArray(customBlacklistedWords));\n }\n }\n var restValue = value;\n var blacklistedWords = [];\n for (var i = 0; i < blackList.length; i++) {\n var word = blackList[i];\n var regExp = new RegExp(\"\".concat(word), 'gi');\n if (regExp.test(value)) {\n blacklistedWords.push(word);\n restValue = restValue.replace(regExp, '');\n }\n\n // If less the 3 symboles left, just stop iterating\n if (restValue.length < 3) {\n break;\n }\n }\n if (blacklistedWords.length) {\n // If there are some random characters except of blacklisted words in the password,\n // calculate the entropy for them\n var _ref = restValue.length ? this.performChecks(restValue) : 0,\n charactersPoolSize = _ref.charactersPoolSize;\n var entropyOfNonblacklistedValue = this.calculatePasswordEntropy(restValue.length, charactersPoolSize);\n // Calculate the entropy if the biggest part of the password could be picked up from dictionary words\n var dictionaryCheckEntropy = this.calculatePasswordEntropyWords(blacklistedWords.length);\n var entropy = dictionaryCheckEntropy + entropyOfNonblacklistedValue;\n return {\n entropy: entropy,\n blacklistedWords: blacklistedWords\n };\n }\n return true;\n }\n\n /**\n * Determines is a password is secure enough to submit\n * @return {boolean}\n */\n }, {\n key: \"isValid\",\n value: function isValid() {\n var isValidCheck = this.settings.isValid;\n if (isValidCheck && typeof isValidCheck === 'string') {\n var valid = this.evaluate(isValidCheck, this.component.evalContext({\n entropy: this.entropy,\n level: this.level\n }), 'valid');\n return valid;\n }\n return this.entropy >= Math.round(this.maxEntropy / 2);\n }\n\n /**\n * Handles the result of check and constructs a new error object or returns an amount of points to add to the current entropy\n * @param {boolean|number} valid - Determines if the validation was failed or an amount of points if it was passed\n * @param {*} validation - Validation configuration\n * @param {string} value - Value which was validated\n * @param {string} message - Message which should be shown if validation was not passed\n */\n }, {\n key: \"handleRuleCheckResult\",\n value: function handleRuleCheckResult(valid, validation, message, errors) {\n if (valid !== true) {\n errors.push({\n validation: validation.name,\n message: message,\n level: validation.required ? 'error' : 'warning'\n });\n } else if (validation.increaseCharactersPoolSize) {\n return validation.increaseCharactersPoolSize;\n }\n return 0;\n }\n }, {\n key: \"performChecks\",\n value: function performChecks(value) {\n var _this3 = this;\n var errors = [];\n var charactersPoolSize = 0;\n this.rulesSettings.forEach(function (settings) {\n if (_this3.rules[settings.name]) {\n var rule = _lodash[\"default\"].merge({}, _this3.rules[settings.name], settings);\n var valid = rule.check(value, settings.options || {});\n var message = settings.message || valid;\n charactersPoolSize += _this3.handleRuleCheckResult(valid, rule, message, errors);\n }\n });\n this.customRules.forEach(function (rule) {\n if (rule.check && typeof rule.check === 'string') {\n var valid = _this3.evaluate(rule.check, _this3.component.evalContext({\n value: value\n }), 'valid');\n var message = typeof valid === 'string' ? valid : \"Password does not meet \".concat(rule.name, \" validation\");\n charactersPoolSize += _this3.handleRuleCheckResult(valid, rule, message, errors);\n }\n });\n return {\n charactersPoolSize: charactersPoolSize,\n errors: errors\n };\n }\n\n /**\n * Performs checks to validate password security\n * @param {string} value - Suggested password\n */\n }, {\n key: \"checkValidity\",\n value: function checkValidity(value) {\n var _this$settings$blackL;\n var passwordLength = value.length;\n var _this$performChecks = this.performChecks(value),\n charactersPoolSize = _this$performChecks.charactersPoolSize,\n errors = _this$performChecks.errors;\n this.errors = errors;\n var entropy = this.calculatePasswordEntropy(passwordLength, charactersPoolSize);\n var blackListCheck = (_this$settings$blackL = this.settings.blackList) !== null && _this$settings$blackL !== void 0 && _this$settings$blackL.length || this.settings.customBlacklistedWords ? this.checkBlackList(value) : null;\n\n // If there were found some words from the black list\n if (blackListCheck && blackListCheck !== true) {\n this.handleBlackListCheckResult(blackListCheck);\n // Select the mininal entropy based on the dictionary check or symbolic check\n this.entropy = Math.min(entropy, blackListCheck.entropy);\n } else {\n this.entropy = entropy;\n }\n var isValid = this.isValid();\n if (!isValid) {\n this.errors.push({\n message: 'Password is not strong enough',\n level: this.settings.required ? 'error' : 'warning'\n });\n }\n return !this.errors.length;\n }\n }, {\n key: \"handleBlackListCheckResult\",\n value: function handleBlackListCheckResult(result) {\n var blacklistedWords = result.blacklistedWords;\n var isRequired = this.settings.disableBlacklistedWords;\n var message = \"Password \".concat(isRequired ? 'must' : 'should', \" not include common words: \").concat(blacklistedWords.join(', '));\n var validation = {\n name: 'blacklist',\n required: isRequired\n };\n this.handleRuleCheckResult(false, validation, message, this.errors);\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n var _this4 = this;\n _get(_getPrototypeOf(PasswordStrengthAddon.prototype), \"attach\", this).call(this, element);\n var container = this.component.ce('div', {\n ref: 'passwordStrengthIndicator'\n });\n var inserted = this.insertContainer(element, container);\n if (!inserted) {\n this.component.append(container);\n }\n this._element = container;\n this.component.on('redraw', function () {\n return _this4.updateView();\n });\n this.component.on('componentError', function () {\n return _this4.updateView();\n });\n this.updateView();\n }\n }, {\n key: \"insertContainer\",\n value: function insertContainer(element, container) {\n var _this$settings$locati, _this$settings$locati2;\n if (!element || !container) {\n return false;\n }\n var insert = (_this$settings$locati = this.settings.location) === null || _this$settings$locati === void 0 ? void 0 : _this$settings$locati.insert;\n var selector = (_this$settings$locati2 = this.settings.location) === null || _this$settings$locati2 === void 0 ? void 0 : _this$settings$locati2.selector;\n var reference;\n if (selector) {\n reference = element.querySelector(selector);\n }\n if (reference) {\n var parent = reference.parentNode;\n switch (insert) {\n case 'after':\n if (parent) {\n parent.insertBefore(container, reference.nextSibling || null);\n return true;\n }\n return false;\n case 'before':\n if (parent) {\n parent.insertBefore(container, reference);\n return true;\n }\n return false;\n default:\n console.warn(\"Unknown insert option: \".concat(insert));\n return false;\n }\n } else {\n console.warn(\"No elements found using selector: \".concat(selector));\n return false;\n }\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n _get(_getPrototypeOf(PasswordStrengthAddon.prototype), \"destroy\", this).call(this);\n }\n\n /**\n * Finds the level which one the passed entropy suits\n * @param {number} entropy - Points of password's security\n */\n }, {\n key: \"getLevel\",\n value: function getLevel() {\n var entropy = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.entropy;\n var lowestLevel = this.levels[0];\n var prevMaxEntropy = lowestLevel.maxEntropy;\n if (entropy <= lowestLevel.maxEntropy) {\n return lowestLevel;\n }\n if (entropy >= this.maxEntropy) {\n return this.levels[this.levels.length - 1];\n }\n\n // Iterate through levels and find the one which the passed entropy belongs to\n for (var i = 1; i < this.levels.length; i++) {\n var level = this.levels[i];\n if (entropy > prevMaxEntropy && entropy <= level.maxEntropy) {\n return level;\n }\n prevMaxEntropy = level.maxEntropy;\n }\n return lowestLevel;\n }\n\n /**\n * Update the current view of the password's security indicator\n */\n }, {\n key: \"updateView\",\n value: function updateView() {\n if (!this.element) {\n return;\n }\n var view = this.render();\n this.element.innerHTML = view;\n }\n }], [{\n key: \"info\",\n get: function get() {\n return {\n supportedComponents: ['password'],\n name: 'passwordStrength',\n components: _PasswordStrengthAddon[\"default\"],\n label: 'Password Strength',\n defaultSettings: {\n rulesSettings: [{\n name: 'length',\n required: false,\n message: 'Value should be longer'\n }, {\n name: 'upperCase',\n required: false,\n message: 'Value should have uppercase letters'\n }, {\n name: 'numeric',\n required: false,\n message: 'Value should have numeric symbols'\n }, {\n name: 'lowerCase',\n required: false,\n message: 'Value should be have lowercase letters'\n }, {\n name: 'symbols',\n required: false,\n message: 'Value should have symbols'\n }],\n updateOn: 'levelChange',\n required: true,\n levels: [{\n name: 'Low',\n maxEntropy: 28,\n style: 'danger'\n }, {\n name: 'Medium',\n maxEntropy: 45,\n style: 'warning'\n }, {\n name: 'High',\n maxEntropy: 59,\n style: 'info'\n }, {\n name: 'Very High',\n maxEntropy: 85,\n style: 'success'\n }],\n blackList: [],\n template: \"\\n
\\n {% if (!ctx.readOnly && !ctx.pristine) { %}\\n
\\n {% } %}\\n \\n \",\n location: {\n insert: 'after',\n selector: '[ref=\"element\"]'\n }\n }\n };\n }\n }]);\n return PasswordStrengthAddon;\n}(_FormioAddon2[\"default\"]);\nexports[\"default\"] = PasswordStrengthAddon;\n\n//# sourceURL=webpack://Formio/./lib/addons/PasswordStrength/PasswordStrengthAddon.js?"); /***/ }), @@ -180,7 +191,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.editForms = exports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n\nvar _PasswordStrengthAddon = _interopRequireDefault(__webpack_require__(/*! ./PasswordStrength/PasswordStrengthAddon */ \"./lib/addons/PasswordStrength/PasswordStrengthAddon.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar editForms = [_PasswordStrengthAddon.default.info].map(function (_ref) {\n var components = _ref.components,\n name = _ref.name,\n defaultSettings = _ref.defaultSettings;\n return {\n type: 'form',\n key: 'settings',\n display: 'form',\n input: true,\n components: components,\n defaultValue: {\n data: defaultSettings\n },\n customConditional: function customConditional(_ref2) {\n var row = _ref2.row;\n return row.name.value === name;\n }\n };\n});\nexports.editForms = editForms;\nvar _default = {\n passwordStrength: _PasswordStrengthAddon.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/addons/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.editForms = exports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\nvar _PasswordStrengthAddon = _interopRequireDefault(__webpack_require__(/*! ./PasswordStrength/PasswordStrengthAddon */ \"./lib/addons/PasswordStrength/PasswordStrengthAddon.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar editForms = [_PasswordStrengthAddon[\"default\"].info].map(function (_ref) {\n var components = _ref.components,\n name = _ref.name,\n defaultSettings = _ref.defaultSettings;\n return {\n type: 'form',\n key: 'settings',\n display: 'form',\n input: true,\n components: components,\n defaultValue: {\n data: defaultSettings\n },\n customConditional: function customConditional(_ref2) {\n var row = _ref2.row;\n return row.name.value === name;\n }\n };\n});\nexports.editForms = editForms;\nvar _default = {\n passwordStrength: _PasswordStrengthAddon[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/addons/index.js?"); /***/ }), @@ -191,7 +202,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nvar _PDFBuilder = _interopRequireDefault(__webpack_require__(/*! ../PDFBuilder */ \"./lib/PDFBuilder.js\"));\n\nvar _WebformBuilder = _interopRequireDefault(__webpack_require__(/*! ../WebformBuilder */ \"./lib/WebformBuilder.js\"));\n\nvar _WizardBuilder = _interopRequireDefault(__webpack_require__(/*! ../WizardBuilder */ \"./lib/WizardBuilder.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar Builders = /*#__PURE__*/function () {\n function Builders() {\n _classCallCheck(this, Builders);\n }\n\n _createClass(Builders, null, [{\n key: \"addBuilder\",\n value: function addBuilder(name, builder) {\n Builders.builders[name] = builder;\n }\n }, {\n key: \"addBuilders\",\n value: function addBuilders(builders) {\n Builders.builders = _lodash.default.merge(Builders.builders, builders);\n }\n }, {\n key: \"getBuilder\",\n value: function getBuilder(name) {\n return Builders.builders[name];\n }\n }, {\n key: \"getBuilders\",\n value: function getBuilders() {\n return Builders.builders;\n }\n }]);\n\n return Builders;\n}();\n\nexports[\"default\"] = Builders;\n\n_defineProperty(Builders, \"builders\", {\n pdf: _PDFBuilder.default,\n webform: _WebformBuilder.default,\n wizard: _WizardBuilder.default\n});\n\n//# sourceURL=webpack://Formio/./lib/builders/Builders.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nvar _PDFBuilder = _interopRequireDefault(__webpack_require__(/*! ../PDFBuilder */ \"./lib/PDFBuilder.js\"));\nvar _WebformBuilder = _interopRequireDefault(__webpack_require__(/*! ../WebformBuilder */ \"./lib/WebformBuilder.js\"));\nvar _WizardBuilder = _interopRequireDefault(__webpack_require__(/*! ../WizardBuilder */ \"./lib/WizardBuilder.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar Builders = /*#__PURE__*/function () {\n function Builders() {\n _classCallCheck(this, Builders);\n }\n _createClass(Builders, null, [{\n key: \"addBuilder\",\n value: function addBuilder(name, builder) {\n Builders.builders[name] = builder;\n }\n }, {\n key: \"addBuilders\",\n value: function addBuilders(builders) {\n Builders.builders = _lodash[\"default\"].merge(Builders.builders, builders);\n }\n }, {\n key: \"getBuilder\",\n value: function getBuilder(name) {\n return Builders.builders[name];\n }\n }, {\n key: \"getBuilders\",\n value: function getBuilders() {\n return Builders.builders;\n }\n }]);\n return Builders;\n}();\nexports[\"default\"] = Builders;\n_defineProperty(Builders, \"builders\", {\n pdf: _PDFBuilder[\"default\"],\n webform: _WebformBuilder[\"default\"],\n wizard: _WizardBuilder[\"default\"]\n});\n\n//# sourceURL=webpack://Formio/./lib/builders/Builders.js?"); /***/ }), @@ -202,7 +213,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _Builders = _interopRequireDefault(__webpack_require__(/*! ./Builders */ \"./lib/builders/Builders.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = _Builders.default;\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/builders/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _Builders = _interopRequireDefault(__webpack_require__(/*! ./Builders */ \"./lib/builders/Builders.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = _Builders[\"default\"];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/builders/index.js?"); /***/ }), @@ -213,7 +224,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _Component = _interopRequireDefault(__webpack_require__(/*! ./_classes/component/Component */ \"./lib/components/_classes/component/Component.js\"));\n\nvar _utils = _interopRequireDefault(__webpack_require__(/*! ./_classes/component/editForm/utils */ \"./lib/components/_classes/component/editForm/utils.js\"));\n\nvar _Component2 = _interopRequireDefault(__webpack_require__(/*! ./_classes/component/Component.form */ \"./lib/components/_classes/component/Component.form.js\"));\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar Components = /*#__PURE__*/function () {\n function Components() {\n _classCallCheck(this, Components);\n }\n\n _createClass(Components, null, [{\n key: \"EditFormUtils\",\n get: function get() {\n return Components._editFormUtils;\n },\n set: function set(value) {\n Components._editFormUtils = value;\n }\n }, {\n key: \"baseEditForm\",\n get: function get() {\n return Components._baseEditForm;\n },\n set: function set(value) {\n Components._baseEditForm = value;\n }\n }, {\n key: \"recalculateComponents\",\n value: function recalculateComponents() {\n if (window && window.Formio && window.Formio.AllComponents) {\n Components.setComponents(window.Formio.AllComponents);\n }\n }\n }, {\n key: \"components\",\n get: function get() {\n if (!Components._components) {\n Components._components = {};\n }\n\n return Components._components;\n }\n }, {\n key: \"setComponents\",\n value: function setComponents(comps) {\n // Set the tableView method on BaseComponent.\n if (comps.base) {\n // Implement the tableView method.\n comps.base.tableView = function (value, options) {\n var comp = Components.create(options.component, options.options || {}, options.data || {}, true);\n return comp.getView(value);\n };\n }\n\n _lodash.default.assign(Components.components, comps);\n }\n }, {\n key: \"addComponent\",\n value: function addComponent(name, comp) {\n return Components.setComponent(name, comp);\n }\n }, {\n key: \"setComponent\",\n value: function setComponent(name, comp) {\n Components.components[name] = comp;\n }\n }, {\n key: \"create\",\n value: function create(component, options, data) {\n var comp = null;\n\n if (component.type && Components.components.hasOwnProperty(component.type)) {\n comp = new Components.components[component.type](component, options, data);\n } else if (component.arrayTree) {\n // eslint-disable-next-line new-cap\n comp = new Components.components['datagrid'](component, options, data);\n } else if (component.tree) {\n // eslint-disable-next-line new-cap\n comp = new Components.components['nesteddata'](component, options, data);\n } else if (Array.isArray(component.components)) {\n // eslint-disable-next-line new-cap\n comp = new Components.components['nested'](component, options, data);\n } else if (options && options.server) {\n // eslint-disable-next-line new-cap\n comp = new Components.components['hidden'](component, options, data);\n } else {\n comp = new _Component.default(component, options, data);\n }\n\n return comp;\n }\n }]);\n\n return Components;\n}();\n\nexports[\"default\"] = Components;\n\n_defineProperty(Components, \"_editFormUtils\", _utils.default);\n\n_defineProperty(Components, \"_baseEditForm\", _Component2.default);\n\n//# sourceURL=webpack://Formio/./lib/components/Components.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.array.is-array.js */ \"./node_modules/core-js/modules/es.array.is-array.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\nvar _Component = _interopRequireDefault(__webpack_require__(/*! ./_classes/component/Component */ \"./lib/components/_classes/component/Component.js\"));\nvar _utils = _interopRequireDefault(__webpack_require__(/*! ./_classes/component/editForm/utils */ \"./lib/components/_classes/component/editForm/utils.js\"));\nvar _Component2 = _interopRequireDefault(__webpack_require__(/*! ./_classes/component/Component.form */ \"./lib/components/_classes/component/Component.form.js\"));\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar Components = /*#__PURE__*/function () {\n function Components() {\n _classCallCheck(this, Components);\n }\n _createClass(Components, null, [{\n key: \"EditFormUtils\",\n get: function get() {\n return Components._editFormUtils;\n },\n set: function set(value) {\n Components._editFormUtils = value;\n }\n }, {\n key: \"baseEditForm\",\n get: function get() {\n return Components._baseEditForm;\n },\n set: function set(value) {\n Components._baseEditForm = value;\n }\n }, {\n key: \"recalculateComponents\",\n value: function recalculateComponents() {\n if (window && window.Formio && window.Formio.AllComponents) {\n Components.setComponents(window.Formio.AllComponents);\n }\n }\n }, {\n key: \"components\",\n get: function get() {\n if (!Components._components) {\n Components._components = {};\n }\n return Components._components;\n }\n }, {\n key: \"setComponents\",\n value: function setComponents(comps) {\n // Set the tableView method on BaseComponent.\n if (comps.base) {\n // Implement the tableView method.\n comps.base.tableView = function (value, options) {\n var comp = Components.create(options.component, options.options || {}, options.data || {}, true);\n return comp.getView(value);\n };\n }\n _lodash[\"default\"].assign(Components.components, comps);\n }\n }, {\n key: \"addComponent\",\n value: function addComponent(name, comp) {\n return Components.setComponent(name, comp);\n }\n }, {\n key: \"setComponent\",\n value: function setComponent(name, comp) {\n Components.components[name] = comp;\n }\n }, {\n key: \"create\",\n value: function create(component, options, data) {\n var comp = null;\n if (component.type && Components.components.hasOwnProperty(component.type)) {\n comp = new Components.components[component.type](component, options, data);\n } else if (component.arrayTree) {\n // eslint-disable-next-line new-cap\n comp = new Components.components['datagrid'](component, options, data);\n } else if (component.tree) {\n // eslint-disable-next-line new-cap\n comp = new Components.components['nesteddata'](component, options, data);\n } else if (Array.isArray(component.components)) {\n // eslint-disable-next-line new-cap\n comp = new Components.components['nested'](component, options, data);\n } else if (options && options.server) {\n // eslint-disable-next-line new-cap\n comp = new Components.components['hidden'](component, options, data);\n } else {\n comp = new _Component[\"default\"](component, options, data);\n }\n return comp;\n }\n }]);\n return Components;\n}();\nexports[\"default\"] = Components;\n_defineProperty(Components, \"_editFormUtils\", _utils[\"default\"]);\n_defineProperty(Components, \"_baseEditForm\", _Component2[\"default\"]);\n\n//# sourceURL=webpack://Formio/./lib/components/Components.js?"); /***/ }), @@ -224,7 +235,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nvar _ComponentEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/Component.edit.addons */ \"./lib/components/_classes/component/editForm/Component.edit.addons.js\"));\n\nvar _ComponentEdit2 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Component.edit.conditional */ \"./lib/components/_classes/component/editForm/Component.edit.conditional.js\"));\n\nvar _ComponentEdit3 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Component.edit.data */ \"./lib/components/_classes/component/editForm/Component.edit.data.js\"));\n\nvar _ComponentEdit4 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Component.edit.api */ \"./lib/components/_classes/component/editForm/Component.edit.api.js\"));\n\nvar _ComponentEdit5 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Component.edit.display */ \"./lib/components/_classes/component/editForm/Component.edit.display.js\"));\n\nvar _ComponentEdit6 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Component.edit.logic */ \"./lib/components/_classes/component/editForm/Component.edit.logic.js\"));\n\nvar _ComponentEdit7 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Component.edit.validation */ \"./lib/components/_classes/component/editForm/Component.edit.validation.js\"));\n\nvar _ComponentEdit8 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Component.edit.layout */ \"./lib/components/_classes/component/editForm/Component.edit.layout.js\"));\n\nvar _utils = _interopRequireDefault(__webpack_require__(/*! ./editForm/utils */ \"./lib/components/_classes/component/editForm/utils.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n var components = _lodash.default.cloneDeep([{\n type: 'tabs',\n key: 'tabs',\n components: [{\n label: 'Display',\n key: 'display',\n weight: 0,\n components: _ComponentEdit5.default\n }, {\n label: 'Data',\n key: 'data',\n weight: 10,\n components: _ComponentEdit3.default\n }, {\n label: 'Validation',\n key: 'validation',\n weight: 20,\n components: _ComponentEdit7.default\n }, {\n label: 'API',\n key: 'api',\n weight: 30,\n components: _ComponentEdit4.default\n }, {\n label: 'Conditional',\n key: 'conditional',\n weight: 40,\n components: _ComponentEdit2.default\n }, {\n label: 'Logic',\n key: 'logic',\n weight: 50,\n components: _ComponentEdit6.default\n }, {\n label: 'Layout',\n key: 'layout',\n weight: 60,\n components: _ComponentEdit8.default\n }, {\n label: 'Addons',\n key: 'addons',\n weight: 70,\n components: _ComponentEdit.default\n }]\n }]).concat(extend.map(function (items) {\n return {\n type: 'tabs',\n key: 'tabs',\n components: _lodash.default.cloneDeep(items)\n };\n }));\n\n return {\n components: _lodash.default.unionWith(components, _utils.default.unifyComponents).concat({\n type: 'hidden',\n key: 'type'\n })\n };\n}\n\n//# sourceURL=webpack://Formio/./lib/components/_classes/component/Component.form.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nvar _ComponentEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/Component.edit.conditional */ \"./lib/components/_classes/component/editForm/Component.edit.conditional.js\"));\nvar _ComponentEdit2 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Component.edit.data */ \"./lib/components/_classes/component/editForm/Component.edit.data.js\"));\nvar _ComponentEdit3 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Component.edit.api */ \"./lib/components/_classes/component/editForm/Component.edit.api.js\"));\nvar _ComponentEdit4 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Component.edit.display */ \"./lib/components/_classes/component/editForm/Component.edit.display.js\"));\nvar _ComponentEdit5 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Component.edit.logic */ \"./lib/components/_classes/component/editForm/Component.edit.logic.js\"));\nvar _ComponentEdit6 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Component.edit.validation */ \"./lib/components/_classes/component/editForm/Component.edit.validation.js\"));\nvar _ComponentEdit7 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Component.edit.layout */ \"./lib/components/_classes/component/editForm/Component.edit.layout.js\"));\nvar _utils = _interopRequireDefault(__webpack_require__(/*! ./editForm/utils */ \"./lib/components/_classes/component/editForm/utils.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n var components = _lodash[\"default\"].cloneDeep([{\n type: 'tabs',\n key: 'tabs',\n components: [{\n label: 'Display',\n key: 'display',\n weight: 0,\n components: _ComponentEdit4[\"default\"]\n }, {\n label: 'Data',\n key: 'data',\n weight: 10,\n components: _ComponentEdit2[\"default\"]\n }, {\n label: 'Validation',\n key: 'validation',\n weight: 20,\n components: _ComponentEdit6[\"default\"]\n }, {\n label: 'API',\n key: 'api',\n weight: 30,\n components: _ComponentEdit3[\"default\"]\n }, {\n label: 'Conditional',\n key: 'conditional',\n weight: 40,\n components: _ComponentEdit[\"default\"]\n }, {\n label: 'Logic',\n key: 'logic',\n weight: 50,\n components: _ComponentEdit5[\"default\"]\n }, {\n label: 'Layout',\n key: 'layout',\n weight: 60,\n components: _ComponentEdit7[\"default\"]\n }]\n }]).concat(extend.map(function (items) {\n return {\n type: 'tabs',\n key: 'tabs',\n components: _lodash[\"default\"].cloneDeep(items)\n };\n }));\n return {\n components: _lodash[\"default\"].unionWith(components, _utils[\"default\"].unifyComponents).concat({\n type: 'hidden',\n key: 'type'\n })\n };\n}\n\n//# sourceURL=webpack://Formio/./lib/components/_classes/component/Component.form.js?"); /***/ }), @@ -235,18 +246,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptors.js\");\n\n__webpack_require__(/*! core-js/modules/es.weak-map.js */ \"./node_modules/core-js/modules/es.weak-map.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.object.assign.js */ \"./node_modules/core-js/modules/es.object.assign.js\");\n\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.flags.js */ \"./node_modules/core-js/modules/es.regexp.flags.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.includes.js */ \"./node_modules/core-js/modules/es.array.includes.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.split.js */ \"./node_modules/core-js/modules/es.string.split.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.includes.js */ \"./node_modules/core-js/modules/es.string.includes.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.starts-with.js */ \"./node_modules/core-js/modules/es.string.starts-with.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.join.js */ \"./node_modules/core-js/modules/es.array.join.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.splice.js */ \"./node_modules/core-js/modules/es.array.splice.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.from.js */ \"./node_modules/core-js/modules/es.array.from.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.slice.js */ \"./node_modules/core-js/modules/es.array.slice.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\nvar _vanillaTextMask = __webpack_require__(/*! @formio/vanilla-text-mask */ \"./node_modules/@formio/vanilla-text-mask/dist/vanillaTextMask.js\");\n\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\n\nvar _tippy = _interopRequireDefault(__webpack_require__(/*! tippy.js */ \"./node_modules/tippy.js/dist/tippy.esm.js\"));\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nvar _ismobilejs = _interopRequireDefault(__webpack_require__(/*! ismobilejs */ \"./node_modules/ismobilejs/esm/index.js\"));\n\nvar _Formio = __webpack_require__(/*! ../../../Formio */ \"./lib/Formio.js\");\n\nvar FormioUtils = _interopRequireWildcard(__webpack_require__(/*! ../../../utils/utils */ \"./lib/utils/utils.js\"));\n\nvar _Validator = _interopRequireDefault(__webpack_require__(/*! ../../../validator/Validator */ \"./lib/validator/Validator.js\"));\n\nvar _Element2 = _interopRequireDefault(__webpack_require__(/*! ../../../Element */ \"./lib/Element.js\"));\n\nvar _ComponentModal = _interopRequireDefault(__webpack_require__(/*! ../componentModal/ComponentModal */ \"./lib/components/_classes/componentModal/ComponentModal.js\"));\n\nvar _widgets = _interopRequireDefault(__webpack_require__(/*! ../../../widgets */ \"./lib/widgets/index.js\"));\n\nvar _addons = _interopRequireDefault(__webpack_require__(/*! ../../../addons */ \"./lib/addons/index.js\"));\n\nvar _uploadAdapter = __webpack_require__(/*! ../../../providers/storage/uploadAdapter */ \"./lib/providers/storage/uploadAdapter.js\");\n\nvar _en = _interopRequireDefault(__webpack_require__(/*! ../../../translations/en */ \"./lib/translations/en.js\"));\n\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\n\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar isIEBrowser = FormioUtils.getBrowserInfo().ie;\nvar CKEDITOR_URL = isIEBrowser ? 'https://cdn.ckeditor.com/4.14.1/standard/ckeditor.js' : 'https://cdn.form.io/ckeditor/19.0.0/ckeditor.js';\nvar QUILL_URL = isIEBrowser ? 'https://cdn.quilljs.com/1.3.7' : 'https://cdn.quilljs.com/2.0.0-dev.3';\nvar QUILL_TABLE_URL = 'https://cdn.form.io/quill/quill-table.js';\nvar ACE_URL = 'https://cdn.form.io/ace/1.4.10/ace.js';\nvar Templates = _Formio.GlobalFormio.Templates;\n\nif (!Templates) {\n Templates = (__webpack_require__(/*! ../../../templates/Templates */ \"./lib/templates/Templates.js\")[\"default\"]);\n}\n/**\n * This is the Component class\n which all elements within the FormioForm derive from.\n */\n\n\nvar Component = /*#__PURE__*/function (_Element) {\n _inherits(Component, _Element);\n\n var _super = _createSuper(Component);\n\n /* eslint-enable no-unused-vars */\n\n /**\n * Initialize a new Component.\n *\n * @param {Object} component - The component JSON you wish to initialize.\n * @param {Object} options - The options for this component.\n * @param {Object} data - The global data submission object this component will belong.\n */\n\n /* eslint-disable max-statements */\n function Component(component, options, data) {\n var _this;\n\n _classCallCheck(this, Component);\n\n _this = _super.call(this, Object.assign({\n renderMode: 'form',\n attachMode: 'full',\n noDefaults: false\n }, options || {})); // Restore the component id.\n\n if (component && component.id) {\n _this.id = component.id;\n }\n /**\n * Determines if this component has a condition assigned to it.\n * @type {null}\n * @private\n */\n\n\n _this._hasCondition = null;\n /**\n * References to dom elements\n */\n\n _this.refs = {}; // Allow global override for any component JSON.\n\n if (component && _this.options.components && _this.options.components[component.type]) {\n _lodash.default.merge(component, _this.options.components[component.type]);\n }\n /**\n * Set the validator instance.\n */\n\n\n _this.validator = _Validator.default;\n /**\n * The data path to this specific component instance.\n *\n * @type {string}\n */\n\n _this.path = '';\n /**\n * The Form.io component JSON schema.\n * @type {*}\n */\n\n _this.component = _this.mergeSchema(component || {}); // Add the id to the component.\n\n _this.component.id = _this.id; // Save off the original component to be used in logic.\n\n _this.originalComponent = (0, FormioUtils.fastCloneDeep)(_this.component);\n /**\n * If the component has been attached\n */\n\n _this.attached = false;\n /**\n * If the component has been rendered\n */\n\n _this.rendered = false;\n /**\n * The data object in which this component resides.\n * @type {*}\n */\n\n _this._data = data || {};\n /**\n * The existing error that this component has.\n * @type {string}\n */\n\n _this.error = '';\n /**\n * Tool tip text after processing\n * @type {string}\n */\n\n _this.tooltip = '';\n /**\n * The row path of this component.\n * @type {number}\n */\n\n _this.row = _this.options.row;\n /**\n * Determines if this component is disabled, or not.\n *\n * @type {boolean}\n */\n\n _this._disabled = (0, FormioUtils.boolValue)(_this.component.disabled) ? _this.component.disabled : false;\n /**\n * Points to the root component, usually the FormComponent.\n *\n * @type {Component}\n */\n\n _this.root = _this.options.root;\n _this.localRoot = _this.options.localRoot;\n /**\n * If this input has been input and provided value.\n *\n * @type {boolean}\n */\n\n _this.pristine = true;\n /**\n * Points to the parent component.\n *\n * @type {Component}\n */\n\n _this.parent = _this.options.parent;\n _this.options.name = _this.options.name || 'data';\n /**\n * The validators that are assigned to this component.\n * @type {[string]}\n */\n\n _this.validators = ['required', 'minLength', 'maxLength', 'minWords', 'maxWords', 'custom', 'pattern', 'json', 'mask'];\n _this._path = ''; // Nested forms don't have parents so we need to pass their path in.\n\n _this._parentPath = _this.options.parentPath || ''; // Needs for Nextgen Rules Engine\n\n _this.resetCaches();\n /**\n * Determines if this component is visible, or not.\n */\n\n\n _this._parentVisible = _this.options.hasOwnProperty('parentVisible') ? _this.options.parentVisible : true;\n _this._visible = _this._parentVisible && _this.conditionallyVisible(null, data);\n _this._parentDisabled = false;\n /**\n * Used to trigger a new change in this component.\n * @type {function} - Call to trigger a change in this component.\n */\n\n var changes = [];\n var lastChanged = null;\n var triggerArgs = [];\n\n var _triggerChange = _lodash.default.debounce(function () {\n var _this2;\n\n if (_this.root) {\n _this.root.changing = false;\n }\n\n triggerArgs = [];\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n if (!args[1] && lastChanged) {\n // Set the changed component if one isn't provided.\n args[1] = lastChanged;\n }\n\n if (_lodash.default.isEmpty(args[0]) && lastChanged) {\n // Set the flags if it is empty and lastChanged exists.\n args[0] = lastChanged.flags;\n }\n\n lastChanged = null;\n args[3] = changes;\n\n var retVal = (_this2 = _this).onChange.apply(_this2, args);\n\n changes = [];\n return retVal;\n }, 100);\n\n _this.triggerChange = function () {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n if (args[1]) {\n // Make sure that during the debounce that we always track lastChanged component, even if they\n // don't provide one later.\n lastChanged = args[1];\n changes.push(lastChanged);\n }\n\n if (_this.root) {\n _this.root.changing = true;\n }\n\n if (args.length) {\n triggerArgs = args;\n }\n\n return _triggerChange.apply(void 0, _toConsumableArray(triggerArgs));\n };\n /**\n * Used to trigger a redraw event within this component.\n *\n * @type {Function}\n */\n\n\n _this.triggerRedraw = _lodash.default.debounce(_this.redraw.bind(_assertThisInitialized(_this)), 100);\n /**\n * list of attached tooltips\n * @type {Array}\n */\n\n _this.tooltips = [];\n /**\n * List of attached addons\n * @type {Array}\n */\n\n _this.addons = []; // To force this component to be invalid.\n\n _this.invalid = false;\n\n if (_this.component) {\n _this.type = _this.component.type;\n\n if (_this.allowData && _this.key) {\n _this.options.name += \"[\".concat(_this.key, \"]\"); // If component is visible or not set to clear on hide, set the default value.\n\n if (_this.visible || !_this.component.clearOnHide) {\n if (!_this.hasValue()) {\n if (_this.shouldAddDefaultValue) {\n _this.dataValue = _this.defaultValue;\n }\n } else {\n // Ensure the dataValue is set.\n\n /* eslint-disable no-self-assign */\n _this.dataValue = _this.dataValue;\n /* eslint-enable no-self-assign */\n }\n }\n }\n /**\n * The element information for creating the input element.\n * @type {*}\n */\n\n\n _this.info = _this.elementInfo();\n } // Allow anyone to hook into the component creation.\n\n\n _this.hook('component');\n\n if (!_this.options.skipInit) {\n _this.init();\n }\n\n return _this;\n }\n /* eslint-enable max-statements */\n\n\n _createClass(Component, [{\n key: \"data\",\n get: function get() {\n return this._data;\n },\n set: function set(value) {\n this._data = value;\n }\n }, {\n key: \"mergeSchema\",\n value: function mergeSchema() {\n var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n return _lodash.default.defaultsDeep(component, this.defaultSchema);\n } // Allow componets to notify when ready.\n\n }, {\n key: \"ready\",\n get: function get() {\n return _nativePromiseOnly.default.resolve(this);\n }\n }, {\n key: \"labelInfo\",\n get: function get() {\n var label = {};\n label.hidden = this.labelIsHidden();\n label.className = '';\n label.labelPosition = this.component.labelPosition;\n label.tooltipClass = \"\".concat(this.iconClass('question-sign'), \" text-muted\");\n var isPDFReadOnlyMode = this.parent && this.parent.form && this.parent.form.display === 'pdf' && this.options.readOnly;\n\n if (this.hasInput && this.component.validate && (0, FormioUtils.boolValue)(this.component.validate.required) && !isPDFReadOnlyMode) {\n label.className += ' field-required';\n }\n\n if (label.hidden) {\n label.className += ' control-label--hidden';\n }\n\n if (this.info.attr.id) {\n label.for = this.info.attr.id;\n }\n\n return label;\n }\n }, {\n key: \"init\",\n value: function init() {\n var _this$component$addon,\n _this3 = this;\n\n this.disabled = this.shouldDisabled;\n this._visible = this.conditionallyVisible(null, null);\n\n if ((_this$component$addon = this.component.addons) !== null && _this$component$addon !== void 0 && _this$component$addon.length) {\n this.component.addons.forEach(function (addon) {\n return _this3.createAddon(addon);\n });\n }\n }\n }, {\n key: \"createAddon\",\n value: function createAddon(addonConfiguration) {\n var _addonConfiguration$s;\n\n var name = addonConfiguration.name;\n\n if (!name) {\n return;\n }\n\n var settings = ((_addonConfiguration$s = addonConfiguration.settings) === null || _addonConfiguration$s === void 0 ? void 0 : _addonConfiguration$s.data) || {};\n var Addon = _addons.default[name];\n var addon = null;\n\n if (Addon) {\n var supportedComponents = Addon.info.supportedComponents;\n var supportsThisComponentType = !(supportedComponents !== null && supportedComponents !== void 0 && supportedComponents.length) || supportedComponents.indexOf(this.component.type) !== -1;\n\n if (supportsThisComponentType) {\n addon = new Addon(settings, this);\n this.addons.push(addon);\n } else {\n console.warn(\"Addon \".concat(name, \" does not support component of type \").concat(this.component.type, \".\"));\n }\n }\n\n return addon;\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n _get(_getPrototypeOf(Component.prototype), \"destroy\", this).call(this);\n\n this.detach();\n this.addons.forEach(function (addon) {\n return addon.destroy();\n });\n }\n }, {\n key: \"shouldDisabled\",\n get: function get() {\n return this.options.readOnly || this.component.disabled || this.options.hasOwnProperty('disabled') && this.options.disabled[this.key];\n }\n }, {\n key: \"isInputComponent\",\n get: function get() {\n return !this.component.hasOwnProperty('input') || this.component.input;\n }\n }, {\n key: \"allowData\",\n get: function get() {\n return this.hasInput;\n }\n }, {\n key: \"hasInput\",\n get: function get() {\n return this.isInputComponent || this.refs.input && this.refs.input.length;\n }\n }, {\n key: \"defaultSchema\",\n get: function get() {\n return Component.schema();\n }\n }, {\n key: \"key\",\n get: function get() {\n return _lodash.default.get(this.component, 'key', '');\n }\n }, {\n key: \"parentVisible\",\n get: function get() {\n return this._parentVisible;\n },\n set: function set(value) {\n this._parentVisible = value;\n }\n }, {\n key: \"parentDisabled\",\n get: function get() {\n return this._parentDisabled;\n }\n /**\n *\n * @param value {boolean}\n */\n ,\n set: function set(value) {\n this._parentDisabled = value;\n }\n }, {\n key: \"visible\",\n get:\n /**\n *\n * @returns {boolean}\n */\n function get() {\n // Show only if visibility changes or if we are in builder mode or if hidden fields should be shown.\n if (this.builderMode || this.previewMode || this.options.showHiddenFields) {\n return true;\n }\n\n if (this.options.hide && this.options.hide[this.component.key]) {\n return false;\n }\n\n if (this.options.show && this.options.show[this.component.key]) {\n return true;\n }\n\n return this._visible && this._parentVisible;\n },\n set: function set(value) {\n if (this._visible !== value) {\n this._visible = value;\n this.clearOnHide();\n this.redraw();\n }\n }\n }, {\n key: \"currentForm\",\n get: function get() {\n return this._currentForm;\n },\n set: function set(instance) {\n this._currentForm = instance;\n }\n }, {\n key: \"fullMode\",\n get: function get() {\n return this.options.attachMode === 'full';\n }\n }, {\n key: \"builderMode\",\n get: function get() {\n return this.options.attachMode === 'builder';\n }\n }, {\n key: \"calculatedPath\",\n get: function get() {\n console.error('component.calculatedPath was deprecated, use component.path instead.');\n return this.path;\n }\n }, {\n key: \"labelPosition\",\n get: function get() {\n return this.component.labelPosition;\n }\n }, {\n key: \"labelWidth\",\n get: function get() {\n var width = this.component.labelWidth;\n return width >= 0 ? width : 30;\n }\n }, {\n key: \"labelMargin\",\n get: function get() {\n var margin = this.component.labelMargin;\n return margin >= 0 ? margin : 3;\n }\n }, {\n key: \"isAdvancedLabel\",\n get: function get() {\n return ['left-left', 'left-right', 'right-left', 'right-right'].includes(this.labelPosition);\n }\n }, {\n key: \"labelPositions\",\n get: function get() {\n return this.labelPosition.split('-');\n }\n }, {\n key: \"skipInEmail\",\n get: function get() {\n return false;\n }\n }, {\n key: \"rightDirection\",\n value: function rightDirection(direction) {\n if (this.options.condensedMode) {\n return false;\n }\n\n return direction === 'right';\n }\n }, {\n key: \"getLabelInfo\",\n value: function getLabelInfo() {\n var isCondensed = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var isRightPosition = this.rightDirection(this.labelPositions[0]);\n var isLeftPosition = this.labelPositions[0] === 'left' || isCondensed;\n var isRightAlign = this.rightDirection(this.labelPositions[1]);\n var contentMargin = '';\n\n if (this.component.hideLabel) {\n var margin = this.labelWidth + this.labelMargin;\n contentMargin = isRightPosition ? \"margin-right: \".concat(margin, \"%\") : '';\n contentMargin = isLeftPosition ? \"margin-left: \".concat(margin, \"%\") : '';\n }\n\n var labelStyles = \"\\n flex: \".concat(this.labelWidth, \";\\n \").concat(isRightPosition ? 'margin-left' : 'margin-right', \": \").concat(this.labelMargin, \"%;\\n \");\n var contentStyles = \"\\n flex: \".concat(100 - this.labelWidth - this.labelMargin, \";\\n \").concat(contentMargin, \";\\n \").concat(this.component.hideLabel ? \"max-width: \".concat(100 - this.labelWidth - this.labelMargin) : '', \";\\n \");\n return {\n isRightPosition: isRightPosition,\n isRightAlign: isRightAlign,\n labelStyles: labelStyles,\n contentStyles: contentStyles\n };\n }\n /**\n * Returns only the schema that is different from the default.\n *\n * @param schema\n * @param defaultSchema\n */\n\n }, {\n key: \"getModifiedSchema\",\n value: function getModifiedSchema(schema, defaultSchema, recursion) {\n var _this4 = this;\n\n var modified = {};\n\n if (!defaultSchema) {\n return schema;\n }\n\n _lodash.default.each(schema, function (val, key) {\n if (!_lodash.default.isArray(val) && _lodash.default.isObject(val) && defaultSchema.hasOwnProperty(key)) {\n var subModified = _this4.getModifiedSchema(val, defaultSchema[key], true);\n\n if (!_lodash.default.isEmpty(subModified)) {\n modified[key] = subModified;\n }\n } else if (_lodash.default.isArray(val)) {\n if (val.length !== 0 && !_lodash.default.isEqual(val, defaultSchema[key])) {\n modified[key] = val;\n }\n } else if (!recursion && key === 'type' || !recursion && key === 'key' || !recursion && key === 'label' || !recursion && key === 'input' || !recursion && key === 'tableView' || val !== '' && !defaultSchema.hasOwnProperty(key) || val !== '' && val !== defaultSchema[key] || defaultSchema[key] && val !== defaultSchema[key]) {\n modified[key] = val;\n }\n });\n\n return modified;\n }\n /**\n * Returns the JSON schema for this component.\n */\n\n }, {\n key: \"schema\",\n get: function get() {\n return (0, FormioUtils.fastCloneDeep)(this.getModifiedSchema(_lodash.default.omit(this.component, 'id'), this.defaultSchema));\n }\n /**\n * Returns true if component is inside DataGrid\n */\n\n }, {\n key: \"isInDataGrid\",\n get: function get() {\n return this.inDataGrid;\n }\n /**\n * Translate a text using the i18n system.\n *\n * @param {string} text - The i18n identifier.\n * @param {Object} params - The i18n parameters to use for translation.\n */\n\n }, {\n key: \"t\",\n value: function t(text) {\n var _get2;\n\n var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n if (!text) {\n return '';\n } // Use _userInput: true to ignore translations from defaults\n\n\n if (text in _en.default && params._userInput) {\n return text;\n }\n\n params.data = this.rootValue;\n params.row = this.data;\n params.component = this.component;\n\n for (var _len3 = arguments.length, args = new Array(_len3 > 2 ? _len3 - 2 : 0), _key3 = 2; _key3 < _len3; _key3++) {\n args[_key3 - 2] = arguments[_key3];\n }\n\n return (_get2 = _get(_getPrototypeOf(Component.prototype), \"t\", this)).call.apply(_get2, [this, text, params].concat(args));\n }\n }, {\n key: \"labelIsHidden\",\n value: function labelIsHidden() {\n return !this.component.label || (!this.isInDataGrid && this.component.hideLabel || this.isInDataGrid && !this.component.dataGridLabel || this.options.inputsOnly) && !this.builderMode;\n }\n }, {\n key: \"transform\",\n get: function get() {\n return Templates.current.hasOwnProperty('transform') ? Templates.current.transform.bind(Templates.current) : function (type, value) {\n return value;\n };\n }\n }, {\n key: \"getTemplate\",\n value: function getTemplate(names, modes) {\n modes = Array.isArray(modes) ? modes : [modes];\n names = Array.isArray(names) ? names : [names];\n\n if (!modes.includes('form')) {\n modes.push('form');\n }\n\n var result = null;\n\n if (this.options.templates) {\n result = this.checkTemplate(this.options.templates, names, modes);\n\n if (result) {\n return result;\n }\n }\n\n var frameworkTemplates = this.options.template ? Templates.templates[this.options.template] : Templates.current;\n result = this.checkTemplate(frameworkTemplates, names, modes);\n\n if (result) {\n return result;\n } // Default back to bootstrap if not defined.\n\n\n var name = names[names.length - 1];\n var templatesByName = Templates.defaultTemplates[name];\n\n if (!templatesByName) {\n return \"Unknown template: \".concat(name);\n }\n\n var templateByMode = this.checkTemplateMode(templatesByName, modes);\n\n if (templateByMode) {\n return templateByMode;\n }\n\n return templatesByName.form;\n }\n }, {\n key: \"checkTemplate\",\n value: function checkTemplate(templates, names, modes) {\n var _iterator = _createForOfIteratorHelper(names),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var name = _step.value;\n var templatesByName = templates[name];\n\n if (templatesByName) {\n var templateByMode = this.checkTemplateMode(templatesByName, modes);\n\n if (templateByMode) {\n return templateByMode;\n }\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n return null;\n }\n }, {\n key: \"checkTemplateMode\",\n value: function checkTemplateMode(templatesByName, modes) {\n var _iterator2 = _createForOfIteratorHelper(modes),\n _step2;\n\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var mode = _step2.value;\n var templateByMode = templatesByName[mode];\n\n if (templateByMode) {\n return templateByMode;\n }\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n\n return null;\n }\n }, {\n key: \"getFormattedTooltip\",\n value: function getFormattedTooltip(tooltipValue) {\n var tooltip = this.interpolate(tooltipValue || '').replace(/(?:\\r\\n|\\r|\\n)/g, '
');\n return tooltip ? this.t(tooltip, {\n _userInput: true\n }).replace(/\"/g, '"') : '';\n }\n }, {\n key: \"isHtmlRenderMode\",\n value: function isHtmlRenderMode() {\n return this.options.renderMode === 'html';\n }\n }, {\n key: \"renderTemplate\",\n value: function renderTemplate(name) {\n var _this5 = this;\n\n var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var modeOption = arguments.length > 2 ? arguments[2] : undefined;\n // Need to make this fall back to form if renderMode is not found similar to how we search templates.\n var mode = modeOption || this.options.renderMode || 'form';\n data.component = this.component;\n data.self = this;\n data.options = this.options;\n data.readOnly = this.options.readOnly;\n data.iconClass = this.iconClass.bind(this);\n data.size = this.size.bind(this);\n data.t = this.t.bind(this);\n data.transform = this.transform;\n data.id = data.id || this.id;\n data.key = data.key || this.key;\n data.value = data.value || this.dataValue;\n data.disabled = this.disabled;\n data.builder = this.builderMode;\n\n data.render = function () {\n console.warn(\"Form.io 'render' template function is deprecated.\\n If you need to render template (template A) inside of another template (template B),\\n pass pre-compiled template A (use this.renderTemplate('template_A_name') as template context variable for template B\");\n return _this5.renderTemplate.apply(_this5, arguments);\n };\n\n data.label = this.labelInfo;\n data.tooltip = this.getFormattedTooltip(this.component.tooltip); // Allow more specific template names\n\n var names = [\"\".concat(name, \"-\").concat(this.component.type, \"-\").concat(this.key), \"\".concat(name, \"-\").concat(this.component.type), \"\".concat(name, \"-\").concat(this.key), \"\".concat(name)]; // Allow template alters.\n\n return this.hook(\"render\".concat(name.charAt(0).toUpperCase() + name.substring(1, name.length)), this.interpolate(this.getTemplate(names, mode), data), data, mode);\n }\n /**\n * Sanitize an html string.\n *\n * @param string\n * @returns {*}\n */\n\n }, {\n key: \"sanitize\",\n value: function sanitize(dirty, forceSanitize, options) {\n var _this$options;\n\n // No need to sanitize when generating PDF'S since no users interact with the form.\n if (!this.shouldSanitizeValue && !forceSanitize || this.options.pdf && !forceSanitize) {\n return dirty;\n }\n\n return FormioUtils.sanitize(dirty, {\n sanitizeConfig: _lodash.default.merge(((_this$options = this.options) === null || _this$options === void 0 ? void 0 : _this$options.sanitizeConfig) || {}, options || {})\n });\n }\n /**\n * Render a template string into html.\n *\n * @param template\n * @param data\n * @param actions\n *\n * @return {HTMLElement|String} - The created element or an empty string if template is not specified.\n */\n\n }, {\n key: \"renderString\",\n value: function renderString(template, data) {\n if (!template) {\n return '';\n } // Interpolate the template and populate\n\n\n return this.interpolate(template, data);\n }\n }, {\n key: \"performInputMapping\",\n value: function performInputMapping(input) {\n return input;\n }\n }, {\n key: \"widget\",\n get: function get() {\n var _this$root;\n\n var settings = this.component.widget;\n\n if (settings && (_this$root = this.root) !== null && _this$root !== void 0 && _this$root.shadowRoot) {\n settings.shadowRoot = this.root.shadowRoot;\n }\n\n var widget = settings && _widgets.default[settings.type] ? new _widgets.default[settings.type](settings, this.component, this) : null;\n return widget;\n }\n }, {\n key: \"getBrowserLanguage\",\n value: function getBrowserLanguage() {\n var nav = window.navigator;\n var browserLanguagePropertyKeys = ['language', 'browserLanguage', 'systemLanguage', 'userLanguage'];\n var language; // support for HTML 5.1 \"navigator.languages\"\n\n if (Array.isArray(nav.languages)) {\n for (var i = 0; i < nav.languages.length; i++) {\n language = nav.languages[i];\n\n if (language && language.length) {\n return language.split(';')[0];\n }\n }\n } // support for other well known properties in browsers\n\n\n for (var _i = 0; _i < browserLanguagePropertyKeys.length; _i++) {\n language = nav[browserLanguagePropertyKeys[_i]];\n\n if (language && language.length) {\n return language.split(';')[0];\n }\n }\n\n return null;\n }\n /**\n * Called before a next and previous page is triggered allowing the components\n * to perform special functions.\n *\n * @return {*}\n */\n\n }, {\n key: \"beforePage\",\n value: function beforePage() {\n return _nativePromiseOnly.default.resolve(true);\n }\n }, {\n key: \"beforeNext\",\n value: function beforeNext() {\n return this.beforePage(true);\n }\n /**\n * Called before a submission is triggered allowing the components\n * to perform special async functions.\n *\n * @return {*}\n */\n\n }, {\n key: \"beforeSubmit\",\n value: function beforeSubmit() {\n return _nativePromiseOnly.default.resolve(true);\n }\n /**\n * Return the submission timezone.\n *\n * @return {*}\n */\n\n }, {\n key: \"submissionTimezone\",\n get: function get() {\n this.options.submissionTimezone = this.options.submissionTimezone || _lodash.default.get(this.root, 'options.submissionTimezone');\n return this.options.submissionTimezone;\n }\n }, {\n key: \"loadRefs\",\n value: function loadRefs(element, refs) {\n for (var ref in refs) {\n var refType = refs[ref];\n var isString = typeof refType === 'string';\n var selector = isString && refType.includes('scope') ? \":scope > [ref=\\\"\".concat(ref, \"\\\"]\") : \"[ref=\\\"\".concat(ref, \"\\\"]\");\n\n if (isString && refType.startsWith('single')) {\n this.refs[ref] = element.querySelector(selector);\n } else {\n this.refs[ref] = element.querySelectorAll(selector);\n }\n }\n }\n }, {\n key: \"setOpenModalElement\",\n value: function setOpenModalElement(template) {\n this.componentModal.setOpenModalElement(template || this.getModalPreviewTemplate());\n }\n }, {\n key: \"getModalPreviewTemplate\",\n value: function getModalPreviewTemplate() {\n var dataValue = this.component.type === 'password' ? this.dataValue.replace(/./g, '•') : this.dataValue;\n var message = this.error ? {\n level: 'error',\n message: this.error.message\n } : '';\n return this.renderTemplate('modalPreview', {\n previewText: this.getValueAsString(dataValue, {\n modalPreview: true\n }) || this.t('Click to set value'),\n messages: message && this.renderTemplate('message', message)\n });\n }\n }, {\n key: \"build\",\n value: function build(element) {\n element = element || this.element;\n this.empty(element);\n this.setContent(element, this.render());\n return this.attach(element);\n }\n }, {\n key: \"hasModalSaveButton\",\n get: function get() {\n return true;\n }\n }, {\n key: \"render\",\n value: function render() {\n var children = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"Unknown component: \".concat(this.component.type);\n var topLevel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var isVisible = this.visible;\n this.rendered = true;\n\n if (!this.builderMode && !this.previewMode && this.component.modalEdit) {\n return _ComponentModal.default.render(this, {\n visible: isVisible,\n showSaveButton: this.hasModalSaveButton,\n id: this.id,\n classes: this.className,\n styles: this.customStyle,\n children: children\n }, topLevel);\n } else {\n return this.renderTemplate('component', {\n visible: isVisible,\n id: this.id,\n classes: this.className,\n styles: this.customStyle,\n children: children\n }, topLevel);\n }\n }\n }, {\n key: \"attachTooltips\",\n value: function attachTooltips(toolTipsRefs) {\n var _this6 = this;\n\n toolTipsRefs === null || toolTipsRefs === void 0 ? void 0 : toolTipsRefs.forEach(function (tooltip, index) {\n if (tooltip) {\n var tooltipAttribute = tooltip.getAttribute('data-tooltip');\n var tooltipDataTitle = tooltip.getAttribute('data-title');\n\n var tooltipText = _this6.interpolate(tooltipDataTitle || tooltipAttribute).replace(/(?:\\r\\n|\\r|\\n)/g, '
');\n\n _this6.tooltips[index] = (0, _tippy.default)(tooltip, {\n allowHTML: true,\n trigger: 'mouseenter click focus',\n placement: 'right',\n zIndex: 10000,\n interactive: true,\n content: _this6.t(tooltipText, {\n _userInput: true\n })\n });\n }\n });\n }\n }, {\n key: \"createComponentModal\",\n value: function createComponentModal(element, modalShouldBeOpened, currentValue) {\n return new _ComponentModal.default(this, element, modalShouldBeOpened, currentValue);\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n if (!this.builderMode && !this.previewMode && this.component.modalEdit) {\n var modalShouldBeOpened = this.componentModal ? this.componentModal.isOpened : false;\n var currentValue = modalShouldBeOpened ? this.componentModal.currentValue : this.dataValue;\n var openModalTemplate = this.componentModal && modalShouldBeOpened ? this.componentModal.openModalTemplate : null;\n this.componentModal = this.createComponentModal(element, modalShouldBeOpened, currentValue);\n this.setOpenModalElement(openModalTemplate);\n }\n\n this.attached = true;\n this.element = element;\n element.component = this; // If this already has an id, get it from the dom. If SSR, it could be different from the initiated id.\n\n if (this.element.id) {\n this.id = this.element.id;\n this.component.id = this.id;\n }\n\n this.loadRefs(element, {\n messageContainer: 'single',\n tooltip: 'multiple'\n });\n this.attachTooltips(this.refs.tooltip); // Attach logic.\n\n this.attachLogic();\n this.autofocus(); // Allow global attach.\n\n this.hook('attachComponent', element, this); // Allow attach per component type.\n\n var type = this.component.type;\n\n if (type) {\n this.hook(\"attach\".concat(type.charAt(0).toUpperCase() + type.substring(1, type.length)), element, this);\n }\n\n this.restoreFocus();\n this.addons.forEach(function (addon) {\n return addon.attach(element);\n });\n return _nativePromiseOnly.default.resolve();\n }\n }, {\n key: \"restoreFocus\",\n value: function restoreFocus() {\n var _this$root2, _this$root2$focusedCo;\n\n var isFocused = ((_this$root2 = this.root) === null || _this$root2 === void 0 ? void 0 : (_this$root2$focusedCo = _this$root2.focusedComponent) === null || _this$root2$focusedCo === void 0 ? void 0 : _this$root2$focusedCo.path) === this.path;\n\n if (isFocused) {\n var _this$root$currentSel;\n\n this.loadRefs(this.element, {\n input: 'multiple'\n });\n this.focus((_this$root$currentSel = this.root.currentSelection) === null || _this$root$currentSel === void 0 ? void 0 : _this$root$currentSel.index);\n this.restoreCaretPosition();\n }\n }\n }, {\n key: \"addShortcut\",\n value: function addShortcut(element, shortcut) {\n // Avoid infinite recursion.\n if (!element || !this.root || this.root === this) {\n return;\n }\n\n if (!shortcut) {\n shortcut = this.component.shortcut;\n }\n\n this.root.addShortcut(element, shortcut);\n }\n }, {\n key: \"removeShortcut\",\n value: function removeShortcut(element, shortcut) {\n // Avoid infinite recursion.\n if (!element || this.root === this) {\n return;\n }\n\n if (!shortcut) {\n shortcut = this.component.shortcut;\n }\n\n this.root.removeShortcut(element, shortcut);\n }\n /**\n * Remove all event handlers.\n */\n\n }, {\n key: \"detach\",\n value: function detach() {\n this.refs = {};\n this.removeEventListeners();\n this.detachLogic();\n\n if (this.tooltip) {\n this.tooltip.destroy();\n }\n }\n }, {\n key: \"checkRefresh\",\n value: function checkRefresh(refreshData, changed, flags) {\n var changePath = _lodash.default.get(changed, 'instance.path', false); // Don't let components change themselves.\n\n\n if (changePath && this.path === changePath) {\n return;\n }\n\n if (refreshData === 'data') {\n this.refresh(this.data, changed, flags);\n } else if (changePath && (0, FormioUtils.getComponentPath)(changed.instance) === refreshData && changed && changed.instance && // Make sure the changed component is not in a different \"context\". Solves issues where refreshOn being set\n // in fields inside EditGrids could alter their state from other rows (which is bad).\n this.inContext(changed.instance)) {\n this.refresh(changed.value, changed, flags);\n }\n }\n }, {\n key: \"checkRefreshOn\",\n value: function checkRefreshOn(changes) {\n var _this7 = this;\n\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n changes = changes || [];\n\n if (flags.noRefresh) {\n return;\n }\n\n if (!changes.length && flags.changed) {\n changes = [flags.changed];\n }\n\n var refreshOn = flags.fromBlur ? this.component.refreshOnBlur : this.component.refreshOn || this.component.redrawOn; // If they wish to refresh on a value, then add that here.\n\n if (refreshOn) {\n if (Array.isArray(refreshOn)) {\n refreshOn.forEach(function (refreshData) {\n return changes.forEach(function (changed) {\n return _this7.checkRefresh(refreshData, changed, flags);\n });\n });\n } else {\n changes.forEach(function (changed) {\n return _this7.checkRefresh(refreshOn, changed, flags);\n });\n }\n }\n }\n /**\n * Refreshes the component with a new value.\n *\n * @param value\n */\n\n }, {\n key: \"refresh\",\n value: function refresh(value) {\n if (this.hasOwnProperty('refreshOnValue')) {\n this.refreshOnChanged = !_lodash.default.isEqual(value, this.refreshOnValue);\n } else {\n this.refreshOnChanged = true;\n }\n\n this.refreshOnValue = (0, FormioUtils.fastCloneDeep)(value);\n\n if (this.refreshOnChanged) {\n if (this.component.clearOnRefresh) {\n this.setValue(null);\n }\n\n this.triggerRedraw();\n }\n }\n /**\n * Checks to see if a separate component is in the \"context\" of this component. This is determined by first checking\n * if they share the same \"data\" object. It will then walk up the parent tree and compare its parents data objects\n * with the components data and returns true if they are in the same context.\n *\n * Different rows of the same EditGrid, for example, are in different contexts.\n *\n * @param component\n */\n\n }, {\n key: \"inContext\",\n value: function inContext(component) {\n if (component.data === this.data) {\n return true;\n }\n\n var parent = this.parent;\n\n while (parent) {\n if (parent.data === component.data) {\n return true;\n }\n\n parent = parent.parent;\n }\n\n return false;\n }\n }, {\n key: \"viewOnly\",\n get: function get() {\n return this.options.readOnly && this.options.viewAsHtml;\n }\n }, {\n key: \"createViewOnlyElement\",\n value: function createViewOnlyElement() {\n this.element = this.ce('dl', {\n id: this.id\n });\n\n if (this.element) {\n // Ensure you can get the component info from the element.\n this.element.component = this;\n }\n\n return this.element;\n }\n }, {\n key: \"defaultViewOnlyValue\",\n get: function get() {\n return '-';\n }\n /**\n * Uses the widget to determine the output string.\n *\n * @param value\n * @return {*}\n */\n\n }, {\n key: \"getWidgetValueAsString\",\n value: function getWidgetValueAsString(value, options) {\n var _this8 = this;\n\n var noInputWidget = !this.refs.input || !this.refs.input[0] || !this.refs.input[0].widget;\n\n if (!value || noInputWidget) {\n if (!this.widget || !value) {\n return value;\n } else {\n return this.widget.getValueAsString(value);\n }\n }\n\n if (Array.isArray(value)) {\n var values = [];\n value.forEach(function (val, index) {\n var widget = _this8.refs.input[index] && _this8.refs.input[index].widget;\n\n if (widget) {\n values.push(widget.getValueAsString(val, options));\n }\n });\n return values;\n }\n\n var widget = this.refs.input[0].widget;\n return widget.getValueAsString(value, options);\n }\n }, {\n key: \"getValueAsString\",\n value: function getValueAsString(value, options) {\n if (!value) {\n return '';\n }\n\n value = this.getWidgetValueAsString(value, options);\n\n if (Array.isArray(value)) {\n return value.join(', ');\n }\n\n if (_lodash.default.isPlainObject(value)) {\n return JSON.stringify(value);\n }\n\n if (value === null || value === undefined) {\n return '';\n }\n\n var stringValue = value.toString();\n return this.sanitize(stringValue);\n }\n }, {\n key: \"getView\",\n value: function getView(value, options) {\n if (this.component.protected) {\n return '--- PROTECTED ---';\n }\n\n return this.getValueAsString(value, options);\n }\n }, {\n key: \"updateItems\",\n value: function updateItems() {\n this.restoreValue();\n this.onChange.apply(this, arguments);\n }\n /**\n * @param {*} data\n * @param {boolean} [forceUseValue=false] - if true, return 'value' property of the data\n * @return {*}\n */\n\n }, {\n key: \"itemValue\",\n value: function itemValue(data) {\n var forceUseValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n if (_lodash.default.isObject(data)) {\n if (this.valueProperty) {\n return _lodash.default.get(data, this.valueProperty);\n }\n\n if (forceUseValue) {\n return data.value;\n }\n }\n\n return data;\n }\n }, {\n key: \"itemValueForHTMLMode\",\n value: function itemValueForHTMLMode(value) {\n var _this9 = this;\n\n if (Array.isArray(value)) {\n var values = value.map(function (item) {\n return Array.isArray(item) ? _this9.itemValueForHTMLMode(item) : _this9.itemValue(item);\n });\n return values.join(', ');\n }\n\n return this.itemValue(value);\n }\n }, {\n key: \"createModal\",\n value: function createModal(element, attr, confirm) {\n var _this10 = this;\n\n var dialog = this.ce('div', attr || {});\n this.setContent(dialog, this.renderTemplate('dialog')); // Add refs to dialog, not \"this\".\n\n dialog.refs = {};\n this.loadRefs.call(dialog, dialog, {\n dialogOverlay: 'single',\n dialogContents: 'single',\n dialogClose: 'single'\n });\n dialog.refs.dialogContents.appendChild(element);\n document.body.appendChild(dialog);\n document.body.classList.add('modal-open');\n\n dialog.close = function () {\n document.body.classList.remove('modal-open');\n dialog.dispatchEvent(new CustomEvent('close'));\n };\n\n this.addEventListener(dialog, 'close', function () {\n return _this10.removeChildFrom(dialog, document.body);\n });\n\n var close = function close(event) {\n event.preventDefault();\n dialog.close();\n };\n\n var handleCloseClick = function handleCloseClick(e) {\n if (confirm) {\n confirm().then(function () {\n return close(e);\n }).catch(function () {});\n } else {\n close(e);\n }\n };\n\n this.addEventListener(dialog.refs.dialogOverlay, 'click', handleCloseClick);\n this.addEventListener(dialog.refs.dialogClose, 'click', handleCloseClick);\n return dialog;\n }\n }, {\n key: \"optimizeRedraw\",\n get: function get() {\n if (this.options.optimizeRedraw && this.element && !this.visible) {\n this.addClass(this.element, 'formio-removed');\n return true;\n }\n\n return false;\n }\n /**\n * Retrieves the CSS class name of this component.\n * @returns {string} - The class name of this component.\n */\n\n }, {\n key: \"className\",\n get: function get() {\n var className = this.hasInput ? 'form-group has-feedback ' : '';\n className += \"formio-component formio-component-\".concat(this.component.type, \" \"); // TODO: find proper way to avoid overriding of default type-based component styles\n\n if (this.key && this.key !== 'form') {\n className += \"formio-component-\".concat(this.key, \" \");\n }\n\n if (this.component.multiple) {\n className += 'formio-component-multiple ';\n }\n\n if (this.component.customClass) {\n className += this.component.customClass;\n }\n\n if (this.hasInput && this.component.validate && (0, FormioUtils.boolValue)(this.component.validate.required)) {\n className += ' required';\n }\n\n if (this.labelIsHidden()) {\n className += ' formio-component-label-hidden';\n }\n\n if (!this.visible) {\n className += ' formio-hidden';\n }\n\n return className;\n }\n /**\n * Build the custom style from the layout values\n * @return {string} - The custom style\n */\n\n }, {\n key: \"customStyle\",\n get: function get() {\n var customCSS = '';\n\n _lodash.default.each(this.component.style, function (value, key) {\n if (value !== '') {\n customCSS += \"\".concat(key, \":\").concat(value, \";\");\n }\n });\n\n return customCSS;\n }\n }, {\n key: \"isMobile\",\n get: function get() {\n return (0, _ismobilejs.default)();\n }\n /**\n * Returns the outside wrapping element of this component.\n * @returns {HTMLElement}\n */\n\n }, {\n key: \"getElement\",\n value: function getElement() {\n return this.element;\n }\n /**\n * Create an evaluation context for all script executions and interpolations.\n *\n * @param additional\n * @return {*}\n */\n\n }, {\n key: \"evalContext\",\n value: function evalContext(additional) {\n return _get(_getPrototypeOf(Component.prototype), \"evalContext\", this).call(this, Object.assign({\n component: this.component,\n row: this.data,\n rowIndex: this.rowIndex,\n data: this.rootValue,\n iconClass: this.iconClass.bind(this),\n // Bind the translate function to the data context of any interpolated string.\n // It is useful to translate strings in different scenarions (eg: custom edit grid templates, custom error messages etc.)\n // and desirable to be publicly available rather than calling the internal {instance.t} function in the template string.\n t: this.t.bind(this),\n submission: this.root ? this.root._submission : {\n data: this.rootValue\n },\n form: this.root ? this.root._form : {},\n options: this.options\n }, additional));\n }\n /**\n * Sets the pristine flag for this component.\n *\n * @param pristine {boolean} - TRUE to make pristine, FALSE not pristine.\n */\n\n }, {\n key: \"setPristine\",\n value: function setPristine(pristine) {\n this.pristine = pristine;\n }\n }, {\n key: \"isPristine\",\n get: function get() {\n return this.pristine;\n }\n }, {\n key: \"setDirty\",\n value: function setDirty(dirty) {\n this.dirty = dirty;\n }\n }, {\n key: \"isDirty\",\n get: function get() {\n return this.dirty;\n }\n /**\n * Removes a value out of the data array and rebuild the rows.\n * @param {number} index - The index of the data element to remove.\n */\n\n }, {\n key: \"removeValue\",\n value: function removeValue(index) {\n this.splice(index);\n this.redraw();\n this.restoreValue();\n this.triggerRootChange();\n }\n }, {\n key: \"iconClass\",\n value: function iconClass(name, spinning) {\n var iconset = this.options.iconset || Templates.current.defaultIconset || 'fa';\n return Templates.current.hasOwnProperty('iconClass') ? Templates.current.iconClass(iconset, name, spinning) : this.options.iconset === 'fa' ? Templates.defaultTemplates.iconClass(iconset, name, spinning) : name;\n }\n }, {\n key: \"size\",\n value: function size(_size) {\n return Templates.current.hasOwnProperty('size') ? Templates.current.size(_size) : _size;\n }\n /**\n * The readible name for this component.\n * @returns {string} - The name of the component.\n */\n\n }, {\n key: \"name\",\n get: function get() {\n return this.t(this.component.label || this.component.placeholder || this.key, {\n _userInput: true\n });\n }\n /**\n * Returns the error label for this component.\n * @return {*}\n */\n\n }, {\n key: \"errorLabel\",\n get: function get() {\n return this.t(this.component.errorLabel || this.component.label || this.component.placeholder || this.key);\n }\n /**\n * Get the error message provided a certain type of error.\n * @param type\n * @return {*}\n */\n\n }, {\n key: \"errorMessage\",\n value: function errorMessage(type) {\n return this.component.errors && this.component.errors[type] ? this.component.errors[type] : type;\n }\n }, {\n key: \"setContent\",\n value: function setContent(element, content, forceSanitize, sanitizeOptions) {\n if (element instanceof HTMLElement) {\n element.innerHTML = this.sanitize(content, forceSanitize, sanitizeOptions);\n return true;\n }\n\n return false;\n }\n }, {\n key: \"restoreCaretPosition\",\n value: function restoreCaretPosition() {\n var _this$root3;\n\n if ((_this$root3 = this.root) !== null && _this$root3 !== void 0 && _this$root3.currentSelection) {\n var _this$refs$input;\n\n if ((_this$refs$input = this.refs.input) !== null && _this$refs$input !== void 0 && _this$refs$input.length) {\n var _this$root$currentSel2 = this.root.currentSelection,\n selection = _this$root$currentSel2.selection,\n index = _this$root$currentSel2.index;\n var input = this.refs.input[index];\n var isInputRangeSelectable = /text|search|password|tel|url/i.test(input.type || '');\n\n if (input) {\n if (isInputRangeSelectable) {\n var _input;\n\n (_input = input).setSelectionRange.apply(_input, _toConsumableArray(selection));\n }\n } else {\n var _input$value;\n\n input = this.refs.input[this.refs.input.length];\n var lastCharacter = ((_input$value = input.value) === null || _input$value === void 0 ? void 0 : _input$value.length) || 0;\n\n if (isInputRangeSelectable) {\n input.setSelectionRange(lastCharacter, lastCharacter);\n }\n }\n }\n }\n }\n }, {\n key: \"redraw\",\n value: function redraw() {\n // Don't bother if we have not built yet.\n if (!this.element || !this.element.parentNode || this.optimizeRedraw) {\n // Return a non-resolving promise.\n return _nativePromiseOnly.default.resolve();\n }\n\n this.detach();\n this.emit('redraw'); // Since we are going to replace the element, we need to know it's position so we can find it in the parent's children.\n\n var parent = this.element.parentNode;\n var index = Array.prototype.indexOf.call(parent.children, this.element);\n this.element.outerHTML = this.sanitize(this.render());\n this.element = parent.children[index];\n return this.attach(this.element);\n }\n }, {\n key: \"rebuild\",\n value: function rebuild() {\n this.destroy();\n this.init();\n this.visible = this.conditionallyVisible(null, null);\n return this.redraw();\n }\n }, {\n key: \"removeEventListeners\",\n value: function removeEventListeners() {\n _get(_getPrototypeOf(Component.prototype), \"removeEventListeners\", this).call(this);\n\n this.tooltips.forEach(function (tooltip) {\n return tooltip.destroy();\n });\n this.tooltips = [];\n }\n }, {\n key: \"hasClass\",\n value: function hasClass(element, className) {\n if (!element) {\n return;\n }\n\n return _get(_getPrototypeOf(Component.prototype), \"hasClass\", this).call(this, element, this.transform('class', className));\n }\n }, {\n key: \"addClass\",\n value: function addClass(element, className) {\n if (!element) {\n return;\n }\n\n return _get(_getPrototypeOf(Component.prototype), \"addClass\", this).call(this, element, this.transform('class', className));\n }\n }, {\n key: \"removeClass\",\n value: function removeClass(element, className) {\n if (!element) {\n return;\n }\n\n return _get(_getPrototypeOf(Component.prototype), \"removeClass\", this).call(this, element, this.transform('class', className));\n }\n /**\n * Determines if this component has a condition defined.\n *\n * @return {null}\n */\n\n }, {\n key: \"hasCondition\",\n value: function hasCondition() {\n if (this._hasCondition !== null) {\n return this._hasCondition;\n }\n\n this._hasCondition = FormioUtils.hasCondition(this.component);\n return this._hasCondition;\n }\n /**\n * Check if this component is conditionally visible.\n *\n * @param data\n * @return {boolean}\n */\n\n }, {\n key: \"conditionallyVisible\",\n value: function conditionallyVisible(data, row) {\n data = data || this.rootValue;\n row = row || this.data;\n\n if (this.builderMode || this.previewMode || !this.hasCondition()) {\n return !this.component.hidden;\n }\n\n data = data || (this.root ? this.root.data : {});\n return this.checkCondition(row, data);\n }\n /**\n * Checks the condition of this component.\n *\n * TODO: Switch row and data parameters to be consistent with other methods.\n *\n * @param row - The row contextual data.\n * @param data - The global data object.\n * @return {boolean} - True if the condition applies to this component.\n */\n\n }, {\n key: \"checkCondition\",\n value: function checkCondition(row, data) {\n return FormioUtils.checkCondition(this.component, row || this.data, data || this.rootValue, this.root ? this.root._form : {}, this);\n }\n /**\n * Check for conditionals and hide/show the element based on those conditions.\n */\n\n }, {\n key: \"checkComponentConditions\",\n value: function checkComponentConditions(data, flags, row) {\n data = data || this.rootValue;\n flags = flags || {};\n row = row || this.data;\n\n if (!this.builderMode & !this.previewMode && this.fieldLogic(data, row)) {\n this.redraw();\n } // Check advanced conditions\n\n\n var visible = this.conditionallyVisible(data, row);\n\n if (this.visible !== visible) {\n this.visible = visible;\n }\n\n return visible;\n }\n /**\n * Checks conditions for this component and any sub components.\n * @param args\n * @return {boolean}\n */\n\n }, {\n key: \"checkConditions\",\n value: function checkConditions(data, flags, row) {\n data = data || this.rootValue;\n flags = flags || {};\n row = row || this.data;\n return this.checkComponentConditions(data, flags, row);\n }\n }, {\n key: \"logic\",\n get: function get() {\n return this.component.logic || [];\n }\n /**\n * Check all triggers and apply necessary actions.\n *\n * @param data\n */\n\n }, {\n key: \"fieldLogic\",\n value: function fieldLogic(data, row) {\n var _this11 = this;\n\n data = data || this.rootValue;\n row = row || this.data;\n var logics = this.logic; // If there aren't logic, don't go further.\n\n if (logics.length === 0) {\n return;\n }\n\n var newComponent = (0, FormioUtils.fastCloneDeep)(this.originalComponent);\n var changed = logics.reduce(function (changed, logic) {\n var result = FormioUtils.checkTrigger(newComponent, logic.trigger, row, data, _this11.root ? _this11.root._form : {}, _this11);\n return (result ? _this11.applyActions(newComponent, logic.actions, result, row, data) : false) || changed;\n }, false); // If component definition changed, replace and mark as changed.\n\n if (!_lodash.default.isEqual(this.component, newComponent)) {\n this.component = newComponent;\n changed = true;\n var disabled = this.shouldDisabled; // Change disabled state if it has changed\n\n if (this.disabled !== disabled) {\n this.disabled = disabled;\n }\n }\n\n return changed;\n }\n }, {\n key: \"isIE\",\n value: function isIE() {\n if (typeof window === 'undefined') {\n return false;\n }\n\n var userAgent = window.navigator.userAgent;\n var msie = userAgent.indexOf('MSIE ');\n\n if (msie > 0) {\n // IE 10 or older => return version number\n return parseInt(userAgent.substring(msie + 5, userAgent.indexOf('.', msie)), 10);\n }\n\n var trident = userAgent.indexOf('Trident/');\n\n if (trident > 0) {\n // IE 11 => return version number\n var rv = userAgent.indexOf('rv:');\n return parseInt(userAgent.substring(rv + 3, userAgent.indexOf('.', rv)), 10);\n }\n\n var edge = userAgent.indexOf('Edge/');\n\n if (edge > 0) {\n // IE 12 (aka Edge) => return version number\n return parseInt(userAgent.substring(edge + 5, userAgent.indexOf('.', edge)), 10);\n } // other browser\n\n\n return false;\n }\n }, {\n key: \"defineActionValue\",\n value: function defineActionValue(action, argsObject) {\n return this.evaluate(action.value, argsObject, 'value');\n }\n }, {\n key: \"applyActions\",\n value: function applyActions(newComponent, actions, result, row, data) {\n var _this12 = this;\n\n data = data || this.rootValue;\n row = row || this.data;\n return actions.reduce(function (changed, action) {\n switch (action.type) {\n case 'property':\n {\n FormioUtils.setActionProperty(newComponent, action, result, row, data, _this12);\n var property = action.property.value;\n\n if (!_lodash.default.isEqual(_lodash.default.get(_this12.component, property), _lodash.default.get(newComponent, property))) {\n changed = true;\n }\n\n break;\n }\n\n case 'value':\n {\n var oldValue = _this12.getValue();\n\n var newValue = _this12.defineActionValue(action, {\n value: _lodash.default.clone(oldValue),\n data: data,\n row: row,\n component: newComponent,\n result: result\n });\n\n if (!_lodash.default.isEqual(oldValue, newValue)) {\n _this12.setValue(newValue);\n\n if (_this12.viewOnly) {\n _this12.dataValue = newValue;\n }\n\n changed = true;\n }\n\n break;\n }\n\n case 'mergeComponentSchema':\n {\n var schema = _this12.evaluate(action.schemaDefinition, {\n value: _lodash.default.clone(_this12.getValue()),\n data: data,\n row: row,\n component: newComponent,\n result: result\n }, 'schema');\n\n _lodash.default.assign(newComponent, schema);\n\n if (!_lodash.default.isEqual(_this12.component, newComponent)) {\n changed = true;\n }\n\n break;\n }\n\n case 'customAction':\n {\n var _oldValue = _this12.getValue();\n\n var _newValue = _this12.evaluate(action.customAction, {\n value: _lodash.default.clone(_oldValue),\n data: data,\n row: row,\n input: _oldValue,\n component: newComponent,\n result: result\n }, 'value');\n\n if (!_lodash.default.isEqual(_oldValue, _newValue)) {\n _this12.setValue(_newValue);\n\n if (_this12.viewOnly) {\n _this12.dataValue = _newValue;\n }\n\n changed = true;\n }\n\n break;\n }\n }\n\n return changed;\n }, false);\n } // Deprecated\n\n }, {\n key: \"addInputError\",\n value: function addInputError(message, dirty, elements) {\n this.addMessages(message);\n this.setErrorClasses(elements, dirty, !!message);\n } // Deprecated\n\n }, {\n key: \"removeInputError\",\n value: function removeInputError(elements) {\n this.setErrorClasses(elements, true, false);\n }\n /**\n * Add a new input error to this element.\n *\n * @param message\n * @param dirty\n */\n\n }, {\n key: \"addMessages\",\n value: function addMessages(messages) {\n var _this13 = this;\n\n if (!messages) {\n return;\n } // Standardize on array of objects for message.\n\n\n if (typeof messages === 'string') {\n messages = {\n messages: messages,\n level: 'error'\n };\n }\n\n if (!Array.isArray(messages)) {\n messages = [messages];\n }\n\n messages = _lodash.default.uniqBy(messages, function (message) {\n return message.message;\n });\n\n if (this.refs.messageContainer) {\n this.setContent(this.refs.messageContainer, messages.map(function (message) {\n return _this13.renderTemplate('message', message);\n }).join(''));\n }\n }\n }, {\n key: \"setErrorClasses\",\n value: function setErrorClasses(elements, dirty, hasErrors, hasMessages) {\n var _this14 = this;\n\n var element = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : this.element;\n this.clearErrorClasses();\n elements.forEach(function (element) {\n _this14.setElementInvalid(_this14.performInputMapping(element), false);\n });\n this.setInputWidgetErrorClasses(elements, hasErrors);\n\n if (hasErrors) {\n // Add error classes\n elements.forEach(function (input) {\n _this14.setElementInvalid(_this14.performInputMapping(input), true);\n });\n\n if (dirty && this.options.highlightErrors) {\n this.addClass(element, this.options.componentErrorClass);\n } else {\n this.addClass(element, 'has-error');\n }\n }\n\n if (hasMessages) {\n this.addClass(element, 'has-message');\n }\n }\n }, {\n key: \"setElementInvalid\",\n value: function setElementInvalid(element, invalid) {\n if (!element) return;\n\n if (invalid) {\n this.addClass(element, 'is-invalid');\n } else {\n this.removeClass(element, 'is-invalid');\n }\n\n element.setAttribute('aria-invalid', invalid ? 'true' : 'false');\n }\n }, {\n key: \"clearOnHide\",\n value: function clearOnHide() {\n // clearOnHide defaults to true for old forms (without the value set) so only trigger if the value is false.\n if ( // if change happens inside EditGrid's row, it doesn't trigger change on the root level, so rootPristine will be true\n (!this.rootPristine || this.options.server || (0, FormioUtils.isInsideScopingComponent)(this)) && this.component.clearOnHide !== false && !this.options.readOnly && !this.options.showHiddenFields) {\n if (!this.visible) {\n this.deleteValue();\n } else if (!this.hasValue() && this.shouldAddDefaultValue) {\n // If shown, ensure the default is set.\n this.setValue(this.defaultValue, {\n noUpdateEvent: true\n });\n }\n }\n }\n }, {\n key: \"triggerRootChange\",\n value: function triggerRootChange() {\n if (this.options.onChange) {\n var _this$options2;\n\n (_this$options2 = this.options).onChange.apply(_this$options2, arguments);\n } else if (this.root) {\n var _this$root4;\n\n (_this$root4 = this.root).triggerChange.apply(_this$root4, arguments);\n }\n }\n }, {\n key: \"onChange\",\n value: function onChange(flags, fromRoot) {\n flags = flags || {};\n\n if (flags.modified) {\n if (!flags.noPristineChangeOnModified) {\n this.pristine = false;\n }\n\n this.addClass(this.getElement(), 'formio-modified');\n } // If we are supposed to validate on blur, then don't trigger validation yet.\n\n\n if (this.component.validateOn === 'blur' && !this.errors.length) {\n flags.noValidate = true;\n }\n\n if (this.component.onChange) {\n this.evaluate(this.component.onChange, {\n flags: flags\n });\n } // Set the changed variable.\n\n\n var changed = {\n instance: this,\n component: this.component,\n value: this.dataValue,\n flags: flags\n }; // Emit the change.\n\n this.emit('componentChange', changed); // Do not propogate the modified flag.\n\n var modified = false;\n\n if (flags.modified) {\n modified = true;\n delete flags.modified;\n } // Bubble this change up to the top.\n\n\n if (!fromRoot) {\n this.triggerRootChange(flags, changed, modified);\n }\n\n return changed;\n }\n }, {\n key: \"wysiwygDefault\",\n get: function get() {\n return {\n quill: {\n theme: 'snow',\n placeholder: this.t(this.component.placeholder, {\n _userInput: true\n }),\n modules: {\n toolbar: [[{\n 'size': ['small', false, 'large', 'huge']\n }], // custom dropdown\n [{\n 'header': [1, 2, 3, 4, 5, 6, false]\n }], [{\n 'font': []\n }], ['bold', 'italic', 'underline', 'strike', {\n 'script': 'sub'\n }, {\n 'script': 'super'\n }, 'clean'], [{\n 'color': []\n }, {\n 'background': []\n }], [{\n 'list': 'ordered'\n }, {\n 'list': 'bullet'\n }, {\n 'indent': '-1'\n }, {\n 'indent': '+1'\n }, {\n 'align': []\n }], ['blockquote', 'code-block'], ['link', 'image', 'video', 'formula', 'source']]\n }\n },\n ace: {\n theme: 'ace/theme/xcode',\n maxLines: 12,\n minLines: 12,\n tabSize: 2,\n mode: 'ace/mode/javascript',\n placeholder: this.t(this.component.placeholder, {\n _userInput: true\n })\n },\n ckeditor: {\n image: {\n toolbar: ['imageTextAlternative', '|', 'imageStyle:full', 'imageStyle:alignLeft', 'imageStyle:alignCenter', 'imageStyle:alignRight'],\n styles: ['full', 'alignLeft', 'alignCenter', 'alignRight']\n },\n extraPlugins: []\n },\n default: {}\n };\n }\n }, {\n key: \"addCKE\",\n value: function addCKE(element, settings, onChange) {\n settings = _lodash.default.isEmpty(settings) ? {} : settings;\n settings.base64Upload = this.component.isUploadEnabled ? false : true;\n settings.mediaEmbed = {\n previewsInData: true\n };\n settings = _lodash.default.merge(this.wysiwygDefault.ckeditor, _lodash.default.get(this.options, 'editors.ckeditor.settings', {}), settings);\n\n if (this.component.isUploadEnabled) {\n settings.extraPlugins.push((0, _uploadAdapter.getFormioUploadAdapterPlugin)(this.fileService, this));\n }\n\n return _Formio.GlobalFormio.requireLibrary('ckeditor', isIEBrowser ? 'CKEDITOR' : 'ClassicEditor', _lodash.default.get(this.options, 'editors.ckeditor.src', CKEDITOR_URL), true).then(function () {\n if (!element.parentNode) {\n return _nativePromiseOnly.default.reject();\n }\n\n if (isIEBrowser) {\n var editor = CKEDITOR.replace(element);\n editor.on('change', function () {\n return onChange(editor.getData());\n });\n return _nativePromiseOnly.default.resolve(editor);\n } else {\n return ClassicEditor.create(element, settings).then(function (editor) {\n editor.model.document.on('change', function () {\n return onChange(editor.data.get());\n });\n return editor;\n });\n }\n });\n }\n }, {\n key: \"addQuill\",\n value: function addQuill(element, settings, onChange) {\n var _this15 = this;\n\n settings = _lodash.default.isEmpty(settings) ? this.wysiwygDefault.quill : settings;\n settings = _lodash.default.merge(this.wysiwygDefault.quill, _lodash.default.get(this.options, 'editors.quill.settings', {}), settings);\n settings = _objectSpread(_objectSpread({}, settings), {}, {\n modules: _objectSpread({\n table: true\n }, settings.modules)\n }); // Lazy load the quill css.\n\n _Formio.GlobalFormio.requireLibrary(\"quill-css-\".concat(settings.theme), 'Quill', [{\n type: 'styles',\n src: \"\".concat(QUILL_URL, \"/quill.\").concat(settings.theme, \".css\")\n }], true); // Lazy load the quill library.\n\n\n return _Formio.GlobalFormio.requireLibrary('quill', 'Quill', _lodash.default.get(this.options, 'editors.quill.src', \"\".concat(QUILL_URL, \"/quill.min.js\")), true).then(function () {\n return _Formio.GlobalFormio.requireLibrary('quill-table', 'Quill', QUILL_TABLE_URL, true).then(function () {\n if (!element.parentNode) {\n return _nativePromiseOnly.default.reject();\n }\n\n _this15.quill = new Quill(element, isIEBrowser ? _objectSpread(_objectSpread({}, settings), {}, {\n modules: {}\n }) : settings);\n /** This block of code adds the [source] capabilities. See https://codepen.io/anon/pen/ZyEjrQ **/\n\n var txtArea = document.createElement('textarea');\n txtArea.setAttribute('class', 'quill-source-code');\n\n _this15.quill.addContainer('ql-custom').appendChild(txtArea);\n\n var qlSource = element.parentNode.querySelector('.ql-source');\n\n if (qlSource) {\n _this15.addEventListener(qlSource, 'click', function (event) {\n event.preventDefault();\n\n if (txtArea.style.display === 'inherit') {\n _this15.quill.setContents(_this15.quill.clipboard.convert({\n html: txtArea.value\n }));\n }\n\n txtArea.style.display = txtArea.style.display === 'none' ? 'inherit' : 'none';\n });\n }\n /** END CODEBLOCK **/\n // Make sure to select cursor when they click on the element.\n\n\n _this15.addEventListener(element, 'click', function () {\n return _this15.quill.focus();\n }); // Allows users to skip toolbar items when tabbing though form\n\n\n var elm = document.querySelectorAll('.ql-formats > button');\n\n for (var i = 0; i < elm.length; i++) {\n elm[i].setAttribute('tabindex', '-1');\n }\n\n _this15.quill.on('text-change', function () {\n txtArea.value = _this15.quill.root.innerHTML;\n onChange(txtArea);\n });\n\n return _this15.quill;\n });\n });\n }\n }, {\n key: \"shouldSanitizeValue\",\n get: function get() {\n var _this$options3;\n\n // Sanitize value if sanitizing for thw whole content is turned off\n return ((_this$options3 = this.options) === null || _this$options3 === void 0 ? void 0 : _this$options3.sanitize) !== false;\n }\n }, {\n key: \"addAce\",\n value: function addAce(element, settings, onChange) {\n if (!settings || settings.theme === 'snow') {\n var mode = settings ? settings.mode : '';\n settings = {};\n\n if (mode) {\n settings.mode = mode;\n }\n }\n\n settings = _lodash.default.merge(this.wysiwygDefault.ace, _lodash.default.get(this.options, 'editors.ace.settings', {}), settings || {});\n return _Formio.GlobalFormio.requireLibrary('ace', 'ace', _lodash.default.get(this.options, 'editors.ace.src', ACE_URL), true).then(function (editor) {\n editor = editor.edit(element);\n editor.removeAllListeners('change');\n editor.setOptions(settings);\n editor.getSession().setMode(settings.mode);\n editor.on('change', function () {\n return onChange(editor.getValue());\n });\n\n if (settings.isUseWorkerDisabled) {\n editor.session.setUseWorker(false);\n }\n\n return editor;\n });\n }\n }, {\n key: \"tree\",\n get: function get() {\n return this.component.tree || false;\n }\n /**\n * The empty value for this component.\n *\n * @return {null}\n */\n\n }, {\n key: \"emptyValue\",\n get: function get() {\n return null;\n }\n /**\n * Returns if this component has a value set.\n *\n */\n\n }, {\n key: \"hasValue\",\n value: function hasValue(data) {\n return _lodash.default.has(data || this.data, this.key);\n }\n /**\n * Get the data value at the root level.\n *\n * @return {*}\n */\n\n }, {\n key: \"rootValue\",\n get: function get() {\n return this.root ? this.root.data : this.data;\n }\n }, {\n key: \"rootPristine\",\n get: function get() {\n return _lodash.default.get(this, 'root.pristine', false);\n }\n /**\n * Get the static value of this component.\n * @return {*}\n */\n\n }, {\n key: \"dataValue\",\n get: function get() {\n if (!this.key || !this.visible && this.component.clearOnHide && !this.rootPristine) {\n return this.emptyValue;\n }\n\n if (!this.hasValue() && this.shouldAddDefaultValue) {\n var empty = this.component.multiple ? [] : this.emptyValue;\n\n if (!this.rootPristine) {\n this.dataValue = empty;\n }\n\n return empty;\n }\n\n return _lodash.default.get(this._data, this.key);\n }\n /**\n * Sets the static value of this component.\n *\n * @param value\n */\n ,\n set: function set(value) {\n if (!this.allowData || !this.key || !this.visible && this.component.clearOnHide && !this.rootPristine) {\n return;\n }\n\n if (value !== null && value !== undefined) {\n value = this.hook('setDataValue', value, this.key, this._data);\n }\n\n if (value === null || value === undefined) {\n this.unset();\n return;\n }\n\n _lodash.default.set(this._data, this.key, value);\n\n return;\n }\n /**\n * Splice a value from the dataValue.\n *\n * @param index\n */\n\n }, {\n key: \"splice\",\n value: function splice(index) {\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n if (this.hasValue()) {\n var dataValue = this.dataValue || [];\n\n if (_lodash.default.isArray(dataValue) && dataValue.hasOwnProperty(index)) {\n dataValue.splice(index, 1);\n this.dataValue = dataValue;\n this.triggerChange(flags);\n }\n }\n }\n }, {\n key: \"unset\",\n value: function unset() {\n _lodash.default.unset(this._data, this.key);\n }\n /**\n * Deletes the value of the component.\n */\n\n }, {\n key: \"deleteValue\",\n value: function deleteValue() {\n this.setValue(null, {\n noUpdateEvent: true,\n noDefault: true\n });\n this.unset();\n }\n }, {\n key: \"getCustomDefaultValue\",\n value: function getCustomDefaultValue(defaultValue) {\n if (this.component.customDefaultValue && !this.options.preview) {\n defaultValue = this.evaluate(this.component.customDefaultValue, {\n value: ''\n }, 'value');\n }\n\n return defaultValue;\n }\n }, {\n key: \"shouldAddDefaultValue\",\n get: function get() {\n return !this.options.noDefaults || this.component.defaultValue && !this.isEmpty(this.component.defaultValue) || this.component.customDefaultValue;\n }\n }, {\n key: \"defaultValue\",\n get: function get() {\n var _this16 = this;\n\n var defaultValue = this.emptyValue;\n\n if (this.component.defaultValue) {\n defaultValue = this.component.defaultValue;\n }\n\n defaultValue = this.getCustomDefaultValue(defaultValue);\n\n var checkMask = function checkMask(value) {\n if (typeof value === 'string') {\n var placeholderChar = _this16.placeholderChar;\n value = (0, _vanillaTextMask.conformToMask)(value, _this16.defaultMask, {\n placeholderChar: placeholderChar\n }).conformedValue;\n\n if (!FormioUtils.matchInputMask(value, _this16.defaultMask)) {\n value = '';\n }\n } else {\n value = '';\n }\n\n return value;\n };\n\n if (this.defaultMask) {\n if (Array.isArray(defaultValue)) {\n defaultValue = defaultValue.map(checkMask);\n } else {\n defaultValue = checkMask(defaultValue);\n }\n } // Clone so that it creates a new instance.\n\n\n return _lodash.default.cloneDeep(defaultValue);\n }\n /**\n * Get the input value of this component.\n *\n * @return {*}\n */\n\n }, {\n key: \"getValue\",\n value: function getValue() {\n if (!this.hasInput || this.viewOnly || !this.refs.input || !this.refs.input.length) {\n return this.dataValue;\n }\n\n var values = [];\n\n for (var i in this.refs.input) {\n if (this.refs.input.hasOwnProperty(i)) {\n if (!this.component.multiple) {\n return this.getValueAt(i);\n }\n\n values.push(this.getValueAt(i));\n }\n }\n\n if (values.length === 0 && !this.component.multiple) {\n return '';\n }\n\n return values;\n }\n /**\n * Get the value at a specific index.\n *\n * @param index\n * @returns {*}\n */\n\n }, {\n key: \"getValueAt\",\n value: function getValueAt(index) {\n var input = this.performInputMapping(this.refs.input[index]);\n return input ? input.value : undefined;\n }\n /**\n * Set the value of this component.\n *\n * @param value\n * @param flags\n *\n * @return {boolean} - If the value changed.\n */\n\n }, {\n key: \"setValue\",\n value: function setValue(value) {\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var changed = this.updateValue(value, flags);\n value = this.dataValue;\n\n if (!this.hasInput) {\n return changed;\n }\n\n var isArray = Array.isArray(value);\n var valueInput = this.refs.fileLink || this.refs.input;\n\n if (isArray && Array.isArray(this.defaultValue) && this.refs.hasOwnProperty('input') && valueInput && valueInput.length !== value.length && this.visible) {\n this.redraw();\n }\n\n if (this.isHtmlRenderMode() && flags && flags.fromSubmission && changed) {\n this.redraw();\n return changed;\n }\n\n for (var i in this.refs.input) {\n if (this.refs.input.hasOwnProperty(i)) {\n this.setValueAt(i, isArray ? value[i] : value, flags);\n }\n }\n\n return changed;\n }\n /**\n * Set the value at a specific index.\n *\n * @param index\n * @param value\n */\n\n }, {\n key: \"setValueAt\",\n value: function setValueAt(index, value) {\n var flags = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n if (!flags.noDefault && (value === null || value === undefined) && !this.component.multiple) {\n value = this.defaultValue;\n }\n\n var input = this.performInputMapping(this.refs.input[index]);\n var valueMaskInput = this.refs.valueMaskInput;\n\n if (valueMaskInput !== null && valueMaskInput !== void 0 && valueMaskInput.mask) {\n valueMaskInput.mask.textMaskInputElement.update(value);\n }\n\n if (input.mask) {\n input.mask.textMaskInputElement.update(value);\n } else if (input.widget && input.widget.setValue) {\n input.widget.setValue(value);\n } else {\n input.value = value;\n }\n }\n }, {\n key: \"hasSetValue\",\n get: function get() {\n return this.hasValue() && !this.isEmpty(this.dataValue);\n }\n }, {\n key: \"setDefaultValue\",\n value: function setDefaultValue() {\n if (this.defaultValue && this.shouldAddDefaultValue) {\n var defaultValue = this.component.multiple && !this.dataValue.length ? [] : this.defaultValue;\n this.setValue(defaultValue, {\n noUpdateEvent: true\n });\n }\n }\n /**\n * Restore the value of a control.\n */\n\n }, {\n key: \"restoreValue\",\n value: function restoreValue() {\n if (this.hasSetValue) {\n this.setValue(this.dataValue, {\n noUpdateEvent: true\n });\n } else {\n this.setDefaultValue();\n }\n }\n /**\n * Normalize values coming into updateValue.\n *\n * @param value\n * @return {*}\n */\n\n }, {\n key: \"normalizeValue\",\n value: function normalizeValue(value) {\n if (this.component.multiple && !Array.isArray(value)) {\n value = value ? [value] : [];\n }\n\n return value;\n }\n /**\n * Update a value of this component.\n *\n * @param flags\n */\n\n }, {\n key: \"updateComponentValue\",\n value: function updateComponentValue(value) {\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var newValue = !flags.resetValue && (value === undefined || value === null) ? this.getValue() : value;\n newValue = this.normalizeValue(newValue, flags);\n var oldValue = this.dataValue;\n var changed = newValue !== undefined ? this.hasChanged(newValue, oldValue) : false;\n\n if (changed) {\n this.dataValue = newValue;\n changed = this.dataValue !== oldValue;\n this.updateOnChange(flags, changed);\n }\n\n if (this.componentModal && flags && flags.fromSubmission) {\n this.componentModal.setValue(value);\n }\n\n return changed;\n }\n /**\n * Updates the value of this component plus all sub-components.\n *\n * @param args\n * @return {boolean}\n */\n\n }, {\n key: \"updateValue\",\n value: function updateValue() {\n return this.updateComponentValue.apply(this, arguments);\n }\n }, {\n key: \"getIcon\",\n value: function getIcon(name, content, styles) {\n var ref = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'icon';\n return this.renderTemplate('icon', {\n className: this.iconClass(name),\n ref: ref,\n styles: styles,\n content: content\n });\n }\n /**\n * Resets the value of this component.\n */\n\n }, {\n key: \"resetValue\",\n value: function resetValue() {\n this.unset();\n this.setValue(this.emptyValue, {\n noUpdateEvent: true,\n noValidate: true,\n resetValue: true\n });\n }\n /**\n * Determine if the value of this component has changed.\n *\n * @param newValue\n * @param oldValue\n * @return {boolean}\n */\n\n }, {\n key: \"hasChanged\",\n value: function hasChanged(newValue, oldValue) {\n if ((newValue === undefined || newValue === null) && (oldValue === undefined || oldValue === null || this.isEmpty(oldValue))) {\n return false;\n } // If we do not have a value and are getting set to anything other than undefined or null, then we changed.\n\n\n if (newValue !== undefined && newValue !== null && this.allowData && !this.hasValue()) {\n return true;\n }\n\n return !_lodash.default.isEqual(newValue, oldValue);\n }\n /**\n * Update the value on change.\n *\n * @param flags\n */\n\n }, {\n key: \"updateOnChange\",\n value: function updateOnChange() {\n var flags = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var changed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n if (!flags.noUpdateEvent && changed) {\n this.triggerChange(flags);\n return true;\n }\n\n return false;\n }\n /**\n * Perform a calculated value operation.\n *\n * @param data - The global data object.\n *\n * @return {boolean} - If the value changed during calculation.\n */\n\n }, {\n key: \"convertNumberOrBoolToString\",\n value: function convertNumberOrBoolToString(value) {\n if (typeof value === 'number' || typeof value === 'boolean') {\n return value.toString();\n }\n\n return value;\n }\n }, {\n key: \"doValueCalculation\",\n value: function doValueCalculation(dataValue, data, row) {\n return this.evaluate(this.component.calculateValue, {\n value: dataValue,\n data: data,\n row: row || this.data\n }, 'value');\n }\n /* eslint-disable max-statements */\n\n }, {\n key: \"calculateComponentValue\",\n value: function calculateComponentValue(data, flags, row) {\n // If no calculated value or\n // hidden and set to clearOnHide (Don't calculate a value for a hidden field set to clear when hidden)\n var clearOnHide = this.component.clearOnHide;\n var shouldBeCleared = !this.visible && clearOnHide;\n\n var allowOverride = _lodash.default.get(this.component, 'allowCalculateOverride', false); // Handle all cases when calculated values should not fire.\n\n\n if (this.options.readOnly && !this.options.pdf || !(this.component.calculateValue || this.component.calculateValueVariable) || shouldBeCleared || this.options.server && !this.component.calculateServer || flags.dataSourceInitialLoading && allowOverride) {\n return false;\n }\n\n var dataValue = this.dataValue; // Calculate the new value.\n\n var calculatedValue = this.doValueCalculation(dataValue, data, row, flags);\n\n if (_lodash.default.isNil(calculatedValue)) {\n calculatedValue = this.emptyValue;\n }\n\n var changed = !_lodash.default.isEqual(dataValue, calculatedValue); // Do not override calculations on server if they have calculateServer set.\n\n if (allowOverride) {\n // The value is considered locked if it is not empty and comes from a submission value.\n var fromSubmission = flags.fromSubmission && this.component.persistent === true;\n\n if (this.isEmpty(dataValue)) {\n // Reset the calculation lock if ever the data is cleared.\n this.calculationLocked = false;\n } else if (this.calculationLocked || fromSubmission) {\n this.calculationLocked = true;\n return false;\n }\n\n var firstPass = this.calculatedValue === undefined;\n\n if (firstPass) {\n this.calculatedValue = null;\n }\n\n var newCalculatedValue = this.normalizeValue(this.convertNumberOrBoolToString(calculatedValue));\n var previousCalculatedValue = this.normalizeValue(this.convertNumberOrBoolToString(this.calculatedValue));\n var normalizedDataValue = this.normalizeValue(this.convertNumberOrBoolToString(dataValue));\n var calculationChanged = !_lodash.default.isEqual(previousCalculatedValue, newCalculatedValue);\n var previousChanged = !_lodash.default.isEqual(normalizedDataValue, previousCalculatedValue);\n\n if (calculationChanged && previousChanged && !firstPass) {\n return false;\n } // Check to ensure that the calculated value is different than the previously calculated value.\n\n\n if (previousCalculatedValue && previousChanged && !calculationChanged) {\n return false;\n }\n\n if (flags.isReordered || !calculationChanged) {\n return false;\n }\n\n if (fromSubmission) {\n // If we set value from submission and it differs from calculated one, set the calculated value to prevent overriding dataValue in the next pass\n this.calculatedValue = calculatedValue;\n return false;\n } // If this is the firstPass, and the dataValue is different than to the calculatedValue.\n\n\n if (firstPass && !this.isEmpty(dataValue) && changed && calculationChanged) {\n // Return that we have a change so it will perform another pass.\n return true;\n }\n }\n\n this.calculatedValue = calculatedValue;\n\n if (changed) {\n if (!flags.noPristineChangeOnModified) {\n this.pristine = false;\n }\n\n flags.triggeredComponentId = this.id;\n return this.setValue(calculatedValue, flags);\n }\n\n return false;\n }\n /* eslint-enable max-statements */\n\n /**\n * Performs calculations in this component plus any child components.\n *\n * @param args\n * @return {boolean}\n */\n\n }, {\n key: \"calculateValue\",\n value: function calculateValue(data, flags, row) {\n data = data || this.rootValue;\n flags = flags || {};\n row = row || this.data;\n return this.calculateComponentValue(data, flags, row);\n }\n /**\n * Get this component's label text.\n *\n */\n\n }, {\n key: \"label\",\n get: function get() {\n return this.component.label;\n }\n /**\n * Set this component's label text and render it.\n *\n * @param value - The new label text.\n */\n ,\n set: function set(value) {\n this.component.label = value;\n\n if (this.labelElement) {\n this.labelElement.innerText = value;\n }\n }\n /**\n * Get FormioForm element at the root of this component tree.\n *\n */\n\n }, {\n key: \"getRoot\",\n value: function getRoot() {\n return this.root;\n }\n /**\n * Returns the invalid message, or empty string if the component is valid.\n *\n * @param data\n * @param dirty\n * @return {*}\n */\n\n }, {\n key: \"invalidMessage\",\n value: function invalidMessage(data, dirty, ignoreCondition, row) {\n if (!ignoreCondition && !this.checkCondition(row, data)) {\n return '';\n } // See if this is forced invalid.\n\n\n if (this.invalid) {\n return this.invalid;\n } // No need to check for errors if there is no input or if it is pristine.\n\n\n if (!this.hasInput || !dirty && this.pristine) {\n return '';\n }\n\n return _lodash.default.map(_Validator.default.checkComponent(this, data), 'message').join('\\n\\n');\n }\n /**\n * Returns if the component is valid or not.\n *\n * @param data\n * @param dirty\n * @return {boolean}\n */\n\n }, {\n key: \"isValid\",\n value: function isValid(data, dirty) {\n return !this.invalidMessage(data, dirty);\n }\n }, {\n key: \"setComponentValidity\",\n value: function setComponentValidity(messages, dirty, silentCheck) {\n var hasErrors = !!messages.filter(function (message) {\n return message.level === 'error' && !message.fromServer;\n }).length;\n\n if (messages.length && (!silentCheck || this.error) && (!this.isEmpty(this.defaultValue) || dirty || !this.pristine)) {\n this.setCustomValidity(messages, dirty);\n } else if (!silentCheck) {\n this.setCustomValidity('');\n }\n\n return !hasErrors;\n }\n /**\n * Checks the validity of this component and sets the error message if it is invalid.\n *\n * @param data\n * @param dirty\n * @param row\n * @return {boolean}\n */\n\n }, {\n key: \"checkComponentValidity\",\n value: function checkComponentValidity(data, dirty, row) {\n var _this$serverErrors,\n _this17 = this;\n\n var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n data = data || this.rootValue;\n row = row || this.data;\n var _options$async = options.async,\n async = _options$async === void 0 ? false : _options$async,\n _options$silentCheck = options.silentCheck,\n silentCheck = _options$silentCheck === void 0 ? false : _options$silentCheck;\n\n if (this.shouldSkipValidation(data, dirty, row)) {\n this.setCustomValidity('');\n return async ? _nativePromiseOnly.default.resolve(true) : true;\n }\n\n var check = _Validator.default.checkComponent(this, data, row, true, async);\n\n var validations = check;\n\n if ((_this$serverErrors = this.serverErrors) !== null && _this$serverErrors !== void 0 && _this$serverErrors.length) {\n validations = check.concat(this.serverErrors);\n }\n\n return async ? validations.then(function (messages) {\n return _this17.setComponentValidity(messages, dirty, silentCheck);\n }) : this.setComponentValidity(validations, dirty, silentCheck);\n }\n }, {\n key: \"checkValidity\",\n value: function checkValidity(data, dirty, row, silentCheck) {\n data = data || this.rootValue;\n row = row || this.data;\n var isValid = this.checkComponentValidity(data, dirty, row, {\n silentCheck: silentCheck\n });\n this.checkModal();\n return isValid;\n }\n }, {\n key: \"checkAsyncValidity\",\n value: function checkAsyncValidity(data, dirty, row, silentCheck) {\n return _nativePromiseOnly.default.resolve(this.checkComponentValidity(data, dirty, row, {\n async: true,\n silentCheck: silentCheck\n }));\n }\n /**\n * Check the conditions, calculations, and validity of a single component and triggers an update if\n * something changed.\n *\n * @param data - The root data of the change event.\n * @param flags - The flags from this change event.\n *\n * @return boolean - If component is valid or not.\n */\n\n }, {\n key: \"checkData\",\n value: function checkData(data, flags, row) {\n data = data || this.rootValue;\n flags = flags || {};\n row = row || this.data; // Needs for Nextgen Rules Engine\n\n this.resetCaches(); // Do not trigger refresh if change was triggered on blur event since components with Refresh on Blur have their own listeners\n\n if (!flags.fromBlur) {\n this.checkRefreshOn(flags.changes, flags);\n }\n\n if (flags.noCheck) {\n return true;\n }\n\n this.checkComponentConditions(data, flags, row);\n\n if (this.id !== flags.triggeredComponentId) {\n this.calculateComponentValue(data, flags, row);\n }\n\n if (flags.noValidate && !flags.validateOnInit && !flags.fromIframe) {\n if (flags.fromSubmission && this.rootPristine && this.pristine && this.error && flags.changed) {\n this.checkComponentValidity(data, !!this.options.alwaysDirty, row, true);\n }\n\n return true;\n }\n\n var isDirty = false; // We need to set dirty if they explicitly set noValidate to false.\n\n if (this.options.alwaysDirty || flags.dirty) {\n isDirty = true;\n } // See if they explicitely set the values with setSubmission.\n\n\n if (flags.fromSubmission && this.hasValue(data)) {\n isDirty = true;\n }\n\n this.setDirty(isDirty);\n\n if (this.component.validateOn === 'blur' && flags.fromSubmission) {\n return true;\n }\n\n var isValid = this.checkComponentValidity(data, isDirty, row, flags);\n this.checkModal();\n return isValid;\n }\n }, {\n key: \"checkModal\",\n value: function checkModal() {\n var isValid = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n var dirty = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n if (!this.component.modalEdit || !this.componentModal) {\n return;\n }\n\n if (dirty && !isValid) {\n this.setErrorClasses([this.refs.openModal], dirty, !isValid, !!this.errors.length, this.refs.openModalWrapper);\n } else {\n this.clearErrorClasses(this.refs.openModalWrapper);\n }\n }\n }, {\n key: \"validationValue\",\n get: function get() {\n return this.dataValue;\n }\n }, {\n key: \"isEmpty\",\n value: function isEmpty() {\n var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.dataValue;\n var isEmptyArray = _lodash.default.isArray(value) && value.length === 1 ? _lodash.default.isEqual(value[0], this.emptyValue) : false;\n return value == null || value.length === 0 || _lodash.default.isEqual(value, this.emptyValue) || isEmptyArray;\n }\n }, {\n key: \"isEqual\",\n value: function isEqual(valueA) {\n var valueB = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.dataValue;\n return this.isEmpty(valueA) && this.isEmpty(valueB) || _lodash.default.isEqual(valueA, valueB);\n }\n /**\n * Check if a component is eligible for multiple validation\n *\n * @return {boolean}\n */\n\n }, {\n key: \"validateMultiple\",\n value: function validateMultiple() {\n return true;\n }\n }, {\n key: \"errors\",\n get: function get() {\n return this.error ? [this.error] : [];\n }\n }, {\n key: \"clearErrorClasses\",\n value: function clearErrorClasses() {\n var element = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.element;\n this.removeClass(element, this.options.componentErrorClass);\n this.removeClass(element, 'alert alert-danger');\n this.removeClass(element, 'has-error');\n this.removeClass(element, 'has-message');\n }\n }, {\n key: \"setInputWidgetErrorClasses\",\n value: function setInputWidgetErrorClasses(inputRefs, hasErrors) {\n if (!this.isInputComponent || !this.component.widget || !(inputRefs !== null && inputRefs !== void 0 && inputRefs.length)) {\n return;\n }\n\n inputRefs.forEach(function (input) {\n if (input !== null && input !== void 0 && input.widget && input.widget.setErrorClasses) {\n input.widget.setErrorClasses(hasErrors);\n }\n });\n }\n }, {\n key: \"setCustomValidity\",\n value: function setCustomValidity(messages, dirty, external) {\n var _this18 = this;\n\n var inputRefs = this.isInputComponent ? this.refs.input || [] : null;\n\n if (typeof messages === 'string' && messages) {\n messages = {\n level: 'error',\n message: messages\n };\n }\n\n if (!Array.isArray(messages)) {\n if (messages) {\n messages = [messages];\n } else {\n messages = [];\n }\n }\n\n var hasErrors = !!messages.filter(function (message) {\n return message.level === 'error';\n }).length;\n var invalidInputRefs = inputRefs;\n\n if (this.component.multiple) {\n var inputRefsArray = Array.from(inputRefs);\n inputRefsArray.forEach(function (input) {\n _this18.setElementInvalid(_this18.performInputMapping(input), false);\n });\n this.setInputWidgetErrorClasses(inputRefsArray, false);\n invalidInputRefs = inputRefsArray.filter(function (ref) {\n var _messages$some, _messages;\n\n return (_messages$some = (_messages = messages).some) === null || _messages$some === void 0 ? void 0 : _messages$some.call(_messages, function (msg) {\n var _msg$context;\n\n return (msg === null || msg === void 0 ? void 0 : (_msg$context = msg.context) === null || _msg$context === void 0 ? void 0 : _msg$context.input) === ref;\n });\n });\n }\n\n if (messages.length) {\n if (this.refs.messageContainer) {\n this.empty(this.refs.messageContainer);\n }\n\n this.error = {\n component: this.component,\n message: messages[0].message,\n messages: messages,\n external: !!external\n };\n this.emit('componentError', this.error);\n this.addMessages(messages, dirty, invalidInputRefs);\n\n if (invalidInputRefs) {\n this.setErrorClasses(invalidInputRefs, dirty, hasErrors, !!messages.length);\n }\n } else if (!this.error || this.error && this.error.external === !!external) {\n if (this.refs.messageContainer) {\n this.empty(this.refs.messageContainer);\n }\n\n if (this.refs.modalMessageContainer) {\n this.empty(this.refs.modalMessageContainer);\n }\n\n this.error = null;\n\n if (invalidInputRefs) {\n this.setErrorClasses(invalidInputRefs, dirty, hasErrors, !!messages.length);\n }\n\n this.clearErrorClasses();\n } // if (!this.refs.input) {\n // return;\n // }\n // this.refs.input.forEach(input => {\n // input = this.performInputMapping(input);\n // if (typeof input.setCustomValidity === 'function') {\n // input.setCustomValidity(message, dirty);\n // }\n // });\n\n }\n /**\n * Determines if the value of this component is hidden from the user as if it is coming from the server, but is\n * protected.\n *\n * @return {boolean|*}\n */\n\n }, {\n key: \"isValueHidden\",\n value: function isValueHidden() {\n if (this.component.protected && this.root.editing) {\n return false;\n }\n\n if (!this.root || !this.root.hasOwnProperty('editing')) {\n return false;\n }\n\n if (!this.root || !this.root.editing) {\n return false;\n }\n\n return this.component.protected || !this.component.persistent || this.component.persistent === 'client-only';\n }\n }, {\n key: \"shouldSkipValidation\",\n value: function shouldSkipValidation(data, dirty, row) {\n var _this19 = this;\n\n var rules = [// Force valid if component is read-only\n function () {\n return _this19.options.readOnly;\n }, // Do not check validations if component is not an input component.\n function () {\n return !_this19.hasInput;\n }, // Check to see if we are editing and if so, check component persistence.\n function () {\n return _this19.isValueHidden();\n }, // Force valid if component is hidden.\n function () {\n return !_this19.visible;\n }, // Force valid if component is conditionally hidden.\n function () {\n return !_this19.checkCondition(row, data);\n }];\n return rules.some(function (pred) {\n return pred();\n });\n } // Maintain reverse compatibility.\n\n }, {\n key: \"whenReady\",\n value: function whenReady() {\n console.warn('The whenReady() method has been deprecated. Please use the dataReady property instead.');\n return this.dataReady;\n }\n }, {\n key: \"dataReady\",\n get: function get() {\n return _nativePromiseOnly.default.resolve();\n }\n /**\n * Prints out the value of this component as a string value.\n */\n\n }, {\n key: \"asString\",\n value: function asString(value) {\n value = value || this.getValue();\n return (Array.isArray(value) ? value : [value]).map(_lodash.default.toString).join(', ');\n }\n /**\n * Return if the component is disabled.\n * @return {boolean}\n */\n\n }, {\n key: \"disabled\",\n get: function get() {\n return this._disabled || this.parentDisabled;\n }\n /**\n * Disable this component.\n *\n * @param {boolean} disabled\n */\n ,\n set: function set(disabled) {\n this._disabled = disabled;\n }\n }, {\n key: \"setDisabled\",\n value: function setDisabled(element, disabled) {\n if (!element) {\n return;\n }\n\n element.disabled = disabled;\n\n if (disabled) {\n element.setAttribute('disabled', 'disabled');\n } else {\n element.removeAttribute('disabled');\n }\n }\n }, {\n key: \"setLoading\",\n value: function setLoading(element, loading) {\n if (!element || element.loading === loading) {\n return;\n }\n\n element.loading = loading;\n\n if (!element.loader && loading) {\n element.loader = this.ce('i', {\n class: \"\".concat(this.iconClass('refresh', true), \" button-icon-right\")\n });\n }\n\n if (element.loader) {\n if (loading) {\n this.appendTo(element.loader, element);\n } else {\n this.removeChildFrom(element.loader, element);\n }\n }\n }\n }, {\n key: \"selectOptions\",\n value: function selectOptions(select, tag, options, defaultValue) {\n var _this20 = this;\n\n _lodash.default.each(options, function (option) {\n var attrs = {\n value: option.value\n };\n\n if (defaultValue !== undefined && option.value === defaultValue) {\n attrs.selected = 'selected';\n }\n\n var optionElement = _this20.ce('option', attrs);\n\n optionElement.appendChild(_this20.text(option.label));\n select.appendChild(optionElement);\n });\n }\n }, {\n key: \"setSelectValue\",\n value: function setSelectValue(select, value) {\n var options = select.querySelectorAll('option');\n\n _lodash.default.each(options, function (option) {\n if (option.value === value) {\n option.setAttribute('selected', 'selected');\n } else {\n option.removeAttribute('selected');\n }\n });\n\n if (select.onchange) {\n select.onchange();\n }\n\n if (select.onselect) {\n select.onselect();\n }\n }\n }, {\n key: \"getRelativePath\",\n value: function getRelativePath(path) {\n var keyPart = \".\".concat(this.key);\n var thisPath = this.isInputComponent ? this.path : this.path.slice(0).replace(keyPart, '');\n return path.replace(thisPath, '');\n }\n }, {\n key: \"clear\",\n value: function clear() {\n this.detach();\n this.empty(this.getElement());\n }\n }, {\n key: \"append\",\n value: function append(element) {\n this.appendTo(element, this.element);\n }\n }, {\n key: \"prepend\",\n value: function prepend(element) {\n this.prependTo(element, this.element);\n }\n }, {\n key: \"removeChild\",\n value: function removeChild(element) {\n this.removeChildFrom(element, this.element);\n }\n }, {\n key: \"detachLogic\",\n value: function detachLogic() {\n var _this21 = this;\n\n this.logic.forEach(function (logic) {\n if (logic.trigger.type === 'event') {\n var event = _this21.interpolate(logic.trigger.event);\n\n _this21.off(event); // only applies to callbacks on this component\n\n }\n });\n }\n }, {\n key: \"attachLogic\",\n value: function attachLogic() {\n var _this22 = this;\n\n // Do not attach logic during builder mode.\n if (this.builderMode) {\n return;\n }\n\n this.logic.forEach(function (logic) {\n if (logic.trigger.type === 'event') {\n var event = _this22.interpolate(logic.trigger.event);\n\n _this22.on(event, function () {\n var newComponent = (0, FormioUtils.fastCloneDeep)(_this22.originalComponent);\n\n for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n args[_key4] = arguments[_key4];\n }\n\n if (_this22.applyActions(newComponent, logic.actions, args)) {\n // If component definition changed, replace it.\n if (!_lodash.default.isEqual(_this22.component, newComponent)) {\n _this22.component = newComponent;\n\n var visible = _this22.conditionallyVisible(null, null);\n\n var disabled = _this22.shouldDisabled; // Change states which won't be recalculated during redrawing\n\n if (_this22.visible !== visible) {\n _this22.visible = visible;\n }\n\n if (_this22.disabled !== disabled) {\n _this22.disabled = disabled;\n }\n\n _this22.redraw();\n }\n }\n }, true);\n }\n });\n }\n /**\n * Get the element information.\n */\n\n }, {\n key: \"elementInfo\",\n value: function elementInfo() {\n var attributes = {\n name: this.options.name,\n type: this.component.inputType || 'text',\n class: 'form-control',\n lang: this.options.language\n };\n\n if (this.component.placeholder) {\n attributes.placeholder = this.t(this.component.placeholder, {\n _userInput: true\n });\n }\n\n if (this.component.tabindex) {\n attributes.tabindex = this.component.tabindex;\n }\n\n if (this.disabled) {\n attributes.disabled = 'disabled';\n }\n\n _lodash.default.defaults(attributes, this.component.attributes);\n\n return {\n type: 'input',\n component: this.component,\n changeEvent: 'change',\n attr: attributes\n };\n }\n }, {\n key: \"autofocus\",\n value: function autofocus() {\n var _this23 = this;\n\n var hasAutofocus = this.component.autofocus && !this.builderMode && !this.options.preview;\n\n if (hasAutofocus) {\n this.on('render', function () {\n return _this23.focus();\n }, true);\n }\n }\n }, {\n key: \"scrollIntoView\",\n value: function scrollIntoView() {\n var element = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.element;\n\n if (!element) {\n return;\n }\n\n var _element$getBoundingC = element.getBoundingClientRect(),\n left = _element$getBoundingC.left,\n top = _element$getBoundingC.top;\n\n window.scrollTo(left + window.scrollX, top + window.scrollY);\n }\n }, {\n key: \"focus\",\n value: function focus(index) {\n var _this$refs$input2;\n\n if ('beforeFocus' in this.parent) {\n this.parent.beforeFocus(this);\n }\n\n if ((_this$refs$input2 = this.refs.input) !== null && _this$refs$input2 !== void 0 && _this$refs$input2.length) {\n var _this$component$widge;\n\n var focusingInput = typeof index === 'number' && this.refs.input[index] ? this.refs.input[index] : this.refs.input[this.refs.input.length - 1];\n\n if (((_this$component$widge = this.component.widget) === null || _this$component$widge === void 0 ? void 0 : _this$component$widge.type) === 'calendar') {\n var sibling = focusingInput.nextSibling;\n\n if (sibling) {\n sibling.focus();\n }\n } else {\n focusingInput.focus();\n }\n }\n\n if (this.refs.openModal) {\n this.refs.openModal.focus();\n }\n\n if (this.parent.refs.openModal) {\n this.parent.refs.openModal.focus();\n }\n }\n /**\n * Get `Formio` instance for working with files\n */\n\n }, {\n key: \"fileService\",\n get: function get() {\n if (this.options.fileService) {\n return this.options.fileService;\n }\n\n if (this.options.formio) {\n return this.options.formio;\n }\n\n if (this.root && this.root.formio) {\n return this.root.formio;\n }\n\n var formio = new _Formio.GlobalFormio(); // If a form is loaded, then make sure to set the correct formUrl.\n\n if (this.root && this.root._form && this.root._form._id) {\n formio.formUrl = \"\".concat(formio.projectUrl, \"/form/\").concat(this.root._form._id);\n }\n\n return formio;\n }\n }, {\n key: \"resetCaches\",\n value: function resetCaches() {}\n }, {\n key: \"previewMode\",\n get: function get() {\n return false;\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len5 = arguments.length, sources = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {\n sources[_key5] = arguments[_key5];\n }\n\n return _lodash.default.merge.apply(_lodash.default, [{\n /**\n * Determines if this component provides an input.\n */\n input: true,\n\n /**\n * The data key for this component (how the data is stored in the database).\n */\n key: '',\n\n /**\n * The input placeholder for this component.\n */\n placeholder: '',\n\n /**\n * The input prefix\n */\n prefix: '',\n\n /**\n * The custom CSS class to provide to this component.\n */\n customClass: '',\n\n /**\n * The input suffix.\n */\n suffix: '',\n\n /**\n * If this component should allow an array of values to be captured.\n */\n multiple: false,\n\n /**\n * The default value of this component.\n */\n defaultValue: null,\n\n /**\n * If the data of this component should be protected (no GET api requests can see the data)\n */\n protected: false,\n\n /**\n * Validate if the value of this component should be unique within the form.\n */\n unique: false,\n\n /**\n * If the value of this component should be persisted within the backend api database.\n */\n persistent: true,\n\n /**\n * Determines if the component should be within the form, but not visible.\n */\n hidden: false,\n\n /**\n * If the component should be cleared when hidden.\n */\n clearOnHide: true,\n\n /**\n * This will refresh this component options when this field changes.\n */\n refreshOn: '',\n\n /**\n * This will redraw the component when this field changes.\n */\n redrawOn: '',\n\n /**\n * If this component should be included as a column within a submission table.\n */\n tableView: false,\n\n /**\n * If this component should be rendering in modal.\n */\n modalEdit: false,\n\n /**\n * The input label provided to this component.\n */\n label: '',\n dataGridLabel: false,\n labelPosition: 'top',\n description: '',\n errorLabel: '',\n tooltip: '',\n hideLabel: false,\n tabindex: '',\n disabled: false,\n autofocus: false,\n dbIndex: false,\n customDefaultValue: '',\n calculateValue: '',\n calculateServer: false,\n widget: null,\n\n /**\n * Attributes that will be assigned to the input elements of this component.\n */\n attributes: {},\n\n /**\n * This will perform the validation on either \"change\" or \"blur\" of the input element.\n */\n validateOn: 'change',\n\n /**\n * The validation criteria for this component.\n */\n validate: {\n /**\n * If this component is required.\n */\n required: false,\n\n /**\n * Custom JavaScript validation.\n */\n custom: '',\n\n /**\n * If the custom validation should remain private (only the backend will see it and execute it).\n */\n customPrivate: false,\n\n /**\n * If this component should implement a strict date validation if the Calendar widget is implemented.\n */\n strictDateValidation: false,\n multiple: false,\n unique: false\n },\n\n /**\n * The simple conditional settings for a component.\n */\n conditional: {\n show: null,\n when: null,\n eq: ''\n },\n overlay: {\n style: '',\n left: '',\n top: '',\n width: '',\n height: ''\n },\n allowCalculateOverride: false,\n encrypted: false,\n showCharCount: false,\n showWordCount: false,\n properties: {},\n allowMultipleMasks: false,\n addons: []\n }].concat(sources));\n }\n /**\n * Return the validator as part of the component.\n *\n * @return {ValidationChecker}\n * @constructor\n */\n\n }, {\n key: \"Validator\",\n get: function get() {\n return _Validator.default;\n }\n /**\n * Provides a table view for this component. Override if you wish to do something different than using getView\n * method of your instance.\n *\n * @param value\n * @param options\n */\n\n /* eslint-disable no-unused-vars */\n\n }, {\n key: \"tableView\",\n value: function tableView(value, options) {}\n }]);\n\n return Component;\n}(_Element2.default);\n\nexports[\"default\"] = Component;\nComponent.externalLibraries = {};\n\nComponent.requireLibrary = function (name, property, src, polling) {\n if (!Component.externalLibraries.hasOwnProperty(name)) {\n Component.externalLibraries[name] = {};\n Component.externalLibraries[name].ready = new _nativePromiseOnly.default(function (resolve, reject) {\n Component.externalLibraries[name].resolve = resolve;\n Component.externalLibraries[name].reject = reject;\n });\n var callbackName = \"\".concat(name, \"Callback\");\n\n if (!polling && !window[callbackName]) {\n window[callbackName] = function () {\n this.resolve();\n }.bind(Component.externalLibraries[name]);\n } // See if the plugin already exists.\n\n\n var plugin = _lodash.default.get(window, property);\n\n if (plugin) {\n Component.externalLibraries[name].resolve(plugin);\n } else {\n src = Array.isArray(src) ? src : [src];\n src.forEach(function (lib) {\n var attrs = {};\n var elementType = '';\n\n if (typeof lib === 'string') {\n lib = {\n type: 'script',\n src: lib\n };\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 };\n break;\n\n case 'styles':\n elementType = 'link';\n attrs = {\n href: lib.src,\n rel: 'stylesheet'\n };\n break;\n } // Add the script to the top page.\n\n\n var script = document.createElement(elementType);\n\n for (var attr in attrs) {\n script.setAttribute(attr, attrs[attr]);\n }\n\n document.getElementsByTagName('head')[0].appendChild(script);\n }); // if no callback is provided, then check periodically for the script.\n\n if (polling) {\n setTimeout(function checkLibrary() {\n var plugin = _lodash.default.get(window, property);\n\n if (plugin) {\n Component.externalLibraries[name].resolve(plugin);\n } else {\n // check again after 200 ms.\n setTimeout(checkLibrary, 200);\n }\n }, 200);\n }\n }\n }\n\n return Component.externalLibraries[name].ready;\n};\n\nComponent.libraryReady = function (name) {\n if (Component.externalLibraries.hasOwnProperty(name) && Component.externalLibraries[name].ready) {\n return Component.externalLibraries[name].ready;\n }\n\n return _nativePromiseOnly.default.reject(\"\".concat(name, \" library was not required.\"));\n};\n\n//# sourceURL=webpack://Formio/./lib/components/_classes/component/Component.js?"); - -/***/ }), - -/***/ "./lib/components/_classes/component/editForm/Component.edit.addons.js": -/*!*****************************************************************************!*\ - !*** ./lib/components/_classes/component/editForm/Component.edit.addons.js ***! - \*****************************************************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.from.js */ \"./node_modules/core-js/modules/es.array.from.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.slice.js */ \"./node_modules/core-js/modules/es.array.slice.js\");\n\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n\n__webpack_require__(/*! core-js/modules/es.weak-map.js */ \"./node_modules/core-js/modules/es.weak-map.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.includes.js */ \"./node_modules/core-js/modules/es.array.includes.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.includes.js */ \"./node_modules/core-js/modules/es.string.includes.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n\nvar _addons = _interopRequireWildcard(__webpack_require__(/*! ../../../../addons */ \"./lib/addons/index.js\"));\n\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\n\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nvar _default = [{\n type: 'editgrid',\n addAnother: 'Add Addon',\n saveRow: 'Save Addon',\n weight: 28,\n input: true,\n key: 'addons',\n label: 'Addons',\n components: [{\n label: 'Name',\n tableView: true,\n key: 'name',\n type: 'select',\n dataSrc: 'custom',\n data: {\n custom: function custom(_ref) {\n var _instance$root, _instance$root$data;\n\n var instance = _ref.instance;\n var componentType = instance === null || instance === void 0 ? void 0 : (_instance$root = instance.root) === null || _instance$root === void 0 ? void 0 : (_instance$root$data = _instance$root.data) === null || _instance$root$data === void 0 ? void 0 : _instance$root$data.type;\n var availableAddons = Object.keys(_addons.default).filter(function (key) {\n var _Addons$key, _Addons$key$info, _Addons$key$info$supp;\n\n if ((_Addons$key = _addons.default[key]) !== null && _Addons$key !== void 0 && (_Addons$key$info = _Addons$key.info) !== null && _Addons$key$info !== void 0 && (_Addons$key$info$supp = _Addons$key$info.supportedComponents) !== null && _Addons$key$info$supp !== void 0 && _Addons$key$info$supp.includes(componentType)) {\n return true;\n }\n\n return false;\n });\n return availableAddons.map(function (addonKey) {\n return {\n value: addonKey,\n label: _addons.default[addonKey].info.label || addonKey\n };\n });\n }\n },\n input: true\n }].concat(_toConsumableArray(_addons.editForms))\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/_classes/component/editForm/Component.edit.addons.js?"); +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptors.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-properties.js */ \"./node_modules/core-js/modules/es.object.define-properties.js\");\n__webpack_require__(/*! core-js/modules/es.weak-map.js */ \"./node_modules/core-js/modules/es.weak-map.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.object.assign.js */ \"./node_modules/core-js/modules/es.object.assign.js\");\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.flags.js */ \"./node_modules/core-js/modules/es.regexp.flags.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.array.index-of.js */ \"./node_modules/core-js/modules/es.array.index-of.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.array.includes.js */ \"./node_modules/core-js/modules/es.array.includes.js\");\n__webpack_require__(/*! core-js/modules/es.array.is-array.js */ \"./node_modules/core-js/modules/es.array.is-array.js\");\n__webpack_require__(/*! core-js/modules/es.string.includes.js */ \"./node_modules/core-js/modules/es.string.includes.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n__webpack_require__(/*! core-js/modules/es.string.starts-with.js */ \"./node_modules/core-js/modules/es.string.starts-with.js\");\n__webpack_require__(/*! core-js/modules/es.array.join.js */ \"./node_modules/core-js/modules/es.array.join.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-string.js */ \"./node_modules/core-js/modules/es.date.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n__webpack_require__(/*! core-js/modules/es.array.splice.js */ \"./node_modules/core-js/modules/es.array.splice.js\");\n__webpack_require__(/*! core-js/modules/es.array.reduce.js */ \"./node_modules/core-js/modules/es.array.reduce.js\");\n__webpack_require__(/*! core-js/modules/es.parse-int.js */ \"./node_modules/core-js/modules/es.parse-int.js\");\n__webpack_require__(/*! core-js/modules/esnext.string.replace-all.js */ \"./node_modules/core-js/modules/esnext.string.replace-all.js\");\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n__webpack_require__(/*! core-js/modules/es.array.from.js */ \"./node_modules/core-js/modules/es.array.from.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.some.js */ \"./node_modules/core-js/modules/es.array.some.js\");\n__webpack_require__(/*! core-js/modules/es.array.slice.js */ \"./node_modules/core-js/modules/es.array.slice.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/web.timers.js */ \"./node_modules/core-js/modules/web.timers.js\");\nvar _vanillaTextMask = __webpack_require__(/*! @formio/vanilla-text-mask */ \"./node_modules/@formio/vanilla-text-mask/dist/vanillaTextMask.js\");\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\nvar _tippy = _interopRequireDefault(__webpack_require__(/*! tippy.js */ \"./node_modules/tippy.js/dist/tippy.esm.js\"));\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nvar _ismobilejs = _interopRequireDefault(__webpack_require__(/*! ismobilejs */ \"./node_modules/ismobilejs/esm/index.js\"));\nvar _Formio = __webpack_require__(/*! ../../../Formio */ \"./lib/Formio.js\");\nvar FormioUtils = _interopRequireWildcard(__webpack_require__(/*! ../../../utils/utils */ \"./lib/utils/utils.js\"));\nvar _Validator = _interopRequireDefault(__webpack_require__(/*! ../../../validator/Validator */ \"./lib/validator/Validator.js\"));\nvar _Element2 = _interopRequireDefault(__webpack_require__(/*! ../../../Element */ \"./lib/Element.js\"));\nvar _ComponentModal = _interopRequireDefault(__webpack_require__(/*! ../componentModal/ComponentModal */ \"./lib/components/_classes/componentModal/ComponentModal.js\"));\nvar _widgets = _interopRequireDefault(__webpack_require__(/*! ../../../widgets */ \"./lib/widgets/index.js\"));\nvar _addons = _interopRequireDefault(__webpack_require__(/*! ../../../addons */ \"./lib/addons/index.js\"));\nvar _uploadAdapter = __webpack_require__(/*! ../../../providers/storage/uploadAdapter */ \"./lib/providers/storage/uploadAdapter.js\");\nvar _en = _interopRequireDefault(__webpack_require__(/*! ../../../translations/en */ \"./lib/translations/en.js\"));\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") { return { \"default\": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj[\"default\"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it[\"return\"] != null) it[\"return\"](); } finally { if (didErr) throw err; } } }; }\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar isIEBrowser = FormioUtils.getBrowserInfo().ie;\nvar Templates = _Formio.GlobalFormio.Templates;\nif (!Templates) {\n Templates = (__webpack_require__(/*! ../../../templates/Templates */ \"./lib/templates/Templates.js\")[\"default\"]);\n}\n\n/**\n * This is the Component class\n which all elements within the FormioForm derive from.\n */\nvar Component = /*#__PURE__*/function (_Element) {\n _inherits(Component, _Element);\n var _super = _createSuper(Component);\n /* eslint-enable no-unused-vars */\n\n /**\n * Initialize a new Component.\n *\n * @param {Object} component - The component JSON you wish to initialize.\n * @param {Object} options - The options for this component.\n * @param {Object} data - The global data submission object this component will belong.\n */\n /* eslint-disable max-statements */\n function Component(component, options, data) {\n var _this;\n _classCallCheck(this, Component);\n _this = _super.call(this, Object.assign({\n renderMode: 'form',\n attachMode: 'full',\n noDefaults: false\n }, options || {}));\n\n // Restore the component id.\n if (component && component.id) {\n _this.id = component.id;\n }\n\n /**\n * Determines if this component has a condition assigned to it.\n * @type {null}\n * @private\n */\n _this._hasCondition = null;\n\n /**\n * References to dom elements\n */\n _this.refs = {};\n\n // Allow global override for any component JSON.\n if (component && _this.options.components && _this.options.components[component.type]) {\n _lodash[\"default\"].merge(component, _this.options.components[component.type]);\n }\n\n /**\n * Set the validator instance.\n */\n _this.validator = _Validator[\"default\"];\n\n /**\n * The data path to this specific component instance.\n *\n * @type {string}\n */\n _this.path = '';\n\n /**\n * The Form.io component JSON schema.\n * @type {*}\n */\n _this.component = _this.mergeSchema(component || {});\n\n // Add the id to the component.\n _this.component.id = _this.id;\n _this.afterComponentAssign();\n\n // Save off the original component to be used in logic.\n _this.originalComponent = (0, FormioUtils.fastCloneDeep)(_this.component);\n\n /**\n * If the component has been attached\n */\n _this.attached = false;\n\n /**\n * If the component has been rendered\n */\n _this.rendered = false;\n\n /**\n * The data object in which this component resides.\n * @type {*}\n */\n _this._data = data || {};\n\n /**\n * The existing error that this component has.\n * @type {string}\n */\n _this.error = '';\n\n /**\n * Tool tip text after processing\n * @type {string}\n */\n _this.tooltip = '';\n\n /**\n * The row path of this component.\n * @type {number}\n */\n _this.row = _this.options.row;\n\n /**\n * Determines if this component is disabled, or not.\n *\n * @type {boolean}\n */\n _this._disabled = (0, FormioUtils.boolValue)(_this.component.disabled) ? _this.component.disabled : false;\n\n /**\n * Points to the root component, usually the FormComponent.\n *\n * @type {Component}\n */\n _this.root = _this.options.root;\n _this.localRoot = _this.options.localRoot;\n\n /**\n * If this input has been input and provided value.\n *\n * @type {boolean}\n */\n _this.pristine = true;\n\n /**\n * Points to the parent component.\n *\n * @type {Component}\n */\n _this.parent = _this.options.parent;\n _this.options.name = _this.options.name || 'data';\n\n /**\n * The validators that are assigned to this component.\n * @type {[string]}\n */\n _this.validators = ['required', 'minLength', 'maxLength', 'minWords', 'maxWords', 'custom', 'pattern', 'json', 'mask'];\n _this._path = '';\n // Nested forms don't have parents so we need to pass their path in.\n _this._parentPath = _this.options.parentPath || '';\n\n // Needs for Nextgen Rules Engine\n _this.resetCaches();\n\n /**\n * Determines if this component is visible, or not.\n */\n _this._parentVisible = _this.options.hasOwnProperty('parentVisible') ? _this.options.parentVisible : true;\n _this._visible = _this._parentVisible && _this.conditionallyVisible(null, data);\n _this._parentDisabled = false;\n\n /**\n * Used to trigger a new change in this component.\n * @type {function} - Call to trigger a change in this component.\n */\n var changes = [];\n var lastChanged = null;\n var triggerArgs = [];\n var _triggerChange = _lodash[\"default\"].debounce(function () {\n var _this2;\n if (_this.root) {\n _this.root.changing = false;\n }\n triggerArgs = [];\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n if (!args[1] && lastChanged) {\n // Set the changed component if one isn't provided.\n args[1] = lastChanged;\n }\n if (_lodash[\"default\"].isEmpty(args[0]) && lastChanged) {\n // Set the flags if it is empty and lastChanged exists.\n args[0] = lastChanged.flags;\n }\n lastChanged = null;\n args[3] = changes;\n var retVal = (_this2 = _this).onChange.apply(_this2, args);\n changes = [];\n return retVal;\n }, 100);\n _this.triggerChange = function () {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n if (args[1]) {\n // Make sure that during the debounce that we always track lastChanged component, even if they\n // don't provide one later.\n lastChanged = args[1];\n changes.push(lastChanged);\n }\n if (_this.root) {\n _this.root.changing = true;\n }\n if (args.length) {\n triggerArgs = args;\n }\n return _triggerChange.apply(void 0, _toConsumableArray(triggerArgs));\n };\n\n /**\n * Used to trigger a redraw event within this component.\n *\n * @type {Function}\n */\n _this.triggerRedraw = _lodash[\"default\"].debounce(_this.redraw.bind(_assertThisInitialized(_this)), 100);\n\n /**\n * list of attached tooltips\n * @type {Array}\n */\n _this.tooltips = [];\n\n /**\n * List of attached addons\n * @type {Array}\n */\n _this.addons = [];\n\n // To force this component to be invalid.\n _this.invalid = false;\n if (_this.component) {\n _this.type = _this.component.type;\n if (_this.allowData && _this.key) {\n _this.options.name += \"[\".concat(_this.key, \"]\");\n // If component is visible or not set to clear on hide, set the default value.\n if (_this.visible || !_this.component.clearOnHide) {\n if (!_this.hasValue()) {\n if (_this.shouldAddDefaultValue) {\n _this.dataValue = _this.defaultValue;\n }\n } else {\n // Ensure the dataValue is set.\n /* eslint-disable no-self-assign */\n _this.dataValue = _this.dataValue;\n /* eslint-enable no-self-assign */\n }\n }\n }\n\n /**\n * The element information for creating the input element.\n * @type {*}\n */\n _this.info = _this.elementInfo();\n }\n\n // Allow anyone to hook into the component creation.\n _this.hook('component');\n if (!_this.options.skipInit) {\n _this.init();\n }\n return _this;\n }\n /* eslint-enable max-statements */\n _createClass(Component, [{\n key: \"data\",\n get: function get() {\n return this._data;\n },\n set: function set(value) {\n this._data = value;\n }\n }, {\n key: \"mergeSchema\",\n value: function mergeSchema() {\n var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n return _lodash[\"default\"].defaultsDeep(component, this.defaultSchema);\n }\n\n // Allow componets to notify when ready.\n }, {\n key: \"ready\",\n get: function get() {\n return _nativePromiseOnly[\"default\"].resolve(this);\n }\n }, {\n key: \"isPDFReadOnlyMode\",\n get: function get() {\n return this.parent && this.parent.form && this.parent.form.display === 'pdf' && this.options.readOnly;\n }\n }, {\n key: \"labelInfo\",\n get: function get() {\n var label = {};\n label.hidden = this.labelIsHidden();\n label.className = '';\n label.labelPosition = this.component.labelPosition;\n label.tooltipClass = \"\".concat(this.iconClass('question-sign'), \" text-muted\");\n var isPDFReadOnlyMode = this.isPDFReadOnlyMode;\n if (this.hasInput && this.component.validate && (0, FormioUtils.boolValue)(this.component.validate.required) && !isPDFReadOnlyMode) {\n label.className += ' field-required';\n }\n if (label.hidden) {\n label.className += ' control-label--hidden';\n }\n if (this.info.attr.id) {\n label[\"for\"] = this.info.attr.id;\n }\n return label;\n }\n }, {\n key: \"init\",\n value: function init() {\n var _this$component$addon,\n _this3 = this;\n this.disabled = this.shouldDisabled;\n this._visible = this.conditionallyVisible(null, null);\n if ((_this$component$addon = this.component.addons) !== null && _this$component$addon !== void 0 && _this$component$addon.length) {\n this.component.addons.forEach(function (addon) {\n return _this3.createAddon(addon);\n });\n }\n }\n }, {\n key: \"afterComponentAssign\",\n value: function afterComponentAssign() {\n //implement in extended classes\n }\n }, {\n key: \"createAddon\",\n value: function createAddon(addonConfiguration) {\n var _addonConfiguration$s;\n var name = addonConfiguration.name;\n if (!name) {\n return;\n }\n var settings = ((_addonConfiguration$s = addonConfiguration.settings) === null || _addonConfiguration$s === void 0 ? void 0 : _addonConfiguration$s.data) || {};\n var Addon = _addons[\"default\"][name.value];\n var addon = null;\n if (Addon) {\n var supportedComponents = Addon.info.supportedComponents;\n var supportsThisComponentType = !(supportedComponents !== null && supportedComponents !== void 0 && supportedComponents.length) || supportedComponents.indexOf(this.component.type) !== -1;\n if (supportsThisComponentType) {\n addon = new Addon(settings, this);\n this.addons.push(addon);\n } else {\n console.warn(\"Addon \".concat(name.label, \" does not support component of type \").concat(this.component.type, \".\"));\n }\n }\n return addon;\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n _get(_getPrototypeOf(Component.prototype), \"destroy\", this).call(this);\n this.detach();\n this.addons.forEach(function (addon) {\n return addon.destroy();\n });\n }\n }, {\n key: \"shouldDisabled\",\n get: function get() {\n return this.options.readOnly || this.component.disabled || this.options.hasOwnProperty('disabled') && this.options.disabled[this.key];\n }\n }, {\n key: \"isInputComponent\",\n get: function get() {\n return !this.component.hasOwnProperty('input') || this.component.input;\n }\n }, {\n key: \"allowData\",\n get: function get() {\n return this.hasInput;\n }\n }, {\n key: \"hasInput\",\n get: function get() {\n return this.isInputComponent || this.refs.input && this.refs.input.length;\n }\n }, {\n key: \"defaultSchema\",\n get: function get() {\n return Component.schema();\n }\n }, {\n key: \"key\",\n get: function get() {\n return _lodash[\"default\"].get(this.component, 'key', '');\n }\n }, {\n key: \"parentVisible\",\n get: function get() {\n return this._parentVisible;\n },\n set: function set(value) {\n this._parentVisible = value;\n }\n }, {\n key: \"parentDisabled\",\n get: function get() {\n return this._parentDisabled;\n }\n\n /**\n *\n * @param value {boolean}\n */,\n set: function set(value) {\n this._parentDisabled = value;\n }\n }, {\n key: \"visible\",\n get:\n /**\n *\n * @returns {boolean}\n */\n function get() {\n // Show only if visibility changes or if we are in builder mode or if hidden fields should be shown.\n if (this.builderMode || this.previewMode || this.options.showHiddenFields) {\n return true;\n }\n if (this.options.hide && this.options.hide[this.component.key]) {\n return false;\n }\n if (this.options.show && this.options.show[this.component.key]) {\n return true;\n }\n return this._visible && this._parentVisible;\n },\n set: function set(value) {\n if (this._visible !== value) {\n this._visible = value;\n this.clearOnHide();\n this.redraw();\n }\n }\n }, {\n key: \"currentForm\",\n get: function get() {\n return this._currentForm;\n },\n set: function set(instance) {\n this._currentForm = instance;\n }\n }, {\n key: \"fullMode\",\n get: function get() {\n return this.options.attachMode === 'full';\n }\n }, {\n key: \"builderMode\",\n get: function get() {\n return this.options.attachMode === 'builder';\n }\n }, {\n key: \"calculatedPath\",\n get: function get() {\n console.error('component.calculatedPath was deprecated, use component.path instead.');\n return this.path;\n }\n }, {\n key: \"labelPosition\",\n get: function get() {\n return this.component.labelPosition;\n }\n }, {\n key: \"labelWidth\",\n get: function get() {\n var width = this.component.labelWidth;\n return width >= 0 ? width : 30;\n }\n }, {\n key: \"labelMargin\",\n get: function get() {\n var margin = this.component.labelMargin;\n return margin >= 0 ? margin : 3;\n }\n }, {\n key: \"isAdvancedLabel\",\n get: function get() {\n return ['left-left', 'left-right', 'right-left', 'right-right'].includes(this.labelPosition);\n }\n }, {\n key: \"labelPositions\",\n get: function get() {\n return this.labelPosition.split('-');\n }\n }, {\n key: \"skipInEmail\",\n get: function get() {\n return false;\n }\n }, {\n key: \"rightDirection\",\n value: function rightDirection(direction) {\n if (this.options.condensedMode) {\n return false;\n }\n return direction === 'right';\n }\n }, {\n key: \"getLabelInfo\",\n value: function getLabelInfo() {\n var isCondensed = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n var isRightPosition = this.rightDirection(this.labelPositions[0]);\n var isLeftPosition = this.labelPositions[0] === 'left' || isCondensed;\n var isRightAlign = this.rightDirection(this.labelPositions[1]);\n var contentMargin = '';\n if (this.component.hideLabel) {\n var margin = this.labelWidth + this.labelMargin;\n contentMargin = isRightPosition ? \"margin-right: \".concat(margin, \"%\") : '';\n contentMargin = isLeftPosition ? \"margin-left: \".concat(margin, \"%\") : '';\n }\n var labelStyles = \"\\n flex: \".concat(this.labelWidth, \";\\n \").concat(isRightPosition ? 'margin-left' : 'margin-right', \": \").concat(this.labelMargin, \"%;\\n \");\n var contentStyles = \"\\n flex: \".concat(100 - this.labelWidth - this.labelMargin, \";\\n \").concat(contentMargin, \";\\n \").concat(this.component.hideLabel ? \"max-width: \".concat(100 - this.labelWidth - this.labelMargin) : '', \";\\n \");\n return {\n isRightPosition: isRightPosition,\n isRightAlign: isRightAlign,\n labelStyles: labelStyles,\n contentStyles: contentStyles\n };\n }\n\n /**\n * Returns only the schema that is different from the default.\n *\n * @param schema\n * @param defaultSchema\n */\n }, {\n key: \"getModifiedSchema\",\n value: function getModifiedSchema(schema, defaultSchema, recursion) {\n var _this4 = this;\n var modified = {};\n if (!defaultSchema) {\n return schema;\n }\n _lodash[\"default\"].each(schema, function (val, key) {\n if (!_lodash[\"default\"].isArray(val) && _lodash[\"default\"].isObject(val) && defaultSchema.hasOwnProperty(key)) {\n var subModified = _this4.getModifiedSchema(val, defaultSchema[key], true);\n if (!_lodash[\"default\"].isEmpty(subModified)) {\n modified[key] = subModified;\n }\n } else if (_lodash[\"default\"].isArray(val)) {\n if (val.length !== 0 && !_lodash[\"default\"].isEqual(val, defaultSchema[key])) {\n modified[key] = val;\n }\n } else if (!recursion && key === 'type' || !recursion && key === 'key' || !recursion && key === 'label' || !recursion && key === 'input' || !recursion && key === 'tableView' || val !== '' && !defaultSchema.hasOwnProperty(key) || val !== '' && val !== defaultSchema[key] || defaultSchema[key] && val !== defaultSchema[key]) {\n modified[key] = val;\n }\n });\n return modified;\n }\n\n /**\n * Returns the JSON schema for this component.\n */\n }, {\n key: \"schema\",\n get: function get() {\n return (0, FormioUtils.fastCloneDeep)(this.getModifiedSchema(_lodash[\"default\"].omit(this.component, 'id'), this.defaultSchema));\n }\n\n /**\n * Returns true if component is inside DataGrid\n */\n }, {\n key: \"isInDataGrid\",\n get: function get() {\n return this.inDataGrid;\n }\n\n /**\n * Translate a text using the i18n system.\n *\n * @param {string} text - The i18n identifier.\n * @param {Object} params - The i18n parameters to use for translation.\n */\n }, {\n key: \"t\",\n value: function t(text) {\n var _get2;\n var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n if (!text) {\n return '';\n }\n // Use _userInput: true to ignore translations from defaults\n if (text in _en[\"default\"] && params._userInput) {\n return text;\n }\n params.data = this.rootValue;\n params.row = this.data;\n params.component = this.component;\n for (var _len3 = arguments.length, args = new Array(_len3 > 2 ? _len3 - 2 : 0), _key3 = 2; _key3 < _len3; _key3++) {\n args[_key3 - 2] = arguments[_key3];\n }\n return (_get2 = _get(_getPrototypeOf(Component.prototype), \"t\", this)).call.apply(_get2, [this, text, params].concat(args));\n }\n }, {\n key: \"labelIsHidden\",\n value: function labelIsHidden() {\n return !this.component.label || (!this.isInDataGrid && this.component.hideLabel || this.isInDataGrid && !this.component.dataGridLabel || this.options.inputsOnly) && !this.builderMode;\n }\n }, {\n key: \"transform\",\n value: function transform(type, value) {\n var frameworkTemplates = this.options.template ? Templates.templates[this.options.template] : Templates.current;\n return frameworkTemplates.hasOwnProperty('transform') ? frameworkTemplates.transform(type, value) : function (type, value) {\n return value;\n };\n }\n }, {\n key: \"getTemplate\",\n value: function getTemplate(names, modes) {\n modes = Array.isArray(modes) ? modes : [modes];\n names = Array.isArray(names) ? names : [names];\n if (!modes.includes('form')) {\n modes.push('form');\n }\n var result = null;\n if (this.options.templates) {\n result = this.checkTemplate(this.options.templates, names, modes);\n if (result) {\n return result;\n }\n }\n var frameworkTemplates = this.options.template ? Templates.templates[this.options.template] : Templates.current;\n result = this.checkTemplate(frameworkTemplates, names, modes);\n if (result) {\n return result;\n }\n\n // Default back to bootstrap if not defined.\n var name = names[names.length - 1];\n var templatesByName = Templates.defaultTemplates[name];\n if (!templatesByName) {\n return \"Unknown template: \".concat(name);\n }\n var templateByMode = this.checkTemplateMode(templatesByName, modes);\n if (templateByMode) {\n return templateByMode;\n }\n return templatesByName.form;\n }\n }, {\n key: \"checkTemplate\",\n value: function checkTemplate(templates, names, modes) {\n var _iterator = _createForOfIteratorHelper(names),\n _step;\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var name = _step.value;\n var templatesByName = templates[name];\n if (templatesByName) {\n var templateByMode = this.checkTemplateMode(templatesByName, modes);\n if (templateByMode) {\n return templateByMode;\n }\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n return null;\n }\n }, {\n key: \"checkTemplateMode\",\n value: function checkTemplateMode(templatesByName, modes) {\n var _iterator2 = _createForOfIteratorHelper(modes),\n _step2;\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var mode = _step2.value;\n var templateByMode = templatesByName[mode];\n if (templateByMode) {\n return templateByMode;\n }\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n return null;\n }\n }, {\n key: \"getFormattedAttribute\",\n value: function getFormattedAttribute(attr) {\n return attr ? this.t(attr, {\n _userInput: true\n }).replace(/\"/g, '"') : '';\n }\n }, {\n key: \"getFormattedTooltip\",\n value: function getFormattedTooltip(tooltipValue) {\n var tooltip = this.interpolate(tooltipValue || '').replace(/(?:\\r\\n|\\r|\\n)/g, '
');\n return this.getFormattedAttribute(tooltip);\n }\n }, {\n key: \"isHtmlRenderMode\",\n value: function isHtmlRenderMode() {\n return this.options.renderMode === 'html';\n }\n }, {\n key: \"renderTemplate\",\n value: function renderTemplate(name) {\n var _this5 = this;\n var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var modeOption = arguments.length > 2 ? arguments[2] : undefined;\n // Need to make this fall back to form if renderMode is not found similar to how we search templates.\n var mode = modeOption || this.options.renderMode || 'form';\n data.component = this.component;\n data.self = this;\n data.options = this.options;\n data.readOnly = this.options.readOnly;\n data.iconClass = this.iconClass.bind(this);\n data.size = this.size.bind(this);\n data.t = this.t.bind(this);\n data.transform = this.transform.bind(this);\n data.id = data.id || this.id;\n data.key = data.key || this.key;\n data.value = data.value || this.dataValue;\n data.disabled = this.disabled;\n data.builder = this.builderMode;\n data.render = function () {\n console.warn(\"Form.io 'render' template function is deprecated.\\n If you need to render template (template A) inside of another template (template B),\\n pass pre-compiled template A (use this.renderTemplate('template_A_name') as template context variable for template B\");\n return _this5.renderTemplate.apply(_this5, arguments);\n };\n data.label = data.labelInfo || this.labelInfo;\n data.tooltip = this.getFormattedTooltip(this.component.tooltip);\n\n // Allow more specific template names\n var names = [\"\".concat(name, \"-\").concat(this.component.type, \"-\").concat(this.key), \"\".concat(name, \"-\").concat(this.component.type), \"\".concat(name, \"-\").concat(this.key), \"\".concat(name)];\n\n // Allow template alters.\n return this.hook(\"render\".concat(name.charAt(0).toUpperCase() + name.substring(1, name.length)), this.interpolate(this.getTemplate(names, mode), data), data, mode);\n }\n\n /**\n * Sanitize an html string.\n *\n * @param string\n * @returns {*}\n */\n }, {\n key: \"sanitize\",\n value: function sanitize(dirty, forceSanitize, options) {\n var _this$options;\n // No need to sanitize when generating PDF'S since no users interact with the form.\n if (!this.shouldSanitizeValue && !forceSanitize || this.options.pdf && !forceSanitize) {\n return dirty;\n }\n return FormioUtils.sanitize(dirty, {\n sanitizeConfig: _lodash[\"default\"].merge(((_this$options = this.options) === null || _this$options === void 0 ? void 0 : _this$options.sanitizeConfig) || {}, options || {})\n });\n }\n\n /**\n * Render a template string into html.\n *\n * @param template\n * @param data\n * @param actions\n *\n * @return {HTMLElement|String} - The created element or an empty string if template is not specified.\n */\n }, {\n key: \"renderString\",\n value: function renderString(template, data) {\n if (!template) {\n return '';\n }\n // Interpolate the template and populate\n return this.interpolate(template, data);\n }\n }, {\n key: \"performInputMapping\",\n value: function performInputMapping(input) {\n return input;\n }\n }, {\n key: \"widget\",\n get: function get() {\n var _this$root;\n var settings = this.component.widget;\n if (settings && (_this$root = this.root) !== null && _this$root !== void 0 && _this$root.shadowRoot) {\n settings.shadowRoot = this.root.shadowRoot;\n }\n var widget = settings && _widgets[\"default\"][settings.type] ? new _widgets[\"default\"][settings.type](settings, this.component, this) : null;\n return widget;\n }\n }, {\n key: \"getBrowserLanguage\",\n value: function getBrowserLanguage() {\n var nav = window.navigator;\n var browserLanguagePropertyKeys = ['language', 'browserLanguage', 'systemLanguage', 'userLanguage'];\n var language;\n\n // support for HTML 5.1 \"navigator.languages\"\n if (Array.isArray(nav.languages)) {\n for (var i = 0; i < nav.languages.length; i++) {\n language = nav.languages[i];\n if (language && language.length) {\n return language.split(';')[0];\n }\n }\n }\n\n // support for other well known properties in browsers\n for (var _i = 0; _i < browserLanguagePropertyKeys.length; _i++) {\n language = nav[browserLanguagePropertyKeys[_i]];\n if (language && language.length) {\n return language.split(';')[0];\n }\n }\n return null;\n }\n\n /**\n * Called before a next and previous page is triggered allowing the components\n * to perform special functions.\n *\n * @return {*}\n */\n }, {\n key: \"beforePage\",\n value: function beforePage() {\n return _nativePromiseOnly[\"default\"].resolve(true);\n }\n }, {\n key: \"beforeNext\",\n value: function beforeNext() {\n return this.beforePage(true);\n }\n\n /**\n * Called before a submission is triggered allowing the components\n * to perform special async functions.\n *\n * @return {*}\n */\n }, {\n key: \"beforeSubmit\",\n value: function beforeSubmit() {\n return _nativePromiseOnly[\"default\"].resolve(true);\n }\n\n /**\n * Return the submission timezone.\n *\n * @return {*}\n */\n }, {\n key: \"submissionTimezone\",\n get: function get() {\n this.options.submissionTimezone = this.options.submissionTimezone || _lodash[\"default\"].get(this.root, 'options.submissionTimezone');\n return this.options.submissionTimezone;\n }\n }, {\n key: \"timezone\",\n get: function get() {\n return this.getTimezone(this.component);\n }\n }, {\n key: \"getTimezone\",\n value: function getTimezone(settings) {\n if (settings.timezone) {\n return settings.timezone;\n }\n if (settings.displayInTimezone === 'utc') {\n return 'UTC';\n }\n var submissionTimezone = this.submissionTimezone;\n if (submissionTimezone && (settings.displayInTimezone === 'submission' || (this.options.pdf || this.options.server) && settings.displayInTimezone === 'viewer')) {\n return submissionTimezone;\n }\n\n // Return current timezone if none are provided.\n return (0, FormioUtils.currentTimezone)();\n }\n }, {\n key: \"loadRefs\",\n value: function loadRefs(element, refs) {\n for (var ref in refs) {\n var refType = refs[ref];\n var isString = typeof refType === 'string';\n var selector = isString && refType.includes('scope') ? \":scope > [ref=\\\"\".concat(ref, \"\\\"]\") : \"[ref=\\\"\".concat(ref, \"\\\"]\");\n if (isString && refType.startsWith('single')) {\n this.refs[ref] = element.querySelector(selector);\n } else {\n this.refs[ref] = element.querySelectorAll(selector);\n }\n }\n }\n }, {\n key: \"setOpenModalElement\",\n value: function setOpenModalElement(template) {\n this.componentModal.setOpenModalElement(template || this.getModalPreviewTemplate());\n }\n }, {\n key: \"getModalPreviewTemplate\",\n value: function getModalPreviewTemplate() {\n var _this$component$valid;\n var dataValue = this.component.type === 'password' ? this.dataValue.replace(/./g, '•') : this.dataValue;\n var message = this.error ? {\n level: 'error',\n message: this.error.message\n } : '';\n var modalLabel;\n if (this.hasInput && (_this$component$valid = this.component.validate) !== null && _this$component$valid !== void 0 && _this$component$valid.required && !this.isPDFReadOnlyMode) {\n modalLabel = {\n className: 'field-required'\n };\n }\n return this.renderTemplate('modalPreview', {\n previewText: this.getValueAsString(dataValue, {\n modalPreview: true\n }) || this.t('Click to set value'),\n messages: message && this.renderTemplate('message', message),\n labelInfo: modalLabel\n });\n }\n }, {\n key: \"build\",\n value: function build(element) {\n element = element || this.element;\n this.empty(element);\n this.setContent(element, this.render());\n return this.attach(element);\n }\n }, {\n key: \"hasModalSaveButton\",\n get: function get() {\n return true;\n }\n }, {\n key: \"render\",\n value: function render() {\n var children = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"Unknown component: \".concat(this.component.type);\n var topLevel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var isVisible = this.visible;\n this.rendered = true;\n if (!this.builderMode && !this.previewMode && this.component.modalEdit) {\n return _ComponentModal[\"default\"].render(this, {\n visible: isVisible,\n showSaveButton: this.hasModalSaveButton,\n id: this.id,\n classes: this.className,\n styles: this.customStyle,\n children: children\n }, topLevel);\n } else {\n return this.renderTemplate('component', {\n visible: isVisible,\n id: this.id,\n classes: this.className,\n styles: this.customStyle,\n children: children\n }, topLevel);\n }\n }\n }, {\n key: \"attachTooltips\",\n value: function attachTooltips(toolTipsRefs) {\n var _this6 = this;\n toolTipsRefs === null || toolTipsRefs === void 0 ? void 0 : toolTipsRefs.forEach(function (tooltip, index) {\n if (tooltip) {\n var tooltipAttribute = tooltip.getAttribute('data-tooltip');\n var tooltipDataTitle = tooltip.getAttribute('data-title');\n var tooltipText = _this6.interpolate(tooltipDataTitle || tooltipAttribute).replace(/(?:\\r\\n|\\r|\\n)/g, '
');\n _this6.tooltips[index] = (0, _tippy[\"default\"])(tooltip, {\n allowHTML: true,\n trigger: 'mouseenter click focus',\n placement: 'right',\n zIndex: 10000,\n interactive: true,\n content: _this6.t(tooltipText, {\n _userInput: true\n })\n });\n }\n });\n }\n }, {\n key: \"createComponentModal\",\n value: function createComponentModal(element, modalShouldBeOpened, currentValue) {\n return new _ComponentModal[\"default\"](this, element, modalShouldBeOpened, currentValue);\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n if (!this.builderMode && !this.previewMode && this.component.modalEdit) {\n var modalShouldBeOpened = this.componentModal ? this.componentModal.isOpened : false;\n var currentValue = modalShouldBeOpened ? this.componentModal.currentValue : this.dataValue;\n var openModalTemplate = this.componentModal && modalShouldBeOpened ? this.componentModal.openModalTemplate : null;\n this.componentModal = this.createComponentModal(element, modalShouldBeOpened, currentValue);\n this.setOpenModalElement(openModalTemplate);\n }\n this.attached = true;\n this.element = element;\n element.component = this;\n\n // If this already has an id, get it from the dom. If SSR, it could be different from the initiated id.\n if (this.element.id) {\n this.id = this.element.id;\n this.component.id = this.id;\n }\n this.loadRefs(element, {\n messageContainer: 'single',\n tooltip: 'multiple'\n });\n this.attachTooltips(this.refs.tooltip);\n\n // Attach logic.\n this.attachLogic();\n this.autofocus();\n\n // Allow global attach.\n this.hook('attachComponent', element, this);\n // Allow attach per component type.\n var type = this.component.type;\n if (type) {\n this.hook(\"attach\".concat(type.charAt(0).toUpperCase() + type.substring(1, type.length)), element, this);\n }\n this.restoreFocus();\n this.addons.forEach(function (addon) {\n return addon.attach(element);\n });\n return _nativePromiseOnly[\"default\"].resolve();\n }\n }, {\n key: \"restoreFocus\",\n value: function restoreFocus() {\n var _this$root2, _this$root2$focusedCo;\n var isFocused = ((_this$root2 = this.root) === null || _this$root2 === void 0 ? void 0 : (_this$root2$focusedCo = _this$root2.focusedComponent) === null || _this$root2$focusedCo === void 0 ? void 0 : _this$root2$focusedCo.path) === this.path;\n if (isFocused) {\n var _this$root$currentSel;\n this.loadRefs(this.element, {\n input: 'multiple'\n });\n this.focus((_this$root$currentSel = this.root.currentSelection) === null || _this$root$currentSel === void 0 ? void 0 : _this$root$currentSel.index);\n this.restoreCaretPosition();\n }\n }\n }, {\n key: \"addShortcut\",\n value: function addShortcut(element, shortcut) {\n // Avoid infinite recursion.\n if (!element || !this.root || this.root === this) {\n return;\n }\n if (!shortcut) {\n shortcut = this.component.shortcut;\n }\n this.root.addShortcut(element, shortcut);\n }\n }, {\n key: \"removeShortcut\",\n value: function removeShortcut(element, shortcut) {\n // Avoid infinite recursion.\n if (!element || this.root === this) {\n return;\n }\n if (!shortcut) {\n shortcut = this.component.shortcut;\n }\n this.root.removeShortcut(element, shortcut);\n }\n\n /**\n * Remove all event handlers.\n */\n }, {\n key: \"detach\",\n value: function detach() {\n this.refs = {};\n this.removeEventListeners();\n this.detachLogic();\n if (this.tooltip) {\n this.tooltip.destroy();\n }\n }\n }, {\n key: \"checkRefresh\",\n value: function checkRefresh(refreshData, changed, flags) {\n var changePath = _lodash[\"default\"].get(changed, 'instance.path', false);\n // Don't let components change themselves.\n if (changePath && this.path === changePath) {\n return;\n }\n if (refreshData === 'data') {\n this.refresh(this.data, changed, flags);\n } else if (changePath && (0, FormioUtils.getComponentPath)(changed.instance) === refreshData && changed && changed.instance &&\n // Make sure the changed component is not in a different \"context\". Solves issues where refreshOn being set\n // in fields inside EditGrids could alter their state from other rows (which is bad).\n this.inContext(changed.instance)) {\n this.refresh(changed.value, changed, flags);\n }\n }\n }, {\n key: \"checkRefreshOn\",\n value: function checkRefreshOn(changes) {\n var _this7 = this;\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n changes = changes || [];\n if (flags.noRefresh) {\n return;\n }\n if (!changes.length && flags.changed) {\n changes = [flags.changed];\n }\n var refreshOn = flags.fromBlur ? this.component.refreshOnBlur : this.component.refreshOn || this.component.redrawOn;\n // If they wish to refresh on a value, then add that here.\n if (refreshOn) {\n if (Array.isArray(refreshOn)) {\n refreshOn.forEach(function (refreshData) {\n return changes.forEach(function (changed) {\n return _this7.checkRefresh(refreshData, changed, flags);\n });\n });\n } else {\n changes.forEach(function (changed) {\n return _this7.checkRefresh(refreshOn, changed, flags);\n });\n }\n }\n }\n\n /**\n * Refreshes the component with a new value.\n *\n * @param value\n */\n }, {\n key: \"refresh\",\n value: function refresh(value) {\n if (this.hasOwnProperty('refreshOnValue')) {\n this.refreshOnChanged = !_lodash[\"default\"].isEqual(value, this.refreshOnValue);\n } else {\n this.refreshOnChanged = true;\n }\n this.refreshOnValue = (0, FormioUtils.fastCloneDeep)(value);\n if (this.refreshOnChanged) {\n if (this.component.clearOnRefresh) {\n this.setValue(null);\n }\n this.triggerRedraw();\n }\n }\n\n /**\n * Checks to see if a separate component is in the \"context\" of this component. This is determined by first checking\n * if they share the same \"data\" object. It will then walk up the parent tree and compare its parents data objects\n * with the components data and returns true if they are in the same context.\n *\n * Different rows of the same EditGrid, for example, are in different contexts.\n *\n * @param component\n */\n }, {\n key: \"inContext\",\n value: function inContext(component) {\n if (component.data === this.data) {\n return true;\n }\n var parent = this.parent;\n while (parent) {\n if (parent.data === component.data) {\n return true;\n }\n parent = parent.parent;\n }\n return false;\n }\n }, {\n key: \"viewOnly\",\n get: function get() {\n return this.options.readOnly && this.options.viewAsHtml;\n }\n }, {\n key: \"createViewOnlyElement\",\n value: function createViewOnlyElement() {\n this.element = this.ce('dl', {\n id: this.id\n });\n if (this.element) {\n // Ensure you can get the component info from the element.\n this.element.component = this;\n }\n return this.element;\n }\n }, {\n key: \"defaultViewOnlyValue\",\n get: function get() {\n return '-';\n }\n\n /**\n * Uses the widget to determine the output string.\n *\n * @param value\n * @return {*}\n */\n }, {\n key: \"getWidgetValueAsString\",\n value: function getWidgetValueAsString(value, options) {\n var _this8 = this;\n var noInputWidget = !this.refs.input || !this.refs.input[0] || !this.refs.input[0].widget;\n if (!value || noInputWidget) {\n if (!this.widget || !value) {\n return value;\n } else {\n return this.widget.getValueAsString(value);\n }\n }\n if (Array.isArray(value)) {\n var values = [];\n value.forEach(function (val, index) {\n var widget = _this8.refs.input[index] && _this8.refs.input[index].widget;\n if (widget) {\n values.push(widget.getValueAsString(val, options));\n }\n });\n return values;\n }\n var widget = this.refs.input[0].widget;\n return widget.getValueAsString(value, options);\n }\n }, {\n key: \"getValueAsString\",\n value: function getValueAsString(value, options) {\n if (!value) {\n return '';\n }\n value = this.getWidgetValueAsString(value, options);\n if (Array.isArray(value)) {\n return value.join(', ');\n }\n if (_lodash[\"default\"].isPlainObject(value)) {\n return JSON.stringify(value);\n }\n if (value === null || value === undefined) {\n return '';\n }\n var stringValue = value.toString();\n return this.sanitize(stringValue);\n }\n }, {\n key: \"getView\",\n value: function getView(value, options) {\n if (this.component[\"protected\"]) {\n return '--- PROTECTED ---';\n }\n return this.getValueAsString(value, options);\n }\n }, {\n key: \"updateItems\",\n value: function updateItems() {\n this.restoreValue();\n this.onChange.apply(this, arguments);\n }\n\n /**\n * @param {*} data\n * @param {boolean} [forceUseValue=false] - if true, return 'value' property of the data\n * @return {*}\n */\n }, {\n key: \"itemValue\",\n value: function itemValue(data) {\n var forceUseValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n if (_lodash[\"default\"].isObject(data) && !_lodash[\"default\"].isArray(data)) {\n if (this.valueProperty) {\n return _lodash[\"default\"].get(data, this.valueProperty);\n }\n if (forceUseValue) {\n return data.value;\n }\n }\n return data;\n }\n }, {\n key: \"itemValueForHTMLMode\",\n value: function itemValueForHTMLMode(value) {\n var _this9 = this;\n if (Array.isArray(value)) {\n var values = value.map(function (item) {\n return Array.isArray(item) ? _this9.itemValueForHTMLMode(item) : _this9.itemValue(item);\n });\n return values.join(', ');\n }\n return this.itemValue(value);\n }\n }, {\n key: \"createModal\",\n value: function createModal(element, attr, confirm) {\n var _this10 = this;\n var dialog = this.ce('div', attr || {});\n this.setContent(dialog, this.renderTemplate('dialog'));\n\n // Add refs to dialog, not \"this\".\n dialog.refs = {};\n this.loadRefs.call(dialog, dialog, {\n dialogOverlay: 'single',\n dialogContents: 'single',\n dialogClose: 'single'\n });\n dialog.refs.dialogContents.appendChild(element);\n document.body.appendChild(dialog);\n document.body.classList.add('modal-open');\n dialog.close = function () {\n document.body.classList.remove('modal-open');\n dialog.dispatchEvent(new CustomEvent('close'));\n };\n this.addEventListener(dialog, 'close', function () {\n return _this10.removeChildFrom(dialog, document.body);\n });\n var close = function close(event) {\n event.preventDefault();\n dialog.close();\n };\n var handleCloseClick = function handleCloseClick(e) {\n if (confirm) {\n confirm().then(function () {\n return close(e);\n })[\"catch\"](function () {});\n } else {\n close(e);\n }\n };\n this.addEventListener(dialog.refs.dialogOverlay, 'click', handleCloseClick);\n this.addEventListener(dialog.refs.dialogClose, 'click', handleCloseClick);\n return dialog;\n }\n }, {\n key: \"optimizeRedraw\",\n get: function get() {\n if (this.options.optimizeRedraw && this.element && !this.visible) {\n this.addClass(this.element, 'formio-removed');\n return true;\n }\n return false;\n }\n\n /**\n * Retrieves the CSS class name of this component.\n * @returns {string} - The class name of this component.\n */\n }, {\n key: \"className\",\n get: function get() {\n var className = this.hasInput ? \"\".concat(this.transform('class', 'form-group'), \" has-feedback \") : '';\n className += \"formio-component formio-component-\".concat(this.component.type, \" \");\n // TODO: find proper way to avoid overriding of default type-based component styles\n if (this.key && this.key !== 'form') {\n className += \"formio-component-\".concat(this.key, \" \");\n }\n if (this.component.multiple) {\n className += 'formio-component-multiple ';\n }\n if (this.component.customClass) {\n className += this.component.customClass;\n }\n if (this.hasInput && this.component.validate && (0, FormioUtils.boolValue)(this.component.validate.required)) {\n className += ' required';\n }\n if (this.labelIsHidden()) {\n className += ' formio-component-label-hidden';\n }\n if (!this.visible) {\n className += ' formio-hidden';\n }\n return className;\n }\n\n /**\n * Build the custom style from the layout values\n * @return {string} - The custom style\n */\n }, {\n key: \"customStyle\",\n get: function get() {\n var customCSS = '';\n _lodash[\"default\"].each(this.component.style, function (value, key) {\n if (value !== '') {\n customCSS += \"\".concat(key, \":\").concat(value, \";\");\n }\n });\n return customCSS;\n }\n }, {\n key: \"isMobile\",\n get: function get() {\n return (0, _ismobilejs[\"default\"])();\n }\n\n /**\n * Returns the outside wrapping element of this component.\n * @returns {HTMLElement}\n */\n }, {\n key: \"getElement\",\n value: function getElement() {\n return this.element;\n }\n\n /**\n * Create an evaluation context for all script executions and interpolations.\n *\n * @param additional\n * @return {*}\n */\n }, {\n key: \"evalContext\",\n value: function evalContext(additional) {\n return _get(_getPrototypeOf(Component.prototype), \"evalContext\", this).call(this, Object.assign({\n component: this.component,\n row: this.data,\n rowIndex: this.rowIndex,\n data: this.rootValue,\n iconClass: this.iconClass.bind(this),\n // Bind the translate function to the data context of any interpolated string.\n // It is useful to translate strings in different scenarions (eg: custom edit grid templates, custom error messages etc.)\n // and desirable to be publicly available rather than calling the internal {instance.t} function in the template string.\n t: this.t.bind(this),\n submission: this.root ? this.root._submission : {\n data: this.rootValue\n },\n form: this.root ? this.root._form : {},\n options: this.options\n }, additional));\n }\n\n /**\n * Sets the pristine flag for this component.\n *\n * @param pristine {boolean} - TRUE to make pristine, FALSE not pristine.\n */\n }, {\n key: \"setPristine\",\n value: function setPristine(pristine) {\n this.pristine = pristine;\n }\n }, {\n key: \"isPristine\",\n get: function get() {\n return this.pristine;\n }\n }, {\n key: \"setDirty\",\n value: function setDirty(dirty) {\n this.dirty = dirty;\n }\n }, {\n key: \"isDirty\",\n get: function get() {\n return this.dirty;\n }\n\n /**\n * Removes a value out of the data array and rebuild the rows.\n * @param {number} index - The index of the data element to remove.\n */\n }, {\n key: \"removeValue\",\n value: function removeValue(index) {\n this.splice(index);\n this.redraw();\n this.restoreValue();\n this.triggerRootChange();\n }\n }, {\n key: \"iconClass\",\n value: function iconClass(name, spinning) {\n var iconset = this.options.iconset || Templates.current.defaultIconset || 'fa';\n return Templates.current.hasOwnProperty('iconClass') ? Templates.current.iconClass(iconset, name, spinning) : this.options.iconset === 'fa' ? Templates.defaultTemplates.iconClass(iconset, name, spinning) : name;\n }\n }, {\n key: \"size\",\n value: function size(_size) {\n return Templates.current.hasOwnProperty('size') ? Templates.current.size(_size) : _size;\n }\n\n /**\n * The readible name for this component.\n * @returns {string} - The name of the component.\n */\n }, {\n key: \"name\",\n get: function get() {\n return this.t(this.component.label || this.component.placeholder || this.key, {\n _userInput: true\n });\n }\n\n /**\n * Returns the error label for this component.\n * @return {*}\n */\n }, {\n key: \"errorLabel\",\n get: function get() {\n return this.t(this.component.errorLabel || this.component.label || this.component.placeholder || this.key);\n }\n\n /**\n * Get the error message provided a certain type of error.\n * @param type\n * @return {*}\n */\n }, {\n key: \"errorMessage\",\n value: function errorMessage(type) {\n return this.component.errors && this.component.errors[type] ? this.component.errors[type] : type;\n }\n }, {\n key: \"setContent\",\n value: function setContent(element, content, forceSanitize, sanitizeOptions) {\n if (element instanceof HTMLElement) {\n element.innerHTML = this.sanitize(content, forceSanitize, sanitizeOptions);\n return true;\n }\n return false;\n }\n }, {\n key: \"restoreCaretPosition\",\n value: function restoreCaretPosition() {\n var _this$root3;\n if ((_this$root3 = this.root) !== null && _this$root3 !== void 0 && _this$root3.currentSelection) {\n var _this$refs$input;\n if ((_this$refs$input = this.refs.input) !== null && _this$refs$input !== void 0 && _this$refs$input.length) {\n var _this$root$currentSel2 = this.root.currentSelection,\n selection = _this$root$currentSel2.selection,\n index = _this$root$currentSel2.index;\n var input = this.refs.input[index];\n var isInputRangeSelectable = /text|search|password|tel|url/i.test(input.type || '');\n if (input) {\n if (isInputRangeSelectable) {\n var _input;\n (_input = input).setSelectionRange.apply(_input, _toConsumableArray(selection));\n }\n } else {\n var _input$value;\n input = this.refs.input[this.refs.input.length];\n var lastCharacter = ((_input$value = input.value) === null || _input$value === void 0 ? void 0 : _input$value.length) || 0;\n if (isInputRangeSelectable) {\n input.setSelectionRange(lastCharacter, lastCharacter);\n }\n }\n }\n }\n }\n }, {\n key: \"redraw\",\n value: function redraw() {\n // Don't bother if we have not built yet.\n if (!this.element || !this.element.parentNode || this.optimizeRedraw) {\n // Return a non-resolving promise.\n return _nativePromiseOnly[\"default\"].resolve();\n }\n this.detach();\n this.emit('redraw');\n // Since we are going to replace the element, we need to know it's position so we can find it in the parent's children.\n var parent = this.element.parentNode;\n var index = Array.prototype.indexOf.call(parent.children, this.element);\n this.element.outerHTML = this.sanitize(this.render());\n this.element = parent.children[index];\n return this.attach(this.element);\n }\n }, {\n key: \"rebuild\",\n value: function rebuild() {\n this.destroy();\n this.init();\n this.visible = this.conditionallyVisible(null, null);\n return this.redraw();\n }\n }, {\n key: \"removeEventListeners\",\n value: function removeEventListeners() {\n _get(_getPrototypeOf(Component.prototype), \"removeEventListeners\", this).call(this);\n this.tooltips.forEach(function (tooltip) {\n return tooltip.destroy();\n });\n this.tooltips = [];\n }\n }, {\n key: \"hasClass\",\n value: function hasClass(element, className) {\n if (!element) {\n return;\n }\n return _get(_getPrototypeOf(Component.prototype), \"hasClass\", this).call(this, element, this.transform('class', className));\n }\n }, {\n key: \"addClass\",\n value: function addClass(element, className) {\n if (!element) {\n return;\n }\n return _get(_getPrototypeOf(Component.prototype), \"addClass\", this).call(this, element, this.transform('class', className));\n }\n }, {\n key: \"removeClass\",\n value: function removeClass(element, className) {\n if (!element) {\n return;\n }\n return _get(_getPrototypeOf(Component.prototype), \"removeClass\", this).call(this, element, this.transform('class', className));\n }\n\n /**\n * Determines if this component has a condition defined.\n *\n * @return {null}\n */\n }, {\n key: \"hasCondition\",\n value: function hasCondition() {\n if (this._hasCondition !== null) {\n return this._hasCondition;\n }\n this._hasCondition = FormioUtils.hasCondition(this.component);\n return this._hasCondition;\n }\n\n /**\n * Check if this component is conditionally visible.\n *\n * @param data\n * @return {boolean}\n */\n }, {\n key: \"conditionallyVisible\",\n value: function conditionallyVisible(data, row) {\n data = data || this.rootValue;\n row = row || this.data;\n if (this.builderMode || this.previewMode || !this.hasCondition()) {\n return !this.component.hidden;\n }\n data = data || (this.root ? this.root.data : {});\n return this.checkCondition(row, data);\n }\n\n /**\n * Checks the condition of this component.\n *\n * TODO: Switch row and data parameters to be consistent with other methods.\n *\n * @param row - The row contextual data.\n * @param data - The global data object.\n * @return {boolean} - True if the condition applies to this component.\n */\n }, {\n key: \"checkCondition\",\n value: function checkCondition(row, data) {\n return FormioUtils.checkCondition(this.component, row || this.data, data || this.rootValue, this.root ? this.root._form : {}, this);\n }\n\n /**\n * Check for conditionals and hide/show the element based on those conditions.\n */\n }, {\n key: \"checkComponentConditions\",\n value: function checkComponentConditions(data, flags, row) {\n data = data || this.rootValue;\n flags = flags || {};\n row = row || this.data;\n if (!this.builderMode & !this.previewMode && this.fieldLogic(data, row)) {\n this.redraw();\n }\n\n // Check advanced conditions\n var visible = this.conditionallyVisible(data, row);\n if (this.visible !== visible) {\n this.visible = visible;\n }\n return visible;\n }\n\n /**\n * Checks conditions for this component and any sub components.\n * @param args\n * @return {boolean}\n */\n }, {\n key: \"checkConditions\",\n value: function checkConditions(data, flags, row) {\n data = data || this.rootValue;\n flags = flags || {};\n row = row || this.data;\n return this.checkComponentConditions(data, flags, row);\n }\n }, {\n key: \"logic\",\n get: function get() {\n return this.component.logic || [];\n }\n\n /**\n * Check all triggers and apply necessary actions.\n *\n * @param data\n */\n }, {\n key: \"fieldLogic\",\n value: function fieldLogic(data, row) {\n var _this11 = this;\n data = data || this.rootValue;\n row = row || this.data;\n var logics = this.logic;\n\n // If there aren't logic, don't go further.\n if (logics.length === 0) {\n return;\n }\n var newComponent = (0, FormioUtils.fastCloneDeep)(this.originalComponent);\n var changed = logics.reduce(function (changed, logic) {\n var result = FormioUtils.checkTrigger(newComponent, logic.trigger, row, data, _this11.root ? _this11.root._form : {}, _this11);\n return (result ? _this11.applyActions(newComponent, logic.actions, result, row, data) : false) || changed;\n }, false);\n\n // If component definition changed, replace and mark as changed.\n if (!_lodash[\"default\"].isEqual(this.component, newComponent)) {\n this.component = newComponent;\n changed = true;\n var disabled = this.shouldDisabled;\n // Change disabled state if it has changed\n if (this.disabled !== disabled) {\n this.disabled = disabled;\n }\n }\n return changed;\n }\n }, {\n key: \"isIE\",\n value: function isIE() {\n if (typeof window === 'undefined') {\n return false;\n }\n var userAgent = window.navigator.userAgent;\n var msie = userAgent.indexOf('MSIE ');\n if (msie > 0) {\n // IE 10 or older => return version number\n return parseInt(userAgent.substring(msie + 5, userAgent.indexOf('.', msie)), 10);\n }\n var trident = userAgent.indexOf('Trident/');\n if (trident > 0) {\n // IE 11 => return version number\n var rv = userAgent.indexOf('rv:');\n return parseInt(userAgent.substring(rv + 3, userAgent.indexOf('.', rv)), 10);\n }\n var edge = userAgent.indexOf('Edge/');\n if (edge > 0) {\n // IE 12 (aka Edge) => return version number\n return parseInt(userAgent.substring(edge + 5, userAgent.indexOf('.', edge)), 10);\n }\n\n // other browser\n return false;\n }\n }, {\n key: \"defineActionValue\",\n value: function defineActionValue(action, argsObject) {\n return this.evaluate(action.value, argsObject, 'value');\n }\n }, {\n key: \"applyActions\",\n value: function applyActions(newComponent, actions, result, row, data) {\n var _this12 = this;\n data = data || this.rootValue;\n row = row || this.data;\n return actions.reduce(function (changed, action) {\n switch (action.type) {\n case 'property':\n {\n FormioUtils.setActionProperty(newComponent, action, result, row, data, _this12);\n var property = action.property.value;\n if (!_lodash[\"default\"].isEqual(_lodash[\"default\"].get(_this12.component, property), _lodash[\"default\"].get(newComponent, property))) {\n changed = true;\n }\n break;\n }\n case 'value':\n {\n var oldValue = _this12.getValue();\n var newValue = _this12.defineActionValue(action, {\n value: _lodash[\"default\"].clone(oldValue),\n data: data,\n row: row,\n component: newComponent,\n result: result\n });\n if (!_lodash[\"default\"].isEqual(oldValue, newValue) && !(_this12.component.clearOnHide && !_this12.visible)) {\n _this12.setValue(newValue);\n if (_this12.viewOnly) {\n _this12.dataValue = newValue;\n }\n changed = true;\n }\n break;\n }\n case 'mergeComponentSchema':\n {\n var schema = _this12.evaluate(action.schemaDefinition, {\n value: _lodash[\"default\"].clone(_this12.getValue()),\n data: data,\n row: row,\n component: newComponent,\n result: result\n }, 'schema');\n _lodash[\"default\"].assign(newComponent, schema);\n if (!_lodash[\"default\"].isEqual(_this12.component, newComponent)) {\n changed = true;\n }\n break;\n }\n case 'customAction':\n {\n var _oldValue = _this12.getValue();\n var _newValue = _this12.evaluate(action.customAction, {\n value: _lodash[\"default\"].clone(_oldValue),\n data: data,\n row: row,\n input: _oldValue,\n component: newComponent,\n result: result\n }, 'value');\n if (!_lodash[\"default\"].isEqual(_oldValue, _newValue) && !(_this12.component.clearOnHide && !_this12.visible)) {\n _this12.setValue(_newValue);\n if (_this12.viewOnly) {\n _this12.dataValue = _newValue;\n }\n changed = true;\n }\n break;\n }\n }\n return changed;\n }, false);\n }\n\n // Deprecated\n }, {\n key: \"addInputError\",\n value: function addInputError(message, dirty, elements) {\n this.addMessages(message);\n this.setErrorClasses(elements, dirty, !!message);\n }\n\n // Deprecated\n }, {\n key: \"removeInputError\",\n value: function removeInputError(elements) {\n this.setErrorClasses(elements, true, false);\n }\n\n /**\n * Add a new input error to this element.\n *\n * @param message\n * @param dirty\n */\n }, {\n key: \"addMessages\",\n value: function addMessages(messages) {\n var _this13 = this;\n if (!messages) {\n return;\n }\n\n // Standardize on array of objects for message.\n if (typeof messages === 'string') {\n messages = {\n messages: messages,\n level: 'error'\n };\n }\n if (!Array.isArray(messages)) {\n messages = [messages];\n }\n messages = _lodash[\"default\"].uniqBy(messages, function (message) {\n return message.message;\n });\n if (this.refs.messageContainer) {\n this.setContent(this.refs.messageContainer, messages.map(function (message) {\n if (message.message && typeof message.message === 'string') {\n message.message = message.message.replaceAll('<', '<').replaceAll('>', '>');\n }\n return _this13.renderTemplate('message', message);\n }).join(''));\n }\n }\n }, {\n key: \"setErrorClasses\",\n value: function setErrorClasses(elements, dirty, hasErrors, hasMessages) {\n var _this14 = this;\n var element = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : this.element;\n this.clearErrorClasses();\n elements.forEach(function (element) {\n _this14.setElementInvalid(_this14.performInputMapping(element), false);\n });\n this.setInputWidgetErrorClasses(elements, hasErrors);\n if (hasErrors) {\n // Add error classes\n elements.forEach(function (input) {\n _this14.setElementInvalid(_this14.performInputMapping(input), true);\n });\n if (dirty && this.options.highlightErrors) {\n this.addClass(element, this.options.componentErrorClass);\n } else {\n this.addClass(element, 'has-error');\n }\n }\n if (hasMessages) {\n this.addClass(element, 'has-message');\n }\n }\n }, {\n key: \"setElementInvalid\",\n value: function setElementInvalid(element, invalid) {\n if (!element) return;\n if (invalid) {\n this.addClass(element, 'is-invalid');\n } else {\n this.removeClass(element, 'is-invalid');\n }\n element.setAttribute('aria-invalid', invalid ? 'true' : 'false');\n }\n }, {\n key: \"clearOnHide\",\n value: function clearOnHide() {\n // clearOnHide defaults to true for old forms (without the value set) so only trigger if the value is false.\n if (\n // if change happens inside EditGrid's row, it doesn't trigger change on the root level, so rootPristine will be true\n (!this.rootPristine || this.options.server || (0, FormioUtils.isInsideScopingComponent)(this)) && this.component.clearOnHide !== false && !this.options.readOnly && !this.options.showHiddenFields) {\n if (!this.visible) {\n this.deleteValue();\n } else if (!this.hasValue() && this.shouldAddDefaultValue) {\n // If shown, ensure the default is set.\n this.setValue(this.defaultValue, {\n noUpdateEvent: true\n });\n }\n }\n }\n }, {\n key: \"triggerRootChange\",\n value: function triggerRootChange() {\n if (this.options.onChange) {\n var _this$options2;\n (_this$options2 = this.options).onChange.apply(_this$options2, arguments);\n } else if (this.root) {\n var _this$root4;\n (_this$root4 = this.root).triggerChange.apply(_this$root4, arguments);\n }\n }\n }, {\n key: \"onChange\",\n value: function onChange(flags, fromRoot) {\n flags = flags || {};\n if (flags.modified) {\n if (!flags.noPristineChangeOnModified) {\n this.pristine = false;\n }\n this.addClass(this.getElement(), 'formio-modified');\n }\n\n // If we are supposed to validate on blur, then don't trigger validation yet.\n if (this.component.validateOn === 'blur' && !this.errors.length) {\n flags.noValidate = true;\n }\n if (this.component.onChange) {\n this.evaluate(this.component.onChange, {\n flags: flags\n });\n }\n\n // Set the changed variable.\n var changed = {\n instance: this,\n component: this.component,\n value: this.dataValue,\n flags: flags\n };\n\n // Emit the change.\n this.emit('componentChange', changed);\n\n // Do not propogate the modified flag.\n var modified = false;\n if (flags.modified) {\n modified = true;\n delete flags.modified;\n }\n\n // Bubble this change up to the top.\n if (!fromRoot) {\n this.triggerRootChange(flags, changed, modified);\n }\n return changed;\n }\n }, {\n key: \"wysiwygDefault\",\n get: function get() {\n return {\n quill: {\n theme: 'snow',\n placeholder: this.t(this.component.placeholder, {\n _userInput: true\n }),\n modules: {\n toolbar: [[{\n 'size': ['small', false, 'large', 'huge']\n }],\n // custom dropdown\n [{\n 'header': [1, 2, 3, 4, 5, 6, false]\n }], [{\n 'font': []\n }], ['bold', 'italic', 'underline', 'strike', {\n 'script': 'sub'\n }, {\n 'script': 'super'\n }, 'clean'], [{\n 'color': []\n }, {\n 'background': []\n }], [{\n 'list': 'ordered'\n }, {\n 'list': 'bullet'\n }, {\n 'indent': '-1'\n }, {\n 'indent': '+1'\n }, {\n 'align': []\n }], ['blockquote', 'code-block'], ['link', 'image', 'video', 'formula', 'source']]\n }\n },\n ace: {\n theme: 'ace/theme/xcode',\n maxLines: 12,\n minLines: 12,\n tabSize: 2,\n mode: 'ace/mode/javascript',\n placeholder: this.t(this.component.placeholder, {\n _userInput: true\n })\n },\n ckeditor: {\n image: {\n toolbar: ['imageTextAlternative', '|', 'imageStyle:full', 'imageStyle:alignLeft', 'imageStyle:alignCenter', 'imageStyle:alignRight'],\n styles: ['full', 'alignLeft', 'alignCenter', 'alignRight']\n },\n extraPlugins: []\n },\n \"default\": {}\n };\n }\n }, {\n key: \"addCKE\",\n value: function addCKE(element, settings, onChange) {\n settings = _lodash[\"default\"].isEmpty(settings) ? {} : settings;\n settings.base64Upload = this.component.isUploadEnabled ? false : true;\n settings.mediaEmbed = {\n previewsInData: true\n };\n settings = _lodash[\"default\"].merge(this.wysiwygDefault.ckeditor, _lodash[\"default\"].get(this.options, 'editors.ckeditor.settings', {}), settings);\n if (this.component.isUploadEnabled) {\n settings.extraPlugins.push((0, _uploadAdapter.getFormioUploadAdapterPlugin)(this.fileService, this));\n }\n return _Formio.GlobalFormio.requireLibrary('ckeditor', isIEBrowser ? 'CKEDITOR' : 'ClassicEditor', _lodash[\"default\"].get(this.options, 'editors.ckeditor.src', \"\".concat(_Formio.GlobalFormio.cdn.ckeditor, \"/ckeditor.js\")), true).then(function () {\n if (!element.parentNode) {\n return _nativePromiseOnly[\"default\"].reject();\n }\n if (isIEBrowser) {\n var editor = CKEDITOR.replace(element);\n editor.on('change', function () {\n return onChange(editor.getData());\n });\n return _nativePromiseOnly[\"default\"].resolve(editor);\n } else {\n return ClassicEditor.create(element, settings).then(function (editor) {\n editor.model.document.on('change', function () {\n return onChange(editor.data.get());\n });\n return editor;\n });\n }\n });\n }\n }, {\n key: \"addQuill\",\n value: function addQuill(element, settings, onChange) {\n var _this15 = this;\n settings = _lodash[\"default\"].isEmpty(settings) ? this.wysiwygDefault.quill : settings;\n settings = _lodash[\"default\"].merge(this.wysiwygDefault.quill, _lodash[\"default\"].get(this.options, 'editors.quill.settings', {}), settings);\n settings = _objectSpread(_objectSpread({}, settings), {}, {\n modules: _objectSpread({\n table: true\n }, settings.modules)\n });\n // Lazy load the quill css.\n _Formio.GlobalFormio.requireLibrary(\"quill-css-\".concat(settings.theme), 'Quill', [{\n type: 'styles',\n src: \"\".concat(_Formio.GlobalFormio.cdn.quill, \"/quill.\").concat(settings.theme, \".css\")\n }], true);\n\n // Lazy load the quill library.\n return _Formio.GlobalFormio.requireLibrary('quill', 'Quill', _lodash[\"default\"].get(this.options, 'editors.quill.src', \"\".concat(_Formio.GlobalFormio.cdn.quill, \"/quill.min.js\")), true).then(function () {\n return _Formio.GlobalFormio.requireLibrary('quill-table', 'Quill', \"\".concat(_Formio.GlobalFormio.cdn.baseUrl, \"/quill/quill-table.js\"), true).then(function () {\n if (!element.parentNode) {\n return _nativePromiseOnly[\"default\"].reject();\n }\n _this15.quill = new Quill(element, isIEBrowser ? _objectSpread(_objectSpread({}, settings), {}, {\n modules: {}\n }) : settings);\n\n /** This block of code adds the [source] capabilities. See https://codepen.io/anon/pen/ZyEjrQ **/\n var txtArea = document.createElement('textarea');\n txtArea.setAttribute('class', 'quill-source-code');\n _this15.quill.addContainer('ql-custom').appendChild(txtArea);\n var qlSource = element.parentNode.querySelector('.ql-source');\n if (qlSource) {\n _this15.addEventListener(qlSource, 'click', function (event) {\n event.preventDefault();\n if (txtArea.style.display === 'inherit') {\n _this15.quill.setContents(_this15.quill.clipboard.convert({\n html: txtArea.value\n }));\n }\n txtArea.style.display = txtArea.style.display === 'none' ? 'inherit' : 'none';\n });\n }\n /** END CODEBLOCK **/\n\n // Make sure to select cursor when they click on the element.\n _this15.addEventListener(element, 'click', function () {\n return _this15.quill.focus();\n });\n\n // Allows users to skip toolbar items when tabbing though form\n var elm = document.querySelectorAll('.ql-formats > button');\n for (var i = 0; i < elm.length; i++) {\n elm[i].setAttribute('tabindex', '-1');\n }\n _this15.quill.on('text-change', function () {\n txtArea.value = _this15.quill.root.innerHTML;\n onChange(txtArea);\n });\n return _this15.quill;\n });\n });\n }\n }, {\n key: \"shouldSanitizeValue\",\n get: function get() {\n var _this$options3;\n // Sanitize value if sanitizing for thw whole content is turned off\n return ((_this$options3 = this.options) === null || _this$options3 === void 0 ? void 0 : _this$options3.sanitize) !== false;\n }\n }, {\n key: \"addAce\",\n value: function addAce(element, settings, onChange) {\n if (!settings || settings.theme === 'snow') {\n var mode = settings ? settings.mode : '';\n settings = {};\n if (mode) {\n settings.mode = mode;\n }\n }\n settings = _lodash[\"default\"].merge(this.wysiwygDefault.ace, _lodash[\"default\"].get(this.options, 'editors.ace.settings', {}), settings || {});\n return _Formio.GlobalFormio.requireLibrary('ace', 'ace', _lodash[\"default\"].get(this.options, 'editors.ace.src', \"\".concat(_Formio.GlobalFormio.cdn.ace, \"/ace.js\")), true).then(function (editor) {\n editor = editor.edit(element);\n editor.removeAllListeners('change');\n editor.setOptions(settings);\n editor.getSession().setMode(settings.mode);\n editor.on('change', function () {\n return onChange(editor.getValue());\n });\n if (settings.isUseWorkerDisabled) {\n editor.session.setUseWorker(false);\n }\n return editor;\n });\n }\n }, {\n key: \"tree\",\n get: function get() {\n return this.component.tree || false;\n }\n\n /**\n * The empty value for this component.\n *\n * @return {null}\n */\n }, {\n key: \"emptyValue\",\n get: function get() {\n return null;\n }\n\n /**\n * Returns if this component has a value set.\n *\n */\n }, {\n key: \"hasValue\",\n value: function hasValue(data) {\n return !_lodash[\"default\"].isUndefined(_lodash[\"default\"].get(data || this.data, this.key));\n }\n\n /**\n * Get the data value at the root level.\n *\n * @return {*}\n */\n }, {\n key: \"rootValue\",\n get: function get() {\n return this.root ? this.root.data : this.data;\n }\n }, {\n key: \"rootPristine\",\n get: function get() {\n return _lodash[\"default\"].get(this, 'root.pristine', false);\n }\n\n /**\n * Get the static value of this component.\n * @return {*}\n */\n }, {\n key: \"dataValue\",\n get: function get() {\n if (!this.key || !this.visible && this.component.clearOnHide && !this.rootPristine) {\n return this.emptyValue;\n }\n if (!this.hasValue() && this.shouldAddDefaultValue) {\n var empty = this.component.multiple ? [] : this.emptyValue;\n if (!this.rootPristine) {\n this.dataValue = empty;\n }\n return empty;\n }\n return _lodash[\"default\"].get(this._data, this.key);\n }\n\n /**\n * Sets the static value of this component.\n *\n * @param value\n */,\n set: function set(value) {\n if (!this.allowData || !this.key || !this.visible && this.component.clearOnHide && !this.rootPristine) {\n return;\n }\n if (value !== null && value !== undefined) {\n value = this.hook('setDataValue', value, this.key, this._data);\n }\n if (value === null || value === undefined) {\n this.unset();\n return;\n }\n _lodash[\"default\"].set(this._data, this.key, value);\n return;\n }\n\n /**\n * Splice a value from the dataValue.\n *\n * @param index\n */\n }, {\n key: \"splice\",\n value: function splice(index) {\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n if (this.hasValue()) {\n var dataValue = this.dataValue || [];\n if (_lodash[\"default\"].isArray(dataValue) && dataValue.hasOwnProperty(index)) {\n dataValue.splice(index, 1);\n this.dataValue = dataValue;\n this.triggerChange(flags);\n }\n }\n }\n }, {\n key: \"unset\",\n value: function unset() {\n _lodash[\"default\"].unset(this._data, this.key);\n }\n\n /**\n * Deletes the value of the component.\n */\n }, {\n key: \"deleteValue\",\n value: function deleteValue() {\n this.setValue(null, {\n noUpdateEvent: true,\n noDefault: true\n });\n this.unset();\n }\n }, {\n key: \"getCustomDefaultValue\",\n value: function getCustomDefaultValue(defaultValue) {\n if (this.component.customDefaultValue && !this.options.preview) {\n defaultValue = this.evaluate(this.component.customDefaultValue, {\n value: ''\n }, 'value');\n }\n return defaultValue;\n }\n }, {\n key: \"shouldAddDefaultValue\",\n get: function get() {\n return !this.options.noDefaults || this.component.defaultValue && !this.isEmpty(this.component.defaultValue) || this.component.customDefaultValue;\n }\n }, {\n key: \"defaultValue\",\n get: function get() {\n var _this16 = this;\n var defaultValue = this.emptyValue;\n if (this.component.defaultValue) {\n defaultValue = this.component.defaultValue;\n }\n defaultValue = this.getCustomDefaultValue(defaultValue);\n var checkMask = function checkMask(value) {\n if (typeof value === 'string') {\n var placeholderChar = _this16.placeholderChar;\n value = (0, _vanillaTextMask.conformToMask)(value, _this16.defaultMask, {\n placeholderChar: placeholderChar\n }).conformedValue;\n if (!FormioUtils.matchInputMask(value, _this16.defaultMask)) {\n value = '';\n }\n } else {\n value = '';\n }\n return value;\n };\n if (this.defaultMask) {\n if (Array.isArray(defaultValue)) {\n defaultValue = defaultValue.map(checkMask);\n } else {\n defaultValue = checkMask(defaultValue);\n }\n }\n\n // Clone so that it creates a new instance.\n return _lodash[\"default\"].cloneDeep(defaultValue);\n }\n\n /**\n * Get the input value of this component.\n *\n * @return {*}\n */\n }, {\n key: \"getValue\",\n value: function getValue() {\n if (!this.hasInput || this.viewOnly || !this.refs.input || !this.refs.input.length) {\n return this.dataValue;\n }\n var values = [];\n for (var i in this.refs.input) {\n if (this.refs.input.hasOwnProperty(i)) {\n if (!this.component.multiple) {\n return this.getValueAt(i);\n }\n values.push(this.getValueAt(i));\n }\n }\n if (values.length === 0 && !this.component.multiple) {\n return '';\n }\n return values;\n }\n\n /**\n * Get the value at a specific index.\n *\n * @param index\n * @returns {*}\n */\n }, {\n key: \"getValueAt\",\n value: function getValueAt(index) {\n var input = this.performInputMapping(this.refs.input[index]);\n return input ? input.value : undefined;\n }\n\n /**\n * Set the value of this component.\n *\n * @param value\n * @param flags\n *\n * @return {boolean} - If the value changed.\n */\n }, {\n key: \"setValue\",\n value: function setValue(value) {\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var changed = this.updateValue(value, flags);\n value = this.dataValue;\n if (!this.hasInput) {\n return changed;\n }\n var isArray = Array.isArray(value);\n var valueInput = this.refs.fileLink || this.refs.input;\n if (isArray && Array.isArray(this.defaultValue) && this.refs.hasOwnProperty('input') && valueInput && valueInput.length !== value.length && this.visible) {\n this.redraw();\n }\n if (this.isHtmlRenderMode() && flags && flags.fromSubmission && changed) {\n this.redraw();\n return changed;\n }\n for (var i in this.refs.input) {\n if (this.refs.input.hasOwnProperty(i)) {\n this.setValueAt(i, isArray ? value[i] : value, flags);\n }\n }\n return changed;\n }\n\n /**\n * Set the value at a specific index.\n *\n * @param index\n * @param value\n */\n }, {\n key: \"setValueAt\",\n value: function setValueAt(index, value) {\n var flags = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n if (!flags.noDefault && (value === null || value === undefined) && !this.component.multiple) {\n value = this.defaultValue;\n }\n var input = this.performInputMapping(this.refs.input[index]);\n var valueMaskInput = this.refs.valueMaskInput;\n if (valueMaskInput !== null && valueMaskInput !== void 0 && valueMaskInput.mask) {\n valueMaskInput.mask.textMaskInputElement.update(value);\n }\n if (input.mask) {\n input.mask.textMaskInputElement.update(value);\n } else if (input.widget && input.widget.setValue) {\n input.widget.setValue(value);\n } else {\n input.value = value;\n }\n }\n }, {\n key: \"hasSetValue\",\n get: function get() {\n return this.hasValue() && !this.isEmpty(this.dataValue);\n }\n }, {\n key: \"setDefaultValue\",\n value: function setDefaultValue() {\n if (this.defaultValue && this.shouldAddDefaultValue) {\n var defaultValue = this.component.multiple && !this.dataValue.length ? [] : this.defaultValue;\n this.setValue(defaultValue, {\n noUpdateEvent: true\n });\n }\n }\n\n /**\n * Restore the value of a control.\n */\n }, {\n key: \"restoreValue\",\n value: function restoreValue() {\n if (this.hasSetValue) {\n this.setValue(this.dataValue, {\n noUpdateEvent: true\n });\n } else {\n this.setDefaultValue();\n }\n }\n\n /**\n * Normalize values coming into updateValue.\n *\n * @param value\n * @return {*}\n */\n }, {\n key: \"normalizeValue\",\n value: function normalizeValue(value) {\n if (this.component.multiple && !Array.isArray(value)) {\n value = value ? [value] : [];\n }\n return value;\n }\n\n /**\n * Update a value of this component.\n *\n * @param flags\n */\n }, {\n key: \"updateComponentValue\",\n value: function updateComponentValue(value) {\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var newValue = !flags.resetValue && (value === undefined || value === null) ? this.getValue() : value;\n newValue = this.normalizeValue(newValue, flags);\n var oldValue = this.dataValue;\n var changed = newValue !== undefined ? this.hasChanged(newValue, oldValue) : false;\n if (changed) {\n this.dataValue = newValue;\n changed = this.dataValue !== oldValue;\n this.updateOnChange(flags, changed);\n }\n if (this.componentModal && flags && flags.fromSubmission) {\n this.componentModal.setValue(value);\n }\n return changed;\n }\n\n /**\n * Updates the value of this component plus all sub-components.\n *\n * @param args\n * @return {boolean}\n */\n }, {\n key: \"updateValue\",\n value: function updateValue() {\n return this.updateComponentValue.apply(this, arguments);\n }\n }, {\n key: \"getIcon\",\n value: function getIcon(name, content, styles) {\n var ref = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'icon';\n return this.renderTemplate('icon', {\n className: this.iconClass(name),\n ref: ref,\n styles: styles,\n content: content\n });\n }\n\n /**\n * Resets the value of this component.\n */\n }, {\n key: \"resetValue\",\n value: function resetValue() {\n this.unset();\n this.setValue(this.emptyValue, {\n noUpdateEvent: true,\n noValidate: true,\n resetValue: true\n });\n }\n\n /**\n * Determine if the value of this component has changed.\n *\n * @param newValue\n * @param oldValue\n * @return {boolean}\n */\n }, {\n key: \"hasChanged\",\n value: function hasChanged(newValue, oldValue) {\n if ((newValue === undefined || newValue === null) && (oldValue === undefined || oldValue === null || this.isEmpty(oldValue))) {\n return false;\n }\n // If we do not have a value and are getting set to anything other than undefined or null, then we changed.\n if (newValue !== undefined && newValue !== null && this.allowData && !this.hasValue()) {\n return true;\n }\n return !_lodash[\"default\"].isEqual(newValue, oldValue);\n }\n\n /**\n * Update the value on change.\n *\n * @param flags\n */\n }, {\n key: \"updateOnChange\",\n value: function updateOnChange() {\n var flags = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var changed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n if (!flags.noUpdateEvent && changed) {\n this.triggerChange(flags);\n return true;\n }\n return false;\n }\n\n /**\n * Perform a calculated value operation.\n *\n * @param data - The global data object.\n *\n * @return {boolean} - If the value changed during calculation.\n */\n }, {\n key: \"convertNumberOrBoolToString\",\n value: function convertNumberOrBoolToString(value) {\n if (typeof value === 'number' || typeof value === 'boolean') {\n return value.toString();\n }\n return value;\n }\n }, {\n key: \"doValueCalculation\",\n value: function doValueCalculation(dataValue, data, row) {\n var _this$root5;\n return this.evaluate(this.component.calculateValue, {\n value: dataValue,\n data: data,\n row: row || this.data,\n submission: ((_this$root5 = this.root) === null || _this$root5 === void 0 ? void 0 : _this$root5._submission) || {\n data: this.rootValue\n }\n }, 'value');\n }\n\n /* eslint-disable max-statements */\n }, {\n key: \"calculateComponentValue\",\n value: function calculateComponentValue(data, flags, row) {\n // Skip value calculation for the component if we don't have entire form data set\n if (_lodash[\"default\"].isUndefined(_lodash[\"default\"].get(this, 'root.data'))) {\n return false;\n }\n // If no calculated value or\n // hidden and set to clearOnHide (Don't calculate a value for a hidden field set to clear when hidden)\n var clearOnHide = this.component.clearOnHide;\n var shouldBeCleared = !this.visible && clearOnHide;\n var allowOverride = _lodash[\"default\"].get(this.component, 'allowCalculateOverride', false);\n\n // Handle all cases when calculated values should not fire.\n if (this.options.readOnly && !this.options.pdf && !this.component.calculateValue || !(this.component.calculateValue || this.component.calculateValueVariable) || shouldBeCleared || this.options.server && !this.component.calculateServer || flags.dataSourceInitialLoading && allowOverride) {\n return false;\n }\n var dataValue = this.dataValue;\n // Calculate the new value.\n var calculatedValue = this.doValueCalculation(dataValue, data, row, flags);\n if (_lodash[\"default\"].isNil(calculatedValue)) {\n calculatedValue = this.emptyValue;\n }\n var changed = !_lodash[\"default\"].isEqual(dataValue, calculatedValue);\n\n // Do not override calculations on server if they have calculateServer set.\n if (allowOverride) {\n // The value is considered locked if it is not empty and comes from a submission value.\n var fromSubmission = flags.fromSubmission && this.component.persistent === true;\n if (this.isEmpty(dataValue)) {\n // Reset the calculation lock if ever the data is cleared.\n this.calculationLocked = false;\n } else if (this.calculationLocked || fromSubmission) {\n this.calculationLocked = true;\n return false;\n }\n var firstPass = this.calculatedValue === undefined;\n if (firstPass) {\n this.calculatedValue = null;\n }\n var newCalculatedValue = this.normalizeValue(this.convertNumberOrBoolToString(calculatedValue));\n var previousCalculatedValue = this.normalizeValue(this.convertNumberOrBoolToString(this.calculatedValue));\n var normalizedDataValue = this.normalizeValue(this.convertNumberOrBoolToString(dataValue));\n var calculationChanged = !_lodash[\"default\"].isEqual(previousCalculatedValue, newCalculatedValue);\n var previousChanged = !_lodash[\"default\"].isEqual(normalizedDataValue, previousCalculatedValue);\n if (calculationChanged && previousChanged && !firstPass) {\n return false;\n }\n\n // Check to ensure that the calculated value is different than the previously calculated value.\n if (previousCalculatedValue && previousChanged && !calculationChanged) {\n return false;\n }\n if (flags.isReordered || !calculationChanged) {\n return false;\n }\n if (fromSubmission) {\n // If we set value from submission and it differs from calculated one, set the calculated value to prevent overriding dataValue in the next pass\n this.calculatedValue = calculatedValue;\n return false;\n }\n\n // If this is the firstPass, and the dataValue is different than to the calculatedValue.\n if (firstPass && !this.isEmpty(dataValue) && changed && calculationChanged) {\n // Return that we have a change so it will perform another pass.\n return true;\n }\n }\n this.calculatedValue = calculatedValue;\n if (changed) {\n if (!flags.noPristineChangeOnModified) {\n this.pristine = false;\n }\n flags.triggeredComponentId = this.id;\n return this.setValue(calculatedValue, flags);\n }\n return false;\n }\n /* eslint-enable max-statements */\n\n /**\n * Performs calculations in this component plus any child components.\n *\n * @param args\n * @return {boolean}\n */\n }, {\n key: \"calculateValue\",\n value: function calculateValue(data, flags, row) {\n data = data || this.rootValue;\n flags = flags || {};\n row = row || this.data;\n return this.calculateComponentValue(data, flags, row);\n }\n\n /**\n * Get this component's label text.\n *\n */\n }, {\n key: \"label\",\n get: function get() {\n return this.component.label;\n }\n\n /**\n * Set this component's label text and render it.\n *\n * @param value - The new label text.\n */,\n set: function set(value) {\n this.component.label = value;\n if (this.labelElement) {\n this.labelElement.innerText = value;\n }\n }\n\n /**\n * Get FormioForm element at the root of this component tree.\n *\n */\n }, {\n key: \"getRoot\",\n value: function getRoot() {\n return this.root;\n }\n\n /**\n * Returns the invalid message, or empty string if the component is valid.\n *\n * @param data\n * @param dirty\n * @return {*}\n */\n }, {\n key: \"invalidMessage\",\n value: function invalidMessage(data, dirty, ignoreCondition, row) {\n if (!ignoreCondition && !this.checkCondition(row, data)) {\n return '';\n }\n\n // See if this is forced invalid.\n if (this.invalid) {\n return this.invalid;\n }\n\n // No need to check for errors if there is no input or if it is pristine.\n if (!this.hasInput || !dirty && this.pristine) {\n return '';\n }\n return _lodash[\"default\"].map(_Validator[\"default\"].checkComponent(this, data), 'message').join('\\n\\n');\n }\n\n /**\n * Returns if the component is valid or not.\n *\n * @param data\n * @param dirty\n * @return {boolean}\n */\n }, {\n key: \"isValid\",\n value: function isValid(data, dirty) {\n return !this.invalidMessage(data, dirty);\n }\n }, {\n key: \"setComponentValidity\",\n value: function setComponentValidity(messages, dirty, silentCheck) {\n var hasErrors = !!messages.filter(function (message) {\n return message.level === 'error' && !message.fromServer;\n }).length;\n if (messages.length && (!silentCheck || this.error) && (!this.isEmpty(this.defaultValue) || dirty || !this.pristine)) {\n this.setCustomValidity(messages, dirty);\n } else if (!silentCheck) {\n this.setCustomValidity('');\n }\n return !hasErrors;\n }\n\n /**\n * Checks the validity of this component and sets the error message if it is invalid.\n *\n * @param data\n * @param dirty\n * @param row\n * @return {boolean}\n */\n }, {\n key: \"checkComponentValidity\",\n value: function checkComponentValidity(data, dirty, row) {\n var _this$serverErrors,\n _this17 = this;\n var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n data = data || this.rootValue;\n row = row || this.data;\n var _options$async = options.async,\n async = _options$async === void 0 ? false : _options$async,\n _options$silentCheck = options.silentCheck,\n silentCheck = _options$silentCheck === void 0 ? false : _options$silentCheck;\n if (this.shouldSkipValidation(data, dirty, row)) {\n this.setCustomValidity('');\n return async ? _nativePromiseOnly[\"default\"].resolve(true) : true;\n }\n var check = _Validator[\"default\"].checkComponent(this, data, row, true, async);\n var validations = check;\n if ((_this$serverErrors = this.serverErrors) !== null && _this$serverErrors !== void 0 && _this$serverErrors.length) {\n validations = check.concat(this.serverErrors);\n }\n return async ? validations.then(function (messages) {\n return _this17.setComponentValidity(messages, dirty, silentCheck);\n }) : this.setComponentValidity(validations, dirty, silentCheck);\n }\n }, {\n key: \"checkValidity\",\n value: function checkValidity(data, dirty, row, silentCheck) {\n data = data || this.rootValue;\n row = row || this.data;\n var isValid = this.checkComponentValidity(data, dirty, row, {\n silentCheck: silentCheck\n });\n this.checkModal();\n return isValid;\n }\n }, {\n key: \"checkAsyncValidity\",\n value: function checkAsyncValidity(data, dirty, row, silentCheck) {\n return _nativePromiseOnly[\"default\"].resolve(this.checkComponentValidity(data, dirty, row, {\n async: true,\n silentCheck: silentCheck\n }));\n }\n\n /**\n * Check the conditions, calculations, and validity of a single component and triggers an update if\n * something changed.\n *\n * @param data - The root data of the change event.\n * @param flags - The flags from this change event.\n *\n * @return boolean - If component is valid or not.\n */\n }, {\n key: \"checkData\",\n value: function checkData(data, flags, row) {\n data = data || this.rootValue;\n flags = flags || {};\n row = row || this.data;\n\n // Needs for Nextgen Rules Engine\n this.resetCaches();\n\n // Do not trigger refresh if change was triggered on blur event since components with Refresh on Blur have their own listeners\n if (!flags.fromBlur) {\n this.checkRefreshOn(flags.changes, flags);\n }\n if (flags.noCheck) {\n return true;\n }\n this.checkComponentConditions(data, flags, row);\n if (this.id !== flags.triggeredComponentId) {\n this.calculateComponentValue(data, flags, row);\n }\n if (flags.noValidate && !flags.validateOnInit && !flags.fromIframe) {\n if (flags.fromSubmission && this.rootPristine && this.pristine && this.error && flags.changed) {\n this.checkComponentValidity(data, !!this.options.alwaysDirty, row, true);\n }\n return true;\n }\n var isDirty = false;\n\n // We need to set dirty if they explicitly set noValidate to false.\n if (this.options.alwaysDirty || flags.dirty) {\n isDirty = true;\n }\n\n // See if they explicitely set the values with setSubmission.\n if (flags.fromSubmission && this.hasValue(data)) {\n isDirty = true;\n }\n this.setDirty(isDirty);\n if (this.component.validateOn === 'blur' && flags.fromSubmission) {\n return true;\n }\n var isValid = this.checkComponentValidity(data, isDirty, row, flags);\n this.checkModal();\n return isValid;\n }\n }, {\n key: \"checkModal\",\n value: function checkModal() {\n var isValid = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n var dirty = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n if (!this.component.modalEdit || !this.componentModal) {\n return;\n }\n if (dirty && !isValid) {\n this.setErrorClasses([this.refs.openModal], dirty, !isValid, !!this.errors.length, this.refs.openModalWrapper);\n } else {\n this.clearErrorClasses(this.refs.openModalWrapper);\n }\n }\n }, {\n key: \"validationValue\",\n get: function get() {\n return this.dataValue;\n }\n }, {\n key: \"isEmpty\",\n value: function isEmpty() {\n var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.dataValue;\n var isEmptyArray = _lodash[\"default\"].isArray(value) && value.length === 1 ? _lodash[\"default\"].isEqual(value[0], this.emptyValue) : false;\n return value == null || value.length === 0 || _lodash[\"default\"].isEqual(value, this.emptyValue) || isEmptyArray;\n }\n }, {\n key: \"isEqual\",\n value: function isEqual(valueA) {\n var valueB = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.dataValue;\n return this.isEmpty(valueA) && this.isEmpty(valueB) || _lodash[\"default\"].isEqual(valueA, valueB);\n }\n\n /**\n * Check if a component is eligible for multiple validation\n *\n * @return {boolean}\n */\n }, {\n key: \"validateMultiple\",\n value: function validateMultiple() {\n return true;\n }\n }, {\n key: \"errors\",\n get: function get() {\n return this.error ? [this.error] : [];\n }\n }, {\n key: \"clearErrorClasses\",\n value: function clearErrorClasses() {\n var element = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.element;\n this.removeClass(element, this.options.componentErrorClass);\n this.removeClass(element, 'alert alert-danger');\n this.removeClass(element, 'has-error');\n this.removeClass(element, 'has-message');\n }\n }, {\n key: \"setInputWidgetErrorClasses\",\n value: function setInputWidgetErrorClasses(inputRefs, hasErrors) {\n if (!this.isInputComponent || !this.component.widget || !(inputRefs !== null && inputRefs !== void 0 && inputRefs.length)) {\n return;\n }\n inputRefs.forEach(function (input) {\n if (input !== null && input !== void 0 && input.widget && input.widget.setErrorClasses) {\n input.widget.setErrorClasses(hasErrors);\n }\n });\n }\n }, {\n key: \"addFocusBlurEvents\",\n value: function addFocusBlurEvents(element) {\n var _this18 = this;\n this.addEventListener(element, 'focus', function () {\n if (_this18.root.focusedComponent !== _this18) {\n if (_this18.root.pendingBlur) {\n _this18.root.pendingBlur();\n }\n _this18.root.focusedComponent = _this18;\n _this18.emit('focus', _this18);\n } else if (_this18.root.focusedComponent === _this18 && _this18.root.pendingBlur) {\n _this18.root.pendingBlur.cancel();\n _this18.root.pendingBlur = null;\n }\n });\n this.addEventListener(element, 'blur', function () {\n _this18.root.pendingBlur = FormioUtils.delay(function () {\n _this18.emit('blur', _this18);\n if (_this18.component.validateOn === 'blur') {\n _this18.root.triggerChange({\n fromBlur: true\n }, {\n instance: _this18,\n component: _this18.component,\n value: _this18.dataValue,\n flags: {\n fromBlur: true\n }\n });\n }\n _this18.root.focusedComponent = null;\n _this18.root.pendingBlur = null;\n });\n });\n }\n }, {\n key: \"setCustomValidity\",\n value: function setCustomValidity(messages, dirty, external) {\n var _this19 = this;\n var inputRefs = this.isInputComponent ? this.refs.input || [] : null;\n if (typeof messages === 'string' && messages) {\n messages = {\n level: 'error',\n message: messages\n };\n }\n if (!Array.isArray(messages)) {\n if (messages) {\n messages = [messages];\n } else {\n messages = [];\n }\n }\n var hasErrors = !!messages.filter(function (message) {\n return message.level === 'error';\n }).length;\n var invalidInputRefs = inputRefs;\n if (this.component.multiple) {\n var inputRefsArray = Array.from(inputRefs);\n inputRefsArray.forEach(function (input) {\n _this19.setElementInvalid(_this19.performInputMapping(input), false);\n });\n this.setInputWidgetErrorClasses(inputRefsArray, false);\n invalidInputRefs = inputRefsArray.filter(function (ref) {\n var _messages$some, _messages;\n return (_messages$some = (_messages = messages).some) === null || _messages$some === void 0 ? void 0 : _messages$some.call(_messages, function (msg) {\n var _msg$context;\n return (msg === null || msg === void 0 ? void 0 : (_msg$context = msg.context) === null || _msg$context === void 0 ? void 0 : _msg$context.input) === ref;\n });\n });\n }\n if (messages.length) {\n if (this.refs.messageContainer) {\n this.empty(this.refs.messageContainer);\n }\n this.error = {\n component: this.component,\n message: messages[0].message,\n messages: messages,\n external: !!external\n };\n this.emit('componentError', this.error);\n this.addMessages(messages, dirty, invalidInputRefs);\n if (invalidInputRefs) {\n this.setErrorClasses(invalidInputRefs, dirty, hasErrors, !!messages.length);\n }\n } else if (!this.error || this.error && this.error.external === !!external) {\n if (this.refs.messageContainer) {\n this.empty(this.refs.messageContainer);\n }\n if (this.refs.modalMessageContainer) {\n this.empty(this.refs.modalMessageContainer);\n }\n this.error = null;\n if (invalidInputRefs) {\n this.setErrorClasses(invalidInputRefs, dirty, hasErrors, !!messages.length);\n }\n this.clearErrorClasses();\n }\n\n // if (!this.refs.input) {\n // return;\n // }\n // this.refs.input.forEach(input => {\n // input = this.performInputMapping(input);\n // if (typeof input.setCustomValidity === 'function') {\n // input.setCustomValidity(message, dirty);\n // }\n // });\n }\n\n /**\n * Determines if the value of this component is hidden from the user as if it is coming from the server, but is\n * protected.\n *\n * @return {boolean|*}\n */\n }, {\n key: \"isValueHidden\",\n value: function isValueHidden() {\n if (this.component[\"protected\"] && this.root.editing) {\n return false;\n }\n if (!this.root || !this.root.hasOwnProperty('editing')) {\n return false;\n }\n if (!this.root || !this.root.editing) {\n return false;\n }\n return this.component[\"protected\"] || !this.component.persistent || this.component.persistent === 'client-only';\n }\n }, {\n key: \"shouldSkipValidation\",\n value: function shouldSkipValidation(data, dirty, row) {\n var _this20 = this;\n var rules = [\n // Do not check custom validation for empty data if it is not required\n function () {\n return _this20.component.validate.custom && !_this20.dataValue && !_this20.component.validate.required;\n },\n // Force valid if component is read-only\n function () {\n return _this20.options.readOnly;\n },\n // Do not check validations if component is not an input component.\n function () {\n return !_this20.hasInput;\n },\n // Check to see if we are editing and if so, check component persistence.\n function () {\n return _this20.isValueHidden();\n },\n // Force valid if component is hidden.\n function () {\n return !_this20.visible;\n },\n // Force valid if component is conditionally hidden.\n function () {\n return !_this20.checkCondition(row, data);\n }];\n return rules.some(function (pred) {\n return pred();\n });\n }\n\n // Maintain reverse compatibility.\n }, {\n key: \"whenReady\",\n value: function whenReady() {\n console.warn('The whenReady() method has been deprecated. Please use the dataReady property instead.');\n return this.dataReady;\n }\n }, {\n key: \"dataReady\",\n get: function get() {\n return _nativePromiseOnly[\"default\"].resolve();\n }\n\n /**\n * Prints out the value of this component as a string value.\n */\n }, {\n key: \"asString\",\n value: function asString(value) {\n value = value || this.getValue();\n return (Array.isArray(value) ? value : [value]).map(_lodash[\"default\"].toString).join(', ');\n }\n\n /**\n * Return if the component is disabled.\n * @return {boolean}\n */\n }, {\n key: \"disabled\",\n get: function get() {\n return this._disabled || this.parentDisabled;\n }\n\n /**\n * Disable this component.\n *\n * @param {boolean} disabled\n */,\n set: function set(disabled) {\n this._disabled = disabled;\n }\n }, {\n key: \"setDisabled\",\n value: function setDisabled(element, disabled) {\n if (!element) {\n return;\n }\n element.disabled = disabled;\n if (disabled) {\n element.setAttribute('disabled', 'disabled');\n } else {\n element.removeAttribute('disabled');\n }\n }\n }, {\n key: \"setLoading\",\n value: function setLoading(element, loading) {\n if (!element || element.loading === loading) {\n return;\n }\n element.loading = loading;\n if (!element.loader && loading) {\n element.loader = this.ce('i', {\n \"class\": \"\".concat(this.iconClass('refresh', true), \" button-icon-right\")\n });\n }\n if (element.loader) {\n if (loading) {\n this.appendTo(element.loader, element);\n } else {\n this.removeChildFrom(element.loader, element);\n }\n }\n }\n }, {\n key: \"selectOptions\",\n value: function selectOptions(select, tag, options, defaultValue) {\n var _this21 = this;\n _lodash[\"default\"].each(options, function (option) {\n var attrs = {\n value: option.value\n };\n if (defaultValue !== undefined && option.value === defaultValue) {\n attrs.selected = 'selected';\n }\n var optionElement = _this21.ce('option', attrs);\n optionElement.appendChild(_this21.text(option.label));\n select.appendChild(optionElement);\n });\n }\n }, {\n key: \"setSelectValue\",\n value: function setSelectValue(select, value) {\n var options = select.querySelectorAll('option');\n _lodash[\"default\"].each(options, function (option) {\n if (option.value === value) {\n option.setAttribute('selected', 'selected');\n } else {\n option.removeAttribute('selected');\n }\n });\n if (select.onchange) {\n select.onchange();\n }\n if (select.onselect) {\n select.onselect();\n }\n }\n }, {\n key: \"getRelativePath\",\n value: function getRelativePath(path) {\n var keyPart = \".\".concat(this.key);\n var thisPath = this.isInputComponent ? this.path : this.path.slice(0).replace(keyPart, '');\n return path.replace(thisPath, '');\n }\n }, {\n key: \"clear\",\n value: function clear() {\n this.detach();\n this.empty(this.getElement());\n }\n }, {\n key: \"append\",\n value: function append(element) {\n this.appendTo(element, this.element);\n }\n }, {\n key: \"prepend\",\n value: function prepend(element) {\n this.prependTo(element, this.element);\n }\n }, {\n key: \"removeChild\",\n value: function removeChild(element) {\n this.removeChildFrom(element, this.element);\n }\n }, {\n key: \"detachLogic\",\n value: function detachLogic() {\n var _this22 = this;\n this.logic.forEach(function (logic) {\n if (logic.trigger.type === 'event') {\n var event = _this22.interpolate(logic.trigger.event);\n _this22.off(event); // only applies to callbacks on this component\n }\n });\n }\n }, {\n key: \"attachLogic\",\n value: function attachLogic() {\n var _this23 = this;\n // Do not attach logic during builder mode.\n if (this.builderMode) {\n return;\n }\n this.logic.forEach(function (logic) {\n if (logic.trigger.type === 'event') {\n var event = _this23.interpolate(logic.trigger.event);\n _this23.on(event, function () {\n var newComponent = (0, FormioUtils.fastCloneDeep)(_this23.originalComponent);\n for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n args[_key4] = arguments[_key4];\n }\n if (_this23.applyActions(newComponent, logic.actions, args)) {\n // If component definition changed, replace it.\n if (!_lodash[\"default\"].isEqual(_this23.component, newComponent)) {\n _this23.component = newComponent;\n var visible = _this23.conditionallyVisible(null, null);\n var disabled = _this23.shouldDisabled;\n\n // Change states which won't be recalculated during redrawing\n if (_this23.visible !== visible) {\n _this23.visible = visible;\n }\n if (_this23.disabled !== disabled) {\n _this23.disabled = disabled;\n }\n _this23.redraw();\n }\n }\n }, true);\n }\n });\n }\n\n /**\n * Get the element information.\n */\n }, {\n key: \"elementInfo\",\n value: function elementInfo() {\n var attributes = {\n name: this.options.name,\n type: this.component.inputType || 'text',\n \"class\": 'form-control',\n lang: this.options.language\n };\n if (this.component.placeholder) {\n attributes.placeholder = this.t(this.component.placeholder, {\n _userInput: true\n });\n }\n if (this.component.tabindex) {\n attributes.tabindex = this.component.tabindex;\n }\n if (this.disabled) {\n attributes.disabled = 'disabled';\n }\n _lodash[\"default\"].defaults(attributes, this.component.attributes);\n return {\n type: 'input',\n component: this.component,\n changeEvent: 'change',\n attr: attributes\n };\n }\n }, {\n key: \"autofocus\",\n value: function autofocus() {\n var _this24 = this;\n var hasAutofocus = this.component.autofocus && !this.builderMode && !this.options.preview;\n if (hasAutofocus) {\n this.on('render', function () {\n return _this24.focus();\n }, true);\n }\n }\n }, {\n key: \"scrollIntoView\",\n value: function scrollIntoView() {\n var element = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.element;\n if (!element) {\n return;\n }\n var _element$getBoundingC = element.getBoundingClientRect(),\n left = _element$getBoundingC.left,\n top = _element$getBoundingC.top;\n window.scrollTo(left + window.scrollX, top + window.scrollY);\n }\n }, {\n key: \"focus\",\n value: function focus(index) {\n var _this$refs$input2;\n if ('beforeFocus' in this.parent) {\n this.parent.beforeFocus(this);\n }\n if ((_this$refs$input2 = this.refs.input) !== null && _this$refs$input2 !== void 0 && _this$refs$input2.length) {\n var _this$component$widge;\n var focusingInput = typeof index === 'number' && this.refs.input[index] ? this.refs.input[index] : this.refs.input[this.refs.input.length - 1];\n if (((_this$component$widge = this.component.widget) === null || _this$component$widge === void 0 ? void 0 : _this$component$widge.type) === 'calendar') {\n var sibling = focusingInput.nextSibling;\n if (sibling) {\n sibling.focus();\n }\n } else {\n focusingInput.focus();\n }\n }\n if (this.refs.openModal) {\n this.refs.openModal.focus();\n }\n if (this.parent.refs.openModal) {\n this.parent.refs.openModal.focus();\n }\n }\n\n /**\n * Get `Formio` instance for working with files\n */\n }, {\n key: \"fileService\",\n get: function get() {\n if (this.options.fileService) {\n return this.options.fileService;\n }\n if (this.options.formio) {\n return this.options.formio;\n }\n if (this.root && this.root.formio) {\n return this.root.formio;\n }\n var formio = new _Formio.GlobalFormio();\n // If a form is loaded, then make sure to set the correct formUrl.\n if (this.root && this.root._form && this.root._form._id) {\n formio.formUrl = \"\".concat(formio.projectUrl, \"/form/\").concat(this.root._form._id);\n }\n return formio;\n }\n }, {\n key: \"resetCaches\",\n value: function resetCaches() {}\n }, {\n key: \"previewMode\",\n get: function get() {\n return false;\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len5 = arguments.length, sources = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {\n sources[_key5] = arguments[_key5];\n }\n return _lodash[\"default\"].merge.apply(_lodash[\"default\"], [{\n /**\n * Determines if this component provides an input.\n */\n input: true,\n /**\n * The data key for this component (how the data is stored in the database).\n */\n key: '',\n /**\n * The input placeholder for this component.\n */\n placeholder: '',\n /**\n * The input prefix\n */\n prefix: '',\n /**\n * The custom CSS class to provide to this component.\n */\n customClass: '',\n /**\n * The input suffix.\n */\n suffix: '',\n /**\n * If this component should allow an array of values to be captured.\n */\n multiple: false,\n /**\n * The default value of this component.\n */\n defaultValue: null,\n /**\n * If the data of this component should be protected (no GET api requests can see the data)\n */\n \"protected\": false,\n /**\n * Validate if the value of this component should be unique within the form.\n */\n unique: false,\n /**\n * If the value of this component should be persisted within the backend api database.\n */\n persistent: true,\n /**\n * Determines if the component should be within the form, but not visible.\n */\n hidden: false,\n /**\n * If the component should be cleared when hidden.\n */\n clearOnHide: true,\n /**\n * This will refresh this component options when this field changes.\n */\n refreshOn: '',\n /**\n * This will redraw the component when this field changes.\n */\n redrawOn: '',\n /**\n * If this component should be included as a column within a submission table.\n */\n tableView: false,\n /**\n * If this component should be rendering in modal.\n */\n modalEdit: false,\n /**\n * The input label provided to this component.\n */\n label: '',\n dataGridLabel: false,\n labelPosition: 'top',\n description: '',\n errorLabel: '',\n tooltip: '',\n hideLabel: false,\n tabindex: '',\n disabled: false,\n autofocus: false,\n dbIndex: false,\n customDefaultValue: '',\n calculateValue: '',\n calculateServer: false,\n widget: null,\n /**\n * Attributes that will be assigned to the input elements of this component.\n */\n attributes: {},\n /**\n * This will perform the validation on either \"change\" or \"blur\" of the input element.\n */\n validateOn: 'change',\n /**\n * The validation criteria for this component.\n */\n validate: {\n /**\n * If this component is required.\n */\n required: false,\n /**\n * Custom JavaScript validation.\n */\n custom: '',\n /**\n * If the custom validation should remain private (only the backend will see it and execute it).\n */\n customPrivate: false,\n /**\n * If this component should implement a strict date validation if the Calendar widget is implemented.\n */\n strictDateValidation: false,\n multiple: false,\n unique: false\n },\n /**\n * The simple conditional settings for a component.\n */\n conditional: {\n show: null,\n when: null,\n eq: ''\n },\n overlay: {\n style: '',\n left: '',\n top: '',\n width: '',\n height: ''\n },\n allowCalculateOverride: false,\n encrypted: false,\n showCharCount: false,\n showWordCount: false,\n properties: {},\n allowMultipleMasks: false,\n addons: []\n }].concat(sources));\n }\n\n /**\n * Return the validator as part of the component.\n *\n * @return {ValidationChecker}\n * @constructor\n */\n }, {\n key: \"Validator\",\n get: function get() {\n return _Validator[\"default\"];\n }\n\n /**\n * Provides a table view for this component. Override if you wish to do something different than using getView\n * method of your instance.\n *\n * @param value\n * @param options\n */\n /* eslint-disable no-unused-vars */\n }, {\n key: \"tableView\",\n value: function tableView(value, options) {}\n }]);\n return Component;\n}(_Element2[\"default\"]);\nexports[\"default\"] = Component;\nComponent.externalLibraries = {};\nComponent.requireLibrary = function (name, property, src, polling) {\n if (!Component.externalLibraries.hasOwnProperty(name)) {\n Component.externalLibraries[name] = {};\n Component.externalLibraries[name].ready = new _nativePromiseOnly[\"default\"](function (resolve, reject) {\n Component.externalLibraries[name].resolve = resolve;\n Component.externalLibraries[name].reject = reject;\n });\n var callbackName = \"\".concat(name, \"Callback\");\n if (!polling && !window[callbackName]) {\n window[callbackName] = function () {\n this.resolve();\n }.bind(Component.externalLibraries[name]);\n }\n // See if the plugin already exists.\n var plugin = _lodash[\"default\"].get(window, property);\n if (plugin) {\n Component.externalLibraries[name].resolve(plugin);\n } else {\n src = Array.isArray(src) ? src : [src];\n src.forEach(function (lib) {\n var attrs = {};\n var 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 };\n break;\n case 'styles':\n elementType = 'link';\n attrs = {\n href: lib.src,\n rel: 'stylesheet'\n };\n break;\n }\n\n // Add the script to the top page.\n var script = document.createElement(elementType);\n for (var attr in attrs) {\n script.setAttribute(attr, attrs[attr]);\n }\n document.getElementsByTagName('head')[0].appendChild(script);\n });\n\n // if no callback is provided, then check periodically for the script.\n if (polling) {\n setTimeout(function checkLibrary() {\n var plugin = _lodash[\"default\"].get(window, property);\n if (plugin) {\n Component.externalLibraries[name].resolve(plugin);\n } else {\n // check again after 200 ms.\n setTimeout(checkLibrary, 200);\n }\n }, 200);\n }\n }\n }\n return Component.externalLibraries[name].ready;\n};\nComponent.libraryReady = function (name) {\n if (Component.externalLibraries.hasOwnProperty(name) && Component.externalLibraries[name].ready) {\n return Component.externalLibraries[name].ready;\n }\n return _nativePromiseOnly[\"default\"].reject(\"\".concat(name, \" library was not required.\"));\n};\n\n//# sourceURL=webpack://Formio/./lib/components/_classes/component/Component.js?"); /***/ }), @@ -254,10 +254,10 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /*!**************************************************************************!*\ !*** ./lib/components/_classes/component/editForm/Component.edit.api.js ***! \**************************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n weight: 0,\n type: 'textfield',\n input: true,\n key: 'key',\n label: 'Property Name',\n tooltip: 'The name of this field in the API endpoint.',\n validate: {\n pattern: '(\\\\w|\\\\w[\\\\w-.]*\\\\w)',\n patternMessage: 'The property name must only contain alphanumeric characters, underscores, dots and dashes and should not be ended by dash or dot.',\n required: true\n }\n}, {\n weight: 100,\n type: 'tags',\n input: true,\n label: 'Field Tags',\n storeas: 'array',\n tooltip: 'Tag the field for use in custom logic.',\n key: 'tags'\n}, {\n weight: 200,\n type: 'datamap',\n label: 'Custom Properties',\n tooltip: 'This allows you to configure any custom properties for this component.',\n key: 'properties',\n valueComponent: {\n type: 'textfield',\n key: 'value',\n label: 'Value',\n placeholder: 'Value',\n input: true\n }\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/_classes/component/editForm/Component.edit.api.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n weight: 0,\n type: 'textfield',\n input: true,\n key: 'key',\n label: 'Property Name',\n tooltip: 'The name of this field in the API endpoint.',\n validate: {\n pattern: '(\\\\w|\\\\w[\\\\w-.]*\\\\w)',\n patternMessage: 'The property name must only contain alphanumeric characters, underscores, dots and dashes and should not be ended by dash or dot.',\n required: true\n }\n}, {\n weight: 100,\n type: 'tags',\n input: true,\n label: 'Field Tags',\n storeas: 'array',\n tooltip: 'Tag the field for use in custom logic.',\n key: 'tags'\n}, {\n weight: 200,\n type: 'datamap',\n label: 'Custom Properties',\n tooltip: 'This allows you to configure any custom properties for this component.',\n key: 'properties',\n valueComponent: {\n type: 'textfield',\n key: 'value',\n label: 'Value',\n placeholder: 'Value',\n input: true\n }\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/_classes/component/editForm/Component.edit.api.js?"); /***/ }), @@ -268,7 +268,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _utils = _interopRequireDefault(__webpack_require__(/*! ./utils */ \"./lib/components/_classes/component/editForm/utils.js\"));\n\nvar _utils2 = __webpack_require__(/*! ../../../../utils/utils */ \"./lib/utils/utils.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/* eslint-disable quotes, max-len */\nvar _default = [{\n type: 'panel',\n title: 'Simple',\n key: 'simple-conditional',\n theme: 'default',\n components: [{\n type: 'select',\n input: true,\n label: 'This component should Display:',\n key: 'conditional.show',\n dataSrc: 'values',\n data: {\n values: [{\n label: 'True',\n value: 'true'\n }, {\n label: 'False',\n value: 'false'\n }]\n }\n }, {\n type: 'select',\n input: true,\n label: 'When the form component:',\n key: 'conditional.when',\n dataSrc: 'custom',\n valueProperty: 'value',\n data: {\n custom: function custom(context) {\n return (0, _utils2.getContextComponents)(context);\n }\n }\n }, {\n type: 'textfield',\n input: true,\n label: 'Has the value:',\n key: 'conditional.eq'\n }]\n}, _utils.default.javaScriptValue('Advanced Conditions', 'customConditional', 'conditional.json', 110, '

You must assign the show variable a boolean result.

' + '

Note: Advanced Conditional logic will override the results of the Simple Conditional logic.

' + '
Example
show = !!data.showMe;
', '

Click here for an example

')];\n/* eslint-enable quotes, max-len */\n\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/_classes/component/editForm/Component.edit.conditional.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _utils = _interopRequireDefault(__webpack_require__(/*! ./utils */ \"./lib/components/_classes/component/editForm/utils.js\"));\nvar _utils2 = __webpack_require__(/*! ../../../../utils/utils */ \"./lib/utils/utils.js\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n/* eslint-disable quotes, max-len */\nvar _default = [{\n type: 'panel',\n title: 'Simple',\n key: 'simple-conditional',\n theme: 'default',\n weight: 105,\n components: [{\n type: 'select',\n input: true,\n label: 'This component should Display:',\n key: 'conditional.show',\n dataSrc: 'values',\n data: {\n values: [{\n label: 'True',\n value: 'true'\n }, {\n label: 'False',\n value: 'false'\n }]\n }\n }, {\n type: 'select',\n input: true,\n label: 'When the form component:',\n key: 'conditional.when',\n dataSrc: 'custom',\n valueProperty: 'value',\n data: {\n custom: function custom(context) {\n return (0, _utils2.getContextComponents)(context);\n }\n }\n }, {\n type: 'textfield',\n input: true,\n label: 'Has the value:',\n key: 'conditional.eq'\n }]\n}, _utils[\"default\"].javaScriptValue('Advanced Conditions', 'customConditional', 'conditional.json', 110, '

You must assign the show variable a boolean result.

' + '

Note: Advanced Conditional logic will override the results of the Simple Conditional logic.

' + '
Example
show = !!data.showMe;
', '

Click here for an example

')];\n/* eslint-enable quotes, max-len */\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/_classes/component/editForm/Component.edit.conditional.js?"); /***/ }), @@ -279,7 +279,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _utils = _interopRequireDefault(__webpack_require__(/*! ./utils */ \"./lib/components/_classes/component/editForm/utils.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/* eslint-disable max-len */\nvar _default = [{\n weight: 0,\n type: 'checkbox',\n label: 'Multiple Values',\n tooltip: 'Allows multiple values to be entered for this field.',\n key: 'multiple',\n input: true\n}, {\n type: 'textfield',\n label: 'Default Value',\n key: 'defaultValue',\n weight: 5,\n placeholder: 'Default Value',\n tooltip: 'The Default Value will be the value for this field, before user interaction. Having a default value will override the placeholder text.',\n input: true\n}, {\n weight: 30,\n type: 'radio',\n label: 'Persistent',\n tooltip: 'A persistent field will be stored in database when the form is submitted.',\n key: 'persistent',\n input: true,\n inline: true,\n defaultValue: true,\n values: [{\n label: 'None',\n value: false\n }, {\n label: 'Server',\n value: true\n }, {\n label: 'Client',\n value: 'client-only'\n }]\n}, {\n weight: 150,\n type: 'checkbox',\n label: 'Protected',\n tooltip: 'A protected field will not be returned when queried via API.',\n key: 'protected',\n input: true\n}, {\n type: 'checkbox',\n input: true,\n weight: 200,\n key: 'dbIndex',\n label: 'Database Index',\n tooltip: 'Set this field as an index within the database. Increases performance for submission queries.'\n}, {\n weight: 400,\n type: 'checkbox',\n label: 'Encrypted (Enterprise Only)',\n tooltip: 'Encrypt this field on the server. This is two way encryption which is not suitable for passwords.',\n key: 'encrypted',\n input: true,\n logic: [{\n name: 'disabled',\n trigger: {\n type: 'javascript',\n javascript: 'result = !instance.root.options.sac;'\n },\n actions: [{\n name: 'disabled',\n type: 'property',\n property: {\n label: 'Disabled',\n value: 'disabled',\n type: 'boolean'\n },\n state: true\n }]\n }, {\n name: 'disabledToolTip',\n trigger: {\n type: 'javascript',\n javascript: 'result = !instance.root.options.sac;'\n },\n actions: [{\n name: 'addDisabledTooltip',\n type: 'property',\n property: {\n label: 'Tooltip',\n value: 'tooltip',\n type: 'string'\n },\n text: 'Encryption is not available with your current plan. Please contact sales@form.io.'\n }]\n }]\n}, {\n type: 'select',\n input: true,\n key: 'redrawOn',\n label: 'Redraw On',\n weight: 600,\n tooltip: 'Redraw this component if another component changes. This is useful if interpolating parts of the component like the label.',\n dataSrc: 'custom',\n valueProperty: 'value',\n data: {\n custom: function custom(context) {\n var values = [];\n values.push({\n label: 'Any Change',\n value: 'data'\n });\n context.utils.eachComponent(context.instance.options.editForm.components, function (component, path) {\n if (component.key !== context.data.key) {\n values.push({\n label: component.label || component.key,\n value: path\n });\n }\n });\n return values;\n }\n },\n conditional: {\n json: {\n '!': [{\n var: 'data.dataSrc'\n }]\n }\n }\n}, {\n weight: 700,\n type: 'checkbox',\n label: 'Clear Value When Hidden',\n key: 'clearOnHide',\n defaultValue: true,\n tooltip: 'When a field is hidden, clear the value.',\n input: true,\n clearOnHide: false,\n calculateValue: 'value = data.hidden ? false : value',\n conditional: {\n json: {\n '!': [{\n var: 'data.hidden'\n }]\n }\n }\n}, _utils.default.javaScriptValue('Custom Default Value', 'customDefaultValue', 'customDefaultValue', 1000, '

Example:

value = data.firstName + \" \" + data.lastName;

', '

Example:

{\"cat\": [{\"var\": \"data.firstName\"}, \" \", {\"var\": \"data.lastName\"}]}
'), _utils.default.javaScriptValue('Calculated Value', 'calculateValue', 'calculateValue', 1100, '

Example:

value = data.a + data.b + data.c;

', '

Example:

{\"+\": [{\"var\": \"data.a\"}, {\"var\": \"data.b\"}, {\"var\": \"data.c\"}]}

Click here for an example

', 'tokenThe decoded JWT token for the authenticated user.'), {\n type: 'checkbox',\n input: true,\n weight: 1100,\n key: 'calculateServer',\n label: 'Calculate Value on server',\n tooltip: 'Checking this will run the calculation on the server. This is useful if you wish to override the values submitted with the calculations performed on the server.'\n}, {\n type: 'checkbox',\n input: true,\n weight: 1200,\n key: 'allowCalculateOverride',\n label: 'Allow Manual Override of Calculated Value',\n tooltip: 'When checked, this will allow the user to manually override the calculated value.'\n}];\n/* eslint-enable max-len */\n\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/_classes/component/editForm/Component.edit.data.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _utils = _interopRequireDefault(__webpack_require__(/*! ./utils */ \"./lib/components/_classes/component/editForm/utils.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n/* eslint-disable max-len */\nvar _default = [{\n weight: 0,\n type: 'checkbox',\n label: 'Multiple Values',\n tooltip: 'Allows multiple values to be entered for this field.',\n key: 'multiple',\n input: true\n}, {\n type: 'textfield',\n label: 'Default Value',\n key: 'defaultValue',\n weight: 5,\n placeholder: 'Default Value',\n tooltip: 'The Default Value will be the value for this field, before user interaction. Having a default value will override the placeholder text.',\n input: true\n}, {\n weight: 30,\n type: 'radio',\n label: 'Persistent',\n tooltip: 'A persistent field will be stored in database when the form is submitted.',\n key: 'persistent',\n input: true,\n inline: true,\n defaultValue: true,\n values: [{\n label: 'None',\n value: false\n }, {\n label: 'Server',\n value: true\n }, {\n label: 'Client',\n value: 'client-only'\n }]\n}, {\n weight: 150,\n type: 'checkbox',\n label: 'Protected',\n tooltip: 'A protected field will not be returned when queried via API.',\n key: 'protected',\n input: true\n}, {\n type: 'checkbox',\n input: true,\n weight: 200,\n key: 'dbIndex',\n label: 'Database Index',\n tooltip: 'Set this field as an index within the database. Increases performance for submission queries.'\n}, {\n weight: 400,\n type: 'checkbox',\n label: 'Encrypted',\n tooltip: 'Encrypt this field on the server. This is two way encryption which is not suitable for passwords.',\n key: 'encrypted',\n input: true,\n logic: [{\n name: 'disabled',\n trigger: {\n type: 'javascript',\n javascript: 'result = !instance.root.options.sac;'\n },\n actions: [{\n name: 'disabled',\n type: 'property',\n property: {\n label: 'Disabled',\n value: 'disabled',\n type: 'boolean'\n },\n state: true\n }]\n }, {\n name: 'disabledToolTip',\n trigger: {\n type: 'javascript',\n javascript: 'result = !instance.root.options.sac;'\n },\n actions: [{\n name: 'addDisabledTooltip',\n type: 'property',\n property: {\n label: 'Tooltip',\n value: 'tooltip',\n type: 'string'\n },\n text: 'Only available with Security Module. Contact sales@form.io for more information.'\n }]\n }]\n}, {\n type: 'select',\n input: true,\n key: 'redrawOn',\n label: 'Redraw On',\n weight: 600,\n tooltip: 'Redraw this component if another component changes. This is useful if interpolating parts of the component like the label.',\n dataSrc: 'custom',\n valueProperty: 'value',\n data: {\n custom: function custom(context) {\n var values = [];\n values.push({\n label: 'Any Change',\n value: 'data'\n });\n context.utils.eachComponent(context.instance.options.editForm.components, function (component, path) {\n if (component.key !== context.data.key) {\n values.push({\n label: component.label || component.key,\n value: path\n });\n }\n });\n return values;\n }\n },\n conditional: {\n json: {\n '!': [{\n \"var\": 'data.dataSrc'\n }]\n }\n }\n}, {\n weight: 700,\n type: 'checkbox',\n label: 'Clear Value When Hidden',\n key: 'clearOnHide',\n defaultValue: true,\n tooltip: 'When a field is hidden, clear the value.',\n input: true\n}, _utils[\"default\"].javaScriptValue('Custom Default Value', 'customDefaultValue', 'customDefaultValue', 1000, '

Example:

value = data.firstName + \" \" + data.lastName;

', '

Example:

{\"cat\": [{\"var\": \"data.firstName\"}, \" \", {\"var\": \"data.lastName\"}]}
'), _utils[\"default\"].javaScriptValue('Calculated Value', 'calculateValue', 'calculateValue', 1100, '

Example:

value = data.a + data.b + data.c;

', '

Example:

{\"+\": [{\"var\": \"data.a\"}, {\"var\": \"data.b\"}, {\"var\": \"data.c\"}]}

Click here for an example

', 'tokenThe decoded JWT token for the authenticated user.'), {\n type: 'checkbox',\n input: true,\n weight: 1100,\n key: 'calculateServer',\n label: 'Calculate Value on server',\n tooltip: 'Checking this will run the calculation on the server. This is useful if you wish to override the values submitted with the calculations performed on the server.'\n}, {\n type: 'checkbox',\n input: true,\n weight: 1200,\n key: 'allowCalculateOverride',\n label: 'Allow Manual Override of Calculated Value',\n tooltip: 'When checked, this will allow the user to manually override the calculated value.'\n}];\n/* eslint-enable max-len */\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/_classes/component/editForm/Component.edit.data.js?"); /***/ }), @@ -290,7 +290,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.regexp.flags.js */ \"./node_modules/core-js/modules/es.regexp.flags.js\");\n\n/* eslint-disable max-len */\nvar _default = [{\n weight: 0,\n type: 'textfield',\n input: true,\n key: 'label',\n label: 'Label',\n placeholder: 'Field Label',\n tooltip: 'The label for this field that will appear next to it.',\n validate: {\n required: true\n }\n}, {\n type: 'select',\n input: true,\n key: 'labelPosition',\n label: 'Label Position',\n tooltip: 'Position for the label for this field.',\n weight: 20,\n defaultValue: 'top',\n dataSrc: 'values',\n data: {\n values: [{\n label: 'Top',\n value: 'top'\n }, {\n label: 'Left (Left-aligned)',\n value: 'left-left'\n }, {\n label: 'Left (Right-aligned)',\n value: 'left-right'\n }, {\n label: 'Right (Left-aligned)',\n value: 'right-left'\n }, {\n label: 'Right (Right-aligned)',\n value: 'right-right'\n }, {\n label: 'Bottom',\n value: 'bottom'\n }]\n }\n}, {\n type: 'number',\n input: true,\n key: 'labelWidth',\n label: 'Label Width',\n tooltip: 'The width of label on line in percentages.',\n clearOnHide: false,\n weight: 30,\n placeholder: '30',\n suffix: '%',\n validate: {\n min: 0,\n max: 100\n },\n conditional: {\n json: {\n and: [{\n '!==': [{\n var: 'data.labelPosition'\n }, 'top']\n }, {\n '!==': [{\n var: 'data.labelPosition'\n }, 'bottom']\n }]\n }\n }\n}, {\n type: 'number',\n input: true,\n key: 'labelMargin',\n label: 'Label Margin',\n tooltip: 'The width of label margin on line in percentages.',\n clearOnHide: false,\n weight: 30,\n placeholder: '3',\n suffix: '%',\n validate: {\n min: 0,\n max: 100\n },\n conditional: {\n json: {\n and: [{\n '!==': [{\n var: 'data.labelPosition'\n }, 'top']\n }, {\n '!==': [{\n var: 'data.labelPosition'\n }, 'bottom']\n }]\n }\n }\n}, {\n weight: 100,\n type: 'textfield',\n input: true,\n key: 'placeholder',\n label: 'Placeholder',\n placeholder: 'Placeholder',\n tooltip: 'The placeholder text that will appear when this field is empty.'\n}, {\n weight: 200,\n type: 'textarea',\n input: true,\n key: 'description',\n label: 'Description',\n placeholder: 'Description for this field.',\n tooltip: 'The description is text that will appear below the input field.',\n editor: 'ace',\n as: 'html',\n wysiwyg: {\n minLines: 3,\n isUseWorkerDisabled: true\n }\n}, {\n weight: 300,\n type: 'textarea',\n input: true,\n key: 'tooltip',\n label: 'Tooltip',\n placeholder: 'To add a tooltip to this field, enter text here.',\n tooltip: 'Adds a tooltip to the side of this field.',\n editor: 'ace',\n as: 'html',\n wysiwyg: {\n minLines: 3,\n isUseWorkerDisabled: true\n }\n}, {\n weight: 500,\n type: 'textfield',\n input: true,\n key: 'customClass',\n label: 'Custom CSS Class',\n placeholder: 'Custom CSS Class',\n tooltip: 'Custom CSS class to add to this component.'\n}, {\n weight: 600,\n type: 'textfield',\n input: true,\n key: 'tabindex',\n label: 'Tab Index',\n placeholder: '0',\n tooltip: 'Sets the tabindex attribute of this component to override the tab order of the form. See the MDN documentation on tabindex for more information.'\n}, {\n weight: 1100,\n type: 'checkbox',\n label: 'Hidden',\n tooltip: 'A hidden field is still a part of the form, but is hidden from view.',\n key: 'hidden',\n input: true\n}, {\n weight: 1200,\n type: 'checkbox',\n label: 'Hide Label',\n tooltip: 'Hide the label (title, if no label) of this component. This allows you to show the label in the form builder, but not when it is rendered.',\n key: 'hideLabel',\n input: true\n}, {\n weight: 1350,\n type: 'checkbox',\n label: 'Initial Focus',\n tooltip: 'Make this field the initially focused element on this form.',\n key: 'autofocus',\n input: true\n}, {\n weight: 1370,\n type: 'checkbox',\n label: 'Show Label in DataGrid',\n tooltip: 'Show the label when in a Datagrid.',\n key: 'dataGridLabel',\n input: true,\n customConditional: function customConditional(context) {\n var _context$instance$opt, _context$instance$opt2;\n\n return (_context$instance$opt = context.instance.options) === null || _context$instance$opt === void 0 ? void 0 : (_context$instance$opt2 = _context$instance$opt.flags) === null || _context$instance$opt2 === void 0 ? void 0 : _context$instance$opt2.inDataGrid;\n }\n}, {\n weight: 1400,\n type: 'checkbox',\n label: 'Disabled',\n tooltip: 'Disable the form input.',\n key: 'disabled',\n input: true\n}, {\n weight: 1500,\n type: 'checkbox',\n label: 'Table View',\n tooltip: 'Shows this value within the table view of the submissions.',\n key: 'tableView',\n input: true\n}, {\n weight: 1600,\n type: 'checkbox',\n label: 'Modal Edit',\n tooltip: 'Opens up a modal to edit the value of this component.',\n key: 'modalEdit',\n input: true\n}];\n/* eslint-enable max-len */\n\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/_classes/component/editForm/Component.edit.display.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.regexp.flags.js */ \"./node_modules/core-js/modules/es.regexp.flags.js\");\n/* eslint-disable max-len */\nvar _default = [{\n weight: 0,\n type: 'textfield',\n input: true,\n key: 'label',\n label: 'Label',\n placeholder: 'Field Label',\n tooltip: 'The label for this field that will appear next to it.',\n validate: {\n required: true\n },\n autofocus: true\n}, {\n type: 'select',\n input: true,\n key: 'labelPosition',\n label: 'Label Position',\n tooltip: 'Position for the label for this field.',\n weight: 20,\n defaultValue: 'top',\n dataSrc: 'values',\n data: {\n values: [{\n label: 'Top',\n value: 'top'\n }, {\n label: 'Left (Left-aligned)',\n value: 'left-left'\n }, {\n label: 'Left (Right-aligned)',\n value: 'left-right'\n }, {\n label: 'Right (Left-aligned)',\n value: 'right-left'\n }, {\n label: 'Right (Right-aligned)',\n value: 'right-right'\n }, {\n label: 'Bottom',\n value: 'bottom'\n }]\n }\n}, {\n type: 'number',\n input: true,\n key: 'labelWidth',\n label: 'Label Width',\n tooltip: 'The width of label on line in percentages.',\n clearOnHide: false,\n weight: 30,\n placeholder: '30',\n suffix: '%',\n validate: {\n min: 0,\n max: 100\n },\n conditional: {\n json: {\n and: [{\n '!==': [{\n \"var\": 'data.labelPosition'\n }, 'top']\n }, {\n '!==': [{\n \"var\": 'data.labelPosition'\n }, 'bottom']\n }]\n }\n }\n}, {\n type: 'number',\n input: true,\n key: 'labelMargin',\n label: 'Label Margin',\n tooltip: 'The width of label margin on line in percentages.',\n clearOnHide: false,\n weight: 30,\n placeholder: '3',\n suffix: '%',\n validate: {\n min: 0,\n max: 100\n },\n conditional: {\n json: {\n and: [{\n '!==': [{\n \"var\": 'data.labelPosition'\n }, 'top']\n }, {\n '!==': [{\n \"var\": 'data.labelPosition'\n }, 'bottom']\n }]\n }\n }\n}, {\n weight: 100,\n type: 'textfield',\n input: true,\n key: 'placeholder',\n label: 'Placeholder',\n placeholder: 'Placeholder',\n tooltip: 'The placeholder text that will appear when this field is empty.'\n}, {\n weight: 200,\n type: 'textarea',\n input: true,\n key: 'description',\n label: 'Description',\n placeholder: 'Description for this field.',\n tooltip: 'The description is text that will appear below the input field.',\n editor: 'ace',\n as: 'html',\n wysiwyg: {\n minLines: 3,\n isUseWorkerDisabled: true\n }\n}, {\n weight: 300,\n type: 'textarea',\n input: true,\n key: 'tooltip',\n label: 'Tooltip',\n placeholder: 'To add a tooltip to this field, enter text here.',\n tooltip: 'Adds a tooltip to the side of this field.',\n editor: 'ace',\n as: 'html',\n wysiwyg: {\n minLines: 3,\n isUseWorkerDisabled: true\n }\n}, {\n weight: 500,\n type: 'textfield',\n input: true,\n key: 'customClass',\n label: 'Custom CSS Class',\n placeholder: 'Custom CSS Class',\n tooltip: 'Custom CSS class to add to this component.'\n}, {\n weight: 600,\n type: 'textfield',\n input: true,\n key: 'tabindex',\n label: 'Tab Index',\n placeholder: '0',\n tooltip: 'Sets the tabindex attribute of this component to override the tab order of the form. See the MDN documentation on tabindex for more information.'\n}, {\n weight: 1100,\n type: 'checkbox',\n label: 'Hidden',\n tooltip: 'A hidden field is still a part of the form, but is hidden from view.',\n key: 'hidden',\n input: true\n}, {\n weight: 1200,\n type: 'checkbox',\n label: 'Hide Label',\n tooltip: 'Hide the label (title, if no label) of this component. This allows you to show the label in the form builder, but not when it is rendered.',\n key: 'hideLabel',\n input: true\n}, {\n weight: 1350,\n type: 'checkbox',\n label: 'Initial Focus',\n tooltip: 'Make this field the initially focused element on this form.',\n key: 'autofocus',\n input: true\n}, {\n weight: 1370,\n type: 'checkbox',\n label: 'Show Label in DataGrid',\n tooltip: 'Show the label inside each row when in a Datagrid.',\n key: 'dataGridLabel',\n input: true,\n customConditional: function customConditional(context) {\n var _context$instance$opt, _context$instance$opt2;\n return (_context$instance$opt = context.instance.options) === null || _context$instance$opt === void 0 ? void 0 : (_context$instance$opt2 = _context$instance$opt.flags) === null || _context$instance$opt2 === void 0 ? void 0 : _context$instance$opt2.inDataGrid;\n }\n}, {\n weight: 1400,\n type: 'checkbox',\n label: 'Disabled',\n tooltip: 'Disable the form input.',\n key: 'disabled',\n input: true\n}, {\n weight: 1500,\n type: 'checkbox',\n label: 'Table View',\n tooltip: 'Shows this value within the table view of the submissions.',\n key: 'tableView',\n input: true\n}, {\n weight: 1600,\n type: 'checkbox',\n label: 'Modal Edit',\n tooltip: 'Opens up a modal to edit the value of this component.',\n key: 'modalEdit',\n input: true\n}];\n/* eslint-enable max-len */\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/_classes/component/editForm/Component.edit.display.js?"); /***/ }), @@ -298,10 +298,10 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /*!*****************************************************************************!*\ !*** ./lib/components/_classes/component/editForm/Component.edit.layout.js ***! \*****************************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n label: 'HTML Attributes',\n type: 'datamap',\n input: true,\n key: 'attributes',\n keyLabel: 'Attribute Name',\n valueComponent: {\n type: 'textfield',\n key: 'value',\n label: 'Attribute Value',\n input: true\n },\n tooltip: 'Provide a map of HTML attributes for component\\'s input element (attributes provided by other component settings or other attributes generated by form.io take precedence over attributes in this grid)',\n addAnother: 'Add Attribute'\n}, {\n type: 'panel',\n legend: 'PDF Overlay',\n title: 'PDF Overlay',\n key: 'overlay',\n tooltip: 'The settings inside apply only to the PDF forms.',\n weight: 2000,\n collapsible: true,\n collapsed: true,\n components: [{\n type: 'textfield',\n input: true,\n key: 'overlay.style',\n label: 'Style',\n placeholder: '',\n tooltip: 'Custom styles that should be applied to this component when rendered in PDF.'\n }, {\n type: 'textfield',\n input: true,\n key: 'overlay.page',\n label: 'Page',\n placeholder: '',\n tooltip: 'The PDF page to place this component.'\n }, {\n type: 'textfield',\n input: true,\n key: 'overlay.left',\n label: 'Left',\n placeholder: '',\n tooltip: 'The left margin within a page to place this component.'\n }, {\n type: 'textfield',\n input: true,\n key: 'overlay.top',\n label: 'Top',\n placeholder: '',\n tooltip: 'The top margin within a page to place this component.'\n }, {\n type: 'textfield',\n input: true,\n key: 'overlay.width',\n label: 'Width',\n placeholder: '',\n tooltip: 'The width of the component (in pixels).'\n }, {\n type: 'textfield',\n input: true,\n key: 'overlay.height',\n label: 'Height',\n placeholder: '',\n tooltip: 'The height of the component (in pixels).'\n }]\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/_classes/component/editForm/Component.edit.layout.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n label: 'HTML Attributes',\n type: 'datamap',\n input: true,\n key: 'attributes',\n keyLabel: 'Attribute Name',\n valueComponent: {\n type: 'textfield',\n key: 'value',\n label: 'Attribute Value',\n input: true\n },\n tooltip: 'Provide a map of HTML attributes for component\\'s input element (attributes provided by other component settings or other attributes generated by form.io take precedence over attributes in this grid)',\n addAnother: 'Add Attribute'\n}, {\n type: 'panel',\n legend: 'PDF Overlay',\n title: 'PDF Overlay',\n key: 'overlay',\n tooltip: 'The settings inside apply only to the PDF forms.',\n weight: 2000,\n collapsible: true,\n collapsed: true,\n components: [{\n type: 'textfield',\n input: true,\n key: 'overlay.style',\n label: 'Style',\n placeholder: '',\n tooltip: 'Custom styles that should be applied to this component when rendered in PDF.'\n }, {\n type: 'textfield',\n input: true,\n key: 'overlay.page',\n label: 'Page',\n placeholder: '',\n tooltip: 'The PDF page to place this component.'\n }, {\n type: 'textfield',\n input: true,\n key: 'overlay.left',\n label: 'Left',\n placeholder: '',\n tooltip: 'The left margin within a page to place this component.'\n }, {\n type: 'textfield',\n input: true,\n key: 'overlay.top',\n label: 'Top',\n placeholder: '',\n tooltip: 'The top margin within a page to place this component.'\n }, {\n type: 'textfield',\n input: true,\n key: 'overlay.width',\n label: 'Width',\n placeholder: '',\n tooltip: 'The width of the component (in pixels).'\n }, {\n type: 'textfield',\n input: true,\n key: 'overlay.height',\n label: 'Height',\n placeholder: '',\n tooltip: 'The height of the component (in pixels).'\n }]\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/_classes/component/editForm/Component.edit.layout.js?"); /***/ }), @@ -312,7 +312,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.object.assign.js */ \"./node_modules/core-js/modules/es.object.assign.js\");\n\nvar _utils = _interopRequireDefault(__webpack_require__(/*! ./utils */ \"./lib/components/_classes/component/editForm/utils.js\"));\n\nvar _utils2 = __webpack_require__(/*! ../../../../utils/utils */ \"./lib/utils/utils.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/* eslint-disable quotes, max-len */\nvar _default = [{\n weight: 0,\n input: true,\n label: 'Advanced Logic',\n key: 'logic',\n templates: {\n header: '
\\n
\\n {{ value.length }} {{ ctx.t(\"Advanced Logic Configured\") }}\\n
\\n
',\n row: '
\\n
\\n
{{ row.name }}
\\n
\\n
\\n
\\n \\n \\n
\\n
\\n
',\n footer: ''\n },\n type: 'editgrid',\n addAnother: 'Add Logic',\n saveRow: 'Save Logic',\n components: [{\n weight: 0,\n input: true,\n inputType: 'text',\n label: 'Logic Name',\n key: 'name',\n validate: {\n required: true\n },\n type: 'textfield'\n }, {\n weight: 10,\n key: 'triggerPanel',\n input: false,\n title: 'Trigger',\n tableView: false,\n components: [{\n weight: 0,\n input: true,\n tableView: false,\n components: [{\n weight: 0,\n input: true,\n label: 'Type',\n key: 'type',\n tableView: false,\n data: {\n values: [{\n value: 'simple',\n label: 'Simple'\n }, {\n value: 'javascript',\n label: 'Javascript'\n }, {\n value: 'json',\n label: 'JSON Logic'\n }, {\n value: 'event',\n label: 'Event'\n }]\n },\n dataSrc: 'values',\n template: '{{ item.label }}',\n type: 'select'\n }, {\n weight: 10,\n label: '',\n key: 'simple',\n type: 'container',\n tableView: false,\n customConditional: function customConditional(_ref) {\n var row = _ref.row;\n return row.type === 'simple';\n },\n components: [{\n input: true,\n key: 'show',\n label: 'Show',\n type: 'hidden',\n tableView: false,\n calculateValue: function calculateValue() {\n return true;\n }\n }, {\n type: 'select',\n input: true,\n label: 'When the form component:',\n key: 'when',\n dataSrc: 'custom',\n valueProperty: 'value',\n tableView: false,\n data: {\n custom: function custom(context) {\n return (0, _utils2.getContextComponents)(context);\n }\n }\n }, {\n type: 'textfield',\n input: true,\n label: 'Has the value:',\n key: 'eq',\n tableView: false\n }]\n }, {\n weight: 10,\n type: 'textarea',\n key: 'javascript',\n rows: 5,\n editor: 'ace',\n as: 'javascript',\n input: true,\n tableView: false,\n placeholder: \"result = (data['mykey'] > 1);\",\n description: '\"row\", \"data\", and \"component\" variables are available. Return \"result\".',\n customConditional: function customConditional(_ref2) {\n var row = _ref2.row;\n return row.type === 'javascript';\n }\n }, {\n weight: 10,\n type: 'textarea',\n key: 'json',\n rows: 5,\n editor: 'ace',\n label: 'JSON Logic',\n as: 'json',\n input: true,\n tableView: false,\n placeholder: \"{ ... }\",\n description: '\"row\", \"data\", \"component\" and \"_\" variables are available. Return the result to be passed to the action if truthy.',\n customConditional: function customConditional(_ref3) {\n var row = _ref3.row;\n return row.type === 'json';\n }\n }, {\n weight: 10,\n type: 'textfield',\n key: 'event',\n label: 'Event Name',\n placeholder: 'event',\n description: 'The event that will trigger this logic. You can trigger events externally or via a button.',\n tableView: false,\n customConditional: function customConditional(_ref4) {\n var row = _ref4.row;\n return row.type === 'event';\n }\n }],\n key: 'trigger',\n type: 'container'\n }],\n type: 'panel'\n }, {\n weight: 20,\n input: true,\n label: 'Actions',\n key: 'actions',\n tableView: false,\n templates: {\n header: '
\\n
{{ value.length }} {{ ctx.t(\"actions\") }}
\\n
',\n row: '
\\n
\\n
{{ row.name }}
\\n
\\n
\\n
\\n \\n \\n
\\n
\\n
',\n footer: ''\n },\n type: 'editgrid',\n addAnother: 'Add Action',\n saveRow: 'Save Action',\n components: [{\n weight: 0,\n title: 'Action',\n input: false,\n key: 'actionPanel',\n type: 'panel',\n components: [{\n weight: 0,\n input: true,\n inputType: 'text',\n label: 'Action Name',\n key: 'name',\n validate: {\n required: true\n },\n type: 'textfield'\n }, {\n weight: 10,\n input: true,\n label: 'Type',\n key: 'type',\n data: {\n values: [{\n value: 'property',\n label: 'Property'\n }, {\n value: 'value',\n label: 'Value'\n }, {\n label: 'Merge Component Schema',\n value: 'mergeComponentSchema'\n }, {\n label: 'Custom Action',\n value: 'customAction'\n }]\n },\n dataSrc: 'values',\n template: '{{ item.label }}',\n type: 'select'\n }, {\n weight: 20,\n type: 'select',\n template: '{{ item.label }}',\n dataSrc: 'json',\n tableView: false,\n data: {\n json: [{\n label: 'Hidden',\n value: 'hidden',\n type: 'boolean'\n }, {\n label: 'Required',\n value: 'validate.required',\n type: 'boolean'\n }, {\n label: 'Disabled',\n value: 'disabled',\n type: 'boolean'\n }, {\n label: 'Label',\n value: 'label',\n type: 'string'\n }, {\n label: 'Title',\n value: 'title',\n type: 'string'\n }, {\n label: 'Prefix',\n value: 'prefix',\n type: 'string'\n }, {\n label: 'Suffix',\n value: 'suffix',\n type: 'string'\n }, {\n label: 'Tooltip',\n value: 'tooltip',\n type: 'string'\n }, {\n label: 'Description',\n value: 'description',\n type: 'string'\n }, {\n label: 'Placeholder',\n value: 'placeholder',\n type: 'string'\n }, {\n label: 'Input Mask',\n value: 'inputMask',\n type: 'string'\n }, {\n label: 'CSS Class',\n value: 'className',\n type: 'string'\n }, {\n label: 'Container Custom Class',\n value: 'customClass',\n type: 'string'\n }]\n },\n key: 'property',\n label: 'Component Property',\n input: true,\n customConditional: function customConditional(_ref5) {\n var row = _ref5.row;\n return row.type === 'property';\n }\n }, {\n weight: 30,\n input: true,\n label: 'Set State',\n key: 'state',\n tableView: false,\n data: {\n values: [{\n label: 'True',\n value: 'true'\n }, {\n label: 'False',\n value: 'false'\n }]\n },\n dataSrc: 'values',\n template: '{{ item.label }}',\n type: 'select',\n customConditional: function customConditional(_ref6) {\n var row = _ref6.row;\n return row.type === 'property' && row.hasOwnProperty('property') && row.property.type === 'boolean';\n }\n }, {\n weight: 30,\n type: 'textfield',\n key: 'text',\n label: 'Text',\n inputType: 'text',\n input: true,\n tableView: false,\n description: 'Can use templating with {{ data.myfield }}. \"data\", \"row\", \"component\" and \"result\" variables are available.',\n customConditional: function customConditional(_ref7) {\n var row = _ref7.row;\n return row.type === 'property' && row.hasOwnProperty('property') && row.property.type === 'string' && !row.property.component;\n }\n }, {\n weight: 20,\n input: true,\n label: 'Value (Javascript)',\n key: 'value',\n editor: 'ace',\n as: 'javascript',\n rows: 5,\n placeholder: \"value = data.myfield;\",\n type: 'textarea',\n tableView: false,\n description: '\"row\", \"data\", \"component\", and \"result\" variables are available. Return the value.',\n customConditional: function customConditional(_ref8) {\n var row = _ref8.row;\n return row.type === 'value';\n }\n }, {\n weight: 20,\n input: true,\n label: 'Schema Defenition',\n key: 'schemaDefinition',\n editor: 'ace',\n as: 'javascript',\n rows: 5,\n placeholder: \"schema = { label: 'Updated' };\",\n type: 'textarea',\n tableView: false,\n description: '\"row\", \"data\", \"component\", and \"result\" variables are available. Return the schema.',\n customConditional: function customConditional(_ref9) {\n var row = _ref9.row;\n return row.type === 'mergeComponentSchema';\n }\n }, Object.assign(_utils.default.logicVariablesTable('inputThe value that was input into this component'), {\n customConditional: function customConditional(_ref10) {\n var row = _ref10.row;\n return row.type === 'customAction';\n }\n }), {\n weight: 20,\n input: true,\n label: 'Custom Action (Javascript)',\n key: 'customAction',\n editor: 'ace',\n rows: 5,\n placeholder: \"value = data.myfield;\",\n type: 'textarea',\n tableView: false,\n customConditional: function customConditional(_ref11) {\n var row = _ref11.row;\n return row.type === 'customAction';\n }\n }]\n }]\n }]\n}];\n/* eslint-enable quotes, max-len */\n\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/_classes/component/editForm/Component.edit.logic.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.object.assign.js */ \"./node_modules/core-js/modules/es.object.assign.js\");\nvar _utils = _interopRequireDefault(__webpack_require__(/*! ./utils */ \"./lib/components/_classes/component/editForm/utils.js\"));\nvar _utils2 = __webpack_require__(/*! ../../../../utils/utils */ \"./lib/utils/utils.js\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n/* eslint-disable quotes, max-len */\nvar _default = [{\n weight: 0,\n input: true,\n label: 'Advanced Logic',\n key: 'logic',\n templates: {\n header: '
\\n
\\n {{ value.length }} {{ ctx.t(\"Advanced Logic Configured\") }}\\n
\\n
',\n row: '
\\n
\\n
{{ row.name }}
\\n
\\n
\\n
\\n \\n \\n
\\n
\\n
',\n footer: ''\n },\n type: 'editgrid',\n addAnother: 'Add Logic',\n saveRow: 'Save Logic',\n components: [{\n weight: 0,\n input: true,\n inputType: 'text',\n label: 'Logic Name',\n key: 'name',\n validate: {\n required: true\n },\n type: 'textfield'\n }, {\n weight: 10,\n key: 'triggerPanel',\n input: false,\n title: 'Trigger',\n tableView: false,\n components: [{\n weight: 0,\n input: true,\n tableView: false,\n components: [{\n weight: 0,\n input: true,\n label: 'Type',\n key: 'type',\n tableView: false,\n data: {\n values: [{\n value: 'simple',\n label: 'Simple'\n }, {\n value: 'javascript',\n label: 'Javascript'\n }, {\n value: 'json',\n label: 'JSON Logic'\n }, {\n value: 'event',\n label: 'Event'\n }]\n },\n dataSrc: 'values',\n template: '{{ item.label }}',\n type: 'select'\n }, {\n weight: 10,\n label: '',\n key: 'simple',\n type: 'container',\n tableView: false,\n customConditional: function customConditional(_ref) {\n var row = _ref.row;\n return row.type === 'simple';\n },\n components: [{\n input: true,\n key: 'show',\n label: 'Show',\n type: 'hidden',\n tableView: false,\n calculateValue: function calculateValue() {\n return true;\n }\n }, {\n type: 'select',\n input: true,\n label: 'When the form component:',\n key: 'when',\n dataSrc: 'custom',\n valueProperty: 'value',\n tableView: false,\n data: {\n custom: function custom(context) {\n return (0, _utils2.getContextComponents)(context);\n }\n }\n }, {\n type: 'textfield',\n input: true,\n label: 'Has the value:',\n key: 'eq',\n tableView: false\n }]\n }, {\n weight: 10,\n type: 'textarea',\n key: 'javascript',\n rows: 5,\n editor: 'ace',\n as: 'javascript',\n input: true,\n tableView: false,\n placeholder: \"result = (data['mykey'] > 1);\",\n description: '\"row\", \"data\", and \"component\" variables are available. Return \"result\".',\n customConditional: function customConditional(_ref2) {\n var row = _ref2.row;\n return row.type === 'javascript';\n }\n }, {\n weight: 10,\n type: 'textarea',\n key: 'json',\n rows: 5,\n editor: 'ace',\n label: 'JSON Logic',\n as: 'json',\n input: true,\n tableView: false,\n placeholder: \"{ ... }\",\n description: '\"row\", \"data\", \"component\" and \"_\" variables are available. Return the result to be passed to the action if truthy.',\n customConditional: function customConditional(_ref3) {\n var row = _ref3.row;\n return row.type === 'json';\n }\n }, {\n weight: 10,\n type: 'textfield',\n key: 'event',\n label: 'Event Name',\n placeholder: 'event',\n description: 'The event that will trigger this logic. You can trigger events externally or via a button.',\n tableView: false,\n customConditional: function customConditional(_ref4) {\n var row = _ref4.row;\n return row.type === 'event';\n }\n }],\n key: 'trigger',\n type: 'container'\n }],\n type: 'panel'\n }, {\n weight: 20,\n input: true,\n label: 'Actions',\n key: 'actions',\n tableView: false,\n templates: {\n header: '
\\n
{{ value.length }} {{ ctx.t(\"actions\") }}
\\n
',\n row: '
\\n
\\n
{{ row.name }}
\\n
\\n
\\n
\\n \\n \\n
\\n
\\n
',\n footer: ''\n },\n type: 'editgrid',\n addAnother: 'Add Action',\n saveRow: 'Save Action',\n components: [{\n weight: 0,\n title: 'Action',\n input: false,\n key: 'actionPanel',\n type: 'panel',\n components: [{\n weight: 0,\n input: true,\n inputType: 'text',\n label: 'Action Name',\n key: 'name',\n validate: {\n required: true\n },\n type: 'textfield'\n }, {\n weight: 10,\n input: true,\n label: 'Type',\n key: 'type',\n data: {\n values: [{\n value: 'property',\n label: 'Property'\n }, {\n value: 'value',\n label: 'Value'\n }, {\n label: 'Merge Component Schema',\n value: 'mergeComponentSchema'\n }, {\n label: 'Custom Action',\n value: 'customAction'\n }]\n },\n dataSrc: 'values',\n template: '{{ item.label }}',\n type: 'select'\n }, {\n weight: 20,\n type: 'select',\n template: '{{ item.label }}',\n dataSrc: 'json',\n tableView: false,\n data: {\n json: [{\n label: 'Hidden',\n value: 'hidden',\n type: 'boolean'\n }, {\n label: 'Required',\n value: 'validate.required',\n type: 'boolean'\n }, {\n label: 'Disabled',\n value: 'disabled',\n type: 'boolean'\n }, {\n label: 'Label',\n value: 'label',\n type: 'string'\n }, {\n label: 'Title',\n value: 'title',\n type: 'string'\n }, {\n label: 'Prefix',\n value: 'prefix',\n type: 'string'\n }, {\n label: 'Suffix',\n value: 'suffix',\n type: 'string'\n }, {\n label: 'Tooltip',\n value: 'tooltip',\n type: 'string'\n }, {\n label: 'Description',\n value: 'description',\n type: 'string'\n }, {\n label: 'Placeholder',\n value: 'placeholder',\n type: 'string'\n }, {\n label: 'Input Mask',\n value: 'inputMask',\n type: 'string'\n }, {\n label: 'CSS Class',\n value: 'className',\n type: 'string'\n }, {\n label: 'Container Custom Class',\n value: 'customClass',\n type: 'string'\n }]\n },\n key: 'property',\n label: 'Component Property',\n input: true,\n customConditional: function customConditional(_ref5) {\n var row = _ref5.row;\n return row.type === 'property';\n }\n }, {\n weight: 30,\n input: true,\n label: 'Set State',\n key: 'state',\n tableView: false,\n data: {\n values: [{\n label: 'True',\n value: 'true'\n }, {\n label: 'False',\n value: 'false'\n }]\n },\n dataSrc: 'values',\n template: '{{ item.label }}',\n type: 'select',\n customConditional: function customConditional(_ref6) {\n var row = _ref6.row;\n return row.type === 'property' && row.hasOwnProperty('property') && row.property.type === 'boolean';\n }\n }, {\n weight: 30,\n type: 'textfield',\n key: 'text',\n label: 'Text',\n inputType: 'text',\n input: true,\n tableView: false,\n description: 'Can use templating with {{ data.myfield }}. \"data\", \"row\", \"component\" and \"result\" variables are available.',\n customConditional: function customConditional(_ref7) {\n var row = _ref7.row;\n return row.type === 'property' && row.hasOwnProperty('property') && row.property.type === 'string' && !row.property.component;\n }\n }, {\n weight: 20,\n input: true,\n label: 'Value (Javascript)',\n key: 'value',\n editor: 'ace',\n as: 'javascript',\n rows: 5,\n placeholder: \"value = data.myfield;\",\n type: 'textarea',\n tableView: false,\n description: '\"row\", \"data\", \"component\", and \"result\" variables are available. Return the value.',\n customConditional: function customConditional(_ref8) {\n var row = _ref8.row;\n return row.type === 'value';\n }\n }, {\n weight: 20,\n input: true,\n label: 'Schema Defenition',\n key: 'schemaDefinition',\n editor: 'ace',\n as: 'javascript',\n rows: 5,\n placeholder: \"schema = { label: 'Updated' };\",\n type: 'textarea',\n tableView: false,\n description: '\"row\", \"data\", \"component\", and \"result\" variables are available. Return the schema.',\n customConditional: function customConditional(_ref9) {\n var row = _ref9.row;\n return row.type === 'mergeComponentSchema';\n }\n }, Object.assign(_utils[\"default\"].logicVariablesTable('inputThe value that was input into this component'), {\n customConditional: function customConditional(_ref10) {\n var row = _ref10.row;\n return row.type === 'customAction';\n }\n }), {\n weight: 20,\n input: true,\n label: 'Custom Action (Javascript)',\n key: 'customAction',\n editor: 'ace',\n rows: 5,\n placeholder: \"value = data.myfield;\",\n type: 'textarea',\n tableView: false,\n customConditional: function customConditional(_ref11) {\n var row = _ref11.row;\n return row.type === 'customAction';\n }\n }]\n }]\n }]\n}];\n/* eslint-enable quotes, max-len */\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/_classes/component/editForm/Component.edit.logic.js?"); /***/ }), @@ -323,7 +323,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _utils = _interopRequireDefault(__webpack_require__(/*! ./utils */ \"./lib/components/_classes/component/editForm/utils.js\"));\n\nvar _Evaluator = _interopRequireDefault(__webpack_require__(/*! ../../../../utils/Evaluator */ \"./lib/utils/Evaluator.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/* eslint-disable quotes, max-len */\nvar _default = [{\n weight: 10,\n type: 'checkbox',\n label: 'Required',\n tooltip: 'A required field must be filled in before the form can be submitted.',\n key: 'validate.required',\n input: true\n}, {\n weight: 100,\n type: 'checkbox',\n label: 'Unique',\n tooltip: 'Makes sure the data submitted for this field is unique, and has not been submitted before.',\n key: 'unique',\n input: true\n}, {\n weight: 0,\n type: 'select',\n key: 'validateOn',\n defaultValue: 'change',\n input: true,\n label: 'Validate On',\n tooltip: 'Determines when this component should trigger front-end validation.',\n dataSrc: 'values',\n data: {\n values: [{\n label: 'Change',\n value: 'change'\n }, {\n label: 'Blur',\n value: 'blur'\n }]\n }\n}, {\n weight: 190,\n type: 'textfield',\n input: true,\n key: 'errorLabel',\n label: 'Error Label',\n placeholder: 'Error Label',\n tooltip: 'The label for this field when an error occurs.'\n}, {\n weight: 200,\n key: 'validate.customMessage',\n label: 'Custom Error Message',\n placeholder: 'Custom Error Message',\n type: 'textfield',\n tooltip: 'Error message displayed if any error occurred.',\n input: true\n}, {\n type: 'panel',\n title: 'Custom Validation',\n collapsible: true,\n collapsed: true,\n style: {\n 'margin-bottom': '10px'\n },\n key: 'custom-validation-js',\n weight: 300,\n customConditional: function customConditional() {\n return !_Evaluator.default.noeval || _Evaluator.default.protectedEval;\n },\n components: [_utils.default.logicVariablesTable('inputThe value that was input into this component'), {\n type: 'textarea',\n key: 'validate.custom',\n rows: 5,\n editor: 'ace',\n hideLabel: true,\n as: 'javascript',\n input: true\n }, {\n type: 'htmlelement',\n tag: 'div',\n content: \"\\n \\n

Enter custom validation code.

\\n

You must assign the valid variable as either true or an error message if validation fails.

\\n
Example:
\\n
valid = (input === 'Joe') ? true : 'Your name must be \\\"Joe\\\"';
\\n
\"\n }, {\n type: 'well',\n components: [{\n weight: 100,\n type: 'checkbox',\n label: 'Secret Validation',\n tooltip: 'Check this if you wish to perform the validation ONLY on the server side. This keeps your validation logic private and secret.',\n description: 'Check this if you wish to perform the validation ONLY on the server side. This keeps your validation logic private and secret.',\n key: 'validate.customPrivate',\n input: true\n }]\n }]\n}, {\n type: 'panel',\n title: 'JSONLogic Validation',\n collapsible: true,\n collapsed: true,\n key: 'json-validation-json',\n weight: 400,\n components: [{\n type: 'htmlelement',\n tag: 'div',\n\n /* eslint-disable prefer-template */\n content: '

Execute custom logic using JSONLogic.

' + '
Example:
' + '
' + JSON.stringify({\n      \"if\": [{\n        \"===\": [{\n          \"var\": \"input\"\n        }, \"Bob\"]\n      }, true, \"Your name must be 'Bob'!\"]\n    }, null, 2) + '
'\n /* eslint-enable prefer-template */\n\n }, {\n type: 'textarea',\n key: 'validate.json',\n hideLabel: true,\n rows: 5,\n editor: 'ace',\n as: 'json',\n input: true\n }]\n}, {\n type: 'panel',\n title: 'Custom Errors',\n collapsible: true,\n collapsed: true,\n key: 'errors',\n weight: 400,\n components: [{\n type: 'textarea',\n key: 'errors',\n hideLabel: true,\n rows: 5,\n editor: 'ace',\n as: 'json',\n input: true\n }, {\n type: 'htmlelement',\n tag: 'div',\n content: \"\\n

This allows you to set different custom error messages for different errors\\n (in contrast to \\u201CCustom Error Message\\u201D, which only allows you to set one\\n error message for all errors). E.g.

\\n\\n
{\\n  \\\"required\\\": \\\"{{ field }} is required. Try again.\\\",\\n  \\\"maxLength\\\": \\\"{{ field }} is too long. Try again.\\\"\\n}
\\n\\n

You can set the following keys (among others):

\\n
    \\n
  • required
  • \\n
  • min
  • \\n
  • max
  • \\n
  • minLength
  • \\n
  • maxLength
  • \\n
  • minWords
  • \\n
  • maxWords
  • \\n
  • invalid_email
  • \\n
  • invalid_date
  • \\n
  • invalid_day
  • \\n
  • invalid_regex
  • \\n
  • mask
  • \\n
  • pattern
  • \\n
  • custom
  • \\n
\\n\\n

Depending on the error message some of the following template variables can be used in the script:

\\n
    \\n
  • {{ field }} is replaced with the label of the field.
  • \\n
  • {{ min }}
  • \\n
  • {{ max }}
  • \\n
  • {{ length }}
  • \\n
  • {{ pattern }}
  • \\n
  • {{ minDate }}
  • \\n
  • {{ maxDate }}
  • \\n
  • {{ minYear }}
  • \\n
  • {{ maxYear }}
  • \\n
  • {{ regex }}
  • \\n
\\n \"\n }]\n}];\n/* eslint-enable quotes, max-len */\n\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/_classes/component/editForm/Component.edit.validation.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _utils = _interopRequireDefault(__webpack_require__(/*! ./utils */ \"./lib/components/_classes/component/editForm/utils.js\"));\nvar _Evaluator = _interopRequireDefault(__webpack_require__(/*! ../../../../utils/Evaluator */ \"./lib/utils/Evaluator.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n/* eslint-disable quotes, max-len */\nvar _default = [{\n weight: 10,\n type: 'checkbox',\n label: 'Required',\n tooltip: 'A required field must be filled in before the form can be submitted.',\n key: 'validate.required',\n input: true\n}, {\n weight: 100,\n type: 'checkbox',\n label: 'Unique',\n tooltip: 'Makes sure the data submitted for this field is unique, and has not been submitted before.',\n key: 'unique',\n input: true\n}, {\n weight: 0,\n type: 'select',\n key: 'validateOn',\n defaultValue: 'change',\n input: true,\n label: 'Validate On',\n tooltip: 'Determines when this component should trigger front-end validation.',\n dataSrc: 'values',\n data: {\n values: [{\n label: 'Change',\n value: 'change'\n }, {\n label: 'Blur',\n value: 'blur'\n }]\n }\n}, {\n weight: 190,\n type: 'textfield',\n input: true,\n key: 'errorLabel',\n label: 'Error Label',\n placeholder: 'Error Label',\n tooltip: 'The label for this field when an error occurs.'\n}, {\n weight: 200,\n key: 'validate.customMessage',\n label: 'Custom Error Message',\n placeholder: 'Custom Error Message',\n type: 'textfield',\n tooltip: 'Error message displayed if any error occurred.',\n input: true\n}, {\n type: 'panel',\n title: 'Custom Validation',\n collapsible: true,\n collapsed: true,\n style: {\n 'margin-bottom': '10px'\n },\n key: 'custom-validation-js',\n weight: 300,\n customConditional: function customConditional() {\n return !_Evaluator[\"default\"].noeval || _Evaluator[\"default\"].protectedEval;\n },\n components: [_utils[\"default\"].logicVariablesTable('inputThe value that was input into this component'), {\n type: 'textarea',\n key: 'validate.custom',\n rows: 5,\n editor: 'ace',\n hideLabel: true,\n as: 'javascript',\n input: true\n }, {\n type: 'htmlelement',\n tag: 'div',\n content: \"\\n \\n

Enter custom validation code.

\\n

You must assign the valid variable as either true or an error message if validation fails.

\\n
Example:
\\n
valid = (input === 'Joe') ? true : 'Your name must be \\\"Joe\\\"';
\\n
\"\n }, {\n type: 'well',\n components: [{\n weight: 100,\n type: 'checkbox',\n label: 'Secret Validation',\n tooltip: 'Check this if you wish to perform the validation ONLY on the server side. This keeps your validation logic private and secret.',\n description: 'Check this if you wish to perform the validation ONLY on the server side. This keeps your validation logic private and secret.',\n key: 'validate.customPrivate',\n input: true\n }]\n }]\n}, {\n type: 'panel',\n title: 'JSONLogic Validation',\n collapsible: true,\n collapsed: true,\n key: 'json-validation-json',\n weight: 400,\n components: [{\n type: 'htmlelement',\n tag: 'div',\n /* eslint-disable prefer-template */\n content: '

Execute custom logic using JSONLogic.

' + '
Example:
' + '
' + JSON.stringify({\n      \"if\": [{\n        \"===\": [{\n          \"var\": \"input\"\n        }, \"Bob\"]\n      }, true, \"Your name must be 'Bob'!\"]\n    }, null, 2) + '
'\n /* eslint-enable prefer-template */\n }, {\n type: 'textarea',\n key: 'validate.json',\n hideLabel: true,\n rows: 5,\n editor: 'ace',\n as: 'json',\n input: true\n }]\n}, {\n type: 'panel',\n title: 'Custom Errors',\n collapsible: true,\n collapsed: true,\n key: 'errors',\n weight: 400,\n components: [{\n type: 'textarea',\n key: 'errors',\n hideLabel: true,\n rows: 5,\n editor: 'ace',\n as: 'json',\n input: true\n }, {\n type: 'htmlelement',\n tag: 'div',\n content: \"\\n

This allows you to set different custom error messages for different errors\\n (in contrast to \\u201CCustom Error Message\\u201D, which only allows you to set one\\n error message for all errors). E.g.

\\n\\n
{\\n  \\\"required\\\": \\\"{{ field }} is required. Try again.\\\",\\n  \\\"maxLength\\\": \\\"{{ field }} is too long. Try again.\\\"\\n}
\\n\\n

You can set the following keys (among others):

\\n
    \\n
  • required
  • \\n
  • min
  • \\n
  • max
  • \\n
  • minLength
  • \\n
  • maxLength
  • \\n
  • minWords
  • \\n
  • maxWords
  • \\n
  • invalid_email
  • \\n
  • invalid_date
  • \\n
  • invalid_day
  • \\n
  • invalid_regex
  • \\n
  • mask
  • \\n
  • pattern
  • \\n
  • custom
  • \\n
\\n\\n

Depending on the error message some of the following template variables can be used in the script:

\\n
    \\n
  • {{ field }} is replaced with the label of the field.
  • \\n
  • {{ min }}
  • \\n
  • {{ max }}
  • \\n
  • {{ length }}
  • \\n
  • {{ pattern }}
  • \\n
  • {{ minDate }}
  • \\n
  • {{ maxDate }}
  • \\n
  • {{ minYear }}
  • \\n
  • {{ maxYear }}
  • \\n
  • {{ regex }}
  • \\n
\\n \"\n }]\n}];\n/* eslint-enable quotes, max-len */\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/_classes/component/editForm/Component.edit.validation.js?"); /***/ }), @@ -334,7 +334,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.splice.js */ \"./node_modules/core-js/modules/es.array.splice.js\");\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nvar _Evaluator = _interopRequireDefault(__webpack_require__(/*! ../../../../utils/Evaluator */ \"./lib/utils/Evaluator.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar EditFormUtils = {\n sortAndFilterComponents: function sortAndFilterComponents(components) {\n return _lodash.default.filter(_lodash.default.sortBy(components, 'weight'), function (item) {\n return !item.ignore;\n });\n },\n unifyComponents: function unifyComponents(objValue, srcValue) {\n if (objValue.key && srcValue.key) {\n if (objValue.skipMerge || srcValue.skipMerge) {\n return false;\n }\n\n if (objValue.key === srcValue.key) {\n // Create complete objects by including missing keys.\n _lodash.default.each(objValue, function (value, prop) {\n if (objValue.overrideEditForm || !srcValue.hasOwnProperty(prop)) {\n srcValue[prop] = value;\n }\n });\n\n _lodash.default.each(srcValue, function (value, prop) {\n if (srcValue.overrideEditForm || !objValue.hasOwnProperty(prop)) {\n objValue[prop] = value;\n }\n });\n\n if (objValue.components) {\n srcValue.components = EditFormUtils.sortAndFilterComponents(_lodash.default.unionWith(objValue.components, srcValue.components, EditFormUtils.unifyComponents));\n }\n\n return true;\n } else {\n return false;\n }\n }\n\n return _lodash.default.isEqual(objValue, srcValue);\n },\n logicVariablesTable: function logicVariablesTable(additional) {\n additional = additional || '';\n return {\n type: 'htmlelement',\n tag: 'div',\n\n /* eslint-disable prefer-template */\n content: '

The following variables are available in all scripts.

' + '' + additional + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '
formThe complete form JSON object
submissionThe complete submission object.
dataThe complete submission data object.
rowContextual \"row\" data, used within DataGrid, EditGrid, and Container components
componentThe current component JSON
instanceThe current component instance.
valueThe current value of the component.
momentThe moment.js library for date manipulation.
_An instance of Lodash.
utilsAn instance of the FormioUtils object.
utilAn alias for \"utils\".

'\n /* eslint-enable prefer-template */\n\n };\n },\n javaScriptValue: function javaScriptValue(title, property, propertyJSON, weight, exampleHTML, exampleJSON) {\n var additionalParams = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : '';\n var excludeJSONLogic = arguments.length > 7 ? arguments[7] : undefined;\n var components = [this.logicVariablesTable(additionalParams), {\n type: 'panel',\n title: 'JavaScript',\n collapsible: true,\n collapsed: false,\n style: {\n 'margin-bottom': '10px'\n },\n key: \"\".concat(property, \"-js\"),\n customConditional: function customConditional() {\n return !_Evaluator.default.noeval || _Evaluator.default.protectedEval;\n },\n components: [{\n type: 'textarea',\n key: property,\n rows: 5,\n editor: 'ace',\n hideLabel: true,\n as: 'javascript',\n input: true\n }, {\n type: 'htmlelement',\n tag: 'div',\n content: \"

Enter custom javascript code.

\".concat(exampleHTML)\n }]\n }, {\n type: 'panel',\n title: 'JSONLogic',\n collapsible: true,\n collapsed: true,\n key: \"\".concat(property, \"-json\"),\n components: [{\n type: 'htmlelement',\n tag: 'div',\n\n /* eslint-disable prefer-template */\n content: '

Execute custom logic using JSONLogic.

' + '

Full Lodash support is provided using an \"_\" before each operation, such as {\"_sum\": {var: \"data.a\"}}

' + exampleJSON\n /* eslint-enable prefer-template */\n\n }, {\n type: 'textarea',\n key: propertyJSON,\n rows: 5,\n editor: 'ace',\n hideLabel: true,\n as: 'json',\n input: true\n }]\n }];\n\n if (excludeJSONLogic) {\n components.splice(2, 1);\n }\n\n return {\n type: 'panel',\n title: title,\n theme: 'default',\n collapsible: true,\n collapsed: true,\n key: \"\".concat(property, \"Panel\"),\n weight: weight,\n components: components\n };\n }\n};\nvar _default = EditFormUtils;\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/_classes/component/editForm/utils.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.array.splice.js */ \"./node_modules/core-js/modules/es.array.splice.js\");\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nvar _Evaluator = _interopRequireDefault(__webpack_require__(/*! ../../../../utils/Evaluator */ \"./lib/utils/Evaluator.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar EditFormUtils = {\n sortAndFilterComponents: function sortAndFilterComponents(components) {\n return _lodash[\"default\"].filter(_lodash[\"default\"].sortBy(components, 'weight'), function (item) {\n return !item.ignore;\n });\n },\n unifyComponents: function unifyComponents(objValue, srcValue) {\n if (objValue.key && srcValue.key) {\n if (objValue.skipMerge || srcValue.skipMerge) {\n return false;\n }\n if (objValue.key === srcValue.key) {\n // Create complete objects by including missing keys.\n _lodash[\"default\"].each(objValue, function (value, prop) {\n if (objValue.overrideEditForm || !srcValue.hasOwnProperty(prop)) {\n srcValue[prop] = value;\n }\n });\n _lodash[\"default\"].each(srcValue, function (value, prop) {\n if (srcValue.overrideEditForm || !objValue.hasOwnProperty(prop)) {\n objValue[prop] = value;\n }\n });\n if (objValue.components) {\n srcValue.components = EditFormUtils.sortAndFilterComponents(_lodash[\"default\"].unionWith(objValue.components, srcValue.components, EditFormUtils.unifyComponents));\n }\n return true;\n } else {\n return false;\n }\n }\n return _lodash[\"default\"].isEqual(objValue, srcValue);\n },\n logicVariablesTable: function logicVariablesTable(additional) {\n additional = additional || '';\n return {\n type: 'htmlelement',\n tag: 'div',\n /* eslint-disable prefer-template */\n content: '

The following variables are available in all scripts.

' + '' + additional + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '
formThe complete form JSON object
submissionThe complete submission object.
dataThe complete submission data object.
rowContextual \"row\" data, used within DataGrid, EditGrid, and Container components
componentThe current component JSON
instanceThe current component instance.
valueThe current value of the component.
momentThe moment.js library for date manipulation.
_An instance of Lodash.
utilsAn instance of the FormioUtils object.
utilAn alias for \"utils\".

'\n /* eslint-enable prefer-template */\n };\n },\n javaScriptValue: function javaScriptValue(title, property, propertyJSON, weight, exampleHTML, exampleJSON) {\n var additionalParams = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : '';\n var excludeJSONLogic = arguments.length > 7 ? arguments[7] : undefined;\n var components = [this.logicVariablesTable(additionalParams), {\n type: 'panel',\n title: 'JavaScript',\n collapsible: true,\n collapsed: false,\n style: {\n 'margin-bottom': '10px'\n },\n key: \"\".concat(property, \"-js\"),\n customConditional: function customConditional() {\n return !_Evaluator[\"default\"].noeval || _Evaluator[\"default\"].protectedEval;\n },\n components: [{\n type: 'textarea',\n key: property,\n rows: 5,\n editor: 'ace',\n hideLabel: true,\n as: 'javascript',\n input: true\n }, {\n type: 'htmlelement',\n tag: 'div',\n content: \"

Enter custom javascript code.

\".concat(exampleHTML)\n }]\n }, {\n type: 'panel',\n title: 'JSONLogic',\n collapsible: true,\n collapsed: true,\n key: \"\".concat(property, \"-json\"),\n components: [{\n type: 'htmlelement',\n tag: 'div',\n /* eslint-disable prefer-template */\n content: '

Execute custom logic using JSONLogic.

' + '

Full Lodash support is provided using an \"_\" before each operation, such as {\"_sum\": {var: \"data.a\"}}

' + exampleJSON\n /* eslint-enable prefer-template */\n }, {\n type: 'textarea',\n key: propertyJSON,\n rows: 5,\n editor: 'ace',\n hideLabel: true,\n as: 'json',\n input: true\n }]\n }];\n if (excludeJSONLogic) {\n components.splice(2, 1);\n }\n return {\n type: 'panel',\n title: title,\n theme: 'default',\n collapsible: true,\n collapsed: true,\n key: \"\".concat(property, \"Panel\"),\n weight: weight,\n components: components\n };\n }\n};\nvar _default = EditFormUtils;\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/_classes/component/editForm/utils.js?"); /***/ }), @@ -345,7 +345,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptors.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nvar _utils = __webpack_require__(/*! ../../../utils/utils */ \"./lib/utils/utils.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nvar ComponentModal = /*#__PURE__*/function () {\n function ComponentModal(component, element, isOpened, currentValue) {\n _classCallCheck(this, ComponentModal);\n\n this.isOpened = isOpened;\n this.component = component;\n this.element = element;\n this.currentValue = (0, _utils.fastCloneDeep)(currentValue !== null && currentValue !== void 0 ? currentValue : this.component.getValue());\n this.dataLoaded = false;\n this.init();\n }\n\n _createClass(ComponentModal, [{\n key: \"refs\",\n get: function get() {\n return this.component.refs;\n }\n }, {\n key: \"init\",\n value: function init() {\n var _this = this;\n\n this.openModalListener = this.openModalHandler.bind(this);\n\n this.showDialogListener = function (event) {\n if (_this.isValueChanged() && !_this.component.disabled) {\n _this.showDialog();\n } else {\n _this.closeModalHandler(event);\n }\n };\n\n this.closeModalListener = this.closeModalHandler.bind(this);\n this.saveModalListener = this.saveModalValueHandler.bind(this);\n this.closeDialogListener = this.closeDialog.bind(this);\n this.saveDialogListener = this.saveDialog.bind(this);\n this.loadRefs();\n }\n }, {\n key: \"setValue\",\n value: function setValue(value) {\n if (this.dataLoaded) {\n return;\n }\n\n this.currentValue = (0, _utils.fastCloneDeep)(value);\n this.dataLoaded = true;\n this.updateView();\n }\n }, {\n key: \"setOpenModalElement\",\n value: function setOpenModalElement(template) {\n var _this$component;\n\n if ((_this$component = this.component) !== null && _this$component !== void 0 && _this$component.visible) {\n this.openModalTemplate = template;\n this.component.setContent(this.refs.openModalWrapper, template);\n this.loadRefs();\n this.setEventListeners();\n\n if (this.isOpened) {\n this.refs.modalWrapper.classList.add('formio-dialog-disabled-animation');\n this.openModal();\n }\n }\n }\n }, {\n key: \"templateRefs\",\n get: function get() {\n return {\n modalOverlay: 'single',\n modalContents: 'single',\n modalClose: 'single',\n openModalWrapper: 'single',\n openModal: 'single',\n modalSave: 'single',\n modalWrapper: 'single'\n };\n }\n }, {\n key: \"loadRefs\",\n value: function loadRefs() {\n this.component.loadRefs(this.element, this.templateRefs);\n }\n }, {\n key: \"removeEventListeners\",\n value: function removeEventListeners() {\n this.component.removeEventListener(this.refs.openModal, 'click', this.openModalListener);\n this.component.removeEventListener(this.refs.modalOverlay, 'click', this.refs.modalSave ? this.showDialogListener : this.saveModalListener);\n this.component.removeEventListener(this.refs.modalClose, 'click', this.showDialogListener);\n this.component.removeEventListener(this.refs.modalSave, 'click', this.saveModalListener);\n }\n }, {\n key: \"setEventListeners\",\n value: function setEventListeners() {\n this.removeEventListeners();\n this.component.addEventListener(this.refs.openModal, 'click', this.openModalListener);\n this.component.addEventListener(this.refs.modalOverlay, 'click', this.refs.modalSave ? this.showDialogListener : this.saveModalListener);\n this.component.addEventListener(this.refs.modalClose, 'click', this.showDialogListener);\n this.component.addEventListener(this.refs.modalSave, 'click', this.saveModalListener);\n }\n }, {\n key: \"isValueChanged\",\n value: function isValueChanged() {\n var componentValue = this.component.getValue();\n var currentValue = this.currentValue; //excluding metadata comparison for components that have it in dataValue (for ex. nested forms)\n\n if (componentValue && componentValue.data && componentValue.metadata) {\n componentValue = this.component.getValue().data;\n currentValue = this.currentValue.data;\n }\n\n return !_lodash.default.isEqual((0, _utils.fastCloneDeep)(componentValue), currentValue);\n }\n }, {\n key: \"setOpenEventListener\",\n value: function setOpenEventListener() {\n var _this$refs$openModalW;\n\n this.component.removeEventListener(this.refs.openModal, 'click', this.openModalListener);\n this.component.loadRefs((_this$refs$openModalW = this.refs.openModalWrapper) !== null && _this$refs$openModalW !== void 0 ? _this$refs$openModalW : this.element, {\n 'openModal': 'single'\n });\n this.component.addEventListener(this.refs.openModal, 'click', this.openModalListener);\n }\n }, {\n key: \"openModalHandler\",\n value: function openModalHandler(event) {\n event.preventDefault();\n this.openModal();\n }\n }, {\n key: \"positionOverElement\",\n value: function positionOverElement() {\n // Position the modal just over the element on the page.\n var elementOffset = this.element.getBoundingClientRect().top;\n var modalHeight = this.refs.modalContents.getBoundingClientRect().height;\n var modalTop = elementOffset - modalHeight - 10;\n modalTop = modalTop > 0 ? modalTop : 10;\n this.refs.modalWrapper.style.paddingTop = \"\".concat(modalTop, \"px\");\n }\n }, {\n key: \"openModal\",\n value: function openModal() {\n this.isOpened = true;\n this.refs.modalWrapper.classList.remove('component-rendering-hidden');\n\n if (this.component.component.type === 'signature') {\n // Position signature modals just above the signature button.\n this.positionOverElement();\n }\n }\n }, {\n key: \"updateView\",\n value: function updateView() {\n var template = _lodash.default.isEqual(this.currentValue, this.component.defaultValue) ? this.openModalTemplate : this.component.getModalPreviewTemplate();\n this.component.setContent(this.refs.openModalWrapper, template);\n this.setOpenEventListener();\n }\n }, {\n key: \"closeModal\",\n value: function closeModal() {\n this.refs.modalWrapper.classList.remove('formio-dialog-disabled-animation');\n this.refs.modalWrapper.classList.add('component-rendering-hidden');\n this.isOpened = false;\n this.updateView();\n }\n }, {\n key: \"closeModalHandler\",\n value: function closeModalHandler(event) {\n event.preventDefault();\n\n if (!this.component.disabled) {\n this.component.setValue(_lodash.default.cloneDeep(this.currentValue), {\n resetValue: true\n });\n }\n\n this.closeModal();\n }\n }, {\n key: \"showDialog\",\n value: function showDialog() {\n this.dialogElement = this.component.ce('div');\n var dialogContent = \"\\n

\".concat(this.component.t('Do you want to clear changes?'), \"

\\n
\\n \\n \\n
\\n \");\n this.dialogElement.innerHTML = dialogContent;\n this.dialogElement.refs = {};\n this.component.loadRefs.call(this.dialogElement, this.dialogElement, {\n dialogHeader: 'single',\n dialogCancelButton: 'single',\n dialogYesButton: 'single'\n });\n this.dialog = this.component.createModal(this.dialogElement);\n this.component.addEventListener(this.dialogElement.refs.dialogYesButton, 'click', this.saveDialogListener);\n this.component.addEventListener(this.dialogElement.refs.dialogCancelButton, 'click', this.closeDialogListener);\n }\n }, {\n key: \"closeDialog\",\n value: function closeDialog(event) {\n event.preventDefault();\n this.dialog.close();\n this.component.removeEventListener(this.dialogElement.refs.dialogYesButton, 'click', this.saveDialogListener);\n this.component.removeEventListener(this.dialogElement.refs.dialogCancelButton, 'click', this.closeDialogListener);\n }\n }, {\n key: \"saveDialog\",\n value: function saveDialog(event) {\n this.closeDialog(event);\n this.closeModalHandler(event);\n }\n }, {\n key: \"saveModalValueHandler\",\n value: function saveModalValueHandler(event) {\n var _this$component$dataV;\n\n event.preventDefault();\n this.currentValue = (0, _utils.fastCloneDeep)((_this$component$dataV = this.component.dataValue) !== null && _this$component$dataV !== void 0 ? _this$component$dataV : this.component.getValue());\n this.closeModal();\n }\n }], [{\n key: \"render\",\n value: function render(component, data, topLevel) {\n var children = component.renderTemplate('component', data, topLevel);\n var isOpened = this;\n return component.renderTemplate('componentModal', _objectSpread(_objectSpread({}, data), {}, {\n children: children,\n isOpened: isOpened\n }));\n }\n }]);\n\n return ComponentModal;\n}();\n\nexports[\"default\"] = ComponentModal;\n\n//# sourceURL=webpack://Formio/./lib/components/_classes/componentModal/ComponentModal.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptors.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-properties.js */ \"./node_modules/core-js/modules/es.object.define-properties.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nvar _utils = __webpack_require__(/*! ../../../utils/utils */ \"./lib/utils/utils.js\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar ComponentModal = /*#__PURE__*/function () {\n function ComponentModal(component, element, isOpened, currentValue) {\n _classCallCheck(this, ComponentModal);\n this.isOpened = isOpened;\n this.component = component;\n this.element = element;\n this.currentValue = (0, _utils.fastCloneDeep)(currentValue !== null && currentValue !== void 0 ? currentValue : this.component.getValue());\n this.dataLoaded = false;\n this.init();\n }\n _createClass(ComponentModal, [{\n key: \"refs\",\n get: function get() {\n return this.component.refs;\n }\n }, {\n key: \"init\",\n value: function init() {\n var _this = this;\n this.openModalListener = this.openModalHandler.bind(this);\n this.showDialogListener = function (event) {\n if (_this.isValueChanged() && !_this.component.disabled) {\n _this.showDialog();\n } else {\n _this.closeModalHandler(event);\n }\n };\n this.closeModalListener = this.closeModalHandler.bind(this);\n this.saveModalListener = this.saveModalValueHandler.bind(this);\n this.closeDialogListener = this.closeDialog.bind(this);\n this.saveDialogListener = this.saveDialog.bind(this);\n this.loadRefs();\n }\n }, {\n key: \"setValue\",\n value: function setValue(value) {\n if (this.dataLoaded && this.currentValue === value) {\n return;\n }\n this.currentValue = (0, _utils.fastCloneDeep)(value);\n this.dataLoaded = true;\n this.updateView();\n }\n }, {\n key: \"setOpenModalElement\",\n value: function setOpenModalElement(template) {\n var _this$component;\n if ((_this$component = this.component) !== null && _this$component !== void 0 && _this$component.visible) {\n this.openModalTemplate = template;\n this.component.setContent(this.refs.openModalWrapper, template);\n this.loadRefs();\n this.setEventListeners();\n if (this.isOpened) {\n this.refs.modalWrapper.classList.add('formio-dialog-disabled-animation');\n this.openModal();\n }\n }\n }\n }, {\n key: \"templateRefs\",\n get: function get() {\n return {\n modalOverlay: 'single',\n modalContents: 'single',\n modalClose: 'single',\n openModalWrapper: 'single',\n openModal: 'single',\n modalSave: 'single',\n modalWrapper: 'single'\n };\n }\n }, {\n key: \"loadRefs\",\n value: function loadRefs() {\n this.component.loadRefs(this.element, this.templateRefs);\n }\n }, {\n key: \"removeEventListeners\",\n value: function removeEventListeners() {\n this.component.removeEventListener(this.refs.openModal, 'click', this.openModalListener);\n this.component.removeEventListener(this.refs.modalOverlay, 'click', this.refs.modalSave ? this.showDialogListener : this.saveModalListener);\n this.component.removeEventListener(this.refs.modalClose, 'click', this.showDialogListener);\n this.component.removeEventListener(this.refs.modalSave, 'click', this.saveModalListener);\n }\n }, {\n key: \"setEventListeners\",\n value: function setEventListeners() {\n this.removeEventListeners();\n this.component.addEventListener(this.refs.openModal, 'click', this.openModalListener);\n this.component.addEventListener(this.refs.modalOverlay, 'click', this.refs.modalSave ? this.showDialogListener : this.saveModalListener);\n this.component.addEventListener(this.refs.modalClose, 'click', this.showDialogListener);\n this.component.addEventListener(this.refs.modalSave, 'click', this.saveModalListener);\n }\n }, {\n key: \"isValueChanged\",\n value: function isValueChanged() {\n var componentValue = this.component.getValue();\n var currentValue = this.currentValue;\n\n //excluding metadata comparison for components that have it in dataValue (for ex. nested forms)\n if (componentValue && componentValue.data && componentValue.metadata) {\n componentValue = this.component.getValue().data;\n currentValue = this.currentValue.data;\n }\n return !_lodash[\"default\"].isEqual((0, _utils.fastCloneDeep)(componentValue), currentValue);\n }\n }, {\n key: \"setOpenEventListener\",\n value: function setOpenEventListener() {\n var _this$refs$openModalW;\n this.component.removeEventListener(this.refs.openModal, 'click', this.openModalListener);\n this.component.loadRefs((_this$refs$openModalW = this.refs.openModalWrapper) !== null && _this$refs$openModalW !== void 0 ? _this$refs$openModalW : this.element, {\n 'openModal': 'single'\n });\n this.component.addEventListener(this.refs.openModal, 'click', this.openModalListener);\n }\n }, {\n key: \"openModalHandler\",\n value: function openModalHandler(event) {\n event.preventDefault();\n this.openModal();\n }\n }, {\n key: \"positionOverElement\",\n value: function positionOverElement() {\n // Position the modal just over the element on the page.\n var elementOffset = this.element.getBoundingClientRect().top;\n var modalHeight = this.refs.modalContents.getBoundingClientRect().height;\n var modalTop = elementOffset - modalHeight - 10;\n modalTop = modalTop > 0 ? modalTop : 10;\n this.refs.modalWrapper.style.paddingTop = \"\".concat(modalTop, \"px\");\n }\n }, {\n key: \"openModal\",\n value: function openModal() {\n this.isOpened = true;\n this.refs.modalWrapper.classList.remove('component-rendering-hidden');\n if (this.component.component.type === 'signature') {\n // Position signature modals just above the signature button.\n this.positionOverElement();\n }\n }\n }, {\n key: \"updateView\",\n value: function updateView() {\n var template = _lodash[\"default\"].isEqual(this.currentValue, this.component.defaultValue) ? this.openModalTemplate : this.component.getModalPreviewTemplate();\n this.component.setContent(this.refs.openModalWrapper, template);\n this.setOpenEventListener();\n }\n }, {\n key: \"closeModal\",\n value: function closeModal() {\n this.refs.modalWrapper.classList.remove('formio-dialog-disabled-animation');\n this.refs.modalWrapper.classList.add('component-rendering-hidden');\n this.isOpened = false;\n this.updateView();\n }\n }, {\n key: \"closeModalHandler\",\n value: function closeModalHandler(event) {\n event.preventDefault();\n if (!this.component.disabled) {\n this.component.setValue(_lodash[\"default\"].cloneDeep(this.currentValue), {\n resetValue: true\n });\n }\n this.closeModal();\n }\n }, {\n key: \"showDialog\",\n value: function showDialog() {\n this.dialogElement = this.component.ce('div');\n var dialogContent = \"\\n

\".concat(this.component.t('Do you want to clear changes?'), \"

\\n
\\n \\n \\n
\\n \");\n this.dialogElement.innerHTML = dialogContent;\n this.dialogElement.refs = {};\n this.component.loadRefs.call(this.dialogElement, this.dialogElement, {\n dialogHeader: 'single',\n dialogCancelButton: 'single',\n dialogYesButton: 'single'\n });\n this.dialog = this.component.createModal(this.dialogElement);\n this.component.addEventListener(this.dialogElement.refs.dialogYesButton, 'click', this.saveDialogListener);\n this.component.addEventListener(this.dialogElement.refs.dialogCancelButton, 'click', this.closeDialogListener);\n }\n }, {\n key: \"closeDialog\",\n value: function closeDialog(event) {\n event.preventDefault();\n this.dialog.close();\n this.component.removeEventListener(this.dialogElement.refs.dialogYesButton, 'click', this.saveDialogListener);\n this.component.removeEventListener(this.dialogElement.refs.dialogCancelButton, 'click', this.closeDialogListener);\n }\n }, {\n key: \"saveDialog\",\n value: function saveDialog(event) {\n this.closeDialog(event);\n this.closeModalHandler(event);\n }\n }, {\n key: \"saveModalValueHandler\",\n value: function saveModalValueHandler(event) {\n var _this$component$dataV;\n event.preventDefault();\n this.currentValue = (0, _utils.fastCloneDeep)((_this$component$dataV = this.component.dataValue) !== null && _this$component$dataV !== void 0 ? _this$component$dataV : this.component.getValue());\n this.closeModal();\n }\n }], [{\n key: \"render\",\n value: function render(component, data, topLevel) {\n var children = component.renderTemplate('component', data, topLevel);\n return component.renderTemplate('componentModal', _objectSpread(_objectSpread({}, data), {}, {\n children: children\n }));\n }\n }]);\n return ComponentModal;\n}();\nexports[\"default\"] = ComponentModal;\n\n//# sourceURL=webpack://Formio/./lib/components/_classes/componentModal/ComponentModal.js?"); /***/ }), @@ -356,7 +356,7 @@ eval("\n\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptors.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\nvar _Component2 = _interopRequireDefault(__webpack_require__(/*! ../component/Component */ \"./lib/components/_classes/component/Component.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar Field = /*#__PURE__*/function (_Component) {\n _inherits(Field, _Component);\n\n var _super = _createSuper(Field);\n\n function Field() {\n _classCallCheck(this, Field);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(Field, [{\n key: \"render\",\n value: function render(element) {\n if (this.noField) {\n return _get(_getPrototypeOf(Field.prototype), \"render\", this).call(this, element);\n } else if (this.isAdvancedLabel || this.options.condensedMode) {\n return _get(_getPrototypeOf(Field.prototype), \"render\", this).call(this, this.renderTemplate('field', _objectSpread(_objectSpread({}, this.getLabelInfo(this.options.condensedMode)), {}, {\n labelMarkup: this.renderTemplate('label'),\n element: element\n }), 'align'));\n } else {\n return _get(_getPrototypeOf(Field.prototype), \"render\", this).call(this, this.renderTemplate('field', {\n labelMarkup: this.renderTemplate('label'),\n element: element\n }));\n }\n }\n }]);\n\n return Field;\n}(_Component2.default);\n\nexports[\"default\"] = Field;\n\n//# sourceURL=webpack://Formio/./lib/components/_classes/field/Field.js?"); +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptors.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-properties.js */ \"./node_modules/core-js/modules/es.object.define-properties.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _Component2 = _interopRequireDefault(__webpack_require__(/*! ../component/Component */ \"./lib/components/_classes/component/Component.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar Field = /*#__PURE__*/function (_Component) {\n _inherits(Field, _Component);\n var _super = _createSuper(Field);\n function Field() {\n _classCallCheck(this, Field);\n return _super.apply(this, arguments);\n }\n _createClass(Field, [{\n key: \"render\",\n value: function render(element) {\n if (this.noField) {\n return _get(_getPrototypeOf(Field.prototype), \"render\", this).call(this, element);\n } else if (this.isAdvancedLabel || this.options.condensedMode) {\n return _get(_getPrototypeOf(Field.prototype), \"render\", this).call(this, this.renderTemplate('field', _objectSpread(_objectSpread({}, this.getLabelInfo(this.options.condensedMode)), {}, {\n labelMarkup: this.renderTemplate('label'),\n element: element\n }), 'align'));\n } else {\n return _get(_getPrototypeOf(Field.prototype), \"render\", this).call(this, this.renderTemplate('field', {\n labelMarkup: this.renderTemplate('label'),\n element: element\n }));\n }\n }\n }]);\n return Field;\n}(_Component2[\"default\"]);\nexports[\"default\"] = Field;\n\n//# sourceURL=webpack://Formio/./lib/components/_classes/field/Field.js?"); /***/ }), @@ -367,7 +367,40 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.find.js */ \"./node_modules/core-js/modules/es.array.find.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.split.js */ \"./node_modules/core-js/modules/es.string.split.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.trim.js */ \"./node_modules/core-js/modules/es.string.trim.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\nvar _Multivalue2 = _interopRequireDefault(__webpack_require__(/*! ../multivalue/Multivalue */ \"./lib/components/_classes/multivalue/Multivalue.js\"));\n\nvar _utils = __webpack_require__(/*! ../../../utils/utils */ \"./lib/utils/utils.js\");\n\nvar _widgets = _interopRequireDefault(__webpack_require__(/*! ../../../widgets */ \"./lib/widgets/index.js\"));\n\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar Input = /*#__PURE__*/function (_Multivalue) {\n _inherits(Input, _Multivalue);\n\n var _super = _createSuper(Input);\n\n function Input(component, options, data) {\n var _this;\n\n _classCallCheck(this, Input);\n\n _this = _super.call(this, component, options, data);\n _this.triggerUpdateValueAt = _lodash.default.debounce(_this.updateValueAt.bind(_assertThisInitialized(_this)), 100);\n return _this;\n }\n\n _createClass(Input, [{\n key: \"inputInfo\",\n get: function get() {\n var attr = {\n name: this.options.name,\n type: this.component.inputType || 'text',\n class: 'form-control',\n lang: this.options.language\n };\n\n if (this.options.attachMode === 'builder' || this.options.building) {\n attr.autocomplete = 'off';\n }\n\n if (this.component.inputMode) {\n attr.inputmode = this.component.inputMode;\n }\n\n if (this.component.placeholder) {\n attr.placeholder = this.t(this.component.placeholder, {\n _userInput: true\n });\n }\n\n if (this.component.tabindex) {\n attr.tabindex = this.component.tabindex;\n }\n\n if (this.disabled) {\n attr.disabled = 'disabled';\n }\n\n if (this.component.autocomplete) {\n attr.autocomplete = this.component.autocomplete;\n }\n\n _lodash.default.defaults(attr, this.component.attributes);\n\n return {\n id: this.key,\n type: 'input',\n changeEvent: 'input',\n content: '',\n attr: attr\n };\n }\n }, {\n key: \"maskOptions\",\n get: function get() {\n return _lodash.default.map(this.component.inputMasks, function (mask) {\n return {\n label: mask.label,\n value: mask.label\n };\n });\n }\n }, {\n key: \"isMultipleMasksField\",\n get: function get() {\n return this.component.allowMultipleMasks && !!this.component.inputMasks && !!this.component.inputMasks.length;\n }\n }, {\n key: \"getMaskByName\",\n value: function getMaskByName(maskName) {\n var inputMask = _lodash.default.find(this.component.inputMasks, function (inputMask) {\n return inputMask.label === maskName;\n });\n\n return inputMask ? inputMask.mask : undefined;\n }\n }, {\n key: \"setInputMask\",\n value: function setInputMask(input, inputMask) {\n var mask = inputMask || this.component.displayMask || this.component.inputMask;\n return _get(_getPrototypeOf(Input.prototype), \"setInputMask\", this).call(this, input, mask, !this.component.placeholder);\n }\n }, {\n key: \"getMaskOptions\",\n value: function getMaskOptions() {\n return this.component.inputMasks.map(function (mask) {\n return {\n label: mask.label,\n value: mask.label\n };\n });\n }\n }, {\n key: \"getWordCount\",\n value: function getWordCount(value) {\n return !value ? 0 : value.trim().split(/\\s+/).length;\n }\n }, {\n key: \"remainingWords\",\n get: function get() {\n var maxWords = _lodash.default.parseInt(_lodash.default.get(this.component, 'validate.maxWords'), 10);\n\n var wordCount = this.getWordCount(this.dataValue);\n return maxWords - wordCount;\n }\n }, {\n key: \"prefix\",\n get: function get() {\n return this.component.prefix;\n }\n }, {\n key: \"suffix\",\n get: function get() {\n if (this.component.widget && this.component.widget.type === 'calendar') {\n var calendarIcon = this.renderTemplate('icon', {\n ref: 'icon',\n // After font-awesome would be updated to v5.x, \"clock-o\" should be replaced with \"clock\"\n className: this.iconClass(this.component.enableDate || this.component.widget.enableDate ? 'calendar' : 'clock-o'),\n styles: '',\n content: ''\n }).trim();\n\n if (this.component.prefix !== calendarIcon) {\n // converting string to HTML markup to render correctly DateTime component in portal.form.io\n return (0, _utils.convertStringToHTMLElement)(calendarIcon, '[ref=\"icon\"]');\n }\n }\n\n return this.component.suffix;\n }\n }, {\n key: \"renderElement\",\n value: function renderElement(value, index) {\n // Double quotes cause the input value to close so replace them with html quote char.\n if (value && typeof value === 'string') {\n value = value.replace(/\"/g, '"');\n }\n\n var info = this.inputInfo;\n info.attr = info.attr || {};\n info.attr.value = this.getValueAsString(this.formatValue(this.parseValue(value))).replace(/\"/g, '"');\n var valueMask = this.component.inputMask;\n var displayMask = this.component.displayMask;\n var hasDifferentDisplayAndSaveFormats = valueMask && displayMask && valueMask !== displayMask;\n\n if (this.isMultipleMasksField) {\n info.attr.class += ' formio-multiple-mask-input';\n }\n\n return this.isMultipleMasksField ? this.renderTemplate('multipleMasksInput', {\n input: info,\n value: value,\n index: index,\n selectOptions: this.getMaskOptions() || []\n }, this.isHtmlRenderMode() ? 'html' : null) : this.renderTemplate('input', {\n prefix: this.prefix,\n suffix: this.suffix,\n input: info,\n value: this.formatValue(this.parseValue(value)),\n hasValueMaskInput: hasDifferentDisplayAndSaveFormats,\n index: index\n }, this.isHtmlRenderMode() ? 'html' : null);\n }\n }, {\n key: \"setCounter\",\n value: function setCounter(type, element, count, max) {\n if (max) {\n var remaining = max - count;\n\n if (remaining > 0) {\n this.removeClass(element, 'text-danger');\n } else {\n this.addClass(element, 'text-danger');\n }\n\n this.setContent(element, this.t(\"{{ remaining }} \".concat(type, \" remaining.\"), {\n remaining: remaining\n }));\n } else {\n this.setContent(element, this.t(\"{{ count }} \".concat(type), {\n count: count\n }));\n }\n }\n }, {\n key: \"updateValueAt\",\n value: function updateValueAt(value, flags, index) {\n flags = flags || {};\n\n if (_lodash.default.get(this.component, 'showWordCount', false)) {\n if (this.refs.wordcount && this.refs.wordcount[index]) {\n var maxWords = _lodash.default.parseInt(_lodash.default.get(this.component, 'validate.maxWords', 0), 10);\n\n this.setCounter(this.t('words'), this.refs.wordcount[index], this.getWordCount(value), maxWords);\n }\n }\n\n if (_lodash.default.get(this.component, 'showCharCount', false)) {\n if (this.refs.charcount && this.refs.charcount[index]) {\n var maxChars = _lodash.default.parseInt(_lodash.default.get(this.component, 'validate.maxLength', 0), 10);\n\n this.setCounter(this.t('characters'), this.refs.charcount[index], value.length, maxChars);\n }\n }\n }\n }, {\n key: \"getValueAt\",\n value: function getValueAt(index) {\n var input = this.performInputMapping(this.refs.input[index]);\n\n if (input && input.widget) {\n return input.widget.getValue();\n }\n\n return input ? input.value : undefined;\n }\n }, {\n key: \"updateValue\",\n value: function updateValue(value, flags, index) {\n flags = flags || {};\n\n var changed = _get(_getPrototypeOf(Input.prototype), \"updateValue\", this).call(this, value, flags);\n\n this.triggerUpdateValueAt(this.dataValue, flags, index);\n return changed;\n }\n }, {\n key: \"parseValue\",\n value: function parseValue(value) {\n return value;\n }\n }, {\n key: \"formatValue\",\n value: function formatValue(value) {\n return value;\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n this.loadRefs(element, {\n charcount: 'multiple',\n wordcount: 'multiple',\n prefix: 'multiple',\n suffix: 'multiple'\n });\n return _get(_getPrototypeOf(Input.prototype), \"attach\", this).call(this, element);\n }\n }, {\n key: \"getWidget\",\n value: function getWidget(index) {\n index = index || 0;\n\n if (this.refs.input && this.refs.input[index]) {\n return this.refs.input[index].widget;\n }\n\n return null;\n }\n }, {\n key: \"attachElement\",\n value: function attachElement(element, index) {\n var _this2 = this;\n\n _get(_getPrototypeOf(Input.prototype), \"attachElement\", this).call(this, element, index);\n\n if (element.widget) {\n element.widget.destroy();\n } // Attach the widget.\n\n\n var promise = _nativePromiseOnly.default.resolve();\n\n element.widget = this.createWidget(index);\n\n if (element.widget) {\n promise = element.widget.attach(element);\n\n if (this.refs.prefix && this.refs.prefix[index]) {\n element.widget.addPrefix(this.refs.prefix[index]);\n }\n\n if (this.refs.suffix && this.refs.suffix[index]) {\n element.widget.addSuffix(this.refs.suffix[index]);\n }\n } // Add focus and blur events.\n\n\n this.addFocusBlurEvents(element);\n\n if (this.options.submitOnEnter) {\n this.addEventListener(element, 'keypress', function (event) {\n var key = event.keyCode || event.which;\n\n if (key === 13) {\n event.preventDefault();\n event.stopPropagation();\n\n _this2.emit('submitButton');\n }\n });\n }\n\n return promise;\n }\n /**\n * Creates an instance of a widget for this component.\n *\n * @return {null}\n */\n\n }, {\n key: \"createWidget\",\n value: function createWidget(index) {\n var _this$root,\n _this3 = this;\n\n // Return null if no widget is found.\n if (!this.component.widget) {\n return null;\n } // Get the widget settings.\n\n\n var settings = typeof this.component.widget === 'string' ? {\n type: this.component.widget\n } : this.component.widget;\n\n if ((_this$root = this.root) !== null && _this$root !== void 0 && _this$root.shadowRoot) {\n var _this$root2;\n\n settings.shadowRoot = (_this$root2 = this.root) === null || _this$root2 === void 0 ? void 0 : _this$root2.shadowRoot;\n } // Make sure we have a widget.\n\n\n if (!_widgets.default.hasOwnProperty(settings.type)) {\n return null;\n } // Create the widget.\n\n\n var widget = new _widgets.default[settings.type](settings, this.component, this, index);\n widget.on('update', function () {\n return _this3.updateValue(_this3.getValue(), {\n modified: true\n }, index);\n }, true);\n widget.on('redraw', function () {\n return _this3.redraw();\n }, true);\n return widget;\n }\n }, {\n key: \"detach\",\n value: function detach() {\n _get(_getPrototypeOf(Input.prototype), \"detach\", this).call(this);\n\n if (this.refs && this.refs.input) {\n for (var i = 0; i <= this.refs.input.length; i++) {\n var widget = this.getWidget(i);\n\n if (widget) {\n widget.destroy();\n }\n }\n }\n\n this.refs.input = [];\n }\n }, {\n key: \"addFocusBlurEvents\",\n value: function addFocusBlurEvents(element) {\n var _this4 = this;\n\n this.addEventListener(element, 'focus', function () {\n if (_this4.root.focusedComponent !== _this4) {\n if (_this4.root.pendingBlur) {\n _this4.root.pendingBlur();\n }\n\n _this4.root.focusedComponent = _this4;\n\n _this4.emit('focus', _this4);\n } else if (_this4.root.focusedComponent === _this4 && _this4.root.pendingBlur) {\n _this4.root.pendingBlur.cancel();\n\n _this4.root.pendingBlur = null;\n }\n });\n this.addEventListener(element, 'blur', function () {\n _this4.root.pendingBlur = (0, _utils.delay)(function () {\n _this4.emit('blur', _this4);\n\n if (_this4.component.validateOn === 'blur') {\n _this4.root.triggerChange({\n fromBlur: true\n }, {\n instance: _this4,\n component: _this4.component,\n value: _this4.dataValue,\n flags: {\n fromBlur: true\n }\n });\n }\n\n _this4.root.focusedComponent = null;\n _this4.root.pendingBlur = null;\n });\n });\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _Multivalue2.default.schema.apply(_Multivalue2.default, [{\n widget: {\n type: 'input'\n }\n }].concat(extend));\n }\n }]);\n\n return Input;\n}(_Multivalue2.default);\n\nexports[\"default\"] = Input;\n\n//# sourceURL=webpack://Formio/./lib/components/_classes/input/Input.js?"); +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n__webpack_require__(/*! core-js/modules/es.array.find.js */ \"./node_modules/core-js/modules/es.array.find.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n__webpack_require__(/*! core-js/modules/es.string.split.js */ \"./node_modules/core-js/modules/es.string.split.js\");\n__webpack_require__(/*! core-js/modules/es.string.trim.js */ \"./node_modules/core-js/modules/es.string.trim.js\");\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _Multivalue2 = _interopRequireDefault(__webpack_require__(/*! ../multivalue/Multivalue */ \"./lib/components/_classes/multivalue/Multivalue.js\"));\nvar _utils = __webpack_require__(/*! ../../../utils/utils */ \"./lib/utils/utils.js\");\nvar _widgets = _interopRequireDefault(__webpack_require__(/*! ../../../widgets */ \"./lib/widgets/index.js\"));\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar Input = /*#__PURE__*/function (_Multivalue) {\n _inherits(Input, _Multivalue);\n var _super = _createSuper(Input);\n function Input(component, options, data) {\n var _this;\n _classCallCheck(this, Input);\n _this = _super.call(this, component, options, data);\n _this.triggerUpdateValueAt = _lodash[\"default\"].debounce(_this.updateValueAt.bind(_assertThisInitialized(_this)), 100);\n return _this;\n }\n _createClass(Input, [{\n key: \"inputInfo\",\n get: function get() {\n var attr = {\n name: this.options.name,\n type: this.component.inputType || 'text',\n \"class\": 'form-control',\n lang: this.options.language\n };\n if (this.options.attachMode === 'builder' || this.options.building || _lodash[\"default\"].get(this.root, 'form.settings.disableAutocomplete')) {\n attr.autocomplete = this.autocompleteDisableAttrName;\n }\n if (this.component.inputMode) {\n attr.inputmode = this.component.inputMode;\n }\n if (this.component.placeholder) {\n attr.placeholder = this.getFormattedAttribute(this.component.placeholder);\n }\n if (this.component.tabindex) {\n attr.tabindex = this.component.tabindex;\n }\n if (this.disabled) {\n attr.disabled = 'disabled';\n }\n if (this.component.autocomplete) {\n attr.autocomplete = this.component.autocomplete;\n }\n _lodash[\"default\"].defaults(attr, this.component.attributes);\n return {\n id: this.key,\n type: 'input',\n changeEvent: 'input',\n content: '',\n attr: attr\n };\n }\n }, {\n key: \"autocompleteDisableAttrName\",\n get: function get() {\n return 'off';\n }\n }, {\n key: \"maskOptions\",\n get: function get() {\n return _lodash[\"default\"].map(this.component.inputMasks, function (mask) {\n return {\n label: mask.label,\n value: mask.label\n };\n });\n }\n }, {\n key: \"isMultipleMasksField\",\n get: function get() {\n return this.component.allowMultipleMasks && !!this.component.inputMasks && !!this.component.inputMasks.length;\n }\n }, {\n key: \"getMaskByName\",\n value: function getMaskByName(maskName) {\n var inputMask = _lodash[\"default\"].find(this.component.inputMasks, function (inputMask) {\n return inputMask.label === maskName;\n });\n return inputMask ? inputMask.mask : undefined;\n }\n }, {\n key: \"setInputMask\",\n value: function setInputMask(input, inputMask) {\n var mask = inputMask || this.component.displayMask || this.component.inputMask;\n return _get(_getPrototypeOf(Input.prototype), \"setInputMask\", this).call(this, input, mask, !this.component.placeholder);\n }\n }, {\n key: \"getMaskOptions\",\n value: function getMaskOptions() {\n return this.component.inputMasks.map(function (mask) {\n return {\n label: mask.label,\n value: mask.label\n };\n });\n }\n }, {\n key: \"getWordCount\",\n value: function getWordCount(value) {\n return !value ? 0 : value.trim().split(/\\s+/).length;\n }\n }, {\n key: \"remainingWords\",\n get: function get() {\n var maxWords = _lodash[\"default\"].parseInt(_lodash[\"default\"].get(this.component, 'validate.maxWords'), 10);\n var wordCount = this.getWordCount(this.dataValue);\n return maxWords - wordCount;\n }\n }, {\n key: \"prefix\",\n get: function get() {\n return this.component.prefix;\n }\n }, {\n key: \"suffix\",\n get: function get() {\n if (this.component.widget && this.component.widget.type === 'calendar') {\n var calendarIcon = this.renderTemplate('icon', {\n ref: 'icon',\n // After font-awesome would be updated to v5.x, \"clock-o\" should be replaced with \"clock\"\n className: this.iconClass(this.component.enableDate || this.component.widget.enableDate ? 'calendar' : 'clock-o'),\n styles: '',\n content: ''\n }).trim();\n if (this.component.prefix !== calendarIcon) {\n // converting string to HTML markup to render correctly DateTime component in portal.form.io\n return (0, _utils.convertStringToHTMLElement)(calendarIcon, '[ref=\"icon\"]');\n }\n }\n return this.component.suffix;\n }\n }, {\n key: \"renderElement\",\n value: function renderElement(value, index) {\n // Double quotes cause the input value to close so replace them with html quote char.\n if (value && typeof value === 'string') {\n value = value.replace(/\"/g, '"');\n }\n var info = this.inputInfo;\n info.attr = info.attr || {};\n info.attr.value = this.getValueAsString(this.formatValue(this.parseValue(value))).replace(/\"/g, '"');\n var valueMask = this.component.inputMask;\n var displayMask = this.component.displayMask;\n var hasDifferentDisplayAndSaveFormats = valueMask && displayMask && valueMask !== displayMask;\n if (this.isMultipleMasksField) {\n info.attr[\"class\"] += ' formio-multiple-mask-input';\n }\n return this.isMultipleMasksField ? this.renderTemplate('multipleMasksInput', {\n input: info,\n value: value,\n index: index,\n selectOptions: this.getMaskOptions() || []\n }, this.isHtmlRenderMode() ? 'html' : null) : this.renderTemplate('input', {\n prefix: this.prefix,\n suffix: this.suffix,\n input: info,\n value: this.formatValue(this.parseValue(value)),\n hasValueMaskInput: hasDifferentDisplayAndSaveFormats,\n index: index\n }, this.isHtmlRenderMode() ? 'html' : null);\n }\n }, {\n key: \"setCounter\",\n value: function setCounter(type, element, count, max) {\n if (max) {\n var remaining = max - count;\n if (remaining > 0) {\n this.removeClass(element, 'text-danger');\n } else {\n this.addClass(element, 'text-danger');\n }\n this.setContent(element, this.t(\"{{ remaining }} \".concat(type, \" remaining.\"), {\n remaining: remaining\n }));\n } else {\n this.setContent(element, this.t(\"{{ count }} \".concat(type), {\n count: count\n }));\n }\n }\n }, {\n key: \"updateValueAt\",\n value: function updateValueAt(value, flags, index) {\n flags = flags || {};\n if (_lodash[\"default\"].get(this.component, 'showWordCount', false)) {\n if (this.refs.wordcount && this.refs.wordcount[index]) {\n var maxWords = _lodash[\"default\"].parseInt(_lodash[\"default\"].get(this.component, 'validate.maxWords', 0), 10);\n this.setCounter(this.t('words'), this.refs.wordcount[index], this.getWordCount(value), maxWords);\n }\n }\n if (_lodash[\"default\"].get(this.component, 'showCharCount', false)) {\n if (this.refs.charcount && this.refs.charcount[index]) {\n var maxChars = _lodash[\"default\"].parseInt(_lodash[\"default\"].get(this.component, 'validate.maxLength', 0), 10);\n this.setCounter(this.t('characters'), this.refs.charcount[index], value.length, maxChars);\n }\n }\n }\n }, {\n key: \"getValueAt\",\n value: function getValueAt(index) {\n var input = this.performInputMapping(this.refs.input[index]);\n if (input && input.widget) {\n return input.widget.getValue();\n }\n return input ? input.value : undefined;\n }\n }, {\n key: \"updateValue\",\n value: function updateValue(value, flags, index) {\n flags = flags || {};\n var changed = _get(_getPrototypeOf(Input.prototype), \"updateValue\", this).call(this, value, flags);\n this.triggerUpdateValueAt(this.dataValue, flags, index);\n return changed;\n }\n }, {\n key: \"parseValue\",\n value: function parseValue(value) {\n return value;\n }\n }, {\n key: \"formatValue\",\n value: function formatValue(value) {\n return value;\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n this.loadRefs(element, {\n charcount: 'multiple',\n wordcount: 'multiple',\n prefix: 'multiple',\n suffix: 'multiple'\n });\n return _get(_getPrototypeOf(Input.prototype), \"attach\", this).call(this, element);\n }\n }, {\n key: \"getWidget\",\n value: function getWidget(index) {\n index = index || 0;\n if (this.refs.input && this.refs.input[index]) {\n return this.refs.input[index].widget;\n }\n return null;\n }\n }, {\n key: \"attachElement\",\n value: function attachElement(element, index) {\n var _this2 = this;\n _get(_getPrototypeOf(Input.prototype), \"attachElement\", this).call(this, element, index);\n if (element.widget) {\n element.widget.destroy();\n }\n // Attach the widget.\n var promise = _nativePromiseOnly[\"default\"].resolve();\n element.widget = this.createWidget(index);\n if (element.widget) {\n promise = element.widget.attach(element);\n if (this.refs.prefix && this.refs.prefix[index]) {\n element.widget.addPrefix(this.refs.prefix[index]);\n }\n if (this.refs.suffix && this.refs.suffix[index]) {\n element.widget.addSuffix(this.refs.suffix[index]);\n }\n }\n\n // Add focus and blur events.\n this.addFocusBlurEvents(element);\n if (this.options.submitOnEnter) {\n this.addEventListener(element, 'keypress', function (event) {\n var key = event.keyCode || event.which;\n if (key === 13) {\n event.preventDefault();\n event.stopPropagation();\n _this2.emit('submitButton');\n }\n });\n }\n return promise;\n }\n\n /**\n * Creates an instance of a widget for this component.\n *\n * @return {null}\n */\n }, {\n key: \"createWidget\",\n value: function createWidget(index) {\n var _this$root,\n _this3 = this;\n // Return null if no widget is found.\n if (!this.component.widget) {\n return null;\n }\n\n // Get the widget settings.\n var settings = typeof this.component.widget === 'string' ? {\n type: this.component.widget\n } : this.component.widget;\n if ((_this$root = this.root) !== null && _this$root !== void 0 && _this$root.shadowRoot) {\n var _this$root2;\n settings.shadowRoot = (_this$root2 = this.root) === null || _this$root2 === void 0 ? void 0 : _this$root2.shadowRoot;\n }\n\n // Make sure we have a widget.\n if (!_widgets[\"default\"].hasOwnProperty(settings.type)) {\n return null;\n }\n\n // Create the widget.\n var widget = new _widgets[\"default\"][settings.type](settings, this.component, this, index);\n widget.on('update', function () {\n return _this3.updateValue(_this3.getValue(), {\n modified: true\n }, index);\n }, true);\n widget.on('redraw', function () {\n return _this3.redraw();\n }, true);\n return widget;\n }\n }, {\n key: \"detach\",\n value: function detach() {\n _get(_getPrototypeOf(Input.prototype), \"detach\", this).call(this);\n if (this.refs && this.refs.input) {\n for (var i = 0; i <= this.refs.input.length; i++) {\n var widget = this.getWidget(i);\n if (widget) {\n widget.destroy();\n }\n }\n }\n this.refs.input = [];\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _Multivalue2[\"default\"].schema.apply(_Multivalue2[\"default\"], [{\n widget: {\n type: 'input'\n }\n }].concat(extend));\n }\n }]);\n return Input;\n}(_Multivalue2[\"default\"]);\nexports[\"default\"] = Input;\n\n//# sourceURL=webpack://Formio/./lib/components/_classes/input/Input.js?"); + +/***/ }), + +/***/ "./lib/components/_classes/list/ListComponent.form.js": +/*!************************************************************!*\ + !*** ./lib/components/_classes/list/ListComponent.form.js ***! + \************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\nvar _Components = _interopRequireDefault(__webpack_require__(/*! ../../Components */ \"./lib/components/Components.js\"));\nvar _ListComponentEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/ListComponent.edit.data */ \"./lib/components/_classes/list/editForm/ListComponent.edit.data.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _Components[\"default\"].baseEditForm.apply(_Components[\"default\"], [[{\n key: 'data',\n components: _ListComponentEdit[\"default\"]\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/_classes/list/ListComponent.form.js?"); + +/***/ }), + +/***/ "./lib/components/_classes/list/ListComponent.js": +/*!*******************************************************!*\ + !*** ./lib/components/_classes/list/ListComponent.js ***! + \*******************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.date.to-string.js */ \"./node_modules/core-js/modules/es.date.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.starts-with.js */ \"./node_modules/core-js/modules/es.string.starts-with.js\");\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _Field2 = _interopRequireDefault(__webpack_require__(/*! ../field/Field */ \"./lib/components/_classes/field/Field.js\"));\nvar _Formio = __webpack_require__(/*! ../../../Formio */ \"./lib/Formio.js\");\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar ListComponent = /*#__PURE__*/function (_Field) {\n _inherits(ListComponent, _Field);\n var _super = _createSuper(ListComponent);\n function ListComponent() {\n _classCallCheck(this, ListComponent);\n return _super.apply(this, arguments);\n }\n _createClass(ListComponent, [{\n key: \"isSelectURL\",\n get: function get() {\n return this.component.dataSrc === 'url';\n }\n }, {\n key: \"requestHeaders\",\n get: function get() {\n var _this = this;\n // Create the headers object.\n var headers = new _Formio.GlobalFormio.Headers();\n // Add custom headers to the url.\n if (this.component.data && this.component.data.headers) {\n try {\n _lodash[\"default\"].each(this.component.data.headers, function (header) {\n if (header.key) {\n headers.set(header.key, _this.interpolate(header.value));\n }\n });\n } catch (err) {\n console.warn(err.message);\n }\n }\n return headers;\n }\n\n // Must be implemented in child classes.\n }, {\n key: \"setItems\",\n value: function setItems() {}\n }, {\n key: \"updateCustomItems\",\n value: function updateCustomItems() {}\n }, {\n key: \"loadItems\",\n value: function loadItems() {}\n }, {\n key: \"getOptionTemplate\",\n value: function getOptionTemplate(data, value) {\n if (!this.component.template) {\n return data.label;\n }\n var options = {\n noeval: true,\n data: {}\n };\n var template = this.sanitize(this.component.template ? this.interpolate(this.component.template, {\n item: data\n }, options) : data.label, this.shouldSanitizeValue);\n var templateValue = this.component.reference && value !== null && value !== void 0 && value._id ? value._id.toString() : value;\n if (templateValue && !_lodash[\"default\"].isObject(templateValue) && options.data.item) {\n // If the value is not an object, then we need to save the template data off for when it is selected.\n this.templateData[templateValue] = options.data.item;\n }\n return template;\n }\n }, {\n key: \"itemTemplate\",\n value: function itemTemplate(data, value) {\n if (_lodash[\"default\"].isEmpty(data)) {\n return '';\n }\n var template = this.sanitize(this.getOptionTemplate(data, value), this.shouldSanitizeValue);\n if (template) {\n var _this$i18next;\n var label = template.replace(/<\\/?[^>]+(>|$)/g, '');\n var hasTranslator = (_this$i18next = this.i18next) === null || _this$i18next === void 0 ? void 0 : _this$i18next.translator;\n if (!label || hasTranslator && !this.t(label, {\n _userInput: true\n })) return;\n return hasTranslator ? template.replace(label, this.t(label, {\n _userInput: true\n })) : label;\n } else {\n return this.sanitize(JSON.stringify(data), this.shouldSanitizeValue);\n }\n }\n }, {\n key: \"handleLoadingError\",\n value: function handleLoadingError(err) {\n this.loading = false;\n if (err.networkError) {\n this.networkError = true;\n }\n this.itemsLoadedResolve();\n this.emit('componentError', {\n component: this.component,\n message: err.toString()\n });\n console.warn(\"Unable to load resources for \".concat(this.key));\n }\n\n /* eslint-disable max-statements */\n }, {\n key: \"updateItems\",\n value: function updateItems(searchInput, forceUpdate) {\n var _this2 = this;\n if (!this.component.data) {\n console.warn(\"Select component \".concat(this.key, \" does not have data configuration.\"));\n this.itemsLoadedResolve();\n return;\n }\n\n // Only load the data if it is visible.\n if (!this.visible) {\n this.itemsLoadedResolve();\n return;\n }\n switch (this.component.dataSrc) {\n case 'values':\n this.setItems(this.component.data.values);\n break;\n case 'json':\n this.setItems(this.component.data.json);\n break;\n case 'custom':\n this.updateCustomItems(forceUpdate);\n break;\n case 'resource':\n {\n // If there is no resource, or we are lazyLoading, wait until active.\n if (!this.component.data.resource || !forceUpdate && !this.active) {\n this.itemsLoadedResolve();\n return;\n }\n var resourceUrl = this.options.formio ? this.options.formio.formsUrl : \"\".concat(_Formio.GlobalFormio.getProjectUrl(), \"/form\");\n resourceUrl += \"/\".concat(this.component.data.resource, \"/submission\");\n if (forceUpdate || this.additionalResourcesAvailable || !this.serverCount) {\n try {\n this.loadItems(resourceUrl, searchInput, this.requestHeaders);\n } catch (err) {\n console.warn(\"Unable to load resources for \".concat(this.key));\n }\n } else {\n this.setItems(this.downloadedResources);\n }\n break;\n }\n case 'url':\n {\n if (!forceUpdate && !this.active && !this.calculatedValue && this.component.type === 'select') {\n // If we are lazyLoading, wait until activated.\n this.itemsLoadedResolve();\n return;\n }\n var url = this.component.data.url;\n var method;\n var body;\n if (url.startsWith('/')) {\n // if URL starts with '/project', we should use base URL to avoid issues with URL formed like //project//...\n var baseUrl = url.startsWith('/project') ? _Formio.GlobalFormio.getBaseUrl() : _Formio.GlobalFormio.getProjectUrl() || _Formio.GlobalFormio.getBaseUrl();\n url = baseUrl + url;\n }\n if (!this.component.data.method) {\n method = 'GET';\n } else {\n method = this.component.data.method;\n if (method.toUpperCase() === 'POST') {\n body = this.component.data.body;\n } else {\n body = null;\n }\n }\n var options = this.component.authenticate ? {} : {\n noToken: true\n };\n this.loadItems(url, searchInput, this.requestHeaders, options, method, body);\n break;\n }\n case 'indexeddb':\n {\n if (typeof window === 'undefined') {\n return;\n }\n if (!window.indexedDB) {\n window.alert(\"Your browser doesn't support current version of indexedDB\");\n }\n if (this.component.indexeddb && this.component.indexeddb.database && this.component.indexeddb.table) {\n var request = window.indexedDB.open(this.component.indexeddb.database);\n request.onupgradeneeded = function (event) {\n if (_this2.component.customOptions) {\n var db = event.target.result;\n var objectStore = db.createObjectStore(_this2.component.indexeddb.table, {\n keyPath: 'myKey',\n autoIncrement: true\n });\n objectStore.transaction.oncomplete = function () {\n var transaction = db.transaction(_this2.component.indexeddb.table, 'readwrite');\n _this2.component.customOptions.forEach(function (item) {\n transaction.objectStore(_this2.component.indexeddb.table).put(item);\n });\n };\n }\n };\n request.onerror = function () {\n window.alert(request.errorCode);\n };\n request.onsuccess = function (event) {\n var db = event.target.result;\n var transaction = db.transaction(_this2.component.indexeddb.table, 'readwrite');\n var objectStore = transaction.objectStore(_this2.component.indexeddb.table);\n new _nativePromiseOnly[\"default\"](function (resolve) {\n var responseItems = [];\n objectStore.getAll().onsuccess = function (event) {\n event.target.result.forEach(function (item) {\n responseItems.push(item);\n });\n resolve(responseItems);\n };\n }).then(function (items) {\n if (!_lodash[\"default\"].isEmpty(_this2.component.indexeddb.filter)) {\n items = _lodash[\"default\"].filter(items, _this2.component.indexeddb.filter);\n }\n _this2.setItems(items);\n });\n };\n }\n }\n }\n }\n /* eslint-enable max-statements */\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _Field2[\"default\"].schema.apply(_Field2[\"default\"], [{\n dataSrc: 'values',\n authenticate: false,\n ignoreCache: false,\n template: '{{ item.label }}',\n validate: {\n onlyAvailableItems: false\n }\n }].concat(extend));\n }\n }]);\n return ListComponent;\n}(_Field2[\"default\"]);\nexports[\"default\"] = ListComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/_classes/list/ListComponent.js?"); + +/***/ }), + +/***/ "./lib/components/_classes/list/editForm/ListComponent.edit.data.js": +/*!**************************************************************************!*\ + !*** ./lib/components/_classes/list/editForm/ListComponent.edit.data.js ***! + \**************************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n type: 'select',\n input: true,\n weight: 0,\n tooltip: 'The source to use for the select data. Values lets you provide your own values and labels. JSON lets you provide raw JSON data. URL lets you provide a URL to retrieve the JSON data from.',\n key: 'dataSrc',\n defaultValue: 'values',\n label: 'Data Source Type',\n dataSrc: 'values'\n}, {\n type: 'textfield',\n input: true,\n key: 'data.url',\n weight: 10,\n label: 'Data Source URL',\n placeholder: 'Data Source URL',\n tooltip: 'A URL that returns a JSON array to use as the data source.',\n conditional: {\n json: {\n '===': [{\n \"var\": 'data.dataSrc'\n }, 'url']\n }\n }\n}, {\n type: 'datagrid',\n input: true,\n label: 'Request Headers',\n key: 'data.headers',\n tooltip: 'Set any headers that should be sent along with the request to the url. This is useful for authentication.',\n weight: 11,\n components: [{\n label: 'Key',\n key: 'key',\n input: true,\n type: 'textfield'\n }, {\n label: 'Value',\n key: 'value',\n input: true,\n type: 'textfield'\n }],\n conditional: {\n json: {\n '===': [{\n \"var\": 'data.dataSrc'\n }, 'url']\n }\n }\n}, {\n type: 'textfield',\n input: true,\n label: 'Value Property',\n key: 'valueProperty',\n skipMerge: true,\n clearOnHide: false,\n weight: 13,\n description: \"The selected item's property to save.\",\n tooltip: 'The property of each item in the data source to use as the select value. If not specified, the item itself will be used.',\n conditional: {\n json: {\n \"in\": [{\n \"var\": 'data.dataSrc'\n }, ['json', 'url', 'custom']]\n }\n }\n}, {\n type: 'textarea',\n input: true,\n key: 'template',\n label: 'Item Template',\n editor: 'ace',\n as: 'html',\n rows: 3,\n weight: 18,\n tooltip: 'The HTML template for the result data items.',\n allowCalculateOverride: true,\n calculateValue: function calculateValue(context) {\n if (!context.data.template) {\n if (context.instance && context.instance._currentForm.options.editComponent) {\n return context.instance._currentForm.options.editComponent.template;\n }\n }\n return context.data.template;\n }\n}, {\n type: 'checkbox',\n input: true,\n weight: 26,\n key: 'authenticate',\n label: 'Formio Authenticate',\n tooltip: 'Check this if you would like to use Formio Authentication with the request.',\n conditional: {\n json: {\n '===': [{\n \"var\": 'data.dataSrc'\n }, 'url']\n }\n }\n}, {\n type: 'checkbox',\n input: true,\n weight: 29,\n key: 'ignoreCache',\n label: 'Disables Storing Request Result in the Cache',\n tooltip: 'Check it if you don\\'t want the requests and its results to be stored in the cache. By default, it is stored and if the Select tries to make the request to the same URL with the same paremetrs, the cached data will be returned. It allows to increase performance, but if the remote source\\'s data is changing quite often and you always need to keep it up-to-date, uncheck this option.',\n conditional: {\n json: {\n 'or': [{\n '===': [{\n \"var\": 'data.dataSrc'\n }, 'url']\n }, {\n '===': [{\n \"var\": 'data.dataSrc'\n }, 'resource']\n }]\n }\n }\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/_classes/list/editForm/ListComponent.edit.data.js?"); /***/ }), @@ -378,7 +411,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.set.js */ \"./node_modules/core-js/modules/es.reflect.set.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.array.join.js */ \"./node_modules/core-js/modules/es.array.join.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.find.js */ \"./node_modules/core-js/modules/es.array.find.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\nvar _Field2 = _interopRequireDefault(__webpack_require__(/*! ../field/Field */ \"./lib/components/_classes/field/Field.js\"));\n\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction set(target, property, value, receiver) { if (typeof Reflect !== \"undefined\" && Reflect.set) { set = Reflect.set; } else { set = function set(target, property, value, receiver) { var base = _superPropBase(target, property); var desc; if (base) { desc = Object.getOwnPropertyDescriptor(base, property); if (desc.set) { desc.set.call(receiver, value); return true; } else if (!desc.writable) { return false; } } desc = Object.getOwnPropertyDescriptor(receiver, property); if (desc) { if (!desc.writable) { return false; } desc.value = value; Object.defineProperty(receiver, property, desc); } else { _defineProperty(receiver, property, value); } return true; }; } return set(target, property, value, receiver); }\n\nfunction _set(target, property, value, receiver, isStrict) { var s = set(target, property, value, receiver || target); if (!s && isStrict) { throw new Error('failed to set property'); } return value; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar Multivalue = /*#__PURE__*/function (_Field) {\n _inherits(Multivalue, _Field);\n\n var _super = _createSuper(Multivalue);\n\n function Multivalue() {\n _classCallCheck(this, Multivalue);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(Multivalue, [{\n key: \"dataValue\",\n get: function get() {\n var parent = _get(_getPrototypeOf(Multivalue.prototype), \"dataValue\", this);\n\n if (!parent && this.component.multiple) {\n return [];\n }\n\n return parent;\n },\n set: function set(value) {\n _set(_getPrototypeOf(Multivalue.prototype), \"dataValue\", value, this, true);\n }\n }, {\n key: \"defaultValue\",\n get: function get() {\n var value = _get(_getPrototypeOf(Multivalue.prototype), \"defaultValue\", this);\n\n if (this.component.multiple) {\n if (_lodash.default.isArray(value)) {\n value = !value.length ? [_get(_getPrototypeOf(Multivalue.prototype), \"emptyValue\", this)] : value;\n } else {\n value = [value];\n }\n }\n\n return value;\n }\n }, {\n key: \"addAnother\",\n get: function get() {\n return this.t(this.component.addAnother || 'Add Another');\n }\n }, {\n key: \"useWrapper\",\n value: function useWrapper() {\n return this.component.hasOwnProperty('multiple') && this.component.multiple;\n }\n }, {\n key: \"render\",\n value: function render() {\n // If single value field.\n if (!this.useWrapper()) {\n return _get(_getPrototypeOf(Multivalue.prototype), \"render\", this).call(this, \"
\\n \".concat(this.renderElement(this.component.type !== 'hidden' ? this.dataValue : ''), \"\\n
\"));\n } // Make sure dataValue is in the correct array format.\n\n\n var dataValue = this.dataValue;\n\n if (!Array.isArray(dataValue)) {\n dataValue = dataValue ? [dataValue] : [];\n } // If multiple value field.\n\n\n return _get(_getPrototypeOf(Multivalue.prototype), \"render\", this).call(this, this.renderTemplate('multiValueTable', {\n rows: dataValue.map(this.renderRow.bind(this)).join(''),\n disabled: this.disabled,\n addAnother: this.addAnother\n }));\n }\n }, {\n key: \"renderElement\",\n value: function renderElement() {\n return '';\n }\n }, {\n key: \"renderRow\",\n value: function renderRow(value, index) {\n return this.renderTemplate('multiValueRow', {\n index: index,\n disabled: this.disabled,\n element: \"\".concat(this.renderElement(value, index))\n });\n }\n }, {\n key: \"attach\",\n value: function attach(dom) {\n var _this = this;\n\n var superAttach = _get(_getPrototypeOf(Multivalue.prototype), \"attach\", this).call(this, dom);\n\n this.loadRefs(dom, {\n addButton: 'multiple',\n input: 'multiple',\n removeRow: 'multiple',\n mask: 'multiple',\n select: 'multiple'\n });\n var promises = [];\n this.refs.input.forEach(function (element, index) {\n promises.push(_this.attachElement.call(_this, element, index));\n });\n\n if (!this.component.multiple) {\n return _nativePromiseOnly.default.all(promises);\n }\n\n this.refs.removeRow.forEach(function (removeButton, index) {\n _this.addEventListener(removeButton, 'click', function (event) {\n event.preventDefault();\n\n _this.removeValue(index);\n });\n }); // If single value field.\n\n this.refs.addButton.forEach(function (addButton) {\n _this.addEventListener(addButton, 'click', function (event) {\n event.preventDefault();\n\n _this.addValue();\n });\n });\n return superAttach.then(function () {\n return _nativePromiseOnly.default.all(promises);\n });\n }\n }, {\n key: \"detach\",\n value: function detach() {\n if (this.refs.input && this.refs.input.length) {\n this.refs.input.forEach(function (input) {\n if (input.mask) {\n input.mask.destroy();\n }\n\n if (input.widget) {\n input.widget.destroy();\n }\n });\n }\n\n if (this.refs.mask && this.refs.mask.length) {\n this.refs.mask.forEach(function (input) {\n if (input.mask) {\n input.mask.destroy();\n }\n });\n }\n\n _get(_getPrototypeOf(Multivalue.prototype), \"detach\", this).call(this);\n }\n /**\n * Attach inputs to the element.\n *\n * @param element\n * @param index\n */\n\n }, {\n key: \"attachElement\",\n value: function attachElement(element, index) {\n var _this2 = this;\n\n this.addEventListener(element, this.inputInfo.changeEvent, function () {\n // Delay update slightly to give input mask a chance to run.\n var textCase = _lodash.default.get(_this2.component, 'case', 'mixed');\n\n if (textCase !== 'mixed') {\n var selectionStart = element.selectionStart,\n selectionEnd = element.selectionEnd;\n\n if (textCase === 'uppercase' && element.value) {\n element.value = element.value.toUpperCase();\n }\n\n if (textCase === 'lowercase' && element.value) {\n element.value = element.value.toLowerCase();\n }\n\n if (element.selectionStart && element.selectionEnd) {\n element.selectionStart = selectionStart;\n element.selectionEnd = selectionEnd;\n }\n }\n\n try {\n _this2.saveCaretPosition(element, index);\n } catch (err) {\n console.warn('An error occurred while trying to save caret position', err);\n } // If a mask is present, delay the update to allow mask to update first.\n\n\n if (element.mask) {\n setTimeout(function () {\n return _this2.updateValue(null, {\n modified: _this2.component.type !== 'hidden'\n }, index);\n }, 1);\n } else {\n return _this2.updateValue(null, {\n modified: _this2.component.type !== 'hidden'\n }, index);\n }\n });\n\n if (!this.attachMultiMask(index)) {\n this.setInputMask(element);\n var valueMask = this.component.inputMask;\n var displayMask = this.component.displayMask;\n\n if (valueMask && displayMask && displayMask !== valueMask && this.refs.valueMaskInput) {\n this.setInputMask(this.refs.valueMaskInput, valueMask);\n }\n }\n } // Saves current caret position to restore it after the component is redrawn\n\n }, {\n key: \"saveCaretPosition\",\n value: function saveCaretPosition(element, index) {\n var _this$root, _this$root$focusedCom;\n\n if (((_this$root = this.root) === null || _this$root === void 0 ? void 0 : (_this$root$focusedCom = _this$root.focusedComponent) === null || _this$root$focusedCom === void 0 ? void 0 : _this$root$focusedCom.path) === this.path) {\n this.root.currentSelection = {\n selection: [element.selectionStart, element.selectionEnd],\n index: index\n };\n }\n }\n }, {\n key: \"onSelectMaskHandler\",\n value: function onSelectMaskHandler(event) {\n this.updateMask(event.target.maskInput, this.getMaskPattern(event.target.value));\n }\n }, {\n key: \"getMaskPattern\",\n value: function getMaskPattern(maskName) {\n if (!this.multiMasks) {\n this.multiMasks = {};\n }\n\n if (this.multiMasks[maskName]) {\n return this.multiMasks[maskName];\n }\n\n var mask = this.component.inputMasks.find(function (inputMask) {\n return inputMask.label === maskName;\n });\n this.multiMasks[maskName] = mask ? mask.mask : this.component.inputMasks[0].mask;\n return this.multiMasks[maskName];\n }\n }, {\n key: \"attachMultiMask\",\n value: function attachMultiMask(index) {\n if (!(this.isMultipleMasksField && this.component.inputMasks.length && this.refs.input.length)) {\n return false;\n }\n\n var maskSelect = this.refs.select[index];\n maskSelect.onchange = this.onSelectMaskHandler.bind(this);\n maskSelect.maskInput = this.refs.mask[index];\n this.setInputMask(maskSelect.maskInput, this.component.inputMasks[0].mask);\n return true;\n }\n }, {\n key: \"updateMask\",\n value: function updateMask(input, mask) {\n if (!mask) {\n return;\n }\n\n this.setInputMask(input, mask, !this.component.placeholder);\n this.updateValue();\n }\n /**\n * Adds a new empty value to the data array.\n */\n\n }, {\n key: \"addNewValue\",\n value: function addNewValue(value) {\n if (value === undefined) {\n value = this.component.defaultValue ? this.component.defaultValue : this.emptyValue; // If default is an empty aray, default back to empty value.\n\n if (Array.isArray(value) && value.length === 0) {\n value = this.emptyValue;\n }\n }\n\n var dataValue = this.dataValue || [];\n\n if (!Array.isArray(dataValue)) {\n dataValue = [dataValue];\n }\n\n if (Array.isArray(value)) {\n dataValue = dataValue.concat(value);\n } else {\n dataValue.push(value);\n }\n\n this.dataValue = dataValue;\n }\n /**\n * Adds a new empty value to the data array, and add a new row to contain it.\n */\n\n }, {\n key: \"addValue\",\n value: function addValue() {\n this.addNewValue();\n this.redraw();\n this.checkConditions();\n\n if (!this.isEmpty(this.dataValue)) {\n this.restoreValue();\n }\n\n if (this.root) {\n this.root.onChange();\n }\n }\n }]);\n\n return Multivalue;\n}(_Field2.default);\n\nexports[\"default\"] = Multivalue;\n\n//# sourceURL=webpack://Formio/./lib/components/_classes/multivalue/Multivalue.js?"); +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.set.js */ \"./node_modules/core-js/modules/es.reflect.set.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.array.is-array.js */ \"./node_modules/core-js/modules/es.array.is-array.js\");\n__webpack_require__(/*! core-js/modules/es.array.join.js */ \"./node_modules/core-js/modules/es.array.join.js\");\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n__webpack_require__(/*! core-js/modules/web.timers.js */ \"./node_modules/core-js/modules/web.timers.js\");\n__webpack_require__(/*! core-js/modules/es.array.find.js */ \"./node_modules/core-js/modules/es.array.find.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _Field2 = _interopRequireDefault(__webpack_require__(/*! ../field/Field */ \"./lib/components/_classes/field/Field.js\"));\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction set(target, property, value, receiver) { if (typeof Reflect !== \"undefined\" && Reflect.set) { set = Reflect.set; } else { set = function set(target, property, value, receiver) { var base = _superPropBase(target, property); var desc; if (base) { desc = Object.getOwnPropertyDescriptor(base, property); if (desc.set) { desc.set.call(receiver, value); return true; } else if (!desc.writable) { return false; } } desc = Object.getOwnPropertyDescriptor(receiver, property); if (desc) { if (!desc.writable) { return false; } desc.value = value; Object.defineProperty(receiver, property, desc); } else { _defineProperty(receiver, property, value); } return true; }; } return set(target, property, value, receiver); }\nfunction _set(target, property, value, receiver, isStrict) { var s = set(target, property, value, receiver || target); if (!s && isStrict) { throw new Error('failed to set property'); } return value; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar Multivalue = /*#__PURE__*/function (_Field) {\n _inherits(Multivalue, _Field);\n var _super = _createSuper(Multivalue);\n function Multivalue() {\n _classCallCheck(this, Multivalue);\n return _super.apply(this, arguments);\n }\n _createClass(Multivalue, [{\n key: \"dataValue\",\n get: function get() {\n var parent = _get(_getPrototypeOf(Multivalue.prototype), \"dataValue\", this);\n if (!parent && this.component.multiple) {\n return [];\n }\n return parent;\n },\n set: function set(value) {\n _set(_getPrototypeOf(Multivalue.prototype), \"dataValue\", value, this, true);\n }\n }, {\n key: \"defaultValue\",\n get: function get() {\n var value = _get(_getPrototypeOf(Multivalue.prototype), \"defaultValue\", this);\n if (this.component.multiple) {\n if (_lodash[\"default\"].isArray(value)) {\n value = !value.length ? [_get(_getPrototypeOf(Multivalue.prototype), \"emptyValue\", this)] : value;\n } else {\n value = [value];\n }\n }\n return value;\n }\n }, {\n key: \"addAnother\",\n get: function get() {\n return this.t(this.component.addAnother || 'Add Another');\n }\n }, {\n key: \"useWrapper\",\n value: function useWrapper() {\n return this.component.hasOwnProperty('multiple') && this.component.multiple;\n }\n }, {\n key: \"render\",\n value: function render() {\n // If single value field.\n if (!this.useWrapper()) {\n return _get(_getPrototypeOf(Multivalue.prototype), \"render\", this).call(this, \"
\\n \".concat(this.renderElement(this.component.type !== 'hidden' ? this.dataValue : ''), \"\\n
\"));\n }\n\n // Make sure dataValue is in the correct array format.\n var dataValue = this.dataValue;\n if (!Array.isArray(dataValue)) {\n dataValue = dataValue ? [dataValue] : [];\n }\n\n // If multiple value field.\n return _get(_getPrototypeOf(Multivalue.prototype), \"render\", this).call(this, this.renderTemplate('multiValueTable', {\n rows: dataValue.map(this.renderRow.bind(this)).join(''),\n disabled: this.disabled,\n addAnother: this.addAnother\n }));\n }\n }, {\n key: \"renderElement\",\n value: function renderElement() {\n return '';\n }\n }, {\n key: \"renderRow\",\n value: function renderRow(value, index) {\n return this.renderTemplate('multiValueRow', {\n index: index,\n disabled: this.disabled,\n element: \"\".concat(this.renderElement(value, index))\n });\n }\n }, {\n key: \"attach\",\n value: function attach(dom) {\n var _this = this;\n var superAttach = _get(_getPrototypeOf(Multivalue.prototype), \"attach\", this).call(this, dom);\n this.loadRefs(dom, {\n addButton: 'multiple',\n input: 'multiple',\n removeRow: 'multiple',\n mask: 'multiple',\n select: 'multiple'\n });\n var promises = [];\n this.refs.input.forEach(function (element, index) {\n promises.push(_this.attachElement.call(_this, element, index));\n });\n if (!this.component.multiple) {\n return _nativePromiseOnly[\"default\"].all(promises);\n }\n this.refs.removeRow.forEach(function (removeButton, index) {\n _this.addEventListener(removeButton, 'click', function (event) {\n event.preventDefault();\n _this.removeValue(index);\n });\n });\n\n // If single value field.\n this.refs.addButton.forEach(function (addButton) {\n _this.addEventListener(addButton, 'click', function (event) {\n event.preventDefault();\n _this.addValue();\n });\n });\n return superAttach.then(function () {\n return _nativePromiseOnly[\"default\"].all(promises);\n });\n }\n }, {\n key: \"detach\",\n value: function detach() {\n if (this.refs.input && this.refs.input.length) {\n this.refs.input.forEach(function (input) {\n if (input.mask) {\n input.mask.destroy();\n }\n if (input.widget) {\n input.widget.destroy();\n }\n });\n }\n if (this.refs.mask && this.refs.mask.length) {\n this.refs.mask.forEach(function (input) {\n if (input.mask) {\n input.mask.destroy();\n }\n });\n }\n _get(_getPrototypeOf(Multivalue.prototype), \"detach\", this).call(this);\n }\n\n /**\n * Attach inputs to the element.\n *\n * @param element\n * @param index\n */\n }, {\n key: \"attachElement\",\n value: function attachElement(element, index) {\n var _this2 = this;\n this.addEventListener(element, this.inputInfo.changeEvent, function () {\n // Delay update slightly to give input mask a chance to run.\n var textCase = _lodash[\"default\"].get(_this2.component, 'case', 'mixed');\n if (textCase !== 'mixed') {\n var selectionStart = element.selectionStart,\n selectionEnd = element.selectionEnd;\n if (textCase === 'uppercase' && element.value) {\n element.value = element.value.toUpperCase();\n }\n if (textCase === 'lowercase' && element.value) {\n element.value = element.value.toLowerCase();\n }\n if (element.selectionStart && element.selectionEnd) {\n element.selectionStart = selectionStart;\n element.selectionEnd = selectionEnd;\n }\n }\n try {\n _this2.saveCaretPosition(element, index);\n } catch (err) {\n console.warn('An error occurred while trying to save caret position', err);\n }\n\n // If a mask is present, delay the update to allow mask to update first.\n if (element.mask) {\n setTimeout(function () {\n return _this2.updateValue(null, {\n modified: _this2.component.type !== 'hidden'\n }, index);\n }, 1);\n } else {\n return _this2.updateValue(null, {\n modified: _this2.component.type !== 'hidden'\n }, index);\n }\n });\n if (!this.attachMultiMask(index)) {\n var applyMask = function applyMask() {\n _this2.setInputMask(element);\n var valueMask = _this2.component.inputMask;\n var displayMask = _this2.component.displayMask;\n if (valueMask && displayMask && displayMask !== valueMask && _this2.refs.valueMaskInput) {\n _this2.setInputMask(_this2.refs.valueMaskInput, valueMask);\n }\n };\n if (this.inputInfo.changeEvent === 'blur') {\n this.addEventListener(element, this.inputInfo.changeEvent, function () {\n var _document$querySelect;\n applyMask();\n _this2.dataValue = _this2.refs.input[0].value;\n var submitBtnDisabled = (_document$querySelect = document.querySelector('[name=\"data[submit]\"]')) === null || _document$querySelect === void 0 ? void 0 : _document$querySelect.disabled;\n submitBtnDisabled = true;\n if (_this2.checkComponentValidity()) {\n _this2.updateComponentValue(_this2.refs.input[0].value);\n submitBtnDisabled = false;\n }\n });\n } else {\n applyMask();\n }\n }\n }\n\n // Saves current caret position to restore it after the component is redrawn\n }, {\n key: \"saveCaretPosition\",\n value: function saveCaretPosition(element, index) {\n var _this$root, _this$root$focusedCom;\n if (((_this$root = this.root) === null || _this$root === void 0 ? void 0 : (_this$root$focusedCom = _this$root.focusedComponent) === null || _this$root$focusedCom === void 0 ? void 0 : _this$root$focusedCom.path) === this.path) {\n this.root.currentSelection = {\n selection: [element.selectionStart, element.selectionEnd],\n index: index\n };\n }\n }\n }, {\n key: \"onSelectMaskHandler\",\n value: function onSelectMaskHandler(event) {\n this.updateMask(event.target.maskInput, this.getMaskPattern(event.target.value));\n }\n }, {\n key: \"getMaskPattern\",\n value: function getMaskPattern(maskName) {\n if (!this.multiMasks) {\n this.multiMasks = {};\n }\n if (this.multiMasks[maskName]) {\n return this.multiMasks[maskName];\n }\n var mask = this.component.inputMasks.find(function (inputMask) {\n return inputMask.label === maskName;\n });\n this.multiMasks[maskName] = mask ? mask.mask : this.component.inputMasks[0].mask;\n return this.multiMasks[maskName];\n }\n }, {\n key: \"attachMultiMask\",\n value: function attachMultiMask(index) {\n if (!(this.isMultipleMasksField && this.component.inputMasks.length && this.refs.input.length)) {\n return false;\n }\n var maskSelect = this.refs.select[index];\n maskSelect.onchange = this.onSelectMaskHandler.bind(this);\n maskSelect.maskInput = this.refs.mask[index];\n this.setInputMask(maskSelect.maskInput, this.component.inputMasks[0].mask);\n return true;\n }\n }, {\n key: \"updateMask\",\n value: function updateMask(input, mask) {\n if (!mask) {\n return;\n }\n this.setInputMask(input, mask, !this.component.placeholder);\n this.updateValue();\n }\n\n /**\n * Adds a new empty value to the data array.\n */\n }, {\n key: \"addNewValue\",\n value: function addNewValue(value) {\n if (value === undefined) {\n value = this.component.defaultValue ? this.component.defaultValue : this.emptyValue;\n // If default is an empty aray, default back to empty value.\n if (Array.isArray(value) && value.length === 0) {\n value = this.emptyValue;\n }\n }\n var dataValue = this.dataValue || [];\n if (!Array.isArray(dataValue)) {\n dataValue = [dataValue];\n }\n if (Array.isArray(value)) {\n dataValue = dataValue.concat(value);\n } else {\n dataValue.push(value);\n }\n this.dataValue = dataValue;\n }\n\n /**\n * Adds a new empty value to the data array, and add a new row to contain it.\n */\n }, {\n key: \"addValue\",\n value: function addValue() {\n this.addNewValue();\n this.redraw();\n this.checkConditions();\n if (!this.isEmpty(this.dataValue)) {\n this.restoreValue();\n }\n if (this.root) {\n this.root.onChange();\n }\n }\n }]);\n return Multivalue;\n}(_Field2[\"default\"]);\nexports[\"default\"] = Multivalue;\n\n//# sourceURL=webpack://Formio/./lib/components/_classes/multivalue/Multivalue.js?"); /***/ }), @@ -389,7 +422,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\nvar _Components = _interopRequireDefault(__webpack_require__(/*! ../../Components */ \"./lib/components/Components.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _Components.default.baseEditForm.apply(_Components.default, [[{\n key: 'data',\n ignore: true\n }, {\n key: 'validation',\n ignore: true\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/_classes/nested/NestedComponent.form.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\nvar _Components = _interopRequireDefault(__webpack_require__(/*! ../../Components */ \"./lib/components/Components.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _Components[\"default\"].baseEditForm.apply(_Components[\"default\"], [[{\n key: 'data',\n ignore: true\n }, {\n key: 'validation',\n ignore: true\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/_classes/nested/NestedComponent.form.js?"); /***/ }), @@ -400,7 +433,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.set.js */ \"./node_modules/core-js/modules/es.reflect.set.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.includes.js */ \"./node_modules/core-js/modules/es.array.includes.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.includes.js */ \"./node_modules/core-js/modules/es.string.includes.js\");\n\n__webpack_require__(/*! core-js/modules/es.number.parse-int.js */ \"./node_modules/core-js/modules/es.number.parse-int.js\");\n\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.find-index.js */ \"./node_modules/core-js/modules/es.array.find-index.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.splice.js */ \"./node_modules/core-js/modules/es.array.splice.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.slice.js */ \"./node_modules/core-js/modules/es.array.slice.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nvar _Field2 = _interopRequireDefault(__webpack_require__(/*! ../field/Field */ \"./lib/components/_classes/field/Field.js\"));\n\nvar _Components = _interopRequireDefault(__webpack_require__(/*! ../../Components */ \"./lib/components/Components.js\"));\n\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\n\nvar _utils = __webpack_require__(/*! ../../../utils/utils */ \"./lib/utils/utils.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction set(target, property, value, receiver) { if (typeof Reflect !== \"undefined\" && Reflect.set) { set = Reflect.set; } else { set = function set(target, property, value, receiver) { var base = _superPropBase(target, property); var desc; if (base) { desc = Object.getOwnPropertyDescriptor(base, property); if (desc.set) { desc.set.call(receiver, value); return true; } else if (!desc.writable) { return false; } } desc = Object.getOwnPropertyDescriptor(receiver, property); if (desc) { if (!desc.writable) { return false; } desc.value = value; Object.defineProperty(receiver, property, desc); } else { _defineProperty(receiver, property, value); } return true; }; } return set(target, property, value, receiver); }\n\nfunction _set(target, property, value, receiver, isStrict) { var s = set(target, property, value, receiver || target); if (!s && isStrict) { throw new Error('failed to set property'); } return value; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar NestedComponent = /*#__PURE__*/function (_Field) {\n _inherits(NestedComponent, _Field);\n\n var _super = _createSuper(NestedComponent);\n\n function NestedComponent(component, options, data) {\n var _this;\n\n _classCallCheck(this, NestedComponent);\n\n _this = _super.call(this, component, options, data);\n _this.type = 'components';\n _this._collapsed = !!_this.component.collapsed;\n return _this;\n }\n\n _createClass(NestedComponent, [{\n key: \"defaultSchema\",\n get: function get() {\n return NestedComponent.schema();\n }\n }, {\n key: \"schema\",\n get: function get() {\n var schema = _get(_getPrototypeOf(NestedComponent.prototype), \"schema\", this);\n\n var components = _lodash.default.uniqBy(this.getComponents(), 'component.key');\n\n schema.components = _lodash.default.map(components, 'schema');\n return schema;\n }\n }, {\n key: \"collapsed\",\n get: function get() {\n return this._collapsed;\n },\n set: function set(value) {\n this._collapsed = value;\n this.collapse(value);\n }\n }, {\n key: \"collapse\",\n value: function collapse(value) {\n var promise = this.redraw();\n\n if (!value && !this.pristine) {\n this.checkValidity(this.data, true);\n }\n\n return promise;\n }\n }, {\n key: \"visible\",\n get: function get() {\n return _get(_getPrototypeOf(NestedComponent.prototype), \"visible\", this);\n },\n set: function set(value) {\n // DO NOT CALL super here. There is an issue where clearOnHide was getting triggered with\n // subcomponents because the \"parentVisible\" flag was set to false when it should really be\n // set to true.\n var visibilityChanged = this._visible !== value;\n this._visible = value;\n var isVisible = this.visible;\n var forceShow = this.options.show && this.options.show[this.component.key];\n var forceHide = this.options.hide && this.options.hide[this.component.key];\n this.components.forEach(function (component) {\n // Set the parent visibility first since we may have nested components within nested components\n // and they need to be able to determine their visibility based on the parent visibility.\n component.parentVisible = isVisible;\n var conditionallyVisible = component.conditionallyVisible();\n\n if (forceShow || conditionallyVisible) {\n component.visible = true;\n } else if (forceHide || !isVisible || !conditionallyVisible) {\n component.visible = false;\n } // If hiding a nested component, clear all errors below.\n\n\n if (!component.visible) {\n component.error = '';\n }\n });\n\n if (visibilityChanged) {\n this.clearOnHide();\n this.redraw();\n }\n }\n }, {\n key: \"parentVisible\",\n get: function get() {\n return _get(_getPrototypeOf(NestedComponent.prototype), \"parentVisible\", this);\n },\n set: function set(value) {\n var _this2 = this;\n\n _set(_getPrototypeOf(NestedComponent.prototype), \"parentVisible\", value, this, true);\n\n this.components.forEach(function (component) {\n return component.parentVisible = _this2.visible;\n });\n }\n }, {\n key: \"disabled\",\n get: function get() {\n return _get(_getPrototypeOf(NestedComponent.prototype), \"disabled\", this);\n },\n set: function set(disabled) {\n _set(_getPrototypeOf(NestedComponent.prototype), \"disabled\", disabled, this, true);\n\n this.components.forEach(function (component) {\n return component.parentDisabled = disabled;\n });\n }\n }, {\n key: \"parentDisabled\",\n get: function get() {\n return _get(_getPrototypeOf(NestedComponent.prototype), \"parentDisabled\", this);\n },\n set: function set(value) {\n var _this3 = this;\n\n _set(_getPrototypeOf(NestedComponent.prototype), \"parentDisabled\", value, this, true);\n\n this.components.forEach(function (component) {\n component.parentDisabled = _this3.disabled;\n });\n }\n }, {\n key: \"ready\",\n get: function get() {\n return _nativePromiseOnly.default.all(this.getComponents().map(function (component) {\n return component.ready;\n }));\n }\n }, {\n key: \"currentForm\",\n get: function get() {\n return _get(_getPrototypeOf(NestedComponent.prototype), \"currentForm\", this);\n },\n set: function set(instance) {\n _set(_getPrototypeOf(NestedComponent.prototype), \"currentForm\", instance, this, true);\n\n this.getComponents().forEach(function (component) {\n component.currentForm = instance;\n });\n }\n }, {\n key: \"rowIndex\",\n get: function get() {\n return this._rowIndex;\n },\n set: function set(value) {\n this._rowIndex = value;\n this.eachComponent(function (component) {\n component.rowIndex = value;\n });\n }\n }, {\n key: \"componentContext\",\n value: function componentContext() {\n return this._data;\n }\n }, {\n key: \"data\",\n get: function get() {\n return this._data;\n },\n set: function set(value) {\n var _this4 = this;\n\n this._data = value;\n this.eachComponent(function (component) {\n component.data = _this4.componentContext(component);\n });\n }\n }, {\n key: \"getComponents\",\n value: function getComponents() {\n return this.components || [];\n }\n /**\n * Perform a deep iteration over every component, including those\n * within other container based components.\n *\n * @param {function} fn - Called for every component.\n */\n\n }, {\n key: \"everyComponent\",\n value: function everyComponent(fn, options) {\n var components = this.getComponents();\n\n _lodash.default.each(components, function (component, index) {\n if (fn(component, components, index) === false) {\n return false;\n }\n\n if (typeof component.everyComponent === 'function') {\n if (component.everyComponent(fn, options) === false) {\n return false;\n }\n }\n });\n }\n }, {\n key: \"hasComponent\",\n value: function hasComponent(component) {\n var result = false;\n this.everyComponent(function (comp) {\n if (comp === component) {\n result = true;\n return false;\n }\n });\n return result;\n }\n }, {\n key: \"flattenComponents\",\n value: function flattenComponents() {\n var result = {};\n this.everyComponent(function (component) {\n result[component.component.flattenAs || component.key] = component;\n });\n return result;\n }\n /**\n * Perform an iteration over each component within this container component.\n *\n * @param {function} fn - Called for each component\n */\n\n }, {\n key: \"eachComponent\",\n value: function eachComponent(fn) {\n _lodash.default.each(this.getComponents(), function (component, index) {\n if (fn(component, index) === false) {\n return false;\n }\n });\n }\n /**\n * Returns a component provided a key. This performs a deep search within the\n * component tree.\n *\n * @param {string} key - The key of the component to retrieve.\n * @param {function} fn - Called with the component once found.\n * @return {Object} - The component that is located.\n */\n\n }, {\n key: \"getComponent\",\n value: function getComponent(path, fn, originalPath) {\n originalPath = originalPath || (0, _utils.getStringFromComponentPath)(path);\n path = (0, _utils.getArrayFromComponentPath)(path);\n var pathStr = originalPath;\n\n var newPath = _lodash.default.clone(path);\n\n var key = newPath.shift();\n var remainingPath = newPath;\n var comp = null;\n var possibleComp = null;\n\n if (_lodash.default.isNumber(key)) {\n key = remainingPath.shift();\n }\n\n if (!_lodash.default.isString(key)) {\n return comp;\n }\n\n this.everyComponent(function (component, components) {\n var matchPath = component.hasInput && component.path ? pathStr.includes(component.path) : true;\n\n if (component.component.key === key) {\n possibleComp = component;\n\n if (matchPath) {\n comp = component;\n\n if (remainingPath.length > 0 && 'getComponent' in component) {\n comp = component.getComponent(remainingPath, fn, originalPath);\n } else if (fn) {\n fn(component, components);\n }\n\n return false;\n }\n }\n });\n\n if (!comp) {\n comp = possibleComp;\n }\n\n return comp;\n }\n /**\n * Return a component provided the Id of the component.\n *\n * @param {string} id - The Id of the component.\n * @param {function} fn - Called with the component once it is retrieved.\n * @return {Object} - The component retrieved.\n */\n\n }, {\n key: \"getComponentById\",\n value: function getComponentById(id, fn) {\n var comp = null;\n this.everyComponent(function (component, components) {\n if (component.id === id) {\n comp = component;\n\n if (fn) {\n fn(component, components);\n }\n\n return false;\n }\n });\n return comp;\n }\n /**\n * Return a path of component's value.\n *\n * @param {Object} component - The component instance.\n * @return {string} - The component's value path.\n */\n\n }, {\n key: \"calculateComponentPath\",\n value: function calculateComponentPath(component) {\n var path = '';\n\n if (component.component.key) {\n var thisPath = this;\n\n while (thisPath && !thisPath.allowData && thisPath.parent) {\n thisPath = thisPath.parent;\n }\n\n var rowIndex = component.row ? \"[\".concat(Number.parseInt(component.row), \"]\") : '';\n path = thisPath.path ? \"\".concat(thisPath.path).concat(rowIndex, \".\") : '';\n path += component._parentPath && component.component.shouldIncludeSubFormPath ? component._parentPath : '';\n path += component.component.key;\n return path;\n }\n }\n /**\n * Create a new component and add it to the components array.\n *\n * @param component\n * @param data\n */\n\n }, {\n key: \"createComponent\",\n value: function createComponent(component, options, data, before) {\n var _options;\n\n if (!component) {\n return;\n }\n\n options = options || this.options;\n data = data || this.data;\n options.parent = this;\n options.parentVisible = this.visible;\n options.root = ((_options = options) === null || _options === void 0 ? void 0 : _options.root) || this.root || this;\n options.localRoot = this.localRoot;\n options.skipInit = true;\n\n if (!this.isInputComponent && this.component.shouldIncludeSubFormPath) {\n component.shouldIncludeSubFormPath = true;\n }\n\n var comp = _Components.default.create(component, options, data, true);\n\n var path = this.calculateComponentPath(comp);\n\n if (path) {\n comp.path = path;\n }\n\n comp.init();\n\n if (component.internal) {\n return comp;\n }\n\n if (before) {\n var index = _lodash.default.findIndex(this.components, {\n id: before.id\n });\n\n if (index !== -1) {\n this.components.splice(index, 0, comp);\n } else {\n this.components.push(comp);\n }\n } else {\n this.components.push(comp);\n }\n\n return comp;\n }\n }, {\n key: \"getContainer\",\n value: function getContainer() {\n return this.element;\n }\n }, {\n key: \"componentComponents\",\n get: function get() {\n return this.component.components || [];\n }\n }, {\n key: \"nestedKey\",\n get: function get() {\n return \"nested-\".concat(this.key);\n }\n }, {\n key: \"templateName\",\n get: function get() {\n return 'container';\n }\n }, {\n key: \"init\",\n value: function init() {\n this.components = this.components || [];\n this.addComponents();\n return _get(_getPrototypeOf(NestedComponent.prototype), \"init\", this).call(this);\n }\n /**\n *\n * @param element\n * @param data\n */\n\n }, {\n key: \"addComponents\",\n value: function addComponents(data, options) {\n var _this5 = this;\n\n data = data || this.data;\n options = options || this.options;\n\n if (options.components) {\n this.components = options.components;\n } else {\n var components = this.hook('addComponents', this.componentComponents, this) || [];\n components.forEach(function (component) {\n return _this5.addComponent(component, data);\n });\n }\n }\n /**\n * Add a new component to the components array.\n *\n * @param {Object} component - The component JSON schema to add.\n * @param {Object} data - The submission data object to house the data for this component.\n * @param {HTMLElement} before - A DOM element to insert this element before.\n * @return {Component} - The created component instance.\n */\n\n }, {\n key: \"addComponent\",\n value: function addComponent(component, data, before, noAdd) {\n data = data || this.data;\n\n if (this.options.parentPath) {\n component.shouldIncludeSubFormPath = true;\n }\n\n component = this.hook('addComponent', component, data, before, noAdd);\n var comp = this.createComponent(component, this.options, data, before ? before : null);\n\n if (noAdd) {\n return comp;\n }\n\n return comp;\n }\n }, {\n key: \"beforeFocus\",\n value: function beforeFocus() {\n if (this.parent && 'beforeFocus' in this.parent) {\n this.parent.beforeFocus(this);\n }\n }\n }, {\n key: \"render\",\n value: function render(children) {\n // If already rendering, don't re-render.\n return _get(_getPrototypeOf(NestedComponent.prototype), \"render\", this).call(this, children || this.renderTemplate(this.templateName, {\n children: !this.visible ? '' : this.renderComponents(),\n nestedKey: this.nestedKey,\n collapsed: this.options.pdf ? false : this.collapsed\n }));\n }\n }, {\n key: \"renderComponents\",\n value: function renderComponents(components) {\n components = components || this.getComponents();\n var children = components.map(function (component) {\n return component.render();\n });\n return this.renderTemplate('components', {\n children: children,\n components: components\n });\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n var _this6 = this;\n\n var superPromise = _get(_getPrototypeOf(NestedComponent.prototype), \"attach\", this).call(this, element);\n\n this.loadRefs(element, _defineProperty({\n header: 'single',\n collapsed: this.collapsed\n }, this.nestedKey, 'single'));\n\n var childPromise = _nativePromiseOnly.default.resolve();\n\n if (this.refs[this.nestedKey]) {\n childPromise = this.attachComponents(this.refs[this.nestedKey]);\n }\n\n if (this.component.collapsible && this.refs.header) {\n this.addEventListener(this.refs.header, 'click', function () {\n _this6.collapsed = !_this6.collapsed;\n });\n this.addEventListener(this.refs.header, 'keydown', function (e) {\n if (e.keyCode === 13 || e.keyCode === 32) {\n e.preventDefault();\n _this6.collapsed = !_this6.collapsed;\n }\n });\n }\n\n return _nativePromiseOnly.default.all([superPromise, childPromise]);\n }\n }, {\n key: \"attachComponents\",\n value: function attachComponents(element, components, container) {\n components = components || this.components;\n container = container || this.component.components;\n element = this.hook('attachComponents', element, components, container, this);\n\n if (!element) {\n // Return a non-resolving promise.\n return new _nativePromiseOnly.default(function () {});\n }\n\n var index = 0;\n var promises = [];\n Array.prototype.slice.call(element.children).forEach(function (child) {\n if (!child.getAttribute('data-noattach') && components[index]) {\n promises.push(components[index].attach(child));\n index++;\n }\n });\n return _nativePromiseOnly.default.all(promises);\n }\n /**\n * Remove a component from the components array.\n *\n * @param {Component} component - The component to remove from the components.\n * @param {Array} components - An array of components to remove this component from.\n */\n\n }, {\n key: \"removeComponent\",\n value: function removeComponent(component, components) {\n components = components || this.components;\n component.destroy();\n\n _lodash.default.remove(components, {\n id: component.id\n });\n }\n /**\n * Removes a component provided the API key of that component.\n *\n * @param {string} key - The API key of the component to remove.\n * @param {function} fn - Called once the component is removed.\n * @return {null}\n */\n\n }, {\n key: \"removeComponentByKey\",\n value: function removeComponentByKey(key, fn) {\n var _this7 = this;\n\n var comp = this.getComponent(key, function (component, components) {\n _this7.removeComponent(component, components);\n\n if (fn) {\n fn(component, components);\n }\n });\n\n if (!comp) {\n if (fn) {\n fn(null);\n }\n\n return null;\n }\n }\n /**\n * Removes a component provided the Id of the component.\n *\n * @param {string} id - The Id of the component to remove.\n * @param {function} fn - Called when the component is removed.\n * @return {null}\n */\n\n }, {\n key: \"removeComponentById\",\n value: function removeComponentById(id, fn) {\n var _this8 = this;\n\n var comp = this.getComponentById(id, function (component, components) {\n _this8.removeComponent(component, components);\n\n if (fn) {\n fn(component, components);\n }\n });\n\n if (!comp) {\n if (fn) {\n fn(null);\n }\n\n return null;\n }\n }\n }, {\n key: \"updateValue\",\n value: function updateValue(value) {\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return this.components.reduce(function (changed, comp) {\n return comp.updateValue(null, flags) || changed;\n }, _get(_getPrototypeOf(NestedComponent.prototype), \"updateValue\", this).call(this, value, flags));\n }\n }, {\n key: \"shouldSkipValidation\",\n value: function shouldSkipValidation(data, dirty, row) {\n // Nested components with no input should not be validated.\n if (!this.component.input) {\n return true;\n } else {\n return _get(_getPrototypeOf(NestedComponent.prototype), \"shouldSkipValidation\", this).call(this, data, dirty, row);\n }\n }\n }, {\n key: \"checkData\",\n value: function checkData(data, flags, row, components) {\n if (this.builderMode) {\n return true;\n }\n\n data = data || this.rootValue;\n flags = flags || {};\n row = row || this.data;\n components = components && _lodash.default.isArray(components) ? components : this.getComponents();\n var isValid = components.reduce(function (valid, comp) {\n return comp.checkData(data, flags, row) && valid;\n }, _get(_getPrototypeOf(NestedComponent.prototype), \"checkData\", this).call(this, data, flags, row));\n this.checkModal(isValid, this.isDirty);\n return isValid;\n }\n }, {\n key: \"checkConditions\",\n value: function checkConditions(data, flags, row) {\n // check conditions of parent component first, because it may influence on visibility of it's children\n var check = _get(_getPrototypeOf(NestedComponent.prototype), \"checkConditions\", this).call(this, data, flags, row); //row data of parent component not always corresponds to row of nested components, use comp.data as row data for children instead\n\n\n this.getComponents().forEach(function (comp) {\n return comp.checkConditions(data, flags, comp.data);\n });\n return check;\n }\n }, {\n key: \"clearOnHide\",\n value: function clearOnHide(show) {\n _get(_getPrototypeOf(NestedComponent.prototype), \"clearOnHide\", this).call(this, show);\n\n if (this.component.clearOnHide) {\n if (this.allowData && !this.hasValue()) {\n this.dataValue = this.defaultValue;\n }\n\n if (this.hasValue()) {\n this.restoreComponentsContext();\n }\n }\n\n this.getComponents().forEach(function (component) {\n return component.clearOnHide(show);\n });\n }\n }, {\n key: \"restoreComponentsContext\",\n value: function restoreComponentsContext() {\n var _this9 = this;\n\n this.getComponents().forEach(function (component) {\n return component.data = _this9.dataValue;\n });\n }\n /**\n * Allow components to hook into the next page trigger to perform their own logic.\n *\n * @return {*}\n */\n\n }, {\n key: \"beforePage\",\n value: function beforePage(next) {\n return _nativePromiseOnly.default.all(this.getComponents().map(function (comp) {\n return comp.beforePage(next);\n }));\n }\n /**\n * Allow components to hook into the submission to provide their own async data.\n *\n * @return {*}\n */\n\n }, {\n key: \"beforeSubmit\",\n value: function beforeSubmit() {\n return _nativePromiseOnly.default.all(this.getComponents().map(function (comp) {\n return comp.beforeSubmit();\n }));\n }\n }, {\n key: \"calculateValue\",\n value: function calculateValue(data, flags, row) {\n // Do not iterate into children and calculateValues if this nested component is conditionally hidden.\n if (!this.conditionallyVisible()) {\n return false;\n }\n\n return this.getComponents().reduce(function (changed, comp) {\n return comp.calculateValue(data, flags, row) || changed;\n }, _get(_getPrototypeOf(NestedComponent.prototype), \"calculateValue\", this).call(this, data, flags, row));\n }\n }, {\n key: \"isLastPage\",\n value: function isLastPage() {\n return this.pages.length - 1 === this.page;\n }\n }, {\n key: \"isValid\",\n value: function isValid(data, dirty) {\n return this.getComponents().reduce(function (valid, comp) {\n return comp.isValid(data, dirty) && valid;\n }, _get(_getPrototypeOf(NestedComponent.prototype), \"isValid\", this).call(this, data, dirty));\n }\n }, {\n key: \"checkValidity\",\n value: function checkValidity(data, dirty, row, silentCheck) {\n if (!this.checkCondition(row, data)) {\n this.setCustomValidity('');\n return true;\n }\n\n var isValid = this.getComponents().reduce(function (check, comp) {\n return comp.checkValidity(data, dirty, row, silentCheck) && check;\n }, _get(_getPrototypeOf(NestedComponent.prototype), \"checkValidity\", this).call(this, data, dirty, row, silentCheck));\n this.checkModal(isValid, dirty);\n return isValid;\n }\n }, {\n key: \"checkAsyncValidity\",\n value: function checkAsyncValidity(data, dirty, row, silentCheck) {\n var _this10 = this;\n\n return this.ready.then(function () {\n var promises = [_get(_getPrototypeOf(NestedComponent.prototype), \"checkAsyncValidity\", _this10).call(_this10, data, dirty, row, silentCheck)];\n\n _this10.eachComponent(function (component) {\n return promises.push(component.checkAsyncValidity(data, dirty, row, silentCheck));\n });\n\n return _nativePromiseOnly.default.all(promises).then(function (results) {\n return results.reduce(function (valid, result) {\n return valid && result;\n }, true);\n });\n });\n }\n }, {\n key: \"setPristine\",\n value: function setPristine(pristine) {\n _get(_getPrototypeOf(NestedComponent.prototype), \"setPristine\", this).call(this, pristine);\n\n this.getComponents().forEach(function (comp) {\n return comp.setPristine(pristine);\n });\n }\n }, {\n key: \"isPristine\",\n get: function get() {\n return this.pristine && this.getComponents().every(function (c) {\n return c.isPristine;\n });\n }\n }, {\n key: \"isDirty\",\n get: function get() {\n return this.dirty && this.getComponents().every(function (c) {\n return c.isDirty;\n });\n }\n }, {\n key: \"detach\",\n value: function detach() {\n this.components.forEach(function (component) {\n component.detach();\n });\n\n _get(_getPrototypeOf(NestedComponent.prototype), \"detach\", this).call(this);\n }\n }, {\n key: \"clear\",\n value: function clear() {\n this.components.forEach(function (component) {\n component.clear();\n });\n\n _get(_getPrototypeOf(NestedComponent.prototype), \"clear\", this).call(this);\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.destroyComponents();\n\n _get(_getPrototypeOf(NestedComponent.prototype), \"destroy\", this).call(this);\n }\n }, {\n key: \"destroyComponents\",\n value: function destroyComponents() {\n var _this11 = this;\n\n var components = this.getComponents().slice();\n components.forEach(function (comp) {\n return _this11.removeComponent(comp, _this11.components);\n });\n this.components = [];\n }\n }, {\n key: \"errors\",\n get: function get() {\n var thisErrors = this.error ? [this.error] : [];\n return this.getComponents().reduce(function (errors, comp) {\n return errors.concat(comp.errors || []);\n }, thisErrors).filter(function (err) {\n return err.level !== 'hidden';\n });\n }\n }, {\n key: \"getValue\",\n value: function getValue() {\n return this.data;\n }\n }, {\n key: \"resetValue\",\n value: function resetValue() {\n _get(_getPrototypeOf(NestedComponent.prototype), \"resetValue\", this).call(this);\n\n this.getComponents().forEach(function (comp) {\n return comp.resetValue();\n });\n this.setPristine(true);\n }\n }, {\n key: \"dataReady\",\n get: function get() {\n return _nativePromiseOnly.default.all(this.getComponents().map(function (component) {\n return component.dataReady;\n }));\n }\n }, {\n key: \"setNestedValue\",\n value: function setNestedValue(component, value) {\n var flags = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n component._data = this.componentContext(component);\n\n if (component.type === 'button') {\n return false;\n }\n\n if (component.type === 'components') {\n if (component.tree && component.hasValue(value)) {\n return component.setValue(_lodash.default.get(value, component.key), flags);\n }\n\n return component.setValue(value, flags);\n } else if (value && component.hasValue(value)) {\n return component.setValue(_lodash.default.get(value, component.key), flags);\n } else if ((!this.rootPristine || component.visible) && component.shouldAddDefaultValue) {\n flags.noValidate = !flags.dirty;\n flags.resetValue = true;\n return component.setValue(component.defaultValue, flags);\n }\n }\n }, {\n key: \"setValue\",\n value: function setValue(value) {\n var _this12 = this;\n\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n if (!value) {\n return false;\n }\n\n if (value.submitAsDraft && !value.submit) {\n flags.noValidate = true;\n }\n\n return this.getComponents().reduce(function (changed, component) {\n return _this12.setNestedValue(component, value, flags, changed) || changed;\n }, false);\n }\n }, {\n key: \"lazyLoad\",\n get: function get() {\n var _this$component$lazyL;\n\n return (_this$component$lazyL = this.component.lazyLoad) !== null && _this$component$lazyL !== void 0 ? _this$component$lazyL : false;\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _Field2.default.schema.apply(_Field2.default, [{\n tree: false,\n lazyLoad: false\n }].concat(extend));\n }\n }]);\n\n return NestedComponent;\n}(_Field2.default);\n\nexports[\"default\"] = NestedComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/_classes/nested/NestedComponent.js?"); +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.set.js */ \"./node_modules/core-js/modules/es.reflect.set.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.array.includes.js */ \"./node_modules/core-js/modules/es.array.includes.js\");\n__webpack_require__(/*! core-js/modules/es.string.includes.js */ \"./node_modules/core-js/modules/es.string.includes.js\");\n__webpack_require__(/*! core-js/modules/es.number.parse-int.js */ \"./node_modules/core-js/modules/es.number.parse-int.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.array.find-index.js */ \"./node_modules/core-js/modules/es.array.find-index.js\");\n__webpack_require__(/*! core-js/modules/es.array.splice.js */ \"./node_modules/core-js/modules/es.array.splice.js\");\n__webpack_require__(/*! core-js/modules/es.array.slice.js */ \"./node_modules/core-js/modules/es.array.slice.js\");\n__webpack_require__(/*! core-js/modules/es.array.reduce.js */ \"./node_modules/core-js/modules/es.array.reduce.js\");\n__webpack_require__(/*! core-js/modules/es.array.every.js */ \"./node_modules/core-js/modules/es.array.every.js\");\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nvar _Field2 = _interopRequireDefault(__webpack_require__(/*! ../field/Field */ \"./lib/components/_classes/field/Field.js\"));\nvar _Components = _interopRequireDefault(__webpack_require__(/*! ../../Components */ \"./lib/components/Components.js\"));\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\nvar _utils = __webpack_require__(/*! ../../../utils/utils */ \"./lib/utils/utils.js\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction set(target, property, value, receiver) { if (typeof Reflect !== \"undefined\" && Reflect.set) { set = Reflect.set; } else { set = function set(target, property, value, receiver) { var base = _superPropBase(target, property); var desc; if (base) { desc = Object.getOwnPropertyDescriptor(base, property); if (desc.set) { desc.set.call(receiver, value); return true; } else if (!desc.writable) { return false; } } desc = Object.getOwnPropertyDescriptor(receiver, property); if (desc) { if (!desc.writable) { return false; } desc.value = value; Object.defineProperty(receiver, property, desc); } else { _defineProperty(receiver, property, value); } return true; }; } return set(target, property, value, receiver); }\nfunction _set(target, property, value, receiver, isStrict) { var s = set(target, property, value, receiver || target); if (!s && isStrict) { throw new Error('failed to set property'); } return value; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar NestedComponent = /*#__PURE__*/function (_Field) {\n _inherits(NestedComponent, _Field);\n var _super = _createSuper(NestedComponent);\n function NestedComponent(component, options, data) {\n var _this;\n _classCallCheck(this, NestedComponent);\n _this = _super.call(this, component, options, data);\n _this.type = 'components';\n _this._collapsed = !!_this.component.collapsed;\n return _this;\n }\n _createClass(NestedComponent, [{\n key: \"defaultSchema\",\n get: function get() {\n return NestedComponent.schema();\n }\n }, {\n key: \"schema\",\n get: function get() {\n var schema = _get(_getPrototypeOf(NestedComponent.prototype), \"schema\", this);\n var components = _lodash[\"default\"].uniqBy(this.getComponents(), 'component.key');\n schema.components = _lodash[\"default\"].map(components, 'schema');\n return schema;\n }\n }, {\n key: \"collapsed\",\n get: function get() {\n return this._collapsed;\n },\n set: function set(value) {\n this._collapsed = value;\n this.collapse(value);\n }\n }, {\n key: \"collapse\",\n value: function collapse(value) {\n var promise = this.redraw();\n if (!value) {\n this.checkValidity(this.data, !this.pristine, null, this.pristine);\n }\n return promise;\n }\n }, {\n key: \"visible\",\n get: function get() {\n return _get(_getPrototypeOf(NestedComponent.prototype), \"visible\", this);\n },\n set: function set(value) {\n // DO NOT CALL super here. There is an issue where clearOnHide was getting triggered with\n // subcomponents because the \"parentVisible\" flag was set to false when it should really be\n // set to true.\n var visibilityChanged = this._visible !== value;\n this._visible = value;\n var isVisible = this.visible;\n var forceShow = this.options.show && this.options.show[this.component.key];\n var forceHide = this.options.hide && this.options.hide[this.component.key];\n this.components.forEach(function (component) {\n // Set the parent visibility first since we may have nested components within nested components\n // and they need to be able to determine their visibility based on the parent visibility.\n component.parentVisible = isVisible;\n var conditionallyVisible = component.conditionallyVisible();\n if (forceShow || conditionallyVisible) {\n component.visible = true;\n } else if (forceHide || !isVisible || !conditionallyVisible) {\n component.visible = false;\n }\n // If hiding a nested component, clear all errors below.\n if (!component.visible) {\n component.error = '';\n }\n });\n if (visibilityChanged) {\n this.clearOnHide();\n this.redraw();\n }\n }\n }, {\n key: \"parentVisible\",\n get: function get() {\n return _get(_getPrototypeOf(NestedComponent.prototype), \"parentVisible\", this);\n },\n set: function set(value) {\n var _this2 = this;\n _set(_getPrototypeOf(NestedComponent.prototype), \"parentVisible\", value, this, true);\n this.components.forEach(function (component) {\n return component.parentVisible = _this2.visible;\n });\n }\n }, {\n key: \"disabled\",\n get: function get() {\n return _get(_getPrototypeOf(NestedComponent.prototype), \"disabled\", this);\n },\n set: function set(disabled) {\n _set(_getPrototypeOf(NestedComponent.prototype), \"disabled\", disabled, this, true);\n this.components.forEach(function (component) {\n return component.parentDisabled = disabled;\n });\n }\n }, {\n key: \"parentDisabled\",\n get: function get() {\n return _get(_getPrototypeOf(NestedComponent.prototype), \"parentDisabled\", this);\n },\n set: function set(value) {\n var _this3 = this;\n _set(_getPrototypeOf(NestedComponent.prototype), \"parentDisabled\", value, this, true);\n this.components.forEach(function (component) {\n component.parentDisabled = _this3.disabled;\n });\n }\n }, {\n key: \"ready\",\n get: function get() {\n return _nativePromiseOnly[\"default\"].all(this.getComponents().map(function (component) {\n return component.ready;\n }));\n }\n }, {\n key: \"currentForm\",\n get: function get() {\n return _get(_getPrototypeOf(NestedComponent.prototype), \"currentForm\", this);\n },\n set: function set(instance) {\n _set(_getPrototypeOf(NestedComponent.prototype), \"currentForm\", instance, this, true);\n this.getComponents().forEach(function (component) {\n component.currentForm = instance;\n });\n }\n }, {\n key: \"rowIndex\",\n get: function get() {\n return this._rowIndex;\n },\n set: function set(value) {\n this._rowIndex = value;\n this.eachComponent(function (component) {\n component.rowIndex = value;\n });\n }\n }, {\n key: \"componentContext\",\n value: function componentContext() {\n return this._data;\n }\n }, {\n key: \"data\",\n get: function get() {\n return this._data;\n },\n set: function set(value) {\n var _this4 = this;\n this._data = value;\n this.eachComponent(function (component) {\n component.data = _this4.componentContext(component);\n });\n }\n }, {\n key: \"getComponents\",\n value: function getComponents() {\n return this.components || [];\n }\n\n /**\n * Perform a deep iteration over every component, including those\n * within other container based components.\n *\n * @param {function} fn - Called for every component.\n */\n }, {\n key: \"everyComponent\",\n value: function everyComponent(fn, options) {\n var components = this.getComponents();\n _lodash[\"default\"].each(components, function (component, index) {\n if (fn(component, components, index) === false) {\n return false;\n }\n if (typeof component.everyComponent === 'function') {\n if (component.everyComponent(fn, options) === false) {\n return false;\n }\n }\n });\n }\n }, {\n key: \"hasComponent\",\n value: function hasComponent(component) {\n var result = false;\n this.everyComponent(function (comp) {\n if (comp === component) {\n result = true;\n return false;\n }\n });\n return result;\n }\n }, {\n key: \"flattenComponents\",\n value: function flattenComponents() {\n var result = {};\n this.everyComponent(function (component) {\n result[component.component.flattenAs || component.key] = component;\n });\n return result;\n }\n\n /**\n * Perform an iteration over each component within this container component.\n *\n * @param {function} fn - Called for each component\n */\n }, {\n key: \"eachComponent\",\n value: function eachComponent(fn) {\n _lodash[\"default\"].each(this.getComponents(), function (component, index) {\n if (fn(component, index) === false) {\n return false;\n }\n });\n }\n\n /**\n * Returns a component provided a key. This performs a deep search within the\n * component tree.\n *\n * @param {string} key - The key of the component to retrieve.\n * @param {function} fn - Called with the component once found.\n * @return {Object} - The component that is located.\n */\n }, {\n key: \"getComponent\",\n value: function getComponent(path, fn, originalPath) {\n originalPath = originalPath || (0, _utils.getStringFromComponentPath)(path);\n path = (0, _utils.getArrayFromComponentPath)(path);\n var pathStr = originalPath;\n var newPath = _lodash[\"default\"].clone(path);\n var key = newPath.shift();\n var remainingPath = newPath;\n var comp = null;\n var possibleComp = null;\n if (_lodash[\"default\"].isNumber(key)) {\n key = remainingPath.shift();\n }\n if (!_lodash[\"default\"].isString(key)) {\n return comp;\n }\n this.everyComponent(function (component, components) {\n var matchPath = component.hasInput && component.path ? pathStr.includes(component.path) : true;\n if (component.component.key === key) {\n possibleComp = component;\n if (matchPath) {\n comp = component;\n if (remainingPath.length > 0 && 'getComponent' in component) {\n comp = component.getComponent(remainingPath, fn, originalPath);\n } else if (fn) {\n fn(component, components);\n }\n return false;\n }\n }\n });\n if (!comp) {\n comp = possibleComp;\n }\n return comp;\n }\n\n /**\n * Return a component provided the Id of the component.\n *\n * @param {string} id - The Id of the component.\n * @param {function} fn - Called with the component once it is retrieved.\n * @return {Object} - The component retrieved.\n */\n }, {\n key: \"getComponentById\",\n value: function getComponentById(id, fn) {\n var comp = null;\n this.everyComponent(function (component, components) {\n if (component.id === id) {\n comp = component;\n if (fn) {\n fn(component, components);\n }\n return false;\n }\n });\n return comp;\n }\n\n /**\n * Return a path of component's value.\n *\n * @param {Object} component - The component instance.\n * @return {string} - The component's value path.\n */\n }, {\n key: \"calculateComponentPath\",\n value: function calculateComponentPath(component) {\n var path = '';\n if (component.component.key) {\n var thisPath = this;\n while (thisPath && !thisPath.allowData && thisPath.parent) {\n thisPath = thisPath.parent;\n }\n var rowIndex = component.row ? \"[\".concat(Number.parseInt(component.row), \"]\") : '';\n path = thisPath.path ? \"\".concat(thisPath.path).concat(rowIndex, \".\") : '';\n path += component._parentPath && component.component.shouldIncludeSubFormPath ? component._parentPath : '';\n path += component.component.key;\n return path;\n }\n }\n\n /**\n * Create a new component and add it to the components array.\n *\n * @param component\n * @param data\n */\n }, {\n key: \"createComponent\",\n value: function createComponent(component, options, data, before, replacedComp) {\n var _options;\n if (!component) {\n return;\n }\n options = options || this.options;\n data = data || this.data;\n options.parent = this;\n options.parentVisible = this.visible;\n options.root = ((_options = options) === null || _options === void 0 ? void 0 : _options.root) || this.root || this;\n options.localRoot = this.localRoot;\n options.skipInit = true;\n if (!(options.display === 'pdf' && this.builderMode)) {\n component.id = (0, _utils.getRandomComponentId)();\n }\n if (!this.isInputComponent && this.component.shouldIncludeSubFormPath) {\n component.shouldIncludeSubFormPath = true;\n }\n var comp = _Components[\"default\"].create(component, options, data, true);\n var path = this.calculateComponentPath(comp);\n if (path) {\n comp.path = path;\n }\n comp.init();\n if (component.internal) {\n return comp;\n }\n if (before) {\n var index = _lodash[\"default\"].findIndex(this.components, {\n id: before.id\n });\n if (index !== -1) {\n this.components.splice(index, 0, comp);\n } else {\n this.components.push(comp);\n }\n } else if (replacedComp) {\n var _index = _lodash[\"default\"].findIndex(this.components, {\n id: replacedComp.id\n });\n if (_index !== -1) {\n this.components[_index] = comp;\n } else {\n this.components.push(comp);\n }\n } else {\n this.components.push(comp);\n }\n return comp;\n }\n }, {\n key: \"getContainer\",\n value: function getContainer() {\n return this.element;\n }\n }, {\n key: \"componentComponents\",\n get: function get() {\n return this.component.components || [];\n }\n }, {\n key: \"nestedKey\",\n get: function get() {\n return \"nested-\".concat(this.key);\n }\n }, {\n key: \"templateName\",\n get: function get() {\n return 'container';\n }\n }, {\n key: \"init\",\n value: function init() {\n this.components = this.components || [];\n this.addComponents();\n return _get(_getPrototypeOf(NestedComponent.prototype), \"init\", this).call(this);\n }\n\n /**\n *\n * @param element\n * @param data\n */\n }, {\n key: \"addComponents\",\n value: function addComponents(data, options) {\n var _this5 = this;\n data = data || this.data;\n options = options || this.options;\n if (options.components) {\n this.components = options.components;\n } else {\n var components = this.hook('addComponents', this.componentComponents, this) || [];\n components.forEach(function (component) {\n return _this5.addComponent(component, data);\n });\n }\n }\n\n /**\n * Add a new component to the components array.\n *\n * @param {Object} component - The component JSON schema to add.\n * @param {Object} data - The submission data object to house the data for this component.\n * @param {HTMLElement} before - A DOM element to insert this element before.\n * @return {Component} - The created component instance.\n */\n }, {\n key: \"addComponent\",\n value: function addComponent(component, data, before, noAdd) {\n data = data || this.data;\n if (this.options.parentPath) {\n component.shouldIncludeSubFormPath = true;\n }\n component = this.hook('addComponent', component, data, before, noAdd);\n var comp = this.createComponent(component, this.options, data, before ? before : null);\n if (noAdd) {\n return comp;\n }\n return comp;\n }\n }, {\n key: \"beforeFocus\",\n value: function beforeFocus() {\n if (this.parent && 'beforeFocus' in this.parent) {\n this.parent.beforeFocus(this);\n }\n }\n }, {\n key: \"render\",\n value: function render(children) {\n // If already rendering, don't re-render.\n return _get(_getPrototypeOf(NestedComponent.prototype), \"render\", this).call(this, children || this.renderTemplate(this.templateName, {\n children: !this.visible ? '' : this.renderComponents(),\n nestedKey: this.nestedKey,\n collapsed: this.options.pdf ? false : this.collapsed\n }));\n }\n }, {\n key: \"renderComponents\",\n value: function renderComponents(components) {\n components = components || this.getComponents();\n var children = components.map(function (component) {\n return component.render();\n });\n return this.renderTemplate('components', {\n children: children,\n components: components\n });\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n var _this6 = this;\n var superPromise = _get(_getPrototypeOf(NestedComponent.prototype), \"attach\", this).call(this, element);\n this.loadRefs(element, _defineProperty({\n header: 'single',\n collapsed: this.collapsed\n }, this.nestedKey, 'single'));\n var childPromise = _nativePromiseOnly[\"default\"].resolve();\n if (this.refs[this.nestedKey]) {\n childPromise = this.attachComponents(this.refs[this.nestedKey]);\n }\n if (!this.visible) {\n this.attachComponentsLogic();\n }\n if (this.component.collapsible && this.refs.header) {\n this.addEventListener(this.refs.header, 'click', function () {\n _this6.collapsed = !_this6.collapsed;\n });\n this.addEventListener(this.refs.header, 'keydown', function (e) {\n if (e.keyCode === 13 || e.keyCode === 32) {\n e.preventDefault();\n _this6.collapsed = !_this6.collapsed;\n }\n });\n }\n return _nativePromiseOnly[\"default\"].all([superPromise, childPromise]);\n }\n }, {\n key: \"attachComponentsLogic\",\n value: function attachComponentsLogic(components) {\n components = components || this.components;\n _lodash[\"default\"].each(components, function (comp) {\n comp.attachLogic();\n if (_lodash[\"default\"].isFunction(comp.attachComponentsLogic)) {\n comp.attachComponentsLogic();\n }\n });\n }\n }, {\n key: \"attachComponents\",\n value: function attachComponents(element, components, container) {\n components = components || this.components;\n container = container || this.component.components;\n element = this.hook('attachComponents', element, components, container, this);\n if (!element) {\n // Return a non-resolving promise.\n return new _nativePromiseOnly[\"default\"](function () {});\n }\n var index = 0;\n var promises = [];\n Array.prototype.slice.call(element.children).forEach(function (child) {\n if (!child.getAttribute('data-noattach') && components[index]) {\n promises.push(components[index].attach(child));\n index++;\n }\n });\n return _nativePromiseOnly[\"default\"].all(promises);\n }\n\n /**\n * Remove a component from the components array.\n *\n * @param {Component} component - The component to remove from the components.\n * @param {Array} components - An array of components to remove this component from.\n */\n }, {\n key: \"removeComponent\",\n value: function removeComponent(component, components) {\n components = components || this.components;\n component.destroy();\n _lodash[\"default\"].remove(components, {\n id: component.id\n });\n }\n\n /**\n * Removes a component provided the API key of that component.\n *\n * @param {string} key - The API key of the component to remove.\n * @param {function} fn - Called once the component is removed.\n * @return {null}\n */\n }, {\n key: \"removeComponentByKey\",\n value: function removeComponentByKey(key, fn) {\n var _this7 = this;\n var comp = this.getComponent(key, function (component, components) {\n _this7.removeComponent(component, components);\n if (fn) {\n fn(component, components);\n }\n });\n if (!comp) {\n if (fn) {\n fn(null);\n }\n return null;\n }\n }\n\n /**\n * Removes a component provided the Id of the component.\n *\n * @param {string} id - The Id of the component to remove.\n * @param {function} fn - Called when the component is removed.\n * @return {null}\n */\n }, {\n key: \"removeComponentById\",\n value: function removeComponentById(id, fn) {\n var _this8 = this;\n var comp = this.getComponentById(id, function (component, components) {\n _this8.removeComponent(component, components);\n if (fn) {\n fn(component, components);\n }\n });\n if (!comp) {\n if (fn) {\n fn(null);\n }\n return null;\n }\n }\n }, {\n key: \"updateValue\",\n value: function updateValue(value) {\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return this.components.reduce(function (changed, comp) {\n return comp.updateValue(null, flags) || changed;\n }, _get(_getPrototypeOf(NestedComponent.prototype), \"updateValue\", this).call(this, value, flags));\n }\n }, {\n key: \"shouldSkipValidation\",\n value: function shouldSkipValidation(data, dirty, row) {\n // Nested components with no input should not be validated.\n if (!this.component.input) {\n return true;\n } else {\n return _get(_getPrototypeOf(NestedComponent.prototype), \"shouldSkipValidation\", this).call(this, data, dirty, row);\n }\n }\n }, {\n key: \"checkData\",\n value: function checkData(data, flags, row, components) {\n if (this.builderMode) {\n return true;\n }\n data = data || this.rootValue;\n flags = flags || {};\n row = row || this.data;\n components = components && _lodash[\"default\"].isArray(components) ? components : this.getComponents();\n var isValid = components.reduce(function (valid, comp) {\n return comp.checkData(data, flags, row) && valid;\n }, _get(_getPrototypeOf(NestedComponent.prototype), \"checkData\", this).call(this, data, flags, row));\n this.checkModal(isValid, this.isDirty);\n return isValid;\n }\n }, {\n key: \"checkConditions\",\n value: function checkConditions(data, flags, row) {\n // check conditions of parent component first, because it may influence on visibility of it's children\n var check = _get(_getPrototypeOf(NestedComponent.prototype), \"checkConditions\", this).call(this, data, flags, row);\n //row data of parent component not always corresponds to row of nested components, use comp.data as row data for children instead\n this.getComponents().forEach(function (comp) {\n return comp.checkConditions(data, flags, comp.data);\n });\n return check;\n }\n }, {\n key: \"clearOnHide\",\n value: function clearOnHide(show) {\n _get(_getPrototypeOf(NestedComponent.prototype), \"clearOnHide\", this).call(this, show);\n if (this.component.clearOnHide) {\n if (this.allowData && !this.hasValue()) {\n this.dataValue = this.defaultValue;\n }\n if (this.hasValue()) {\n this.restoreComponentsContext();\n }\n }\n this.getComponents().forEach(function (component) {\n return component.clearOnHide(show);\n });\n }\n }, {\n key: \"restoreComponentsContext\",\n value: function restoreComponentsContext() {\n var _this9 = this;\n this.getComponents().forEach(function (component) {\n return component.data = _this9.dataValue;\n });\n }\n\n /**\n * Allow components to hook into the next page trigger to perform their own logic.\n *\n * @return {*}\n */\n }, {\n key: \"beforePage\",\n value: function beforePage(next) {\n return _nativePromiseOnly[\"default\"].all(this.getComponents().map(function (comp) {\n return comp.beforePage(next);\n }));\n }\n\n /**\n * Allow components to hook into the submission to provide their own async data.\n *\n * @return {*}\n */\n }, {\n key: \"beforeSubmit\",\n value: function beforeSubmit() {\n return _nativePromiseOnly[\"default\"].all(this.getComponents().map(function (comp) {\n return comp.beforeSubmit();\n }));\n }\n }, {\n key: \"calculateValue\",\n value: function calculateValue(data, flags, row) {\n // Do not iterate into children and calculateValues if this nested component is conditionally hidden.\n if (!this.conditionallyVisible()) {\n return false;\n }\n return this.getComponents().reduce(function (changed, comp) {\n return comp.calculateValue(data, flags, row) || changed;\n }, _get(_getPrototypeOf(NestedComponent.prototype), \"calculateValue\", this).call(this, data, flags, row));\n }\n }, {\n key: \"isLastPage\",\n value: function isLastPage() {\n return this.pages.length - 1 === this.page;\n }\n }, {\n key: \"isValid\",\n value: function isValid(data, dirty) {\n return this.getComponents().reduce(function (valid, comp) {\n return comp.isValid(data, dirty) && valid;\n }, _get(_getPrototypeOf(NestedComponent.prototype), \"isValid\", this).call(this, data, dirty));\n }\n }, {\n key: \"checkChildComponentsValidity\",\n value: function checkChildComponentsValidity(data, dirty, row, silentCheck, isParentValid) {\n return this.getComponents().reduce(function (check, comp) {\n return comp.checkValidity(data, dirty, row, silentCheck) && check;\n }, isParentValid);\n }\n }, {\n key: \"checkValidity\",\n value: function checkValidity(data, dirty, row, silentCheck) {\n if (!this.checkCondition(row, data)) {\n this.setCustomValidity('');\n return true;\n }\n var isValid = this.checkChildComponentsValidity(data, dirty, row, silentCheck, _get(_getPrototypeOf(NestedComponent.prototype), \"checkValidity\", this).call(this, data, dirty, row, silentCheck));\n this.checkModal(isValid, dirty);\n return isValid;\n }\n }, {\n key: \"checkAsyncValidity\",\n value: function checkAsyncValidity(data, dirty, row, silentCheck) {\n var _this10 = this;\n return this.ready.then(function () {\n var promises = [_get(_getPrototypeOf(NestedComponent.prototype), \"checkAsyncValidity\", _this10).call(_this10, data, dirty, row, silentCheck)];\n _this10.eachComponent(function (component) {\n return promises.push(component.checkAsyncValidity(data, dirty, row, silentCheck));\n });\n return _nativePromiseOnly[\"default\"].all(promises).then(function (results) {\n return results.reduce(function (valid, result) {\n return valid && result;\n }, true);\n });\n });\n }\n }, {\n key: \"setPristine\",\n value: function setPristine(pristine) {\n _get(_getPrototypeOf(NestedComponent.prototype), \"setPristine\", this).call(this, pristine);\n this.getComponents().forEach(function (comp) {\n return comp.setPristine(pristine);\n });\n }\n }, {\n key: \"isPristine\",\n get: function get() {\n return this.pristine && this.getComponents().every(function (c) {\n return c.isPristine;\n });\n }\n }, {\n key: \"isDirty\",\n get: function get() {\n return this.dirty && this.getComponents().every(function (c) {\n return c.isDirty;\n });\n }\n }, {\n key: \"detach\",\n value: function detach() {\n this.components.forEach(function (component) {\n component.detach();\n });\n _get(_getPrototypeOf(NestedComponent.prototype), \"detach\", this).call(this);\n }\n }, {\n key: \"clear\",\n value: function clear() {\n this.components.forEach(function (component) {\n component.clear();\n });\n _get(_getPrototypeOf(NestedComponent.prototype), \"clear\", this).call(this);\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.destroyComponents();\n _get(_getPrototypeOf(NestedComponent.prototype), \"destroy\", this).call(this);\n }\n }, {\n key: \"destroyComponents\",\n value: function destroyComponents() {\n var _this11 = this;\n var components = this.getComponents().slice();\n components.forEach(function (comp) {\n return _this11.removeComponent(comp, _this11.components);\n });\n this.components = [];\n }\n }, {\n key: \"errors\",\n get: function get() {\n var thisErrors = this.error ? [this.error] : [];\n return this.getComponents().reduce(function (errors, comp) {\n return errors.concat(comp.errors || []);\n }, thisErrors).filter(function (err) {\n return err.level !== 'hidden';\n });\n }\n }, {\n key: \"getValue\",\n value: function getValue() {\n return this.data;\n }\n }, {\n key: \"resetValue\",\n value: function resetValue() {\n _get(_getPrototypeOf(NestedComponent.prototype), \"resetValue\", this).call(this);\n this.getComponents().forEach(function (comp) {\n return comp.resetValue();\n });\n this.setPristine(true);\n }\n }, {\n key: \"dataReady\",\n get: function get() {\n return _nativePromiseOnly[\"default\"].all(this.getComponents().map(function (component) {\n return component.dataReady;\n }));\n }\n }, {\n key: \"setNestedValue\",\n value: function setNestedValue(component, value) {\n var flags = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n component._data = this.componentContext(component);\n if (component.type === 'button') {\n return false;\n }\n if (component.type === 'components') {\n if (component.tree && component.hasValue(value)) {\n return component.setValue(_lodash[\"default\"].get(value, component.key), flags);\n }\n return component.setValue(value, flags);\n } else if (value && component.hasValue(value)) {\n return component.setValue(_lodash[\"default\"].get(value, component.key), flags);\n } else if ((!this.rootPristine || component.visible) && component.shouldAddDefaultValue) {\n flags.noValidate = !flags.dirty;\n flags.resetValue = true;\n return component.setValue(component.defaultValue, flags);\n }\n }\n }, {\n key: \"setValue\",\n value: function setValue(value) {\n var _this12 = this;\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n if (!value) {\n return false;\n }\n if (value.submitAsDraft && !value.submit) {\n flags.noValidate = true;\n }\n return this.getComponents().reduce(function (changed, component) {\n return _this12.setNestedValue(component, value, flags, changed) || changed;\n }, false);\n }\n }, {\n key: \"lazyLoad\",\n get: function get() {\n var _this$component$lazyL;\n return (_this$component$lazyL = this.component.lazyLoad) !== null && _this$component$lazyL !== void 0 ? _this$component$lazyL : false;\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _Field2[\"default\"].schema.apply(_Field2[\"default\"], [{\n tree: false,\n lazyLoad: false\n }].concat(extend));\n }\n }]);\n return NestedComponent;\n}(_Field2[\"default\"]);\nexports[\"default\"] = NestedComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/_classes/nested/NestedComponent.js?"); /***/ }), @@ -411,7 +444,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nvar _Component = _interopRequireDefault(__webpack_require__(/*! ../component/Component */ \"./lib/components/_classes/component/Component.js\"));\n\nvar _NestedDataComponent2 = _interopRequireDefault(__webpack_require__(/*! ../nesteddata/NestedDataComponent */ \"./lib/components/_classes/nesteddata/NestedDataComponent.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar NestedArrayComponent = /*#__PURE__*/function (_NestedDataComponent) {\n _inherits(NestedArrayComponent, _NestedDataComponent);\n\n var _super = _createSuper(NestedArrayComponent);\n\n function NestedArrayComponent() {\n _classCallCheck(this, NestedArrayComponent);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(NestedArrayComponent, [{\n key: \"componentContext\",\n value: function componentContext(component) {\n return this.iteratableRows[component.rowIndex].data;\n }\n }, {\n key: \"iteratableRows\",\n get: function get() {\n throw new Error('Getter #iteratableRows() is not implemented');\n }\n }, {\n key: \"rowIndex\",\n get: function get() {\n return _get(_getPrototypeOf(NestedArrayComponent.prototype), \"rowIndex\", this);\n },\n set: function set(value) {\n this._rowIndex = value;\n }\n }, {\n key: \"init\",\n value: function init() {\n _get(_getPrototypeOf(NestedArrayComponent.prototype), \"init\", this).call(this);\n\n this.prevHasAddButton = this.hasAddButton();\n }\n }, {\n key: \"checkAddButtonChanged\",\n value: function checkAddButtonChanged() {\n var isAddButton = this.hasAddButton();\n\n if (isAddButton !== this.prevHasAddButton) {\n this.prevHasAddButton = isAddButton;\n this.redraw();\n }\n }\n }, {\n key: \"checkData\",\n value: function checkData(data, flags, row) {\n data = data || this.rootValue;\n flags = flags || {};\n row = row || this.data;\n this.checkAddButtonChanged();\n return this.checkRows('checkData', data, flags, _Component.default.prototype.checkData.call(this, data, flags, row));\n }\n }, {\n key: \"checkRows\",\n value: function checkRows(method, data, opts, defaultValue, silentCheck) {\n var _this = this;\n\n return this.iteratableRows.reduce(function (valid, row, rowIndex) {\n if (!(opts !== null && opts !== void 0 && opts.rowIndex) || (opts === null || opts === void 0 ? void 0 : opts.rowIndex) === rowIndex) {\n return _this.checkRow(method, data, opts, row.data, row.components, silentCheck) && valid;\n } else {\n return valid;\n }\n }, defaultValue);\n }\n }, {\n key: \"checkRow\",\n value: function checkRow(method, data, opts, row, components, silentCheck) {\n if (opts !== null && opts !== void 0 && opts.isolateRow) {\n silentCheck = true;\n opts.noRefresh = true;\n }\n\n var valid = _lodash.default.reduce(components, function (valid, component) {\n return component[method](data, opts, row, silentCheck) && valid;\n }, true);\n\n if (opts !== null && opts !== void 0 && opts.noRefresh) {\n delete opts.noRefresh;\n }\n\n return valid;\n }\n }, {\n key: \"hasAddButton\",\n value: function hasAddButton() {\n var maxLength = _lodash.default.get(this.component, 'validate.maxLength');\n\n var conditionalAddButton = _lodash.default.get(this.component, 'conditionalAddButton');\n\n return !this.component.disableAddingRemovingRows && !this.options.readOnly && !this.disabled && this.fullMode && !this.options.preview && (!maxLength || this.iteratableRows.length < maxLength) && (!conditionalAddButton || this.evaluate(conditionalAddButton, {\n value: this.dataValue\n }, 'show'));\n }\n }, {\n key: \"getComponent\",\n value: function getComponent(path, fn, originalPath) {\n path = Array.isArray(path) ? path : [path];\n var key = path.shift();\n var remainingPath = path;\n var result = [];\n var possibleComp = null;\n var comp = null;\n var rowIndex = null;\n\n if (_lodash.default.isNumber(key)) {\n rowIndex = key;\n key = remainingPath.shift();\n }\n\n if (!_lodash.default.isString(key)) {\n return result;\n }\n\n this.everyComponent(function (component, components) {\n if (component.component.key === key) {\n possibleComp = component;\n\n if (remainingPath.length > 0 && 'getComponent' in component) {\n comp = component.getComponent(remainingPath, fn, originalPath);\n } else if (fn) {\n fn(component, components);\n }\n\n result = rowIndex !== null ? comp : result.concat(comp || possibleComp);\n }\n }, rowIndex);\n\n if ((!result || result.length === 0) && possibleComp) {\n result = rowIndex !== null ? possibleComp : [possibleComp];\n }\n\n return result;\n }\n }, {\n key: \"everyComponent\",\n value: function everyComponent(fn, rowIndex, options) {\n var _options;\n\n if (_lodash.default.isObject(rowIndex)) {\n options = rowIndex;\n rowIndex = null;\n }\n\n if ((_options = options) !== null && _options !== void 0 && _options.email) {\n return;\n }\n\n var components = this.getComponents(rowIndex);\n\n _lodash.default.each(components, function (component, index) {\n if (fn(component, components, index) === false) {\n return false;\n }\n\n if (typeof component.everyComponent === 'function') {\n if (component.everyComponent(fn, options) === false) {\n return false;\n }\n }\n });\n }\n }, {\n key: \"getValueAsString\",\n value: function getValueAsString(value, options) {\n if (options !== null && options !== void 0 && options.email) {\n var _this$component$compo;\n\n var result = \"\\n \\n \\n \\n \";\n (_this$component$compo = this.component.components) === null || _this$component$compo === void 0 ? void 0 : _this$component$compo.forEach(function (component) {\n var label = component.label || component.key;\n result += \"\");\n });\n result += \"\\n \\n \\n \\n \";\n this.iteratableRows.forEach(function (_ref) {\n var components = _ref.components;\n result += '';\n\n _lodash.default.each(components, function (component) {\n result += '';\n });\n\n result += '';\n });\n result += \"\\n \\n
\".concat(label, \"
';\n\n if (component.isInputComponent && component.visible && !component.skipInEmail) {\n result += component.getView(component.dataValue, options);\n }\n\n result += '
\\n \";\n return result;\n }\n\n if (!value || !value.length) {\n return '';\n }\n\n return _get(_getPrototypeOf(NestedArrayComponent.prototype), \"getValueAsString\", this).call(this, value, options);\n }\n }, {\n key: \"getComponents\",\n value: function getComponents(rowIndex) {\n if (rowIndex !== undefined) {\n if (!this.iteratableRows[rowIndex]) {\n return [];\n }\n\n return this.iteratableRows[rowIndex].components;\n }\n\n return _get(_getPrototypeOf(NestedArrayComponent.prototype), \"getComponents\", this).call(this);\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _NestedDataComponent2.default.schema.apply(_NestedDataComponent2.default, [{\n disableAddingRemovingRows: false\n }].concat(extend));\n }\n }]);\n\n return NestedArrayComponent;\n}(_NestedDataComponent2.default);\n\nexports[\"default\"] = NestedArrayComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/_classes/nestedarray/NestedArrayComponent.js?"); +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.array.reduce.js */ \"./node_modules/core-js/modules/es.array.reduce.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.array.is-array.js */ \"./node_modules/core-js/modules/es.array.is-array.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nvar _Component = _interopRequireDefault(__webpack_require__(/*! ../component/Component */ \"./lib/components/_classes/component/Component.js\"));\nvar _NestedDataComponent2 = _interopRequireDefault(__webpack_require__(/*! ../nesteddata/NestedDataComponent */ \"./lib/components/_classes/nesteddata/NestedDataComponent.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar NestedArrayComponent = /*#__PURE__*/function (_NestedDataComponent) {\n _inherits(NestedArrayComponent, _NestedDataComponent);\n var _super = _createSuper(NestedArrayComponent);\n function NestedArrayComponent() {\n _classCallCheck(this, NestedArrayComponent);\n return _super.apply(this, arguments);\n }\n _createClass(NestedArrayComponent, [{\n key: \"componentContext\",\n value: function componentContext(component) {\n return this.iteratableRows[component.rowIndex].data;\n }\n }, {\n key: \"iteratableRows\",\n get: function get() {\n throw new Error('Getter #iteratableRows() is not implemented');\n }\n }, {\n key: \"rowIndex\",\n get: function get() {\n return _get(_getPrototypeOf(NestedArrayComponent.prototype), \"rowIndex\", this);\n },\n set: function set(value) {\n this._rowIndex = value;\n }\n }, {\n key: \"init\",\n value: function init() {\n _get(_getPrototypeOf(NestedArrayComponent.prototype), \"init\", this).call(this);\n this.prevHasAddButton = this.hasAddButton();\n }\n }, {\n key: \"checkAddButtonChanged\",\n value: function checkAddButtonChanged() {\n var isAddButton = this.hasAddButton();\n if (isAddButton !== this.prevHasAddButton) {\n this.prevHasAddButton = isAddButton;\n this.redraw();\n }\n }\n }, {\n key: \"checkData\",\n value: function checkData(data, flags, row) {\n data = data || this.rootValue;\n flags = flags || {};\n row = row || this.data;\n this.checkAddButtonChanged();\n return this.checkRows('checkData', data, flags, _Component[\"default\"].prototype.checkData.call(this, data, flags, row));\n }\n }, {\n key: \"checkRows\",\n value: function checkRows(method, data, opts, defaultValue, silentCheck) {\n var _this = this;\n return this.iteratableRows.reduce(function (valid, row, rowIndex) {\n if (!(opts !== null && opts !== void 0 && opts.rowIndex) || (opts === null || opts === void 0 ? void 0 : opts.rowIndex) === rowIndex) {\n return _this.checkRow(method, data, opts, row.data, row.components, silentCheck) && valid;\n } else {\n return valid;\n }\n }, defaultValue);\n }\n }, {\n key: \"checkRow\",\n value: function checkRow(method, data, opts, row, components, silentCheck) {\n if (opts !== null && opts !== void 0 && opts.isolateRow) {\n silentCheck = true;\n opts.noRefresh = true;\n }\n var valid = _lodash[\"default\"].reduce(components, function (valid, component) {\n return component[method](data, opts, row, silentCheck) && valid;\n }, true);\n if (opts !== null && opts !== void 0 && opts.noRefresh) {\n delete opts.noRefresh;\n }\n return valid;\n }\n }, {\n key: \"hasAddButton\",\n value: function hasAddButton() {\n var maxLength = _lodash[\"default\"].get(this.component, 'validate.maxLength');\n var conditionalAddButton = _lodash[\"default\"].get(this.component, 'conditionalAddButton');\n return !this.component.disableAddingRemovingRows && !this.options.readOnly && !this.disabled && this.fullMode && !this.options.preview && (!maxLength || this.iteratableRows.length < maxLength) && (!conditionalAddButton || this.evaluate(conditionalAddButton, {\n value: this.dataValue\n }, 'show'));\n }\n }, {\n key: \"getComponent\",\n value: function getComponent(path, fn, originalPath) {\n path = Array.isArray(path) ? path : [path];\n var key = path.shift();\n var remainingPath = path;\n var result = [];\n var possibleComp = null;\n var comp = null;\n var rowIndex = null;\n if (_lodash[\"default\"].isNumber(key)) {\n rowIndex = key;\n key = remainingPath.shift();\n }\n if (!_lodash[\"default\"].isString(key)) {\n return result;\n }\n this.everyComponent(function (component, components) {\n if (component.component.key === key) {\n possibleComp = component;\n if (remainingPath.length > 0 && 'getComponent' in component) {\n comp = component.getComponent(remainingPath, fn, originalPath);\n } else if (fn) {\n fn(component, components);\n }\n result = rowIndex !== null ? comp : result.concat(comp || possibleComp);\n }\n }, rowIndex);\n if ((!result || result.length === 0) && possibleComp) {\n result = rowIndex !== null ? possibleComp : [possibleComp];\n }\n return result;\n }\n }, {\n key: \"everyComponent\",\n value: function everyComponent(fn, rowIndex, options) {\n var _options;\n if (_lodash[\"default\"].isObject(rowIndex)) {\n options = rowIndex;\n rowIndex = null;\n }\n if ((_options = options) !== null && _options !== void 0 && _options.email) {\n return;\n }\n var components = this.getComponents(rowIndex);\n _lodash[\"default\"].each(components, function (component, index) {\n if (fn(component, components, index) === false) {\n return false;\n }\n if (typeof component.everyComponent === 'function') {\n if (component.everyComponent(fn, options) === false) {\n return false;\n }\n }\n });\n }\n }, {\n key: \"getValueAsString\",\n value: function getValueAsString(value, options) {\n if (options !== null && options !== void 0 && options.email) {\n var _this$component$compo;\n var result = \"\\n \\n \\n \\n \";\n (_this$component$compo = this.component.components) === null || _this$component$compo === void 0 ? void 0 : _this$component$compo.forEach(function (component) {\n var label = component.label || component.key;\n result += \"\");\n });\n result += \"\\n \\n \\n \\n \";\n this.iteratableRows.forEach(function (_ref) {\n var components = _ref.components;\n result += '';\n _lodash[\"default\"].each(components, function (component) {\n result += '';\n });\n result += '';\n });\n result += \"\\n \\n
\".concat(label, \"
';\n if (component.isInputComponent && component.visible && !component.skipInEmail) {\n result += component.getView(component.dataValue, options);\n }\n result += '
\\n \";\n return result;\n }\n if (!value || !value.length) {\n return '';\n }\n return _get(_getPrototypeOf(NestedArrayComponent.prototype), \"getValueAsString\", this).call(this, value, options);\n }\n }, {\n key: \"getComponents\",\n value: function getComponents(rowIndex) {\n if (rowIndex !== undefined) {\n if (!this.iteratableRows[rowIndex]) {\n return [];\n }\n return this.iteratableRows[rowIndex].components;\n }\n return _get(_getPrototypeOf(NestedArrayComponent.prototype), \"getComponents\", this).call(this);\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _NestedDataComponent2[\"default\"].schema.apply(_NestedDataComponent2[\"default\"], [{\n disableAddingRemovingRows: false\n }].concat(extend));\n }\n }]);\n return NestedArrayComponent;\n}(_NestedDataComponent2[\"default\"]);\nexports[\"default\"] = NestedArrayComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/_classes/nestedarray/NestedArrayComponent.js?"); /***/ }), @@ -422,7 +455,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptors.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.constructor.js */ \"./node_modules/core-js/modules/es.regexp.constructor.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\nvar _Component = _interopRequireDefault(__webpack_require__(/*! ../component/Component */ \"./lib/components/_classes/component/Component.js\"));\n\nvar _NestedComponent2 = _interopRequireDefault(__webpack_require__(/*! ../nested/NestedComponent */ \"./lib/components/_classes/nested/NestedComponent.js\"));\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar NestedDataComponent = /*#__PURE__*/function (_NestedComponent) {\n _inherits(NestedDataComponent, _NestedComponent);\n\n var _super = _createSuper(NestedDataComponent);\n\n function NestedDataComponent() {\n _classCallCheck(this, NestedDataComponent);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(NestedDataComponent, [{\n key: \"hasChanged\",\n value: function hasChanged(newValue, oldValue) {\n // If we do not have a value and are getting set to anything other than undefined or null, then we changed.\n if (newValue !== undefined && newValue !== null && !this.hasValue()) {\n return true;\n }\n\n return !_lodash.default.isEqual(newValue, oldValue);\n }\n }, {\n key: \"allowData\",\n get: function get() {\n return true;\n }\n }, {\n key: \"emptyValue\",\n get: function get() {\n return {};\n }\n }, {\n key: \"componentContext\",\n value: function componentContext() {\n return this.dataValue;\n }\n }, {\n key: \"getValueAsString\",\n value: function getValueAsString(value, options) {\n if (options !== null && options !== void 0 && options.email) {\n var result = \"\\n \\n \\n \";\n this.everyComponent(function (component) {\n if (component.isInputComponent && component.visible && !component.skipInEmail) {\n result += \"\\n \\n \\n \\n \\n \");\n }\n }, _objectSpread(_objectSpread({}, options), {}, {\n fromRoot: true\n }));\n result += \"\\n \\n
\".concat(component.label, \"\").concat(component.getView(component.dataValue, options), \"
\\n \";\n return result;\n }\n\n if (_lodash.default.isEmpty(value)) {\n return '';\n }\n\n if (options !== null && options !== void 0 && options.modalPreview) {\n delete options.modalPreview;\n return this.getDataValueAsTable(value, options);\n }\n\n return '[Complex Data]';\n }\n }, {\n key: \"getDataValueAsTable\",\n value: function getDataValueAsTable(value, options) {\n var result = \"\\n \\n \\n \";\n var htmlTagRegExp = new RegExp('<(.*?)>');\n this.components.forEach(function (component) {\n if (component.isInputComponent && component.visible && !component.skipInEmail) {\n var componentValue = component.getView(component.dataValue, options);\n result += \"\\n \\n \\n \\n \\n \");\n }\n }, _objectSpread(_objectSpread({}, options), {}, {\n fromRoot: true\n }));\n result += \"\\n \\n
\".concat(component.label, \"\").concat(component.component && component.component.inputFormat === 'html' && htmlTagRegExp.test(componentValue) ? componentValue : \"\"), \"
\\n \";\n return result;\n }\n }, {\n key: \"everyComponent\",\n value: function everyComponent(fn, options) {\n if (options !== null && options !== void 0 && options.email) {\n if (options.fromRoot) {\n delete options.fromRoot;\n } else {\n return;\n }\n }\n\n return _get(_getPrototypeOf(NestedDataComponent.prototype), \"everyComponent\", this).call(this, fn, options);\n }\n /**\n * Get the value of this component.\n *\n * @returns {*}\n */\n\n }, {\n key: \"getValue\",\n value: function getValue() {\n return this.dataValue;\n }\n }, {\n key: \"updateValue\",\n value: function updateValue(value) {\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n // Intentionally skip over nested component updateValue method to keep\n // recursive update from occurring with sub components.\n return _Component.default.prototype.updateValue.call(this, value, flags);\n }\n }, {\n key: \"setValue\",\n value: function setValue(value) {\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var changed = false;\n var hasValue = this.hasValue();\n\n if (hasValue && _lodash.default.isEmpty(this.dataValue)) {\n flags.noValidate = true;\n }\n\n if (!value || !_lodash.default.isObject(value) || !hasValue) {\n changed = true;\n this.dataValue = this.defaultValue;\n }\n\n changed = _get(_getPrototypeOf(NestedDataComponent.prototype), \"setValue\", this).call(this, value, flags) || changed;\n this.updateOnChange(flags, changed);\n return changed;\n }\n }]);\n\n return NestedDataComponent;\n}(_NestedComponent2.default);\n\nexports[\"default\"] = NestedDataComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/_classes/nesteddata/NestedDataComponent.js?"); +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptors.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-properties.js */ \"./node_modules/core-js/modules/es.object.define-properties.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.constructor.js */ \"./node_modules/core-js/modules/es.regexp.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _Component = _interopRequireDefault(__webpack_require__(/*! ../component/Component */ \"./lib/components/_classes/component/Component.js\"));\nvar _NestedComponent2 = _interopRequireDefault(__webpack_require__(/*! ../nested/NestedComponent */ \"./lib/components/_classes/nested/NestedComponent.js\"));\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar NestedDataComponent = /*#__PURE__*/function (_NestedComponent) {\n _inherits(NestedDataComponent, _NestedComponent);\n var _super = _createSuper(NestedDataComponent);\n function NestedDataComponent() {\n _classCallCheck(this, NestedDataComponent);\n return _super.apply(this, arguments);\n }\n _createClass(NestedDataComponent, [{\n key: \"hasChanged\",\n value: function hasChanged(newValue, oldValue) {\n // If we do not have a value and are getting set to anything other than undefined or null, then we changed.\n if (newValue !== undefined && newValue !== null && !this.hasValue()) {\n return true;\n }\n return !_lodash[\"default\"].isEqual(newValue, oldValue);\n }\n }, {\n key: \"allowData\",\n get: function get() {\n return true;\n }\n }, {\n key: \"emptyValue\",\n get: function get() {\n return {};\n }\n }, {\n key: \"componentContext\",\n value: function componentContext() {\n return this.dataValue;\n }\n }, {\n key: \"getValueAsString\",\n value: function getValueAsString(value, options) {\n if (options !== null && options !== void 0 && options.email) {\n var result = \"\\n \\n \\n \";\n this.everyComponent(function (component) {\n if (component.isInputComponent && component.visible && !component.skipInEmail) {\n result += \"\\n \\n \\n \\n \\n \");\n }\n }, _objectSpread(_objectSpread({}, options), {}, {\n fromRoot: true\n }));\n result += \"\\n \\n
\".concat(component.label, \"\").concat(component.getView(component.dataValue, options), \"
\\n \";\n return result;\n }\n if (_lodash[\"default\"].isEmpty(value)) {\n return '';\n }\n if (options !== null && options !== void 0 && options.modalPreview) {\n delete options.modalPreview;\n return this.getDataValueAsTable(value, options);\n }\n return '[Complex Data]';\n }\n }, {\n key: \"getDataValueAsTable\",\n value: function getDataValueAsTable(value, options) {\n var result = \"\\n \\n \\n \";\n var htmlTagRegExp = new RegExp('<(.*?)>');\n this.components.forEach(function (component) {\n if (component.isInputComponent && component.visible && !component.skipInEmail) {\n var componentValue = component.getView(component.dataValue, options);\n result += \"\\n \\n \\n \\n \\n \");\n }\n }, _objectSpread(_objectSpread({}, options), {}, {\n fromRoot: true\n }));\n result += \"\\n \\n
\".concat(component.label, \"\").concat(component.component && component.component.inputFormat === 'html' && htmlTagRegExp.test(componentValue) ? componentValue : \"\"), \"
\\n \";\n return result;\n }\n }, {\n key: \"everyComponent\",\n value: function everyComponent(fn, options) {\n if (options !== null && options !== void 0 && options.email) {\n if (options.fromRoot) {\n delete options.fromRoot;\n } else {\n return;\n }\n }\n return _get(_getPrototypeOf(NestedDataComponent.prototype), \"everyComponent\", this).call(this, fn, options);\n }\n\n /**\n * Get the value of this component.\n *\n * @returns {*}\n */\n }, {\n key: \"getValue\",\n value: function getValue() {\n return this.dataValue;\n }\n }, {\n key: \"updateValue\",\n value: function updateValue(value) {\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n // Intentionally skip over nested component updateValue method to keep\n // recursive update from occurring with sub components.\n return _Component[\"default\"].prototype.updateValue.call(this, value, flags);\n }\n }, {\n key: \"setValue\",\n value: function setValue(value) {\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var changed = false;\n var hasValue = this.hasValue();\n if (hasValue && _lodash[\"default\"].isEmpty(this.dataValue)) {\n flags.noValidate = true;\n }\n if (!value || !_lodash[\"default\"].isObject(value) || !hasValue) {\n changed = true;\n this.dataValue = this.defaultValue;\n }\n changed = _get(_getPrototypeOf(NestedDataComponent.prototype), \"setValue\", this).call(this, value, flags) || changed;\n this.updateOnChange(flags, changed);\n return changed;\n }\n }]);\n return NestedDataComponent;\n}(_NestedComponent2[\"default\"]);\nexports[\"default\"] = NestedDataComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/_classes/nesteddata/NestedDataComponent.js?"); /***/ }), @@ -433,7 +466,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\nvar _Components = _interopRequireDefault(__webpack_require__(/*! ../Components */ \"./lib/components/Components.js\"));\n\nvar _AddressEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/Address.edit.data */ \"./lib/components/address/editForm/Address.edit.data.js\"));\n\nvar _AddressEdit2 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Address.edit.display */ \"./lib/components/address/editForm/Address.edit.display.js\"));\n\nvar _AddressEdit3 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Address.edit.provider */ \"./lib/components/address/editForm/Address.edit.provider.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _Components.default.baseEditForm.apply(_Components.default, [[{\n key: 'data',\n components: _AddressEdit.default\n }, {\n key: 'display',\n components: _AddressEdit2.default\n }, {\n label: 'Provider',\n key: 'provider',\n weight: 15,\n components: _AddressEdit3.default\n }, {\n key: 'addons',\n ignore: true\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/address/Address.form.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\nvar _Components = _interopRequireDefault(__webpack_require__(/*! ../Components */ \"./lib/components/Components.js\"));\nvar _AddressEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/Address.edit.data */ \"./lib/components/address/editForm/Address.edit.data.js\"));\nvar _AddressEdit2 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Address.edit.display */ \"./lib/components/address/editForm/Address.edit.display.js\"));\nvar _AddressEdit3 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Address.edit.provider */ \"./lib/components/address/editForm/Address.edit.provider.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _Components[\"default\"].baseEditForm.apply(_Components[\"default\"], [[{\n key: 'data',\n components: _AddressEdit[\"default\"]\n }, {\n key: 'display',\n components: _AddressEdit2[\"default\"]\n }, {\n label: 'Provider',\n key: 'provider',\n weight: 15,\n components: _AddressEdit3[\"default\"]\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/address/Address.form.js?"); /***/ }), @@ -444,7 +477,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptors.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.from.js */ \"./node_modules/core-js/modules/es.array.from.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.slice.js */ \"./node_modules/core-js/modules/es.array.slice.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = exports.AddressComponentMode = void 0;\n\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.join.js */ \"./node_modules/core-js/modules/es.array.join.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.search.js */ \"./node_modules/core-js/modules/es.string.search.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\nvar _autocompleter = _interopRequireDefault(__webpack_require__(/*! autocompleter */ \"./node_modules/autocompleter/autocomplete.js\"));\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nvar _Formio = __webpack_require__(/*! ../../Formio */ \"./lib/Formio.js\");\n\nvar _GoogleAddressProvider = __webpack_require__(/*! ../../providers/address/GoogleAddressProvider */ \"./lib/providers/address/GoogleAddressProvider.js\");\n\nvar _Field = _interopRequireDefault(__webpack_require__(/*! ../_classes/field/Field */ \"./lib/components/_classes/field/Field.js\"));\n\nvar _NestedComponent = _interopRequireDefault(__webpack_require__(/*! ../_classes/nested/NestedComponent */ \"./lib/components/_classes/nested/NestedComponent.js\"));\n\nvar _Container = _interopRequireDefault(__webpack_require__(/*! ../container/Container */ \"./lib/components/container/Container.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { 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\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar AddressComponentMode = {\n Autocomplete: 'autocomplete',\n Manual: 'manual'\n};\nexports.AddressComponentMode = AddressComponentMode;\nvar RemoveValueIconHiddenClass = 'address-autocomplete-remove-value-icon--hidden';\nvar ChildConditional = 'show = _.get(instance, \\'parent.manualMode\\', false);';\n\nvar AddressComponent = /*#__PURE__*/function (_ContainerComponent) {\n _inherits(AddressComponent, _ContainerComponent);\n\n var _super = _createSuper(AddressComponent);\n\n function AddressComponent() {\n _classCallCheck(this, AddressComponent);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(AddressComponent, [{\n key: \"mergeSchema\",\n value: function mergeSchema() {\n var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var defaultSchema = this.defaultSchema;\n\n if (component.components) {\n defaultSchema = _lodash.default.omit(defaultSchema, 'components');\n }\n\n return _lodash.default.defaultsDeep(component, defaultSchema);\n }\n }, {\n key: \"init\",\n value: function init() {\n this.components = this.components || [];\n\n if (this.builderMode || this.manualModeEnabled) {\n _NestedComponent.default.prototype.addComponents.call(this, this.manualMode ? this.address : {});\n }\n\n _Field.default.prototype.init.call(this);\n\n if (!this.builderMode) {\n if (this.component.provider) {\n var _this$component = this.component,\n provider = _this$component.provider,\n providerOptions = _this$component.providerOptions;\n this.provider = this.initializeProvider(provider, providerOptions);\n } else if (this.component.map) {\n // Fallback to legacy version where Google Maps was the only provider.\n this.component.provider = _GoogleAddressProvider.GoogleAddressProvider.name;\n this.component.providerOptions = this.component.providerOptions || {};\n var _this$component2 = this.component,\n map = _this$component2.map,\n _provider = _this$component2.provider,\n _providerOptions = _this$component2.providerOptions;\n var key = map.key,\n region = map.region;\n\n if (key) {\n _lodash.default.set(_providerOptions, 'params.key', key);\n }\n\n if (region) {\n _lodash.default.set(_providerOptions, 'params.region', region);\n }\n\n this.provider = this.initializeProvider(_provider, _providerOptions);\n }\n }\n }\n }, {\n key: \"initializeProvider\",\n value: function initializeProvider(provider) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var url = this.interpolate(options.url);\n\n var Provider = _Formio.GlobalFormio.Providers.getProvider('address', provider);\n\n return new Provider(_objectSpread(_objectSpread({}, options), {}, {\n url: url\n }));\n }\n }, {\n key: \"emptyValue\",\n get: function get() {\n return this.manualModeEnabled ? {\n mode: AddressComponentMode.Autocomplete,\n address: {}\n } : {};\n }\n }, {\n key: \"mode\",\n get: function get() {\n var _this$dataValue$mode, _this$dataValue;\n\n if (!this.manualModeEnabled) {\n return AddressComponentMode.Autocomplete;\n }\n\n return (_this$dataValue$mode = (_this$dataValue = this.dataValue) === null || _this$dataValue === void 0 ? void 0 : _this$dataValue.mode) !== null && _this$dataValue$mode !== void 0 ? _this$dataValue$mode : AddressComponentMode.Autocomplete;\n },\n set: function set(value) {\n if (this.manualModeEnabled) {\n this.dataValue.mode = value;\n }\n }\n }, {\n key: \"autocompleteMode\",\n get: function get() {\n return this.mode === AddressComponentMode.Autocomplete;\n }\n }, {\n key: \"manualMode\",\n get: function get() {\n return this.mode === AddressComponentMode.Manual;\n }\n }, {\n key: \"manualModeEnabled\",\n get: function get() {\n return !this.isMultiple && Boolean(this.component.enableManualMode);\n }\n }, {\n key: \"restoreComponentsContext\",\n value: function restoreComponentsContext() {\n var _this = this;\n\n this.getComponents().forEach(function (component) {\n component.data = _this.address;\n component.setValue(component.dataValue, {\n noUpdateEvent: true\n });\n });\n }\n }, {\n key: \"isMultiple\",\n get: function get() {\n return Boolean(this.component.multiple);\n }\n }, {\n key: \"address\",\n get: function get() {\n if (this.isMultiple) {\n return _lodash.default.isArray(this.dataValue) ? this.dataValue : [this.dataValue];\n } // Manual mode is not implementing for multiple value\n\n\n return this.manualModeEnabled && this.dataValue ? this.dataValue.address : this.dataValue;\n },\n set: function set(value) {\n if (this.manualModeEnabled && !this.isMultiple) {\n this.dataValue.address = value;\n } else {\n this.dataValue = value;\n }\n }\n }, {\n key: \"defaultValue\",\n get: function get() {\n var defaultValue = _get(_getPrototypeOf(AddressComponent.prototype), \"defaultValue\", this);\n\n if (this.isMultiple) {\n defaultValue = _lodash.default.isArray(defaultValue) ? defaultValue : [defaultValue];\n }\n\n return defaultValue;\n }\n }, {\n key: \"defaultSchema\",\n get: function get() {\n return AddressComponent.schema();\n }\n }, {\n key: \"isValueInLegacyFormat\",\n value: function isValueInLegacyFormat(value) {\n return value && !value.mode;\n }\n }, {\n key: \"normalizeValue\",\n value: function normalizeValue(value) {\n return this.manualModeEnabled && this.isValueInLegacyFormat(value) ? {\n mode: AddressComponentMode.Autocomplete,\n address: value\n } : value;\n }\n }, {\n key: \"setValue\",\n value: function setValue(value) {\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n var changed = _Field.default.prototype.setValue.call(this, value, flags);\n\n if (this.manualMode) {\n this.restoreComponentsContext();\n }\n\n if (changed || !_lodash.default.isEmpty(value) && flags.fromSubmission) {\n this.redraw();\n }\n\n return changed;\n }\n }, {\n key: \"modeSwitcher\",\n get: function get() {\n return this.refs ? this.refs[AddressComponent.modeSwitcherRef] || null : null;\n }\n }, {\n key: \"removeValueIcon\",\n get: function get() {\n return this.refs ? this.refs[AddressComponent.removeValueIconRef] || null : null;\n }\n }, {\n key: \"searchInput\",\n get: function get() {\n return this.refs ? this.refs[AddressComponent.searchInputRef] || null : null;\n }\n }, {\n key: \"addRowButton\",\n get: function get() {\n return this.refs ? this.refs[AddressComponent.addRowButtonRef] || null : null;\n }\n }, {\n key: \"removeRowButton\",\n get: function get() {\n return this.refs ? this.refs[AddressComponent.removeRowButtonRef] || null : null;\n }\n }, {\n key: \"searchInputAttributes\",\n get: function get() {\n var attr = {\n name: this.options.name,\n type: 'text',\n class: 'form-control',\n lang: this.options.language,\n tabindex: this.component.tabindex || 0\n };\n\n if (this.component.placeholder) {\n attr.placeholder = this.t(this.component.placeholder), {\n _userInput: true\n };\n }\n\n if (this.disabled) {\n attr.disabled = 'disabled';\n }\n\n _lodash.default.defaults(attr, this.component.attributes);\n\n return attr;\n }\n }, {\n key: \"templateName\",\n get: function get() {\n return 'address';\n }\n }, {\n key: \"gridTemplateName\",\n get: function get() {\n return 'multiValueTable';\n }\n }, {\n key: \"rowTemplateName\",\n get: function get() {\n return 'multiValueRow';\n }\n }, {\n key: \"hasChildren\",\n get: function get() {\n return !this.isMultiple && (this.builderMode || this.manualModeEnabled);\n }\n }, {\n key: \"addAnother\",\n get: function get() {\n return this.t(this.component.addAnother || 'Add Another');\n }\n }, {\n key: \"renderElement\",\n value: function renderElement(value) {\n return this.renderTemplate(this.templateName, {\n children: this.hasChildren ? this.renderComponents() : '',\n nestedKey: this.nestedKey,\n inputAttributes: this.searchInputAttributes,\n ref: {\n modeSwitcher: AddressComponent.modeSwitcherRef,\n removeValueIcon: AddressComponent.removeValueIconRef,\n searchInput: AddressComponent.searchInputRef\n },\n displayValue: this.getDisplayValue(value),\n mode: {\n autocomplete: this.autocompleteMode,\n manual: this.manualMode\n }\n });\n }\n }, {\n key: \"renderRow\",\n value: function renderRow(value, index) {\n return this.renderTemplate(this.rowTemplateName, {\n index: index,\n disabled: this.disabled,\n element: \"\".concat(this.renderElement(value, index))\n });\n }\n }, {\n key: \"renderGrid\",\n value: function renderGrid() {\n return this.renderTemplate(this.gridTemplateName, {\n rows: this.address.map(this.renderRow.bind(this)).join(''),\n disabled: this.disabled,\n addAnother: this.addAnother\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n if (this.isMultiple) {\n return _get(_getPrototypeOf(AddressComponent.prototype), \"render\", this).call(this, this.renderGrid());\n }\n\n return _get(_getPrototypeOf(AddressComponent.prototype), \"render\", this).call(this, this.renderElement());\n }\n }, {\n key: \"onSelectAddress\",\n value: function onSelectAddress(address, element, index) {\n if (this.isMultiple) {\n this.address[index] = address;\n this.address = _toConsumableArray(this.address);\n } else {\n this.address = address;\n }\n\n this.triggerChange({\n modified: true\n });\n\n if (element) {\n element.value = this.getDisplayValue(this.isMultiple ? this.address[index] : this.address);\n }\n\n this.updateRemoveIcon(index);\n }\n }, {\n key: \"addRow\",\n value: function addRow() {\n this.address = this.address.concat(this.emptyValue);\n\n _get(_getPrototypeOf(AddressComponent.prototype), \"redraw\", this).call(this);\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n var _this$loadRefs,\n _this2 = this;\n\n var result = (this.builderMode || this.manualMode ? _get(_getPrototypeOf(AddressComponent.prototype), \"attach\", this) : _Field.default.prototype.attach).call(this, element);\n\n if (!this.builderMode) {\n if (!this.provider && this.component.provider) {\n var _this$component3 = this.component,\n provider = _this$component3.provider,\n providerOptions = _this$component3.providerOptions;\n this.provider = this.initializeProvider(provider, providerOptions);\n }\n }\n\n this.loadRefs(element, (_this$loadRefs = {}, _defineProperty(_this$loadRefs, AddressComponent.addRowButtonRef, 'single'), _defineProperty(_this$loadRefs, AddressComponent.modeSwitcherRef, 'single'), _defineProperty(_this$loadRefs, AddressComponent.removeRowButtonRef, 'multiple'), _defineProperty(_this$loadRefs, AddressComponent.removeValueIconRef, 'multiple'), _defineProperty(_this$loadRefs, AddressComponent.searchInputRef, 'multiple'), _this$loadRefs));\n this.searchInput.forEach(function (element, index) {\n if (!_this2.builderMode && element && _this2.provider) {\n if (_this2.component.provider === 'google') {\n _this2.provider.attachAutocomplete(element, index, _this2.onSelectAddress.bind(_this2));\n } else {\n (0, _autocompleter.default)({\n input: element,\n debounceWaitMs: 300,\n fetch: function fetch(text, update) {\n var query = text;\n\n _this2.provider.search(query).then(update);\n },\n render: function render(address) {\n var div = _this2.ce('div');\n\n div.textContent = _this2.getDisplayValue(address);\n return div;\n },\n onSelect: function onSelect(address) {\n _this2.onSelectAddress(address, element, index);\n }\n });\n }\n\n _this2.addEventListener(element, 'blur', function () {\n if (!element) {\n return;\n }\n\n if (element.value) {\n element.value = _this2.getDisplayValue(_this2.isMultiple ? _this2.address[index] : _this2.address);\n }\n });\n\n _this2.addEventListener(element, 'keyup', function () {\n if (!element) {\n return;\n }\n\n if (!element.value) {\n _this2.clearAddress(element, index);\n }\n });\n }\n });\n\n if (this.addRowButton) {\n this.addEventListener(this.addRowButton, 'click', function (event) {\n event.preventDefault();\n\n _this2.addRow();\n });\n }\n\n this.removeRowButton.forEach(function (removeRowButton, index) {\n _this2.addEventListener(removeRowButton, 'click', function (event) {\n event.preventDefault();\n\n _this2.removeValue(index);\n });\n });\n\n if (this.modeSwitcher) {\n this.addEventListener(this.modeSwitcher, 'change', function () {\n if (!_this2.modeSwitcher) {\n return;\n }\n\n _this2.dataValue = _this2.emptyValue;\n _this2.mode = _this2.modeSwitcher.checked ? AddressComponentMode.Manual : AddressComponentMode.Autocomplete;\n\n if (!_this2.builderMode) {\n if (_this2.manualMode) {\n _this2.restoreComponentsContext();\n }\n\n _this2.triggerChange({\n modified: true\n });\n }\n\n _this2.redraw();\n });\n }\n\n if (!this.builderMode) {\n this.removeValueIcon.forEach(function (removeValueIcon, index) {\n _this2.updateRemoveIcon(index);\n\n var removeValueHandler = function removeValueHandler() {\n var _this2$searchInput;\n\n var searchInput = (_this2$searchInput = _this2.searchInput) === null || _this2$searchInput === void 0 ? void 0 : _this2$searchInput[index];\n\n _this2.clearAddress(searchInput, index);\n\n if (searchInput) {\n searchInput.focus();\n }\n };\n\n _this2.addEventListener(removeValueIcon, 'click', removeValueHandler);\n\n _this2.addEventListener(removeValueIcon, 'keydown', function (_ref) {\n var key = _ref.key;\n\n if (key === 'Enter') {\n removeValueHandler();\n }\n });\n });\n }\n\n return result;\n }\n }, {\n key: \"addChildComponent\",\n value: function addChildComponent(component) {\n component.customConditional = ChildConditional;\n }\n }, {\n key: \"redraw\",\n value: function redraw() {\n var _this3 = this;\n\n var modeSwitcherInFocus = this.modeSwitcher && document.activeElement === this.modeSwitcher;\n return _get(_getPrototypeOf(AddressComponent.prototype), \"redraw\", this).call(this).then(function (result) {\n if (modeSwitcherInFocus && _this3.modeSwitcher) {\n _this3.modeSwitcher.focus();\n }\n\n return result;\n });\n }\n }, {\n key: \"clearAddress\",\n value: function clearAddress(element, index) {\n var _this$address;\n\n if (!this.isEmpty()) {\n this.triggerChange();\n }\n\n if ((_this$address = this.address) !== null && _this$address !== void 0 && _this$address[index]) {\n this.address[index] = this.emptyValue;\n } else {\n this.address = this.emptyValue;\n }\n\n if (element) {\n element.value = '';\n }\n\n this.updateRemoveIcon(index);\n }\n }, {\n key: \"getDisplayValue\",\n value: function getDisplayValue() {\n var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.address;\n return this.provider && !this.manualMode ? this.provider.getDisplayValue(value) : '';\n }\n }, {\n key: \"validateMultiple\",\n value: function validateMultiple() {\n return this.isMultiple;\n }\n }, {\n key: \"updateRemoveIcon\",\n value: function updateRemoveIcon(index) {\n var _this$removeValueIcon;\n\n var removeValueIcon = (_this$removeValueIcon = this.removeValueIcon) === null || _this$removeValueIcon === void 0 ? void 0 : _this$removeValueIcon[index];\n\n if (removeValueIcon) {\n var value = this.isMultiple ? this.address[index] : this.address;\n\n if (this.isEmpty(value) || this.disabled) {\n this.addClass(removeValueIcon, RemoveValueIconHiddenClass);\n } else {\n this.removeClass(removeValueIcon, RemoveValueIconHiddenClass);\n }\n }\n }\n }, {\n key: \"getValueAsString\",\n value: function getValueAsString(value, options) {\n if (!value) {\n return '';\n }\n\n var normalizedValue = this.normalizeValue(value);\n\n var _ref2 = this.manualModeEnabled ? normalizedValue : {\n address: normalizedValue,\n mode: AddressComponentMode.Autocomplete\n },\n address = _ref2.address,\n mode = _ref2.mode;\n\n var valueInManualMode = mode === AddressComponentMode.Manual;\n\n if (this.provider && !valueInManualMode) {\n return this.getDisplayValue(address);\n }\n\n if (valueInManualMode) {\n if (this.component.manualModeViewString) {\n return this.interpolate(this.component.manualModeViewString, {\n address: address,\n data: this.data,\n component: this.component\n });\n }\n\n return this.getComponents().filter(function (component) {\n return component.hasValue(address);\n }).map(function (component) {\n return [component, _lodash.default.get(address, component.key)];\n }).filter(function (_ref3) {\n var _ref4 = _slicedToArray(_ref3, 2),\n component = _ref4[0],\n componentValue = _ref4[1];\n\n return !component.isEmpty(componentValue);\n }).map(function (_ref5) {\n var _ref6 = _slicedToArray(_ref5, 2),\n component = _ref6[0],\n componentValue = _ref6[1];\n\n return component.getValueAsString(componentValue, options);\n }).join(', ');\n }\n\n return _get(_getPrototypeOf(AddressComponent.prototype), \"getValueAsString\", this).call(this, address, options);\n }\n }, {\n key: \"focus\",\n value: function focus() {\n if (this.searchInput && this.searchInput[0]) {\n this.searchInput[0].focus();\n }\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _Container.default.schema.apply(_Container.default, [{\n type: 'address',\n label: 'Address',\n key: 'address',\n switchToManualModeLabel: 'Can\\'t find address? Switch to manual mode.',\n provider: '',\n providerOptions: {},\n manualModeViewString: '',\n hideLabel: false,\n disableClearIcon: false,\n enableManualMode: false,\n components: [{\n label: 'Address 1',\n tableView: false,\n key: 'address1',\n type: 'textfield',\n input: true,\n customConditional: ChildConditional\n }, {\n label: 'Address 2',\n tableView: false,\n key: 'address2',\n type: 'textfield',\n input: true,\n customConditional: ChildConditional\n }, {\n label: 'City',\n tableView: false,\n key: 'city',\n type: 'textfield',\n input: true,\n customConditional: ChildConditional\n }, {\n label: 'State',\n tableView: false,\n key: 'state',\n type: 'textfield',\n input: true,\n customConditional: ChildConditional\n }, {\n label: 'Country',\n tableView: false,\n key: 'country',\n type: 'textfield',\n input: true,\n customConditional: ChildConditional\n }, {\n label: 'Zip Code',\n tableView: false,\n key: 'zip',\n type: 'textfield',\n input: true,\n customConditional: ChildConditional\n }]\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Address',\n group: 'advanced',\n icon: 'home',\n documentation: '/userguide/forms/form-components#address',\n weight: 35,\n schema: AddressComponent.schema()\n };\n }\n }, {\n key: \"modeSwitcherRef\",\n get: function get() {\n return 'modeSwitcher';\n }\n }, {\n key: \"removeValueIconRef\",\n get: function get() {\n return 'removeValueIcon';\n }\n }, {\n key: \"searchInputRef\",\n get: function get() {\n return 'searchInput';\n }\n }, {\n key: \"addRowButtonRef\",\n get: function get() {\n return 'addButton';\n }\n }, {\n key: \"removeRowButtonRef\",\n get: function get() {\n return 'removeRow';\n }\n }]);\n\n return AddressComponent;\n}(_Container.default);\n\nexports[\"default\"] = AddressComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/address/Address.js?"); +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptors.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-properties.js */ \"./node_modules/core-js/modules/es.object.define-properties.js\");\n__webpack_require__(/*! core-js/modules/es.array.is-array.js */ \"./node_modules/core-js/modules/es.array.is-array.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.from.js */ \"./node_modules/core-js/modules/es.array.from.js\");\n__webpack_require__(/*! core-js/modules/es.array.slice.js */ \"./node_modules/core-js/modules/es.array.slice.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = exports.AddressComponentMode = void 0;\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.array.join.js */ \"./node_modules/core-js/modules/es.array.join.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n__webpack_require__(/*! core-js/modules/es.string.search.js */ \"./node_modules/core-js/modules/es.string.search.js\");\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _autocompleter = _interopRequireDefault(__webpack_require__(/*! autocompleter */ \"./node_modules/autocompleter/autocomplete.js\"));\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nvar _Formio = __webpack_require__(/*! ../../Formio */ \"./lib/Formio.js\");\nvar _GoogleAddressProvider = __webpack_require__(/*! ../../providers/address/GoogleAddressProvider */ \"./lib/providers/address/GoogleAddressProvider.js\");\nvar _Field = _interopRequireDefault(__webpack_require__(/*! ../_classes/field/Field */ \"./lib/components/_classes/field/Field.js\"));\nvar _NestedComponent = _interopRequireDefault(__webpack_require__(/*! ../_classes/nested/NestedComponent */ \"./lib/components/_classes/nested/NestedComponent.js\"));\nvar _Container = _interopRequireDefault(__webpack_require__(/*! ../container/Container */ \"./lib/components/container/Container.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : \"undefined\" != typeof Symbol && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) { ; } } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i[\"return\"] && (_r = _i[\"return\"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar AddressComponentMode = {\n Autocomplete: 'autocomplete',\n Manual: 'manual'\n};\nexports.AddressComponentMode = AddressComponentMode;\nvar RemoveValueIconHiddenClass = 'address-autocomplete-remove-value-icon--hidden';\nvar ChildConditional = 'show = _.get(instance, \\'parent.manualMode\\', false);';\nvar AddressComponent = /*#__PURE__*/function (_ContainerComponent) {\n _inherits(AddressComponent, _ContainerComponent);\n var _super = _createSuper(AddressComponent);\n function AddressComponent() {\n _classCallCheck(this, AddressComponent);\n return _super.apply(this, arguments);\n }\n _createClass(AddressComponent, [{\n key: \"mergeSchema\",\n value: function mergeSchema() {\n var component = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var defaultSchema = this.defaultSchema;\n if (component.components) {\n defaultSchema = _lodash[\"default\"].omit(defaultSchema, 'components');\n }\n return _lodash[\"default\"].defaultsDeep(component, defaultSchema);\n }\n }, {\n key: \"init\",\n value: function init() {\n this.components = this.components || [];\n if (this.builderMode || this.manualModeEnabled) {\n _NestedComponent[\"default\"].prototype.addComponents.call(this, this.manualMode ? this.address : {});\n }\n _Field[\"default\"].prototype.init.call(this);\n if (!this.builderMode) {\n if (this.component.provider) {\n var _this$component = this.component,\n provider = _this$component.provider,\n providerOptions = _this$component.providerOptions;\n this.provider = this.initializeProvider(provider, providerOptions);\n } else if (this.component.map) {\n // Fallback to legacy version where Google Maps was the only provider.\n this.component.provider = _GoogleAddressProvider.GoogleAddressProvider.name;\n this.component.providerOptions = this.component.providerOptions || {};\n var _this$component2 = this.component,\n map = _this$component2.map,\n _provider = _this$component2.provider,\n _providerOptions = _this$component2.providerOptions;\n var key = map.key,\n region = map.region;\n if (key) {\n _lodash[\"default\"].set(_providerOptions, 'params.key', key);\n }\n if (region) {\n _lodash[\"default\"].set(_providerOptions, 'params.region', region);\n }\n this.provider = this.initializeProvider(_provider, _providerOptions);\n }\n }\n }\n }, {\n key: \"initializeProvider\",\n value: function initializeProvider(provider) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var url = this.interpolate(options.url);\n var Provider = _Formio.GlobalFormio.Providers.getProvider('address', provider);\n return new Provider(_objectSpread(_objectSpread({}, options), {}, {\n url: url\n }));\n }\n }, {\n key: \"emptyValue\",\n get: function get() {\n return this.manualModeEnabled ? {\n mode: AddressComponentMode.Autocomplete,\n address: {}\n } : {};\n }\n }, {\n key: \"mode\",\n get: function get() {\n var _this$dataValue$mode, _this$dataValue;\n if (!this.manualModeEnabled) {\n return AddressComponentMode.Autocomplete;\n }\n return (_this$dataValue$mode = (_this$dataValue = this.dataValue) === null || _this$dataValue === void 0 ? void 0 : _this$dataValue.mode) !== null && _this$dataValue$mode !== void 0 ? _this$dataValue$mode : AddressComponentMode.Autocomplete;\n },\n set: function set(value) {\n if (this.manualModeEnabled) {\n this.dataValue.mode = value;\n }\n }\n }, {\n key: \"autocompleteMode\",\n get: function get() {\n return this.mode === AddressComponentMode.Autocomplete;\n }\n }, {\n key: \"manualMode\",\n get: function get() {\n return this.mode === AddressComponentMode.Manual;\n }\n }, {\n key: \"manualModeEnabled\",\n get: function get() {\n return !this.isMultiple && Boolean(this.component.enableManualMode);\n }\n }, {\n key: \"restoreComponentsContext\",\n value: function restoreComponentsContext() {\n var _this = this;\n this.getComponents().forEach(function (component) {\n component.data = _this.address;\n component.setValue(component.dataValue, {\n noUpdateEvent: true\n });\n });\n }\n }, {\n key: \"isMultiple\",\n get: function get() {\n return Boolean(this.component.multiple);\n }\n }, {\n key: \"address\",\n get: function get() {\n if (this.isMultiple) {\n return _lodash[\"default\"].isArray(this.dataValue) ? this.dataValue : [this.dataValue];\n }\n // Manual mode is not implementing for multiple value\n return this.manualModeEnabled && this.dataValue ? this.dataValue.address : this.dataValue;\n },\n set: function set(value) {\n if (this.manualModeEnabled && !this.isMultiple) {\n this.dataValue.address = value;\n } else {\n this.dataValue = value;\n }\n }\n }, {\n key: \"defaultValue\",\n get: function get() {\n var defaultValue = _get(_getPrototypeOf(AddressComponent.prototype), \"defaultValue\", this);\n if (this.isMultiple) {\n defaultValue = _lodash[\"default\"].isArray(defaultValue) ? defaultValue : [defaultValue];\n }\n return defaultValue;\n }\n }, {\n key: \"defaultSchema\",\n get: function get() {\n return AddressComponent.schema();\n }\n }, {\n key: \"isValueInLegacyFormat\",\n value: function isValueInLegacyFormat(value) {\n return value && !value.mode;\n }\n }, {\n key: \"normalizeValue\",\n value: function normalizeValue(value) {\n return this.manualModeEnabled && this.isValueInLegacyFormat(value) ? {\n mode: AddressComponentMode.Autocomplete,\n address: value\n } : value;\n }\n }, {\n key: \"setValue\",\n value: function setValue(value) {\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var changed = _Field[\"default\"].prototype.setValue.call(this, value, flags);\n if (this.manualMode) {\n this.restoreComponentsContext();\n }\n if (changed || !_lodash[\"default\"].isEmpty(value) && flags.fromSubmission) {\n this.redraw();\n }\n return changed;\n }\n }, {\n key: \"modeSwitcher\",\n get: function get() {\n return this.refs ? this.refs[AddressComponent.modeSwitcherRef] || null : null;\n }\n }, {\n key: \"removeValueIcon\",\n get: function get() {\n return this.refs ? this.refs[AddressComponent.removeValueIconRef] || null : null;\n }\n }, {\n key: \"searchInput\",\n get: function get() {\n return this.refs ? this.refs[AddressComponent.searchInputRef] || null : null;\n }\n }, {\n key: \"addRowButton\",\n get: function get() {\n return this.refs ? this.refs[AddressComponent.addRowButtonRef] || null : null;\n }\n }, {\n key: \"removeRowButton\",\n get: function get() {\n return this.refs ? this.refs[AddressComponent.removeRowButtonRef] || null : null;\n }\n }, {\n key: \"searchInputAttributes\",\n get: function get() {\n var attr = {\n name: this.options.name,\n type: 'text',\n \"class\": 'form-control',\n lang: this.options.language,\n tabindex: this.component.tabindex || 0\n };\n if (this.component.placeholder) {\n attr.placeholder = this.t(this.component.placeholder), {\n _userInput: true\n };\n }\n if (this.disabled) {\n attr.disabled = 'disabled';\n }\n _lodash[\"default\"].defaults(attr, this.component.attributes);\n return attr;\n }\n }, {\n key: \"templateName\",\n get: function get() {\n return 'address';\n }\n }, {\n key: \"gridTemplateName\",\n get: function get() {\n return 'multiValueTable';\n }\n }, {\n key: \"rowTemplateName\",\n get: function get() {\n return 'multiValueRow';\n }\n }, {\n key: \"hasChildren\",\n get: function get() {\n return !this.isMultiple && (this.builderMode || this.manualModeEnabled);\n }\n }, {\n key: \"addAnother\",\n get: function get() {\n return this.t(this.component.addAnother || 'Add Another');\n }\n }, {\n key: \"renderElement\",\n value: function renderElement(value) {\n return this.renderTemplate(this.templateName, {\n children: this.hasChildren ? this.renderComponents() : '',\n nestedKey: this.nestedKey,\n inputAttributes: this.searchInputAttributes,\n ref: {\n modeSwitcher: AddressComponent.modeSwitcherRef,\n removeValueIcon: AddressComponent.removeValueIconRef,\n searchInput: AddressComponent.searchInputRef\n },\n displayValue: this.getDisplayValue(value),\n mode: {\n autocomplete: this.autocompleteMode,\n manual: this.manualMode\n }\n });\n }\n }, {\n key: \"renderRow\",\n value: function renderRow(value, index) {\n return this.renderTemplate(this.rowTemplateName, {\n index: index,\n disabled: this.disabled,\n element: \"\".concat(this.renderElement(value, index))\n });\n }\n }, {\n key: \"renderGrid\",\n value: function renderGrid() {\n return this.renderTemplate(this.gridTemplateName, {\n rows: this.address.map(this.renderRow.bind(this)).join(''),\n disabled: this.disabled,\n addAnother: this.addAnother\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n if (this.isMultiple) {\n return _get(_getPrototypeOf(AddressComponent.prototype), \"render\", this).call(this, this.renderGrid());\n }\n return _get(_getPrototypeOf(AddressComponent.prototype), \"render\", this).call(this, this.renderElement());\n }\n }, {\n key: \"onSelectAddress\",\n value: function onSelectAddress(address, element, index) {\n if (this.isMultiple) {\n this.address[index] = address;\n this.address = _toConsumableArray(this.address);\n } else {\n this.address = address;\n }\n this.triggerChange({\n modified: true\n });\n if (element) {\n element.value = this.getDisplayValue(this.isMultiple ? this.address[index] : this.address);\n }\n this.updateRemoveIcon(index);\n }\n }, {\n key: \"addRow\",\n value: function addRow() {\n this.address = this.address.concat(this.emptyValue);\n _get(_getPrototypeOf(AddressComponent.prototype), \"redraw\", this).call(this);\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n var _this$loadRefs,\n _this2 = this;\n var result = (this.builderMode || this.manualMode ? _get(_getPrototypeOf(AddressComponent.prototype), \"attach\", this) : _Field[\"default\"].prototype.attach).call(this, element);\n if (!this.builderMode) {\n if (!this.provider && this.component.provider) {\n var _this$component3 = this.component,\n provider = _this$component3.provider,\n providerOptions = _this$component3.providerOptions;\n this.provider = this.initializeProvider(provider, providerOptions);\n }\n }\n this.loadRefs(element, (_this$loadRefs = {}, _defineProperty(_this$loadRefs, AddressComponent.addRowButtonRef, 'single'), _defineProperty(_this$loadRefs, AddressComponent.modeSwitcherRef, 'single'), _defineProperty(_this$loadRefs, AddressComponent.removeRowButtonRef, 'multiple'), _defineProperty(_this$loadRefs, AddressComponent.removeValueIconRef, 'multiple'), _defineProperty(_this$loadRefs, AddressComponent.searchInputRef, 'multiple'), _this$loadRefs));\n this.searchInput.forEach(function (element, index) {\n if (!_this2.builderMode && element && _this2.provider) {\n if (_this2.component.provider === 'google') {\n _this2.provider.attachAutocomplete(element, index, _this2.onSelectAddress.bind(_this2));\n } else {\n (0, _autocompleter[\"default\"])({\n input: element,\n debounceWaitMs: 300,\n fetch: function fetch(text, update) {\n var query = text;\n _this2.provider.search(query).then(update);\n },\n render: function render(address) {\n var div = _this2.ce('div');\n div.textContent = _this2.getDisplayValue(address);\n return div;\n },\n onSelect: function onSelect(address) {\n _this2.onSelectAddress(address, element, index);\n }\n });\n }\n _this2.addEventListener(element, 'blur', function () {\n if (!element) {\n return;\n }\n if (element.value) {\n element.value = _this2.getDisplayValue(_this2.isMultiple ? _this2.address[index] : _this2.address);\n }\n });\n _this2.addEventListener(element, 'keyup', function () {\n if (!element) {\n return;\n }\n if (!element.value) {\n _this2.clearAddress(element, index);\n }\n });\n }\n });\n if (this.addRowButton) {\n this.addEventListener(this.addRowButton, 'click', function (event) {\n event.preventDefault();\n _this2.addRow();\n });\n }\n this.removeRowButton.forEach(function (removeRowButton, index) {\n _this2.addEventListener(removeRowButton, 'click', function (event) {\n event.preventDefault();\n _this2.removeValue(index);\n });\n });\n if (this.modeSwitcher) {\n this.addEventListener(this.modeSwitcher, 'change', function () {\n if (!_this2.modeSwitcher) {\n return;\n }\n _this2.dataValue = _this2.emptyValue;\n _this2.mode = _this2.modeSwitcher.checked ? AddressComponentMode.Manual : AddressComponentMode.Autocomplete;\n if (!_this2.builderMode) {\n if (_this2.manualMode) {\n _this2.restoreComponentsContext();\n }\n _this2.triggerChange({\n modified: true\n });\n }\n _this2.redraw();\n });\n }\n if (!this.builderMode) {\n this.removeValueIcon.forEach(function (removeValueIcon, index) {\n _this2.updateRemoveIcon(index);\n var removeValueHandler = function removeValueHandler() {\n var _this2$searchInput;\n var searchInput = (_this2$searchInput = _this2.searchInput) === null || _this2$searchInput === void 0 ? void 0 : _this2$searchInput[index];\n _this2.clearAddress(searchInput, index);\n if (searchInput) {\n searchInput.focus();\n }\n };\n _this2.addEventListener(removeValueIcon, 'click', removeValueHandler);\n _this2.addEventListener(removeValueIcon, 'keydown', function (_ref) {\n var key = _ref.key;\n if (key === 'Enter') {\n removeValueHandler();\n }\n });\n });\n _lodash[\"default\"].each(this.refs.searchInput || [], function (el) {\n return _this2.addFocusBlurEvents(el);\n });\n }\n return result;\n }\n }, {\n key: \"addChildComponent\",\n value: function addChildComponent(component) {\n component.customConditional = ChildConditional;\n }\n }, {\n key: \"redraw\",\n value: function redraw() {\n var _this3 = this;\n var modeSwitcherInFocus = this.modeSwitcher && document.activeElement === this.modeSwitcher;\n return _get(_getPrototypeOf(AddressComponent.prototype), \"redraw\", this).call(this).then(function (result) {\n if (modeSwitcherInFocus && _this3.modeSwitcher) {\n _this3.modeSwitcher.focus();\n }\n return result;\n });\n }\n }, {\n key: \"clearAddress\",\n value: function clearAddress(element, index) {\n var _this$address;\n if (!this.isEmpty()) {\n this.triggerChange();\n }\n if ((_this$address = this.address) !== null && _this$address !== void 0 && _this$address[index]) {\n this.address[index] = this.emptyValue;\n } else {\n this.address = this.emptyValue;\n }\n if (element) {\n element.value = '';\n }\n this.updateRemoveIcon(index);\n }\n }, {\n key: \"getDisplayValue\",\n value: function getDisplayValue() {\n var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.address;\n return this.provider && !this.manualMode ? this.provider.getDisplayValue(value) : '';\n }\n }, {\n key: \"validateMultiple\",\n value: function validateMultiple() {\n return this.isMultiple;\n }\n }, {\n key: \"updateRemoveIcon\",\n value: function updateRemoveIcon(index) {\n var _this$removeValueIcon;\n var removeValueIcon = (_this$removeValueIcon = this.removeValueIcon) === null || _this$removeValueIcon === void 0 ? void 0 : _this$removeValueIcon[index];\n if (removeValueIcon) {\n var value = this.isMultiple ? this.address[index] : this.address;\n if (this.isEmpty(value) || this.disabled) {\n this.addClass(removeValueIcon, RemoveValueIconHiddenClass);\n } else {\n this.removeClass(removeValueIcon, RemoveValueIconHiddenClass);\n }\n }\n }\n }, {\n key: \"getValueAsString\",\n value: function getValueAsString(value, options) {\n if (!value) {\n return '';\n }\n var normalizedValue = this.normalizeValue(value);\n var _ref2 = this.manualModeEnabled ? normalizedValue : {\n address: normalizedValue,\n mode: AddressComponentMode.Autocomplete\n },\n address = _ref2.address,\n mode = _ref2.mode;\n var valueInManualMode = mode === AddressComponentMode.Manual;\n if (this.provider && !valueInManualMode) {\n return this.getDisplayValue(address);\n }\n if (valueInManualMode) {\n if (this.component.manualModeViewString) {\n return this.interpolate(this.component.manualModeViewString, {\n address: address,\n data: this.data,\n component: this.component\n });\n }\n return this.getComponents().filter(function (component) {\n return component.hasValue(address);\n }).map(function (component) {\n return [component, _lodash[\"default\"].get(address, component.key)];\n }).filter(function (_ref3) {\n var _ref4 = _slicedToArray(_ref3, 2),\n component = _ref4[0],\n componentValue = _ref4[1];\n return !component.isEmpty(componentValue);\n }).map(function (_ref5) {\n var _ref6 = _slicedToArray(_ref5, 2),\n component = _ref6[0],\n componentValue = _ref6[1];\n return component.getValueAsString(componentValue, options);\n }).join(', ');\n }\n return _get(_getPrototypeOf(AddressComponent.prototype), \"getValueAsString\", this).call(this, address, options);\n }\n }, {\n key: \"focus\",\n value: function focus() {\n if (this.searchInput && this.searchInput[0]) {\n this.searchInput[0].focus();\n }\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _Container[\"default\"].schema.apply(_Container[\"default\"], [{\n type: 'address',\n label: 'Address',\n key: 'address',\n switchToManualModeLabel: 'Can\\'t find address? Switch to manual mode.',\n provider: '',\n providerOptions: {},\n manualModeViewString: '',\n hideLabel: false,\n disableClearIcon: false,\n enableManualMode: false,\n components: [{\n label: 'Address 1',\n tableView: false,\n key: 'address1',\n type: 'textfield',\n input: true,\n customConditional: ChildConditional\n }, {\n label: 'Address 2',\n tableView: false,\n key: 'address2',\n type: 'textfield',\n input: true,\n customConditional: ChildConditional\n }, {\n label: 'City',\n tableView: false,\n key: 'city',\n type: 'textfield',\n input: true,\n customConditional: ChildConditional\n }, {\n label: 'State',\n tableView: false,\n key: 'state',\n type: 'textfield',\n input: true,\n customConditional: ChildConditional\n }, {\n label: 'Country',\n tableView: false,\n key: 'country',\n type: 'textfield',\n input: true,\n customConditional: ChildConditional\n }, {\n label: 'Zip Code',\n tableView: false,\n key: 'zip',\n type: 'textfield',\n input: true,\n customConditional: ChildConditional\n }]\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Address',\n group: 'advanced',\n icon: 'home',\n documentation: '/userguide/form-building/advanced-components#address',\n weight: 35,\n schema: AddressComponent.schema()\n };\n }\n }, {\n key: \"modeSwitcherRef\",\n get: function get() {\n return 'modeSwitcher';\n }\n }, {\n key: \"removeValueIconRef\",\n get: function get() {\n return 'removeValueIcon';\n }\n }, {\n key: \"searchInputRef\",\n get: function get() {\n return 'searchInput';\n }\n }, {\n key: \"addRowButtonRef\",\n get: function get() {\n return 'addButton';\n }\n }, {\n key: \"removeRowButtonRef\",\n get: function get() {\n return 'removeRow';\n }\n }]);\n return AddressComponent;\n}(_Container[\"default\"]);\nexports[\"default\"] = AddressComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/address/Address.js?"); /***/ }), @@ -452,10 +485,10 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /*!**************************************************************!*\ !*** ./lib/components/address/editForm/Address.edit.data.js ***! \**************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'multiple',\n customConditional: function customConditional(_ref) {\n var data = _ref.data;\n return !data.enableManualMode;\n }\n}, {\n type: 'address',\n label: 'Default Value',\n key: 'defaultValue',\n weight: 5,\n placeholder: 'Default Value',\n tooltip: 'The Default Value will be the value for this field, before user interaction. Having a default value will override the placeholder text.',\n input: true,\n customDefaultValue: function customDefaultValue(_ref2) {\n var instance = _ref2.instance;\n return instance.manualModeEnabled ? {\n mode: 'autocomplete',\n address: {}\n } : {};\n }\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/address/editForm/Address.edit.data.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'multiple',\n customConditional: function customConditional(_ref) {\n var data = _ref.data;\n return !data.enableManualMode;\n }\n}, {\n type: 'address',\n label: 'Default Value',\n key: 'defaultValue',\n weight: 5,\n placeholder: 'Default Value',\n tooltip: 'The Default Value will be the value for this field, before user interaction. Having a default value will override the placeholder text.',\n input: true,\n customDefaultValue: function customDefaultValue(_ref2) {\n var instance = _ref2.instance;\n return instance.manualModeEnabled ? {\n mode: 'autocomplete',\n address: {}\n } : {};\n }\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/address/editForm/Address.edit.data.js?"); /***/ }), @@ -463,10 +496,10 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /*!*****************************************************************!*\ !*** ./lib/components/address/editForm/Address.edit.display.js ***! \*****************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n weight: 20,\n type: 'checkbox',\n input: true,\n key: 'enableManualMode',\n label: 'Enable Manual Mode',\n tooltip: 'Should Manual Mode be enabled for that component or not.',\n customConditional: function customConditional(_ref) {\n var data = _ref.data;\n return !data.multiple;\n }\n}, {\n weight: 30,\n type: 'textfield',\n input: true,\n key: 'switchToManualModeLabel',\n label: 'Switch To Manual Mode Label',\n placeholder: 'Switch To Manual Mode Label',\n tooltip: 'The label for the checkbox used to switch to manual mode.',\n validate: {\n required: true\n },\n customConditional: function customConditional(_ref2) {\n var data = _ref2.data;\n return Boolean(data.enableManualMode);\n }\n}, {\n weight: 40,\n type: 'checkbox',\n input: true,\n key: 'disableClearIcon',\n label: 'Disable Clear Icon',\n tooltip: 'Clear Icon allows easily clear component\\'s value.'\n}, {\n type: 'textfield',\n label: 'Add Another Text',\n key: 'addAnother',\n tooltip: 'Set the text of the Add Another button.',\n placeholder: 'Add Another',\n weight: 410,\n input: true,\n customConditional: function customConditional(_ref3) {\n var data = _ref3.data;\n return data.multiple;\n }\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/address/editForm/Address.edit.display.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n weight: 20,\n type: 'checkbox',\n input: true,\n key: 'enableManualMode',\n label: 'Enable Manual Mode',\n tooltip: 'Should Manual Mode be enabled for that component or not.',\n customConditional: function customConditional(_ref) {\n var data = _ref.data;\n return !data.multiple;\n }\n}, {\n weight: 30,\n type: 'textfield',\n input: true,\n key: 'switchToManualModeLabel',\n label: 'Switch To Manual Mode Label',\n placeholder: 'Switch To Manual Mode Label',\n tooltip: 'The label for the checkbox used to switch to manual mode.',\n validate: {\n required: true\n },\n customConditional: function customConditional(_ref2) {\n var data = _ref2.data;\n return Boolean(data.enableManualMode);\n }\n}, {\n weight: 40,\n type: 'checkbox',\n input: true,\n key: 'disableClearIcon',\n label: 'Disable Clear Icon',\n tooltip: 'Clear Icon allows easily clear component\\'s value.'\n}, {\n type: 'textfield',\n label: 'Add Another Text',\n key: 'addAnother',\n tooltip: 'Set the text of the Add Another button.',\n placeholder: 'Add Another',\n weight: 410,\n input: true,\n customConditional: function customConditional(_ref3) {\n var data = _ref3.data;\n return data.multiple;\n }\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/address/editForm/Address.edit.display.js?"); /***/ }), @@ -477,7 +510,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.sort.js */ \"./node_modules/core-js/modules/es.array.sort.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nvar _Formio = __webpack_require__(/*! ../../../Formio */ \"./lib/Formio.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = [{\n type: 'select',\n input: true,\n key: 'provider',\n label: 'Provider',\n placeholder: 'Select your address search provider',\n weight: 0,\n tooltip: 'Which address search service should be used.',\n valueProperty: 'value',\n dataSrc: 'custom',\n data: {\n custom: function custom() {\n return _lodash.default.values(_Formio.GlobalFormio.Providers.getProviders('address')).sort().map(function (provider) {\n return {\n label: provider.displayName,\n value: provider.name\n };\n });\n }\n },\n validate: {\n required: true\n }\n}, {\n type: 'textfield',\n input: true,\n key: \"providerOptions.params['subscription-key']\",\n label: 'Subscription Key',\n placeholder: 'Enter Subscription Key',\n weight: 10,\n tooltip: 'Use your Azure Maps subscription key here.',\n validate: {\n required: true\n },\n conditional: {\n json: {\n '===': [{\n var: 'data.provider'\n }, 'azure']\n }\n }\n}, {\n type: 'textfield',\n input: true,\n key: 'providerOptions.url',\n label: 'Url',\n placeholder: 'Enter Url',\n weight: 10,\n tooltip: 'Url to the service which should be used to search addresses for autocomplete.',\n validate: {\n required: true\n },\n conditional: {\n json: {\n '===': [{\n var: 'data.provider'\n }, 'custom']\n }\n }\n}, {\n type: 'textfield',\n input: true,\n key: 'providerOptions.queryProperty',\n label: 'Query Property',\n defaultValue: 'query',\n placeholder: 'Enter Query Property',\n weight: 20,\n tooltip: 'Which query param should be used to pass as a search string. Default is `query`.',\n conditional: {\n json: {\n '===': [{\n var: 'data.provider'\n }, 'custom']\n }\n }\n}, {\n type: 'textfield',\n input: true,\n key: 'providerOptions.responseProperty',\n label: 'Response Property',\n placeholder: 'Enter Response Property',\n weight: 30,\n tooltip: 'The property within the response data, where iterable addresses reside. For example: results.',\n conditional: {\n json: {\n '===': [{\n var: 'data.provider'\n }, 'custom']\n }\n }\n}, {\n type: 'textfield',\n input: true,\n key: 'providerOptions.displayValueProperty',\n label: 'Display Value Property',\n placeholder: 'Display Value Property',\n weight: 40,\n tooltip: 'The property of each address in the response to use as the display value.',\n conditional: {\n json: {\n '===': [{\n var: 'data.provider'\n }, 'custom']\n }\n }\n}, {\n type: 'textarea',\n input: true,\n key: 'providerOptions.params',\n label: 'Params',\n placeholder: '{ ... }',\n weight: 50,\n rows: 5,\n editor: 'ace',\n as: 'json',\n tooltip: 'Additional query params can be specified here in a way of JSON object.',\n conditional: {\n json: {\n '===': [{\n var: 'data.provider'\n }, 'custom']\n }\n }\n}, {\n type: 'textfield',\n input: true,\n key: 'providerOptions.params.key',\n label: 'API Key',\n placeholder: 'Enter API Key',\n weight: 10,\n tooltip: 'Use your Google API key here.',\n validate: {\n required: true\n },\n conditional: {\n json: {\n '===': [{\n var: 'data.provider'\n }, 'google']\n }\n }\n}, {\n type: 'textarea',\n input: true,\n key: 'providerOptions.params.autocompleteOptions',\n label: 'Provider options',\n placeholder: 'Enter provider options as JSON object',\n defaultValue: {},\n weight: 60,\n rows: 5,\n as: 'json',\n editor: 'ace',\n tooltip: 'Specify Google Maps Autocomplete options used for address searching as JSON object. Follow the link for available options',\n conditional: {\n json: {\n '===': [{\n var: 'data.provider'\n }, 'google']\n }\n }\n}, {\n type: 'textarea',\n input: true,\n key: 'manualModeViewString',\n label: 'Manual Mode View String',\n placeholder: 'Enter Manual Mode View String',\n description: '\"address\" variable references component value, \"data\" - submission data and \"component\" - address component schema.',\n weight: 60,\n rows: 5,\n editor: 'ace',\n tooltip: 'Specify template which should be when quering view string for the component value entered in manual mode. This string is used in table view, CSV export and email rendering. When left blank combined value of all components joined with comma will be used.'\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/address/editForm/Address.edit.provider.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n__webpack_require__(/*! core-js/modules/es.array.sort.js */ \"./node_modules/core-js/modules/es.array.sort.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nvar _Formio = __webpack_require__(/*! ../../../Formio */ \"./lib/Formio.js\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = [{\n type: 'select',\n input: true,\n key: 'provider',\n label: 'Provider',\n placeholder: 'Select your address search provider',\n weight: 0,\n tooltip: 'Which address search service should be used.',\n valueProperty: 'value',\n dataSrc: 'custom',\n data: {\n custom: function custom() {\n return _lodash[\"default\"].values(_Formio.GlobalFormio.Providers.getProviders('address')).sort().map(function (provider) {\n return {\n label: provider.displayName,\n value: provider.name\n };\n });\n }\n },\n validate: {\n required: true\n }\n}, {\n type: 'textfield',\n input: true,\n key: \"providerOptions.params['subscription-key']\",\n label: 'Subscription Key',\n placeholder: 'Enter Subscription Key',\n weight: 10,\n tooltip: 'Use your Azure Maps subscription key here.',\n validate: {\n required: true\n },\n conditional: {\n json: {\n '===': [{\n \"var\": 'data.provider'\n }, 'azure']\n }\n }\n}, {\n type: 'textfield',\n input: true,\n key: 'providerOptions.url',\n label: 'Url',\n placeholder: 'Enter Url',\n weight: 10,\n tooltip: 'Url to the service which should be used to search addresses for autocomplete.',\n validate: {\n required: true\n },\n conditional: {\n json: {\n '===': [{\n \"var\": 'data.provider'\n }, 'custom']\n }\n }\n}, {\n type: 'textfield',\n input: true,\n key: 'providerOptions.queryProperty',\n label: 'Query Property',\n defaultValue: 'query',\n placeholder: 'Enter Query Property',\n weight: 20,\n tooltip: 'Which query param should be used to pass as a search string. Default is `query`.',\n conditional: {\n json: {\n '===': [{\n \"var\": 'data.provider'\n }, 'custom']\n }\n }\n}, {\n type: 'textfield',\n input: true,\n key: 'providerOptions.responseProperty',\n label: 'Response Property',\n placeholder: 'Enter Response Property',\n weight: 30,\n tooltip: 'The property within the response data, where iterable addresses reside. For example: results.',\n conditional: {\n json: {\n '===': [{\n \"var\": 'data.provider'\n }, 'custom']\n }\n }\n}, {\n type: 'textfield',\n input: true,\n key: 'providerOptions.displayValueProperty',\n label: 'Display Value Property',\n placeholder: 'Display Value Property',\n weight: 40,\n tooltip: 'The property of each address in the response to use as the display value.',\n conditional: {\n json: {\n '===': [{\n \"var\": 'data.provider'\n }, 'custom']\n }\n }\n}, {\n type: 'textarea',\n input: true,\n key: 'providerOptions.params',\n label: 'Params',\n placeholder: '{ ... }',\n weight: 50,\n rows: 5,\n editor: 'ace',\n as: 'json',\n tooltip: 'Additional query params can be specified here in a way of JSON object.',\n conditional: {\n json: {\n '===': [{\n \"var\": 'data.provider'\n }, 'custom']\n }\n }\n}, {\n type: 'textfield',\n input: true,\n key: 'providerOptions.params.key',\n label: 'API Key',\n placeholder: 'Enter API Key',\n weight: 10,\n tooltip: 'Use your Google API key here.',\n validate: {\n required: true\n },\n conditional: {\n json: {\n '===': [{\n \"var\": 'data.provider'\n }, 'google']\n }\n }\n}, {\n type: 'textarea',\n input: true,\n key: 'providerOptions.params.autocompleteOptions',\n label: 'Provider options',\n placeholder: 'Enter provider options as JSON object',\n defaultValue: {},\n weight: 60,\n rows: 5,\n as: 'json',\n editor: 'ace',\n tooltip: 'Specify Google Maps Autocomplete options used for address searching as JSON object. Follow the link for available options',\n conditional: {\n json: {\n '===': [{\n \"var\": 'data.provider'\n }, 'google']\n }\n }\n}, {\n type: 'textarea',\n input: true,\n key: 'manualModeViewString',\n label: 'Manual Mode View String',\n placeholder: 'Enter Manual Mode View String',\n description: '\"address\" variable references component value, \"data\" - submission data and \"component\" - address component schema.',\n weight: 60,\n rows: 5,\n editor: 'ace',\n tooltip: 'Specify template which should be when quering view string for the component value entered in manual mode. This string is used in table view, CSV export and email rendering. When left blank combined value of all components joined with comma will be used.'\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/address/editForm/Address.edit.provider.js?"); /***/ }), @@ -488,7 +521,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptors.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.from.js */ \"./node_modules/core-js/modules/es.array.from.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.slice.js */ \"./node_modules/core-js/modules/es.array.slice.js\");\n\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.entries.js */ \"./node_modules/core-js/modules/es.object.entries.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nvar _utils = __webpack_require__(/*! ../../utils/utils */ \"./lib/utils/utils.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { 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\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nvar Alert = /*#__PURE__*/function () {\n function Alert(container, component) {\n _classCallCheck(this, Alert);\n\n this.container = container;\n this.alert = null;\n this.parentComponent = component;\n this.refs = {};\n this.loadRefs = this.parentComponent.loadRefs.bind(this);\n }\n\n _createClass(Alert, [{\n key: \"refsNames\",\n get: function get() {\n return {\n messageRef: 'multiple'\n };\n }\n }, {\n key: \"alertTypes\",\n get: function get() {\n return {\n error: 'danger',\n success: 'success',\n info: 'info',\n warning: 'warning'\n };\n }\n }, {\n key: \"showErrors\",\n value: function showErrors() {\n var errors = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n var triggerEvent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n errors = _lodash.default.isArray(errors) ? errors : [errors];\n var messagesList = this.createMessagesList('error', errors);\n this.showAlert('error', messagesList, options);\n\n if (triggerEvent) {\n this.parentComponent.emit('error', errors);\n }\n\n return errors;\n }\n }, {\n key: \"showMessage\",\n value: function showMessage(message, type) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var messageElement = message;\n\n if (messageElement instanceof HTMLElement) {\n messageElement.setAttribute('ref', 'messageRef');\n } else {\n messageElement = this.parentComponent.ce('p', {\n ref: 'messageRef'\n });\n }\n\n this.showAlert(type, messageElement, options);\n }\n }, {\n key: \"createMessagesList\",\n value: function createMessagesList(type) {\n switch (type) {\n case 'error':\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\n return this.createErrorList.apply(this, args);\n }\n }\n }, {\n key: \"createErrorList\",\n value: function createErrorList(errors) {\n var _this = this;\n\n var p = this.parentComponent.ce('p');\n this.parentComponent.setContent(p, this.parentComponent.t('error'));\n var ul = this.parentComponent.ce('ul');\n var messagesList = document.createDocumentFragment();\n errors.forEach(function (err) {\n return _this.appendErrorToList(err, ul);\n });\n p.appendChild(ul);\n messagesList.appendChild(p);\n return messagesList;\n }\n }, {\n key: \"showAlert\",\n value: function showAlert(type, messagesList) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var customClasses = options.customClasses,\n customEvents = options.customEvents;\n this.setAlert(type, messagesList, {\n customClasses: customClasses\n });\n\n if (!this.alert) {\n return;\n }\n\n this.attach({\n customEvents: customEvents\n });\n this.parentComponent.prependTo(this.alert, this.container);\n }\n }, {\n key: \"setAlert\",\n value: function setAlert(type, messagesList) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var alertType = this.alertTypes[type];\n\n if (this.alert) {\n this.clear();\n }\n\n if (messagesList) {\n var _options$id = options.id,\n id = _options$id === void 0 ? \"\".concat(type, \"-list-\").concat(this.parentComponent.id) : _options$id,\n _options$customClasse = options.customClasses,\n customClasses = _options$customClasse === void 0 ? \"alert alert-\".concat(alertType) : _options$customClasse;\n this.alert = this.parentComponent.ce('div', {\n id: id,\n class: customClasses\n });\n\n if (messagesList instanceof HTMLElement) {\n this.parentComponent.appendTo(messagesList, this.alert);\n } else {\n this.parentComponent.setContent(this.alert, messagesList);\n }\n }\n }\n }, {\n key: \"attach\",\n value: function attach(options) {\n var _customEvents$click,\n _customEvents$keypres,\n _this2 = this,\n _this$refs$messageRef;\n\n var _options$customEvents = options.customEvents,\n customEvents = _options$customEvents === void 0 ? {} : _options$customEvents;\n this.eventListenersKeys = [];\n this.loadRefs(this.alert, this.refsNames);\n var clickListeners = ((_customEvents$click = customEvents.click) === null || _customEvents$click === void 0 ? void 0 : _customEvents$click.listeners) || [];\n var keyPressListeners = ((_customEvents$keypres = customEvents.keypress) === null || _customEvents$keypres === void 0 ? void 0 : _customEvents$keypres.listeners) || [];\n customEvents = _objectSpread(_objectSpread({}, customEvents), {}, {\n click: [].concat(_toConsumableArray(clickListeners), [function (e) {\n var key = e.currentTarget.dataset.componentKey;\n\n _this2.focusOnComponent(key);\n }]),\n keypress: [].concat(_toConsumableArray(keyPressListeners), [function (e) {\n var key = e.currentTarget.dataset.componentKey;\n\n _this2.focusOnComponent(key);\n }])\n });\n\n if ((_this$refs$messageRef = this.refs.messageRef) !== null && _this$refs$messageRef !== void 0 && _this$refs$messageRef.length) {\n this.refs.messageRef.forEach(function (el) {\n Object.entries(customEvents).forEach(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n event = _ref2[0],\n listeners = _ref2[1];\n\n listeners.forEach(function (listener) {\n return _this2.parentComponent.addEventListener(el, event, listener);\n });\n\n _this2.eventListenersKeys.push(event);\n });\n });\n }\n }\n }, {\n key: \"clear\",\n value: function clear() {\n var _this3 = this;\n\n try {\n var _this$refs$messageRef2;\n\n if ((_this$refs$messageRef2 = this.refs.messageRef) !== null && _this$refs$messageRef2 !== void 0 && _this$refs$messageRef2.length) {\n this.refs.messageRef.forEach(function (el) {\n _this3.eventListenersKeys.forEach(function (event) {\n return _this3.parentComponent.removeEventListener(el, event);\n });\n });\n }\n\n this.refs = {};\n this.parentComponent.removeChildFrom(this.alert, this.container);\n this.alert = null;\n } catch (err) {// ignore\n }\n }\n }, {\n key: \"focusOnComponent\",\n value: function focusOnComponent(keyOrPath) {\n if (keyOrPath) {\n var _this$parentComponent;\n\n var path = this.parentComponent._parentPath ? keyOrPath.replace(this.parentComponent._parentPath, '') : keyOrPath;\n var component = (_this$parentComponent = this.parentComponent.root) === null || _this$parentComponent === void 0 ? void 0 : _this$parentComponent.getComponent(path, null, keyOrPath);\n\n if (component && _lodash.default.isFunction(component.focus)) {\n component.focus();\n }\n }\n }\n }, {\n key: \"createMessage\",\n value: function createMessage(type, element, message, index, err) {\n switch (type) {\n case 'error':\n return this.createErrorMessage(element, message, index, err);\n }\n }\n }, {\n key: \"createErrorMessage\",\n value: function createErrorMessage(element, message, index, err) {\n var _err$messages, _err$component;\n\n var params = {\n style: 'cursor: pointer',\n ref: 'messageRef',\n tabIndex: 0,\n 'aria-label': \"\".concat(message, \". Click to navigate to the field with following error.\")\n };\n var li = this.parentComponent.ce('li', params);\n this.parentComponent.setContent(li, message);\n var messageFromIndex = !_lodash.default.isUndefined(index) && (err === null || err === void 0 ? void 0 : (_err$messages = err.messages) === null || _err$messages === void 0 ? void 0 : _err$messages[index]);\n var keyOrPath = (messageFromIndex === null || messageFromIndex === void 0 ? void 0 : messageFromIndex.path) || (err === null || err === void 0 ? void 0 : (_err$component = err.component) === null || _err$component === void 0 ? void 0 : _err$component.key);\n\n if (keyOrPath) {\n var formattedKeyOrPath = (0, _utils.getStringFromComponentPath)(keyOrPath);\n li.dataset.componentKey = formattedKeyOrPath;\n }\n\n this.parentComponent.appendTo(li, element);\n }\n }, {\n key: \"appendErrorToList\",\n value: function appendErrorToList(err, ul) {\n var _err$messages2,\n _this4 = this;\n\n if (err !== null && err !== void 0 && (_err$messages2 = err.messages) !== null && _err$messages2 !== void 0 && _err$messages2.length) {\n err.messages.forEach(function (_ref3, index) {\n var message = _ref3.message;\n\n _this4.createMessage('error', ul, message, index, err);\n });\n } else if (err) {\n var message = _lodash.default.isObject(err) ? err.message || '' : err;\n this.createMessage('error', ul, message);\n }\n }\n }]);\n\n return Alert;\n}();\n\nexports[\"default\"] = Alert;\n\n//# sourceURL=webpack://Formio/./lib/components/alert/Alert.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptors.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-properties.js */ \"./node_modules/core-js/modules/es.object.define-properties.js\");\n__webpack_require__(/*! core-js/modules/es.array.is-array.js */ \"./node_modules/core-js/modules/es.array.is-array.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.from.js */ \"./node_modules/core-js/modules/es.array.from.js\");\n__webpack_require__(/*! core-js/modules/es.array.slice.js */ \"./node_modules/core-js/modules/es.array.slice.js\");\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.object.entries.js */ \"./node_modules/core-js/modules/es.object.entries.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nvar _utils = __webpack_require__(/*! ../../utils/utils */ \"./lib/utils/utils.js\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : \"undefined\" != typeof Symbol && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) { ; } } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i[\"return\"] && (_r = _i[\"return\"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar Alert = /*#__PURE__*/function () {\n function Alert(container, component) {\n _classCallCheck(this, Alert);\n this.container = container;\n this.alert = null;\n this.parentComponent = component;\n this.refs = {};\n this.loadRefs = this.parentComponent.loadRefs.bind(this);\n }\n _createClass(Alert, [{\n key: \"refsNames\",\n get: function get() {\n return {\n messageRef: 'multiple'\n };\n }\n }, {\n key: \"alertTypes\",\n get: function get() {\n return {\n error: 'danger',\n success: 'success',\n info: 'info',\n warning: 'warning'\n };\n }\n }, {\n key: \"showErrors\",\n value: function showErrors() {\n var errors = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n var triggerEvent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n errors = _lodash[\"default\"].isArray(errors) ? errors : [errors];\n var messagesList = this.createMessagesList('error', errors);\n this.showAlert('error', messagesList, options);\n if (triggerEvent) {\n this.parentComponent.emit('error', errors);\n }\n return errors;\n }\n }, {\n key: \"showMessage\",\n value: function showMessage(message, type) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var messageElement = message;\n if (messageElement instanceof HTMLElement) {\n messageElement.setAttribute('ref', 'messageRef');\n } else {\n messageElement = this.parentComponent.ce('p', {\n ref: 'messageRef'\n });\n }\n this.showAlert(type, messageElement, options);\n }\n }, {\n key: \"createMessagesList\",\n value: function createMessagesList(type) {\n switch (type) {\n case 'error':\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 this.createErrorList.apply(this, args);\n }\n }\n }, {\n key: \"createErrorList\",\n value: function createErrorList(errors) {\n var _this = this;\n var p = this.parentComponent.ce('p');\n this.parentComponent.setContent(p, this.parentComponent.t('error'));\n var ul = this.parentComponent.ce('ul');\n var messagesList = document.createDocumentFragment();\n errors.forEach(function (err) {\n return _this.appendErrorToList(err, ul);\n });\n p.appendChild(ul);\n messagesList.appendChild(p);\n return messagesList;\n }\n }, {\n key: \"showAlert\",\n value: function showAlert(type, messagesList) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var customClasses = options.customClasses,\n customEvents = options.customEvents;\n this.setAlert(type, messagesList, {\n customClasses: customClasses\n });\n if (!this.alert) {\n return;\n }\n this.attach({\n customEvents: customEvents\n });\n this.parentComponent.prependTo(this.alert, this.container);\n }\n }, {\n key: \"setAlert\",\n value: function setAlert(type, messagesList) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var alertType = this.alertTypes[type];\n if (this.alert) {\n this.clear();\n }\n if (messagesList) {\n var _options$id = options.id,\n id = _options$id === void 0 ? \"\".concat(type, \"-list-\").concat(this.parentComponent.id) : _options$id,\n _options$customClasse = options.customClasses,\n customClasses = _options$customClasse === void 0 ? \"alert alert-\".concat(alertType) : _options$customClasse;\n this.alert = this.parentComponent.ce('div', {\n id: id,\n \"class\": customClasses\n });\n if (messagesList instanceof HTMLElement) {\n this.parentComponent.appendTo(messagesList, this.alert);\n } else {\n this.parentComponent.setContent(this.alert, messagesList);\n }\n }\n }\n }, {\n key: \"attach\",\n value: function attach(options) {\n var _customEvents$click,\n _customEvents$keypres,\n _this2 = this,\n _this$refs$messageRef;\n var _options$customEvents = options.customEvents,\n customEvents = _options$customEvents === void 0 ? {} : _options$customEvents;\n this.eventListenersKeys = [];\n this.loadRefs(this.alert, this.refsNames);\n var clickListeners = ((_customEvents$click = customEvents.click) === null || _customEvents$click === void 0 ? void 0 : _customEvents$click.listeners) || [];\n var keyPressListeners = ((_customEvents$keypres = customEvents.keypress) === null || _customEvents$keypres === void 0 ? void 0 : _customEvents$keypres.listeners) || [];\n customEvents = _objectSpread(_objectSpread({}, customEvents), {}, {\n click: [].concat(_toConsumableArray(clickListeners), [function (e) {\n var key = e.currentTarget.dataset.componentKey;\n _this2.focusOnComponent(key);\n }]),\n keypress: [].concat(_toConsumableArray(keyPressListeners), [function (e) {\n var key = e.currentTarget.dataset.componentKey;\n _this2.focusOnComponent(key);\n }])\n });\n if ((_this$refs$messageRef = this.refs.messageRef) !== null && _this$refs$messageRef !== void 0 && _this$refs$messageRef.length) {\n this.refs.messageRef.forEach(function (el) {\n Object.entries(customEvents).forEach(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n event = _ref2[0],\n listeners = _ref2[1];\n listeners.forEach(function (listener) {\n return _this2.parentComponent.addEventListener(el, event, listener);\n });\n _this2.eventListenersKeys.push(event);\n });\n });\n }\n }\n }, {\n key: \"clear\",\n value: function clear() {\n var _this3 = this;\n try {\n var _this$refs$messageRef2;\n if ((_this$refs$messageRef2 = this.refs.messageRef) !== null && _this$refs$messageRef2 !== void 0 && _this$refs$messageRef2.length) {\n this.refs.messageRef.forEach(function (el) {\n _this3.eventListenersKeys.forEach(function (event) {\n return _this3.parentComponent.removeEventListener(el, event);\n });\n });\n }\n this.refs = {};\n this.parentComponent.removeChildFrom(this.alert, this.container);\n this.alert = null;\n } catch (err) {\n // ignore\n }\n }\n }, {\n key: \"focusOnComponent\",\n value: function focusOnComponent(keyOrPath) {\n if (keyOrPath) {\n var _this$parentComponent;\n var path = this.parentComponent._parentPath ? keyOrPath.replace(this.parentComponent._parentPath, '') : keyOrPath;\n var component = (_this$parentComponent = this.parentComponent.root) === null || _this$parentComponent === void 0 ? void 0 : _this$parentComponent.getComponent(path, null, keyOrPath);\n if (component && _lodash[\"default\"].isFunction(component.focus)) {\n component.focus();\n }\n }\n }\n }, {\n key: \"createMessage\",\n value: function createMessage(type, element, message, index, err) {\n switch (type) {\n case 'error':\n return this.createErrorMessage(element, message, index, err);\n }\n }\n }, {\n key: \"createErrorMessage\",\n value: function createErrorMessage(element, message, index, err) {\n var _err$messages, _err$component;\n var params = {\n style: 'cursor: pointer',\n ref: 'messageRef',\n tabIndex: 0,\n 'aria-label': \"\".concat(message, \". Click to navigate to the field with following error.\")\n };\n var li = this.parentComponent.ce('li', params);\n this.parentComponent.setContent(li, message);\n var messageFromIndex = !_lodash[\"default\"].isUndefined(index) && (err === null || err === void 0 ? void 0 : (_err$messages = err.messages) === null || _err$messages === void 0 ? void 0 : _err$messages[index]);\n var keyOrPath = (messageFromIndex === null || messageFromIndex === void 0 ? void 0 : messageFromIndex.path) || (err === null || err === void 0 ? void 0 : (_err$component = err.component) === null || _err$component === void 0 ? void 0 : _err$component.key);\n if (keyOrPath) {\n var formattedKeyOrPath = (0, _utils.getStringFromComponentPath)(keyOrPath);\n li.dataset.componentKey = formattedKeyOrPath;\n }\n this.parentComponent.appendTo(li, element);\n }\n }, {\n key: \"appendErrorToList\",\n value: function appendErrorToList(err, ul) {\n var _err$messages2,\n _this4 = this;\n if (err !== null && err !== void 0 && (_err$messages2 = err.messages) !== null && _err$messages2 !== void 0 && _err$messages2.length) {\n err.messages.forEach(function (_ref3, index) {\n var message = _ref3.message;\n _this4.createMessage('error', ul, message, index, err);\n });\n } else if (err) {\n var message = _lodash[\"default\"].isObject(err) ? err.message || '' : err;\n this.createMessage('error', ul, message);\n }\n }\n }]);\n return Alert;\n}();\nexports[\"default\"] = Alert;\n\n//# sourceURL=webpack://Formio/./lib/components/alert/Alert.js?"); /***/ }), @@ -499,7 +532,7 @@ eval("\n\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _ = _interopRequireDefault(__webpack_require__(/*! . */ \"./lib/components/index.js\"));\n\nvar _Address = _interopRequireDefault(__webpack_require__(/*! ./address/Address.form */ \"./lib/components/address/Address.form.js\"));\n\nvar _Button = _interopRequireDefault(__webpack_require__(/*! ./button/Button.form */ \"./lib/components/button/Button.form.js\"));\n\nvar _Checkbox = _interopRequireDefault(__webpack_require__(/*! ./checkbox/Checkbox.form */ \"./lib/components/checkbox/Checkbox.form.js\"));\n\nvar _Columns = _interopRequireDefault(__webpack_require__(/*! ./columns/Columns.form */ \"./lib/components/columns/Columns.form.js\"));\n\nvar _Component = _interopRequireDefault(__webpack_require__(/*! ./_classes/component/Component.form */ \"./lib/components/_classes/component/Component.form.js\"));\n\nvar _Container = _interopRequireDefault(__webpack_require__(/*! ./container/Container.form */ \"./lib/components/container/Container.form.js\"));\n\nvar _Content = _interopRequireDefault(__webpack_require__(/*! ./content/Content.form */ \"./lib/components/content/Content.form.js\"));\n\nvar _Currency = _interopRequireDefault(__webpack_require__(/*! ./currency/Currency.form */ \"./lib/components/currency/Currency.form.js\"));\n\nvar _DataGrid = _interopRequireDefault(__webpack_require__(/*! ./datagrid/DataGrid.form */ \"./lib/components/datagrid/DataGrid.form.js\"));\n\nvar _DataMap = _interopRequireDefault(__webpack_require__(/*! ./datamap/DataMap.form */ \"./lib/components/datamap/DataMap.form.js\"));\n\nvar _DateTime = _interopRequireDefault(__webpack_require__(/*! ./datetime/DateTime.form */ \"./lib/components/datetime/DateTime.form.js\"));\n\nvar _Day = _interopRequireDefault(__webpack_require__(/*! ./day/Day.form */ \"./lib/components/day/Day.form.js\"));\n\nvar _EditGrid = _interopRequireDefault(__webpack_require__(/*! ./editgrid/EditGrid.form */ \"./lib/components/editgrid/EditGrid.form.js\"));\n\nvar _Email = _interopRequireDefault(__webpack_require__(/*! ./email/Email.form */ \"./lib/components/email/Email.form.js\"));\n\nvar _Fieldset = _interopRequireDefault(__webpack_require__(/*! ./fieldset/Fieldset.form */ \"./lib/components/fieldset/Fieldset.form.js\"));\n\nvar _File = _interopRequireDefault(__webpack_require__(/*! ./file/File.form */ \"./lib/components/file/File.form.js\"));\n\nvar _Form = _interopRequireDefault(__webpack_require__(/*! ./form/Form.form */ \"./lib/components/form/Form.form.js\"));\n\nvar _Hidden = _interopRequireDefault(__webpack_require__(/*! ./hidden/Hidden.form */ \"./lib/components/hidden/Hidden.form.js\"));\n\nvar _HTML = _interopRequireDefault(__webpack_require__(/*! ./html/HTML.form */ \"./lib/components/html/HTML.form.js\"));\n\nvar _NestedComponent = _interopRequireDefault(__webpack_require__(/*! ./_classes/nested/NestedComponent.form */ \"./lib/components/_classes/nested/NestedComponent.form.js\"));\n\nvar _Number = _interopRequireDefault(__webpack_require__(/*! ./number/Number.form */ \"./lib/components/number/Number.form.js\"));\n\nvar _Panel = _interopRequireDefault(__webpack_require__(/*! ./panel/Panel.form */ \"./lib/components/panel/Panel.form.js\"));\n\nvar _Password = _interopRequireDefault(__webpack_require__(/*! ./password/Password.form */ \"./lib/components/password/Password.form.js\"));\n\nvar _PhoneNumber = _interopRequireDefault(__webpack_require__(/*! ./phonenumber/PhoneNumber.form */ \"./lib/components/phonenumber/PhoneNumber.form.js\"));\n\nvar _Radio = _interopRequireDefault(__webpack_require__(/*! ./radio/Radio.form */ \"./lib/components/radio/Radio.form.js\"));\n\nvar _ReCaptcha = _interopRequireDefault(__webpack_require__(/*! ./recaptcha/ReCaptcha.form */ \"./lib/components/recaptcha/ReCaptcha.form.js\"));\n\nvar _Resource = _interopRequireDefault(__webpack_require__(/*! ./resource/Resource.form */ \"./lib/components/resource/Resource.form.js\"));\n\nvar _SelectBoxes = _interopRequireDefault(__webpack_require__(/*! ./selectboxes/SelectBoxes.form */ \"./lib/components/selectboxes/SelectBoxes.form.js\"));\n\nvar _Select = _interopRequireDefault(__webpack_require__(/*! ./select/Select.form */ \"./lib/components/select/Select.form.js\"));\n\nvar _Signature = _interopRequireDefault(__webpack_require__(/*! ./signature/Signature.form */ \"./lib/components/signature/Signature.form.js\"));\n\nvar _Survey = _interopRequireDefault(__webpack_require__(/*! ./survey/Survey.form */ \"./lib/components/survey/Survey.form.js\"));\n\nvar _Table = _interopRequireDefault(__webpack_require__(/*! ./table/Table.form */ \"./lib/components/table/Table.form.js\"));\n\nvar _Tabs = _interopRequireDefault(__webpack_require__(/*! ./tabs/Tabs.form */ \"./lib/components/tabs/Tabs.form.js\"));\n\nvar _Tags = _interopRequireDefault(__webpack_require__(/*! ./tags/Tags.form */ \"./lib/components/tags/Tags.form.js\"));\n\nvar _TextArea = _interopRequireDefault(__webpack_require__(/*! ./textarea/TextArea.form */ \"./lib/components/textarea/TextArea.form.js\"));\n\nvar _TextField = _interopRequireDefault(__webpack_require__(/*! ./textfield/TextField.form */ \"./lib/components/textfield/TextField.form.js\"));\n\nvar _Time = _interopRequireDefault(__webpack_require__(/*! ./time/Time.form */ \"./lib/components/time/Time.form.js\"));\n\nvar _Tree = _interopRequireDefault(__webpack_require__(/*! ./tree/Tree.form */ \"./lib/components/tree/Tree.form.js\"));\n\nvar _Unknown = _interopRequireDefault(__webpack_require__(/*! ./unknown/Unknown.form */ \"./lib/components/unknown/Unknown.form.js\"));\n\nvar _Url = _interopRequireDefault(__webpack_require__(/*! ./url/Url.form */ \"./lib/components/url/Url.form.js\"));\n\nvar _Well = _interopRequireDefault(__webpack_require__(/*! ./well/Well.form */ \"./lib/components/well/Well.form.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n_.default.address.editForm = _Address.default;\n_.default.button.editForm = _Button.default;\n_.default.checkbox.editForm = _Checkbox.default;\n_.default.columns.editForm = _Columns.default;\n_.default.component.editForm = _Component.default;\n_.default.container.editForm = _Container.default;\n_.default.content.editForm = _Content.default;\n_.default.currency.editForm = _Currency.default;\n_.default.datagrid.editForm = _DataGrid.default;\n_.default.datamap.editForm = _DataMap.default;\n_.default.datetime.editForm = _DateTime.default;\n_.default.day.editForm = _Day.default;\n_.default.editgrid.editForm = _EditGrid.default;\n_.default.email.editForm = _Email.default;\n_.default.fieldset.editForm = _Fieldset.default;\n_.default.file.editForm = _File.default;\n_.default.form.editForm = _Form.default;\n_.default.hidden.editForm = _Hidden.default;\n_.default.htmlelement.editForm = _HTML.default;\n_.default.nested.editForm = _NestedComponent.default;\n_.default.number.editForm = _Number.default;\n_.default.panel.editForm = _Panel.default;\n_.default.password.editForm = _Password.default;\n_.default.phoneNumber.editForm = _PhoneNumber.default;\n_.default.radio.editForm = _Radio.default;\n_.default.recaptcha.editForm = _ReCaptcha.default;\n_.default.resource.editForm = _Resource.default;\n_.default.select.editForm = _Select.default;\n_.default.selectboxes.editForm = _SelectBoxes.default;\n_.default.signature.editForm = _Signature.default;\n_.default.survey.editForm = _Survey.default;\n_.default.table.editForm = _Table.default;\n_.default.tabs.editForm = _Tabs.default;\n_.default.tags.editForm = _Tags.default;\n_.default.textarea.editForm = _TextArea.default;\n_.default.textfield.editForm = _TextField.default;\n_.default.time.editForm = _Time.default;\n_.default.tree.editForm = _Tree.default;\n_.default.unknown.editForm = _Unknown.default;\n_.default.url.editForm = _Url.default;\n_.default.well.editForm = _Well.default;\nvar _default = _.default;\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/builder.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _ = _interopRequireDefault(__webpack_require__(/*! . */ \"./lib/components/index.js\"));\nvar _Address = _interopRequireDefault(__webpack_require__(/*! ./address/Address.form */ \"./lib/components/address/Address.form.js\"));\nvar _Button = _interopRequireDefault(__webpack_require__(/*! ./button/Button.form */ \"./lib/components/button/Button.form.js\"));\nvar _Checkbox = _interopRequireDefault(__webpack_require__(/*! ./checkbox/Checkbox.form */ \"./lib/components/checkbox/Checkbox.form.js\"));\nvar _Columns = _interopRequireDefault(__webpack_require__(/*! ./columns/Columns.form */ \"./lib/components/columns/Columns.form.js\"));\nvar _Component = _interopRequireDefault(__webpack_require__(/*! ./_classes/component/Component.form */ \"./lib/components/_classes/component/Component.form.js\"));\nvar _Container = _interopRequireDefault(__webpack_require__(/*! ./container/Container.form */ \"./lib/components/container/Container.form.js\"));\nvar _Content = _interopRequireDefault(__webpack_require__(/*! ./content/Content.form */ \"./lib/components/content/Content.form.js\"));\nvar _Currency = _interopRequireDefault(__webpack_require__(/*! ./currency/Currency.form */ \"./lib/components/currency/Currency.form.js\"));\nvar _DataGrid = _interopRequireDefault(__webpack_require__(/*! ./datagrid/DataGrid.form */ \"./lib/components/datagrid/DataGrid.form.js\"));\nvar _DataMap = _interopRequireDefault(__webpack_require__(/*! ./datamap/DataMap.form */ \"./lib/components/datamap/DataMap.form.js\"));\nvar _DateTime = _interopRequireDefault(__webpack_require__(/*! ./datetime/DateTime.form */ \"./lib/components/datetime/DateTime.form.js\"));\nvar _Day = _interopRequireDefault(__webpack_require__(/*! ./day/Day.form */ \"./lib/components/day/Day.form.js\"));\nvar _EditGrid = _interopRequireDefault(__webpack_require__(/*! ./editgrid/EditGrid.form */ \"./lib/components/editgrid/EditGrid.form.js\"));\nvar _Email = _interopRequireDefault(__webpack_require__(/*! ./email/Email.form */ \"./lib/components/email/Email.form.js\"));\nvar _Fieldset = _interopRequireDefault(__webpack_require__(/*! ./fieldset/Fieldset.form */ \"./lib/components/fieldset/Fieldset.form.js\"));\nvar _File = _interopRequireDefault(__webpack_require__(/*! ./file/File.form */ \"./lib/components/file/File.form.js\"));\nvar _Form = _interopRequireDefault(__webpack_require__(/*! ./form/Form.form */ \"./lib/components/form/Form.form.js\"));\nvar _ListComponent = _interopRequireDefault(__webpack_require__(/*! ./_classes/list/ListComponent.form */ \"./lib/components/_classes/list/ListComponent.form.js\"));\nvar _Hidden = _interopRequireDefault(__webpack_require__(/*! ./hidden/Hidden.form */ \"./lib/components/hidden/Hidden.form.js\"));\nvar _HTML = _interopRequireDefault(__webpack_require__(/*! ./html/HTML.form */ \"./lib/components/html/HTML.form.js\"));\nvar _NestedComponent = _interopRequireDefault(__webpack_require__(/*! ./_classes/nested/NestedComponent.form */ \"./lib/components/_classes/nested/NestedComponent.form.js\"));\nvar _Number = _interopRequireDefault(__webpack_require__(/*! ./number/Number.form */ \"./lib/components/number/Number.form.js\"));\nvar _Panel = _interopRequireDefault(__webpack_require__(/*! ./panel/Panel.form */ \"./lib/components/panel/Panel.form.js\"));\nvar _Password = _interopRequireDefault(__webpack_require__(/*! ./password/Password.form */ \"./lib/components/password/Password.form.js\"));\nvar _PhoneNumber = _interopRequireDefault(__webpack_require__(/*! ./phonenumber/PhoneNumber.form */ \"./lib/components/phonenumber/PhoneNumber.form.js\"));\nvar _Radio = _interopRequireDefault(__webpack_require__(/*! ./radio/Radio.form */ \"./lib/components/radio/Radio.form.js\"));\nvar _ReCaptcha = _interopRequireDefault(__webpack_require__(/*! ./recaptcha/ReCaptcha.form */ \"./lib/components/recaptcha/ReCaptcha.form.js\"));\nvar _Resource = _interopRequireDefault(__webpack_require__(/*! ./resource/Resource.form */ \"./lib/components/resource/Resource.form.js\"));\nvar _SelectBoxes = _interopRequireDefault(__webpack_require__(/*! ./selectboxes/SelectBoxes.form */ \"./lib/components/selectboxes/SelectBoxes.form.js\"));\nvar _Select = _interopRequireDefault(__webpack_require__(/*! ./select/Select.form */ \"./lib/components/select/Select.form.js\"));\nvar _Signature = _interopRequireDefault(__webpack_require__(/*! ./signature/Signature.form */ \"./lib/components/signature/Signature.form.js\"));\nvar _Survey = _interopRequireDefault(__webpack_require__(/*! ./survey/Survey.form */ \"./lib/components/survey/Survey.form.js\"));\nvar _Table = _interopRequireDefault(__webpack_require__(/*! ./table/Table.form */ \"./lib/components/table/Table.form.js\"));\nvar _Tabs = _interopRequireDefault(__webpack_require__(/*! ./tabs/Tabs.form */ \"./lib/components/tabs/Tabs.form.js\"));\nvar _Tags = _interopRequireDefault(__webpack_require__(/*! ./tags/Tags.form */ \"./lib/components/tags/Tags.form.js\"));\nvar _TextArea = _interopRequireDefault(__webpack_require__(/*! ./textarea/TextArea.form */ \"./lib/components/textarea/TextArea.form.js\"));\nvar _TextField = _interopRequireDefault(__webpack_require__(/*! ./textfield/TextField.form */ \"./lib/components/textfield/TextField.form.js\"));\nvar _Time = _interopRequireDefault(__webpack_require__(/*! ./time/Time.form */ \"./lib/components/time/Time.form.js\"));\nvar _Tree = _interopRequireDefault(__webpack_require__(/*! ./tree/Tree.form */ \"./lib/components/tree/Tree.form.js\"));\nvar _Unknown = _interopRequireDefault(__webpack_require__(/*! ./unknown/Unknown.form */ \"./lib/components/unknown/Unknown.form.js\"));\nvar _Url = _interopRequireDefault(__webpack_require__(/*! ./url/Url.form */ \"./lib/components/url/Url.form.js\"));\nvar _Well = _interopRequireDefault(__webpack_require__(/*! ./well/Well.form */ \"./lib/components/well/Well.form.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n_[\"default\"].address.editForm = _Address[\"default\"];\n_[\"default\"].button.editForm = _Button[\"default\"];\n_[\"default\"].checkbox.editForm = _Checkbox[\"default\"];\n_[\"default\"].columns.editForm = _Columns[\"default\"];\n_[\"default\"].component.editForm = _Component[\"default\"];\n_[\"default\"].container.editForm = _Container[\"default\"];\n_[\"default\"].content.editForm = _Content[\"default\"];\n_[\"default\"].currency.editForm = _Currency[\"default\"];\n_[\"default\"].datagrid.editForm = _DataGrid[\"default\"];\n_[\"default\"].datamap.editForm = _DataMap[\"default\"];\n_[\"default\"].datetime.editForm = _DateTime[\"default\"];\n_[\"default\"].day.editForm = _Day[\"default\"];\n_[\"default\"].editgrid.editForm = _EditGrid[\"default\"];\n_[\"default\"].email.editForm = _Email[\"default\"];\n_[\"default\"].fieldset.editForm = _Fieldset[\"default\"];\n_[\"default\"].file.editForm = _File[\"default\"];\n_[\"default\"].form.editForm = _Form[\"default\"];\n_[\"default\"].list.editForm = _ListComponent[\"default\"];\n_[\"default\"].hidden.editForm = _Hidden[\"default\"];\n_[\"default\"].htmlelement.editForm = _HTML[\"default\"];\n_[\"default\"].nested.editForm = _NestedComponent[\"default\"];\n_[\"default\"].number.editForm = _Number[\"default\"];\n_[\"default\"].panel.editForm = _Panel[\"default\"];\n_[\"default\"].password.editForm = _Password[\"default\"];\n_[\"default\"].phoneNumber.editForm = _PhoneNumber[\"default\"];\n_[\"default\"].radio.editForm = _Radio[\"default\"];\n_[\"default\"].recaptcha.editForm = _ReCaptcha[\"default\"];\n_[\"default\"].resource.editForm = _Resource[\"default\"];\n_[\"default\"].select.editForm = _Select[\"default\"];\n_[\"default\"].selectboxes.editForm = _SelectBoxes[\"default\"];\n_[\"default\"].signature.editForm = _Signature[\"default\"];\n_[\"default\"].survey.editForm = _Survey[\"default\"];\n_[\"default\"].table.editForm = _Table[\"default\"];\n_[\"default\"].tabs.editForm = _Tabs[\"default\"];\n_[\"default\"].tags.editForm = _Tags[\"default\"];\n_[\"default\"].textarea.editForm = _TextArea[\"default\"];\n_[\"default\"].textfield.editForm = _TextField[\"default\"];\n_[\"default\"].time.editForm = _Time[\"default\"];\n_[\"default\"].tree.editForm = _Tree[\"default\"];\n_[\"default\"].unknown.editForm = _Unknown[\"default\"];\n_[\"default\"].url.editForm = _Url[\"default\"];\n_[\"default\"].well.editForm = _Well[\"default\"];\nvar _default = _[\"default\"];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/builder.js?"); /***/ }), @@ -510,7 +543,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\nvar _Components = _interopRequireDefault(__webpack_require__(/*! ../Components */ \"./lib/components/Components.js\"));\n\nvar _ButtonEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/Button.edit.display */ \"./lib/components/button/editForm/Button.edit.display.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _Components.default.baseEditForm.apply(_Components.default, [[{\n key: 'display',\n components: _ButtonEdit.default\n }, {\n key: 'data',\n ignore: true\n }, {\n key: 'validation',\n ignore: true\n }, {\n key: 'addons',\n ignore: true\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/button/Button.form.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\nvar _Components = _interopRequireDefault(__webpack_require__(/*! ../Components */ \"./lib/components/Components.js\"));\nvar _ButtonEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/Button.edit.display */ \"./lib/components/button/editForm/Button.edit.display.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _Components[\"default\"].baseEditForm.apply(_Components[\"default\"], [[{\n key: 'display',\n components: _ButtonEdit[\"default\"]\n }, {\n key: 'data',\n ignore: true\n }, {\n key: 'validation',\n ignore: true\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/button/Button.form.js?"); /***/ }), @@ -521,7 +554,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.array.includes.js */ \"./node_modules/core-js/modules/es.array.includes.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.splice.js */ \"./node_modules/core-js/modules/es.array.splice.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.constructor.js */ \"./node_modules/core-js/modules/es.regexp.constructor.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.search.js */ \"./node_modules/core-js/modules/es.string.search.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.join.js */ \"./node_modules/core-js/modules/es.array.join.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.split.js */ \"./node_modules/core-js/modules/es.string.split.js\");\n\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\n\nvar _Field2 = _interopRequireDefault(__webpack_require__(/*! ../_classes/field/Field */ \"./lib/components/_classes/field/Field.js\"));\n\nvar _Input = _interopRequireDefault(__webpack_require__(/*! ../_classes/input/Input */ \"./lib/components/_classes/input/Input.js\"));\n\nvar _utils = __webpack_require__(/*! ../../utils/utils */ \"./lib/utils/utils.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar ButtonComponent = /*#__PURE__*/function (_Field) {\n _inherits(ButtonComponent, _Field);\n\n var _super = _createSuper(ButtonComponent);\n\n function ButtonComponent(component, options, data) {\n var _this;\n\n _classCallCheck(this, ButtonComponent);\n\n _this = _super.call(this, component, options, data);\n _this.filesUploading = [];\n return _this;\n }\n\n _createClass(ButtonComponent, [{\n key: \"defaultSchema\",\n get: function get() {\n return ButtonComponent.schema();\n }\n }, {\n key: \"inputInfo\",\n get: function get() {\n var info = _get(_getPrototypeOf(ButtonComponent.prototype), \"elementInfo\", this).call(this);\n\n info.type = 'button';\n info.attr.type = ['submit', 'saveState'].includes(this.component.action) ? 'submit' : 'button';\n this.component.theme = this.component.theme || 'default';\n info.attr.class = \"btn btn-\".concat(this.component.theme);\n\n if (this.component.size) {\n info.attr.class += \" btn-\".concat(this.component.size);\n }\n\n if (this.component.block) {\n info.attr.class += ' btn-block';\n }\n\n if (this.component.customClass) {\n info.attr.class += \" \".concat(this.component.customClass);\n }\n\n info.content = this.t(this.component.label, {\n _userInput: true\n });\n return info;\n }\n }, {\n key: \"labelInfo\",\n get: function get() {\n return {\n hidden: true\n };\n }\n }, {\n key: \"loading\",\n set: function set(loading) {\n this.setLoading(this.refs.button, loading);\n }\n }, {\n key: \"skipInEmail\",\n get: function get() {\n return true;\n } // No label needed for buttons.\n\n }, {\n key: \"createLabel\",\n value: function createLabel() {}\n }, {\n key: \"createInput\",\n value: function createInput(container) {\n this.refs.button = _get(_getPrototypeOf(ButtonComponent.prototype), \"createInput\", this).call(this, container);\n return this.refs.button;\n }\n }, {\n key: \"emptyValue\",\n get: function get() {\n return false;\n }\n }, {\n key: \"getValue\",\n value: function getValue() {\n return this.dataValue;\n }\n }, {\n key: \"clicked\",\n get: function get() {\n return this.dataValue;\n }\n }, {\n key: \"defaultValue\",\n get: function get() {\n return false;\n }\n }, {\n key: \"className\",\n get: function get() {\n var className = _get(_getPrototypeOf(ButtonComponent.prototype), \"className\", this);\n\n className += ' form-group';\n return className;\n }\n }, {\n key: \"oauthConfig\",\n get: function get() {\n if (_lodash.default.has(this, 'root.form.config.oauth') && this.component.oauthProvider) {\n return this.root.form.config.oauth[this.component.oauthProvider];\n } // Legacy oauth location.\n\n\n if (this.component.oauth) {\n return this.component.oauth;\n }\n\n return false;\n }\n }, {\n key: \"render\",\n value: function render() {\n if (this.viewOnly || this.options.hideButtons) {\n this._visible = false;\n }\n\n return _get(_getPrototypeOf(ButtonComponent.prototype), \"render\", this).call(this, this.renderTemplate('button', {\n component: this.component,\n input: this.inputInfo\n }));\n }\n }, {\n key: \"attachButton\",\n value: function attachButton() {\n var _this2 = this;\n\n this.addShortcut(this.refs.button);\n var onChange = null;\n var onError = null;\n\n if (this.component.action === 'submit') {\n this.on('submitButton', function () {\n _this2.disabled = true;\n }, true);\n this.on('cancelSubmit', function () {\n _this2.disabled = false;\n }, true);\n this.on('submitDone', function (message) {\n var resultMessage = _lodash.default.isString(message) ? message : _this2.t('complete');\n _this2.loading = false;\n _this2.disabled = false;\n\n _this2.addClass(_this2.refs.button, 'btn-success submit-success');\n\n _this2.removeClass(_this2.refs.button, 'btn-danger submit-fail');\n\n _this2.addClass(_this2.refs.buttonMessageContainer, 'has-success');\n\n _this2.removeClass(_this2.refs.buttonMessageContainer, 'has-error');\n\n _this2.setContent(_this2.refs.buttonMessage, resultMessage);\n }, true);\n this.on('submitError', function (message) {\n var resultMessage = _lodash.default.isString(message) ? _this2.t(message) : _this2.t(_this2.errorMessage('submitError'));\n _this2.loading = false;\n _this2.disabled = false;\n _this2.hasError = true;\n\n _this2.removeClass(_this2.refs.button, 'btn-success submit-success');\n\n _this2.addClass(_this2.refs.button, 'btn-danger submit-fail');\n\n _this2.removeClass(_this2.refs.buttonMessageContainer, 'has-success');\n\n _this2.addClass(_this2.refs.buttonMessageContainer, 'has-error');\n\n _this2.setContent(_this2.refs.buttonMessage, resultMessage);\n }, true);\n this.on('fileUploadingStart', function (filePromise) {\n _this2.filesUploading.push(filePromise);\n\n _this2.disabled = true;\n\n _this2.setDisabled(_this2.refs.button, _this2.disabled);\n }, true);\n this.on('fileUploadingEnd', function (filePromise) {\n var index = _this2.filesUploading.indexOf(filePromise);\n\n if (index !== -1) {\n _this2.filesUploading.splice(index, 1);\n }\n\n _this2.disabled = _this2.shouldDisabled ? true : false;\n\n _this2.setDisabled(_this2.refs.button, _this2.disabled);\n }, true);\n\n onChange = function onChange(value, isValid) {\n _this2.removeClass(_this2.refs.button, 'btn-success submit-success');\n\n if (isValid) {\n _this2.removeClass(_this2.refs.button, 'btn-danger submit-fail');\n\n if (_this2.hasError) {\n _this2.hasError = false;\n\n _this2.setContent(_this2.refs.buttonMessage, '');\n\n _this2.removeClass(_this2.refs.buttonMessageContainer, 'has-success');\n\n _this2.removeClass(_this2.refs.buttonMessageContainer, 'has-error');\n }\n }\n };\n\n onError = function onError() {\n _this2.hasError = true;\n\n _this2.removeClass(_this2.refs.button, 'btn-success submit-success');\n\n _this2.addClass(_this2.refs.button, 'btn-danger submit-fail');\n\n _this2.removeClass(_this2.refs.buttonMessageContainer, 'has-success');\n\n _this2.addClass(_this2.refs.buttonMessageContainer, 'has-error');\n\n _this2.setContent(_this2.refs.buttonMessage, _this2.t(_this2.errorMessage('submitError')));\n };\n }\n\n if (this.component.action === 'url') {\n this.on('requestButton', function () {\n _this2.disabled = true;\n }, true);\n this.on('requestDone', function () {\n _this2.loading = false;\n _this2.disabled = false;\n }, true);\n }\n\n this.on('change', function (value, flags) {\n var isValid = value.isValid;\n var isSilent = flags && flags.silent; //check root validity only if disableOnInvalid is set and when it is not possible to make submission because of validation errors\n\n if (flags && flags.noValidate && (_this2.component.disableOnInvalid || _this2.hasError)) {\n isValid = flags.rootValidity || (_this2.root ? _this2.root.checkValidity(_this2.root.data, null, null, true) : true);\n flags.rootValidity = isValid;\n }\n\n _this2.isDisabledOnInvalid = _this2.component.disableOnInvalid && (isSilent || !isValid);\n _this2.disabled = _this2.shouldDisabled;\n\n _this2.setDisabled(_this2.refs.button, _this2.disabled);\n\n if (onChange) {\n onChange(value, isValid);\n }\n }, true);\n this.on('error', function () {\n _this2.loading = false;\n _this2.disabled = false;\n\n if (onError) {\n onError();\n }\n }, true);\n\n if (this.component.saveOnEnter) {\n this.root.addEventListener(this.root.element, 'keyup', function (event) {\n if (event.keyCode === 13) {\n _this2.onClick.call(_this2, event);\n }\n });\n }\n\n this.addEventListener(this.refs.button, 'click', this.onClick.bind(this));\n this.addEventListener(this.refs.buttonMessageContainer, 'click', function () {\n if (_this2.refs.buttonMessageContainer.classList.contains('has-error')) {\n if (_this2.root && _this2.root.alert) {\n _this2.scrollIntoView(_this2.root.alert);\n }\n }\n });\n this.disabled = this.shouldDisabled;\n this.setDisabled(this.refs.button, this.disabled);\n\n function getUrlParameter(name) {\n name = name.replace(/[[]/, '\\\\[').replace(/[\\]]/, '\\\\]');\n var regex = new RegExp(\"[\\\\?&]\".concat(name, \"=([^&#]*)\"));\n var results = regex.exec(location.search);\n\n if (!results) {\n return results;\n }\n\n return decodeURIComponent(results[1].replace(/\\+/g, ' '));\n } // If this is an OpenID Provider initiated login, perform the click event immediately\n\n\n if (this.component.action === 'oauth' && this.oauthConfig && !this.oauthConfig.error) {\n var iss = getUrlParameter('iss');\n\n if (iss && this.oauthConfig.authURI.indexOf(iss) === 0) {\n this.openOauth(this.oauthConfig);\n }\n }\n }\n }, {\n key: \"shouldDisabled\",\n get: function get() {\n var _this$filesUploading;\n\n return _get(_getPrototypeOf(ButtonComponent.prototype), \"shouldDisabled\", this) || !!((_this$filesUploading = this.filesUploading) !== null && _this$filesUploading !== void 0 && _this$filesUploading.length) || this.isDisabledOnInvalid;\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n this.loadRefs(element, {\n button: 'single',\n buttonMessageContainer: 'single',\n buttonMessage: 'single'\n });\n\n var superAttach = _get(_getPrototypeOf(ButtonComponent.prototype), \"attach\", this).call(this, element);\n\n this.attachButton();\n return superAttach;\n }\n /* eslint-enable max-statements */\n\n }, {\n key: \"detach\",\n value: function detach(element) {\n if (element && this.refs.button) {\n this.removeShortcut(this.refs.button);\n }\n\n _get(_getPrototypeOf(ButtonComponent.prototype), \"detach\", this).call(this);\n }\n }, {\n key: \"onClick\",\n value: function onClick(event) {\n this.triggerReCaptcha(); // Don't click if disabled or in builder mode.\n\n if (this.disabled || this.options.attachMode === 'builder') {\n return;\n }\n\n this.dataValue = true;\n\n if (this.component.action !== 'submit' && this.component.showValidations) {\n this.emit('checkValidity', this.data);\n }\n\n switch (this.component.action) {\n case 'saveState':\n case 'submit':\n event.preventDefault();\n event.stopPropagation();\n this.loading = true;\n this.emit('submitButton', {\n state: this.component.state || 'submitted',\n component: this.component,\n instance: this\n });\n break;\n\n case 'event':\n this.emit(this.interpolate(this.component.event), this.data);\n this.events.emit(this.interpolate(this.component.event), this.data);\n this.emit('customEvent', {\n type: this.interpolate(this.component.event),\n component: this.component,\n data: this.data,\n event: event\n });\n break;\n\n case 'custom':\n {\n // Get the FormioForm at the root of this component's tree\n var form = this.getRoot();\n var flattened = {};\n var components = {};\n (0, _utils.eachComponent)(form.components, function (componentWrapper, path) {\n var component = componentWrapper.component || componentWrapper;\n flattened[path] = component;\n components[component.key] = component;\n }, true);\n this.evaluate(this.component.custom, {\n form: form,\n flattened: flattened,\n components: components\n });\n this.triggerChange();\n break;\n }\n\n case 'url':\n this.loading = true;\n this.emit('requestButton', {\n component: this.component,\n instance: this\n });\n this.emit('requestUrl', {\n url: this.interpolate(this.component.url),\n headers: this.component.headers\n });\n break;\n\n case 'reset':\n this.emit('resetForm');\n break;\n\n case 'delete':\n this.emit('deleteSubmission');\n break;\n\n case 'oauth':\n if (this.root === this) {\n console.warn('You must add the OAuth button to a form for it to function properly');\n return;\n } // Display Alert if OAuth config is missing\n\n\n if (!this.oauthConfig) {\n this.root.setAlert('danger', 'OAuth not configured. You must configure oauth for your project before it will work.');\n break;\n } // Display Alert if oAuth has an error is missing\n\n\n if (this.oauthConfig.error) {\n this.root.setAlert('danger', \"The Following Error Has Occured \".concat(this.oauthConfig.error));\n break;\n }\n\n this.openOauth(this.oauthConfig);\n break;\n }\n }\n }, {\n key: \"openOauth\",\n value: function openOauth(settings) {\n var _this3 = this;\n\n if (!this.root.formio) {\n console.warn('You must attach a Form API url to your form in order to use OAuth buttons.');\n return;\n }\n /*eslint-disable camelcase */\n\n\n var params = {\n response_type: 'code',\n client_id: settings.clientId,\n redirect_uri: settings.redirectURI || window.location.origin || \"\".concat(window.location.protocol, \"//\").concat(window.location.host),\n state: settings.state,\n scope: settings.scope\n };\n /*eslint-enable camelcase */\n // Needs for the correct redirection URI for the OpenID\n\n var originalRedirectUri = params.redirect_uri; // Make display optional.\n\n if (settings.display) {\n params.display = settings.display;\n }\n\n params = Object.keys(params).map(function (key) {\n return \"\".concat(key, \"=\").concat(encodeURIComponent(params[key]));\n }).join('&');\n var separator = settings.authURI.indexOf('?') !== -1 ? '&' : '?';\n var url = \"\".concat(settings.authURI).concat(separator).concat(params);\n var popup = window.open(url, settings.provider, 'width=1020,height=618');\n var interval = setInterval(function () {\n try {\n var popupHost = popup.location.host;\n var currentHost = window.location.host;\n\n if (popup && !popup.closed && popupHost === currentHost && popup.location.search) {\n popup.close();\n\n var _params = popup.location.search.substr(1).split('&').reduce(function (params, param) {\n var split = param.split('=');\n params[split[0]] = split[1];\n return params;\n }, {});\n\n if (_params.error) {\n alert(_params.error_description || _params.error);\n\n _this3.root.setAlert('danger', _params.error_description || _params.error);\n\n return;\n } // TODO: check for error response here\n\n\n if (settings.state !== _params.state) {\n _this3.root.setAlert('danger', 'OAuth state does not match. Please try logging in again.');\n\n return;\n } // Depending on where the settings came from, submit to either the submission endpoint (old) or oauth endpoint (new).\n\n\n var requestPromise = _nativePromiseOnly.default.resolve();\n\n if (_lodash.default.has(_this3, 'root.form.config.oauth') && _this3.root.form.config.oauth[_this3.component.oauthProvider]) {\n _params.provider = settings.provider;\n _params.redirectURI = originalRedirectUri; // Needs for the exclude oAuth Actions that not related to this button\n\n _params.triggeredBy = _this3.key;\n requestPromise = _this3.root.formio.makeRequest('oauth', \"\".concat(_this3.root.formio.projectUrl, \"/oauth2\"), 'POST', _params);\n } else {\n var submission = {\n data: {},\n oauth: {}\n };\n submission.oauth[settings.provider] = _params;\n submission.oauth[settings.provider].redirectURI = originalRedirectUri; // Needs for the exclude oAuth Actions that not related to this button\n\n submission.oauth[settings.provider].triggeredBy = _this3.key;\n requestPromise = _this3.root.formio.saveSubmission(submission);\n }\n\n requestPromise.then(function (result) {\n _this3.root.onSubmit(result, true);\n }).catch(function (err) {\n _this3.root.onSubmissionError(err);\n });\n }\n } catch (error) {\n if (error.name !== 'SecurityError') {\n _this3.root.setAlert('danger', error.message || error);\n }\n }\n\n if (!popup || popup.closed || popup.closed === undefined) {\n clearInterval(interval);\n }\n }, 100);\n }\n }, {\n key: \"focus\",\n value: function focus() {\n if (this.refs.button) {\n this.refs.button.focus();\n }\n }\n }, {\n key: \"triggerReCaptcha\",\n value: function triggerReCaptcha() {\n var _this4 = this;\n\n if (!this.root) {\n return;\n }\n\n var recaptchaComponent;\n this.root.everyComponent(function (component) {\n if (component.component.type === 'recaptcha' && component.component.eventType === 'buttonClick' && component.component.buttonKey === _this4.component.key) {\n recaptchaComponent = component;\n }\n });\n\n if (recaptchaComponent) {\n recaptchaComponent.verify(\"\".concat(this.component.key, \"Click\"));\n }\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _Input.default.schema.apply(_Input.default, [{\n type: 'button',\n label: 'Submit',\n key: 'submit',\n size: 'md',\n leftIcon: '',\n rightIcon: '',\n block: false,\n action: 'submit',\n persistent: false,\n disableOnInvalid: false,\n theme: 'primary',\n dataGridLabel: true\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Button',\n group: 'basic',\n icon: 'stop',\n documentation: '/userguide/forms/form-components#button',\n weight: 110,\n schema: ButtonComponent.schema()\n };\n }\n }]);\n\n return ButtonComponent;\n}(_Field2.default);\n\nexports[\"default\"] = ButtonComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/button/Button.js?"); +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.array.includes.js */ \"./node_modules/core-js/modules/es.array.includes.js\");\n__webpack_require__(/*! core-js/modules/es.array.index-of.js */ \"./node_modules/core-js/modules/es.array.index-of.js\");\n__webpack_require__(/*! core-js/modules/es.array.splice.js */ \"./node_modules/core-js/modules/es.array.splice.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.constructor.js */ \"./node_modules/core-js/modules/es.regexp.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.string.search.js */ \"./node_modules/core-js/modules/es.string.search.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.array.join.js */ \"./node_modules/core-js/modules/es.array.join.js\");\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n__webpack_require__(/*! core-js/modules/web.timers.js */ \"./node_modules/core-js/modules/web.timers.js\");\n__webpack_require__(/*! core-js/modules/es.array.reduce.js */ \"./node_modules/core-js/modules/es.array.reduce.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\nvar _Field2 = _interopRequireDefault(__webpack_require__(/*! ../_classes/field/Field */ \"./lib/components/_classes/field/Field.js\"));\nvar _Input = _interopRequireDefault(__webpack_require__(/*! ../_classes/input/Input */ \"./lib/components/_classes/input/Input.js\"));\nvar _utils = __webpack_require__(/*! ../../utils/utils */ \"./lib/utils/utils.js\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar ButtonComponent = /*#__PURE__*/function (_Field) {\n _inherits(ButtonComponent, _Field);\n var _super = _createSuper(ButtonComponent);\n function ButtonComponent(component, options, data) {\n var _this;\n _classCallCheck(this, ButtonComponent);\n _this = _super.call(this, component, options, data);\n _this.filesUploading = [];\n return _this;\n }\n _createClass(ButtonComponent, [{\n key: \"defaultSchema\",\n get: function get() {\n return ButtonComponent.schema();\n }\n }, {\n key: \"inputInfo\",\n get: function get() {\n var info = _get(_getPrototypeOf(ButtonComponent.prototype), \"elementInfo\", this).call(this);\n info.type = 'button';\n info.attr.type = ['submit', 'saveState'].includes(this.component.action) ? 'submit' : 'button';\n this.component.theme = this.component.theme || 'default';\n info.attr[\"class\"] = \"btn btn-\".concat(this.component.theme);\n if (this.component.size) {\n info.attr[\"class\"] += \" btn-\".concat(this.component.size);\n }\n if (this.component.block) {\n info.attr[\"class\"] += ' btn-block';\n }\n if (this.component.customClass) {\n info.attr[\"class\"] += \" \".concat(this.component.customClass);\n }\n info.content = this.t(this.component.label, {\n _userInput: true\n });\n return info;\n }\n }, {\n key: \"labelInfo\",\n get: function get() {\n return {\n hidden: true\n };\n }\n }, {\n key: \"loading\",\n set: function set(loading) {\n this.setLoading(this.refs.button, loading);\n }\n }, {\n key: \"skipInEmail\",\n get: function get() {\n return true;\n }\n\n // No label needed for buttons.\n }, {\n key: \"createLabel\",\n value: function createLabel() {}\n }, {\n key: \"createInput\",\n value: function createInput(container) {\n this.refs.button = _get(_getPrototypeOf(ButtonComponent.prototype), \"createInput\", this).call(this, container);\n return this.refs.button;\n }\n }, {\n key: \"emptyValue\",\n get: function get() {\n return false;\n }\n }, {\n key: \"getValue\",\n value: function getValue() {\n return this.dataValue;\n }\n }, {\n key: \"clicked\",\n get: function get() {\n return this.dataValue;\n }\n }, {\n key: \"defaultValue\",\n get: function get() {\n return false;\n }\n }, {\n key: \"className\",\n get: function get() {\n var className = _get(_getPrototypeOf(ButtonComponent.prototype), \"className\", this);\n className += \" \".concat(this.transform('class', 'form-group'));\n return className;\n }\n }, {\n key: \"oauthConfig\",\n get: function get() {\n if (_lodash[\"default\"].has(this, 'root.form.config.oauth') && this.component.oauthProvider) {\n return this.root.form.config.oauth[this.component.oauthProvider];\n }\n // Legacy oauth location.\n if (this.component.oauth) {\n return this.component.oauth;\n }\n return false;\n }\n }, {\n key: \"render\",\n value: function render() {\n if (this.viewOnly || this.options.hideButtons) {\n this._visible = false;\n }\n return _get(_getPrototypeOf(ButtonComponent.prototype), \"render\", this).call(this, this.renderTemplate('button', {\n component: this.component,\n input: this.inputInfo\n }));\n }\n }, {\n key: \"attachButton\",\n value: function attachButton() {\n var _this2 = this;\n this.addShortcut(this.refs.button);\n var onChange = null;\n var onError = null;\n if (this.component.action === 'submit') {\n this.on('submitButton', function () {\n _this2.disabled = true;\n }, true);\n this.on('cancelSubmit', function () {\n _this2.disabled = false;\n }, true);\n this.on('submitDone', function (message) {\n var resultMessage = _lodash[\"default\"].isString(message) ? message : _this2.t('complete');\n _this2.loading = false;\n _this2.disabled = false;\n _this2.addClass(_this2.refs.button, 'btn-success submit-success');\n _this2.removeClass(_this2.refs.button, 'btn-danger submit-fail');\n _this2.addClass(_this2.refs.buttonMessageContainer, 'has-success');\n _this2.removeClass(_this2.refs.buttonMessageContainer, 'has-error');\n _this2.setContent(_this2.refs.buttonMessage, resultMessage);\n }, true);\n this.on('submitError', function (message) {\n var resultMessage = _lodash[\"default\"].isString(message) ? _this2.t(message) : _this2.t(_this2.errorMessage('submitError'));\n _this2.loading = false;\n _this2.disabled = false;\n _this2.hasError = true;\n _this2.removeClass(_this2.refs.button, 'btn-success submit-success');\n _this2.addClass(_this2.refs.button, 'btn-danger submit-fail');\n _this2.removeClass(_this2.refs.buttonMessageContainer, 'has-success');\n _this2.addClass(_this2.refs.buttonMessageContainer, 'has-error');\n _this2.setContent(_this2.refs.buttonMessage, resultMessage);\n }, true);\n this.on('fileUploadingStart', function (filePromise) {\n _this2.filesUploading.push(filePromise);\n _this2.disabled = true;\n _this2.setDisabled(_this2.refs.button, _this2.disabled);\n }, true);\n this.on('fileUploadingEnd', function (filePromise) {\n var index = _this2.filesUploading.indexOf(filePromise);\n if (index !== -1) {\n _this2.filesUploading.splice(index, 1);\n }\n _this2.disabled = _this2.shouldDisabled ? true : false;\n _this2.setDisabled(_this2.refs.button, _this2.disabled);\n }, true);\n onChange = function onChange(value, isValid) {\n _this2.removeClass(_this2.refs.button, 'btn-success submit-success');\n if (isValid) {\n _this2.removeClass(_this2.refs.button, 'btn-danger submit-fail');\n if (_this2.hasError) {\n _this2.hasError = false;\n _this2.setContent(_this2.refs.buttonMessage, '');\n _this2.removeClass(_this2.refs.buttonMessageContainer, 'has-success');\n _this2.removeClass(_this2.refs.buttonMessageContainer, 'has-error');\n }\n }\n };\n onError = function onError() {\n _this2.hasError = true;\n _this2.removeClass(_this2.refs.button, 'btn-success submit-success');\n _this2.addClass(_this2.refs.button, 'btn-danger submit-fail');\n _this2.removeClass(_this2.refs.buttonMessageContainer, 'has-success');\n _this2.addClass(_this2.refs.buttonMessageContainer, 'has-error');\n _this2.setContent(_this2.refs.buttonMessage, _this2.t(_this2.errorMessage('submitError')));\n };\n }\n if (this.component.action === 'url') {\n this.on('requestButton', function () {\n _this2.disabled = true;\n }, true);\n this.on('requestDone', function () {\n _this2.loading = false;\n _this2.disabled = false;\n }, true);\n }\n this.on('change', function (value, flags) {\n var isValid = value.isValid;\n var isSilent = flags && flags.silent;\n //check root validity only if disableOnInvalid is set and when it is not possible to make submission because of validation errors\n if (flags && flags.noValidate && (_this2.component.disableOnInvalid || _this2.hasError)) {\n isValid = flags.rootValidity || (_this2.root ? _this2.root.checkValidity(_this2.root.data, null, null, true) : true);\n flags.rootValidity = isValid;\n }\n _this2.isDisabledOnInvalid = _this2.component.disableOnInvalid && (isSilent || !isValid);\n _this2.disabled = _this2.shouldDisabled;\n _this2.setDisabled(_this2.refs.button, _this2.disabled);\n if (onChange) {\n onChange(value, isValid);\n }\n }, true);\n this.on('error', function () {\n _this2.loading = false;\n _this2.disabled = false;\n if (onError) {\n onError();\n }\n }, true);\n if (this.component.saveOnEnter) {\n this.root.addEventListener(this.root.element, 'keyup', function (event) {\n if (event.keyCode === 13) {\n _this2.onClick.call(_this2, event);\n }\n });\n }\n this.addEventListener(this.refs.button, 'click', this.onClick.bind(this));\n this.addEventListener(this.refs.buttonMessageContainer, 'click', function () {\n if (_this2.refs.buttonMessageContainer.classList.contains('has-error')) {\n if (_this2.root && _this2.root.alert) {\n _this2.scrollIntoView(_this2.root.alert);\n }\n }\n });\n this.disabled = this.shouldDisabled;\n this.setDisabled(this.refs.button, this.disabled);\n function getUrlParameter(name) {\n name = name.replace(/[[]/, '\\\\[').replace(/[\\]]/, '\\\\]');\n var regex = new RegExp(\"[\\\\?&]\".concat(name, \"=([^&#]*)\"));\n var results = regex.exec(location.search);\n if (!results) {\n return results;\n }\n return decodeURIComponent(results[1].replace(/\\+/g, ' '));\n }\n\n // If this is an OpenID Provider initiated login, perform the click event immediately\n if (this.component.action === 'oauth' && this.oauthConfig && !this.oauthConfig.error) {\n var iss = getUrlParameter('iss');\n if (iss && this.oauthConfig.authURI.indexOf(iss) === 0) {\n this.openOauth(this.oauthConfig);\n }\n }\n }\n }, {\n key: \"shouldDisabled\",\n get: function get() {\n var _this$filesUploading;\n return _get(_getPrototypeOf(ButtonComponent.prototype), \"shouldDisabled\", this) || !!((_this$filesUploading = this.filesUploading) !== null && _this$filesUploading !== void 0 && _this$filesUploading.length) || this.isDisabledOnInvalid;\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n this.loadRefs(element, {\n button: 'single',\n buttonMessageContainer: 'single',\n buttonMessage: 'single'\n });\n var superAttach = _get(_getPrototypeOf(ButtonComponent.prototype), \"attach\", this).call(this, element);\n this.attachButton();\n return superAttach;\n }\n /* eslint-enable max-statements */\n }, {\n key: \"detach\",\n value: function detach(element) {\n if (element && this.refs.button) {\n this.removeShortcut(this.refs.button);\n }\n _get(_getPrototypeOf(ButtonComponent.prototype), \"detach\", this).call(this);\n }\n }, {\n key: \"onClick\",\n value: function onClick(event) {\n this.triggerReCaptcha();\n // Don't click if disabled or in builder mode.\n if (this.disabled || this.options.attachMode === 'builder') {\n return;\n }\n this.dataValue = true;\n if (this.component.action !== 'submit' && this.component.showValidations) {\n this.emit('checkValidity', this.data);\n }\n switch (this.component.action) {\n case 'saveState':\n case 'submit':\n event.preventDefault();\n event.stopPropagation();\n this.loading = true;\n this.emit('submitButton', {\n state: this.component.state || 'submitted',\n component: this.component,\n instance: this\n });\n break;\n case 'event':\n this.emit(this.interpolate(this.component.event), this.data);\n this.events.emit(this.interpolate(this.component.event), this.data);\n this.emit('customEvent', {\n type: this.interpolate(this.component.event),\n component: this.component,\n data: this.data,\n event: event\n });\n break;\n case 'custom':\n {\n // Get the FormioForm at the root of this component's tree\n var form = this.getRoot();\n var flattened = {};\n var components = {};\n (0, _utils.eachComponent)(form.components, function (componentWrapper, path) {\n var component = componentWrapper.component || componentWrapper;\n flattened[path] = component;\n components[component.key] = component;\n }, true);\n this.evaluate(this.component.custom, {\n form: form,\n flattened: flattened,\n components: components\n });\n this.triggerChange();\n break;\n }\n case 'url':\n this.loading = true;\n this.emit('requestButton', {\n component: this.component,\n instance: this\n });\n this.emit('requestUrl', {\n url: this.interpolate(this.component.url),\n headers: this.component.headers\n });\n break;\n case 'reset':\n this.emit('resetForm');\n break;\n case 'delete':\n this.emit('deleteSubmission');\n break;\n case 'oauth':\n if (this.root === this) {\n console.warn('You must add the OAuth button to a form for it to function properly');\n return;\n }\n\n // Display Alert if OAuth config is missing\n if (!this.oauthConfig) {\n this.root.setAlert('danger', 'OAuth not configured. You must configure oauth for your project before it will work.');\n break;\n }\n\n // Display Alert if oAuth has an error is missing\n if (this.oauthConfig.error) {\n this.root.setAlert('danger', \"The Following Error Has Occured \".concat(this.oauthConfig.error));\n break;\n }\n this.openOauth(this.oauthConfig);\n break;\n }\n }\n }, {\n key: \"openOauth\",\n value: function openOauth(settings) {\n var _this3 = this;\n if (!this.root.formio) {\n console.warn('You must attach a Form API url to your form in order to use OAuth buttons.');\n return;\n }\n\n /*eslint-disable camelcase */\n var params = {\n response_type: 'code',\n client_id: settings.clientId,\n redirect_uri: settings.redirectURI || window.location.origin || \"\".concat(window.location.protocol, \"//\").concat(window.location.host),\n state: settings.state,\n scope: settings.scope\n };\n /*eslint-enable camelcase */\n\n // Needs for the correct redirection URI for the OpenID\n var originalRedirectUri = params.redirect_uri;\n\n // Make display optional.\n if (settings.display) {\n params.display = settings.display;\n }\n params = Object.keys(params).map(function (key) {\n return \"\".concat(key, \"=\").concat(encodeURIComponent(params[key]));\n }).join('&');\n var separator = settings.authURI.indexOf('?') !== -1 ? '&' : '?';\n var url = \"\".concat(settings.authURI).concat(separator).concat(params);\n var popup = window.open(url, settings.provider, 'width=1020,height=618');\n var interval = setInterval(function () {\n try {\n var popupHost = popup.location.host;\n var currentHost = window.location.host;\n if (popup && !popup.closed && popupHost === currentHost) {\n popup.close();\n var _params = popup.location.search.substr(1).split('&').reduce(function (params, param) {\n var split = param.split('=');\n params[split[0]] = split[1];\n return params;\n }, {});\n if (_params.error) {\n alert(_params.error_description || _params.error);\n _this3.root.setAlert('danger', _params.error_description || _params.error);\n return;\n }\n // TODO: check for error response here\n if (settings.state !== _params.state) {\n _this3.root.setAlert('danger', 'OAuth state does not match. Please try logging in again.');\n return;\n }\n // Depending on where the settings came from, submit to either the submission endpoint (old) or oauth endpoint (new).\n var requestPromise = _nativePromiseOnly[\"default\"].resolve();\n if (_lodash[\"default\"].has(_this3, 'root.form.config.oauth') && _this3.root.form.config.oauth[_this3.component.oauthProvider]) {\n _params.provider = settings.provider;\n _params.redirectURI = originalRedirectUri;\n\n // Needs for the exclude oAuth Actions that not related to this button\n _params.triggeredBy = _this3.oauthComponentPath;\n requestPromise = _this3.root.formio.makeRequest('oauth', \"\".concat(_this3.root.formio.projectUrl, \"/oauth2\"), 'POST', _params);\n } else {\n var submission = {\n data: {},\n oauth: {}\n };\n submission.oauth[settings.provider] = _params;\n submission.oauth[settings.provider].redirectURI = originalRedirectUri;\n if (settings.logoutURI) {\n _this3.root.formio.oauthLogoutURI(settings.logoutURI);\n }\n\n // Needs for the exclude oAuth Actions that not related to this button\n submission.oauth[settings.provider].triggeredBy = _this3.oauthComponentPath;\n requestPromise = _this3.root.formio.saveSubmission(submission);\n }\n requestPromise.then(function (result) {\n _this3.root.onSubmit(result, true);\n })[\"catch\"](function (err) {\n _this3.root.onSubmissionError(err);\n });\n }\n } catch (error) {\n if (error.name !== 'SecurityError' && (error.name !== 'Error' || error.message !== 'Permission denied')) {\n _this3.root.setAlert('danger', error.message || error);\n }\n }\n if (!popup || popup.closed || popup.closed === undefined) {\n clearInterval(interval);\n }\n }, 100);\n }\n }, {\n key: \"oauthComponentPath\",\n get: function get() {\n var pathArray = (0, _utils.getArrayFromComponentPath)(this.path);\n return _lodash[\"default\"].chain(pathArray).filter(function (pathPart) {\n return !_lodash[\"default\"].isNumber(pathPart);\n }).join('.').value();\n }\n }, {\n key: \"focus\",\n value: function focus() {\n if (this.refs.button) {\n this.refs.button.focus();\n }\n }\n }, {\n key: \"triggerReCaptcha\",\n value: function triggerReCaptcha() {\n var _this4 = this;\n if (!this.root) {\n return;\n }\n var recaptchaComponent;\n this.root.everyComponent(function (component) {\n if (component.component.type === 'recaptcha' && component.component.eventType === 'buttonClick' && component.component.buttonKey === _this4.component.key) {\n recaptchaComponent = component;\n }\n });\n if (recaptchaComponent) {\n recaptchaComponent.verify(\"\".concat(this.component.key, \"Click\"));\n }\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _Input[\"default\"].schema.apply(_Input[\"default\"], [{\n type: 'button',\n label: 'Submit',\n key: 'submit',\n size: 'md',\n leftIcon: '',\n rightIcon: '',\n block: false,\n action: 'submit',\n persistent: false,\n disableOnInvalid: false,\n theme: 'primary',\n dataGridLabel: true\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Button',\n group: 'basic',\n icon: 'stop',\n documentation: '/userguide/form-building/form-components#button',\n weight: 110,\n schema: ButtonComponent.schema()\n };\n }\n }]);\n return ButtonComponent;\n}(_Field2[\"default\"]);\nexports[\"default\"] = ButtonComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/button/Button.js?"); /***/ }), @@ -532,7 +565,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _builder = _interopRequireDefault(__webpack_require__(/*! ../../../utils/builder */ \"./lib/utils/builder.js\"));\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = [{\n key: 'labelPosition',\n ignore: true\n}, {\n key: 'placeholder',\n ignore: true\n}, {\n key: 'hideLabel',\n ignore: true\n}, {\n type: 'select',\n key: 'action',\n label: 'Action',\n input: true,\n dataSrc: 'values',\n weight: 110,\n tooltip: 'This is the action to be performed by this button.',\n data: {\n values: [{\n label: 'Submit',\n value: 'submit'\n }, {\n label: 'Save in state',\n value: 'saveState'\n }, {\n label: 'Event',\n value: 'event'\n }, {\n label: 'Custom',\n value: 'custom'\n }, {\n label: 'Reset',\n value: 'reset'\n }, {\n label: 'OAuth',\n value: 'oauth'\n }, {\n label: 'POST to URL',\n value: 'url'\n }]\n }\n}, {\n type: 'select',\n key: 'oauthProvider',\n label: 'OAuth Provider',\n input: true,\n dataSrc: 'values',\n weight: 111,\n tooltip: 'The oauth provider to use to log in (8.x server only).',\n data: {\n values: [{\n label: 'OpenID',\n value: 'openid'\n }, {\n label: 'Github',\n value: 'github'\n }, {\n label: 'Google',\n value: 'google'\n }]\n },\n conditional: {\n json: {\n '===': [{\n var: 'data.action'\n }, 'oauth']\n }\n }\n}, {\n type: 'textfield',\n label: 'Save in state',\n key: 'state',\n weight: 112,\n tooltip: 'The state you wish to save the submission under when this button is pressed. Example \"draft\" would save the submission in Draft Mode.',\n placeholder: 'submitted',\n input: true,\n conditional: {\n json: {\n '===': [{\n var: 'data.action'\n }, 'saveState']\n }\n }\n}, {\n type: 'checkbox',\n input: true,\n inputType: 'checkbox',\n key: 'saveOnEnter',\n label: 'Save On Enter',\n weight: 113,\n tooltip: 'Use the Enter key to submit form.',\n conditional: {\n json: {\n '===': [{\n var: 'data.action'\n }, 'submit']\n }\n }\n}, {\n type: 'checkbox',\n input: true,\n inputType: 'checkbox',\n key: 'showValidations',\n label: 'Show Validations',\n weight: 115,\n tooltip: 'When the button is pressed, show any validation errors on the form.',\n conditional: {\n json: {\n '!==': [{\n var: 'data.action'\n }, 'submit']\n }\n }\n}, {\n type: 'textfield',\n label: 'Button Event',\n key: 'event',\n input: true,\n weight: 120,\n tooltip: 'The event to fire when the button is clicked.',\n conditional: {\n json: {\n '===': [{\n var: 'data.action'\n }, 'event']\n }\n }\n}, {\n type: 'textfield',\n inputType: 'url',\n key: 'url',\n input: true,\n weight: 120,\n label: 'Button URL',\n tooltip: 'The URL where the submission will be sent.',\n placeholder: 'https://example.form.io',\n conditional: {\n json: {\n '===': [{\n var: 'data.action'\n }, 'url']\n }\n }\n}, {\n type: 'datagrid',\n key: 'headers',\n input: true,\n weight: 130,\n label: 'Headers',\n addAnother: 'Add Header',\n tooltip: 'Headers Properties and Values for your request',\n components: [{\n key: 'header',\n label: 'Header',\n input: true,\n type: 'textfield'\n }, {\n key: 'value',\n label: 'Value',\n input: true,\n type: 'textfield'\n }],\n conditional: {\n json: {\n '===': [{\n var: 'data.action'\n }, 'url']\n }\n }\n}, {\n type: 'textarea',\n key: 'custom',\n label: 'Button Custom Logic',\n tooltip: 'The custom logic to evaluate when the button is clicked.',\n rows: 5,\n editor: 'ace',\n input: true,\n weight: 120,\n placeholder: \"data['mykey'] = data['anotherKey'];\",\n conditional: {\n json: {\n '===': [{\n var: 'data.action'\n }, 'custom']\n }\n }\n}, {\n type: 'select',\n key: 'theme',\n label: 'Theme',\n input: true,\n tooltip: 'The color theme of this button.',\n dataSrc: 'values',\n weight: 140,\n data: {\n values: [{\n label: 'Primary',\n value: 'primary'\n }, {\n label: 'Secondary',\n value: 'secondary'\n }, {\n label: 'Info',\n value: 'info'\n }, {\n label: 'Success',\n value: 'success'\n }, {\n label: 'Danger',\n value: 'danger'\n }, {\n label: 'Warning',\n value: 'warning'\n }]\n }\n}, {\n type: 'select',\n key: 'size',\n label: 'Size',\n input: true,\n tooltip: 'The size of this button.',\n dataSrc: 'values',\n weight: 150,\n data: {\n values: [{\n label: 'Small',\n value: 'sm'\n }, {\n label: 'Medium',\n value: 'md'\n }, {\n label: 'Large',\n value: 'lg'\n }]\n }\n}, {\n type: 'textfield',\n key: 'leftIcon',\n label: 'Left Icon',\n input: true,\n placeholder: 'Enter icon classes',\n tooltip: \"This is the full icon class string to show the icon. Example: 'fa fa-plus'\",\n weight: 160\n}, {\n type: 'textfield',\n key: 'rightIcon',\n label: 'Right Icon',\n input: true,\n placeholder: 'Enter icon classes',\n tooltip: \"This is the full icon class string to show the icon. Example: 'fa fa-plus'\",\n weight: 170\n}, {\n type: 'select',\n input: true,\n weight: 180,\n label: 'Shortcut',\n key: 'shortcut',\n tooltip: 'Shortcut for this component.',\n dataSrc: 'custom',\n valueProperty: 'value',\n customDefaultValue: function customDefaultValue() {\n return '';\n },\n template: '{{ item.label }}',\n data: {\n custom: function custom(context) {\n return _builder.default.getAvailableShortcuts(_lodash.default.get(context, 'instance.options.editForm', {}), _lodash.default.get(context, 'instance.options.editComponent', {}));\n }\n }\n}, {\n type: 'checkbox',\n key: 'block',\n label: 'Block Button',\n input: true,\n weight: 155,\n tooltip: 'This control should span the full width of the bounding container.'\n}, {\n type: 'checkbox',\n key: 'disableOnInvalid',\n label: 'Disable on Form Invalid',\n tooltip: 'This will disable this field if the form is invalid.',\n input: true,\n weight: 620\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/button/editForm/Button.edit.display.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.regexp.flags.js */ \"./node_modules/core-js/modules/es.regexp.flags.js\");\nvar _builder = _interopRequireDefault(__webpack_require__(/*! ../../../utils/builder */ \"./lib/utils/builder.js\"));\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = [{\n key: 'labelPosition',\n ignore: true\n}, {\n key: 'placeholder',\n ignore: true\n}, {\n key: 'hideLabel',\n customConditional: function customConditional(context) {\n var _context$instance$opt, _context$instance$opt2;\n return (_context$instance$opt = context.instance.options) === null || _context$instance$opt === void 0 ? void 0 : (_context$instance$opt2 = _context$instance$opt.flags) === null || _context$instance$opt2 === void 0 ? void 0 : _context$instance$opt2.inDataGrid;\n }\n}, {\n key: 'dataGridLabel',\n ignore: true\n}, {\n type: 'select',\n key: 'action',\n label: 'Action',\n input: true,\n dataSrc: 'values',\n weight: 110,\n tooltip: 'This is the action to be performed by this button.',\n data: {\n values: [{\n label: 'Submit',\n value: 'submit'\n }, {\n label: 'Save in state',\n value: 'saveState'\n }, {\n label: 'Event',\n value: 'event'\n }, {\n label: 'Custom',\n value: 'custom'\n }, {\n label: 'Reset',\n value: 'reset'\n }, {\n label: 'OAuth',\n value: 'oauth'\n }, {\n label: 'POST to URL',\n value: 'url'\n }]\n }\n}, {\n type: 'select',\n key: 'oauthProvider',\n label: 'OAuth Provider',\n input: true,\n dataSrc: 'values',\n weight: 111,\n tooltip: 'The oauth provider to use to log in (8.x server only).',\n data: {\n values: [{\n label: 'OpenID',\n value: 'openid'\n }, {\n label: 'Github',\n value: 'github'\n }, {\n label: 'Google',\n value: 'google'\n }]\n },\n conditional: {\n json: {\n '===': [{\n \"var\": 'data.action'\n }, 'oauth']\n }\n }\n}, {\n type: 'textfield',\n label: 'Save in state',\n key: 'state',\n weight: 112,\n tooltip: 'The state you wish to save the submission under when this button is pressed. Example \"draft\" would save the submission in Draft Mode.',\n placeholder: 'submitted',\n input: true,\n conditional: {\n json: {\n '===': [{\n \"var\": 'data.action'\n }, 'saveState']\n }\n }\n}, {\n type: 'checkbox',\n input: true,\n inputType: 'checkbox',\n key: 'saveOnEnter',\n label: 'Save On Enter',\n weight: 113,\n tooltip: 'Use the Enter key to submit form.',\n conditional: {\n json: {\n '===': [{\n \"var\": 'data.action'\n }, 'submit']\n }\n }\n}, {\n type: 'checkbox',\n input: true,\n inputType: 'checkbox',\n key: 'showValidations',\n label: 'Show Validations',\n weight: 115,\n tooltip: 'When the button is pressed, show any validation errors on the form.',\n conditional: {\n json: {\n '!==': [{\n \"var\": 'data.action'\n }, 'submit']\n }\n }\n}, {\n type: 'textfield',\n label: 'Button Event',\n key: 'event',\n input: true,\n weight: 120,\n tooltip: 'The event to fire when the button is clicked.',\n conditional: {\n json: {\n '===': [{\n \"var\": 'data.action'\n }, 'event']\n }\n }\n}, {\n type: 'textfield',\n inputType: 'url',\n key: 'url',\n input: true,\n weight: 120,\n label: 'Button URL',\n tooltip: 'The URL where the submission will be sent.',\n placeholder: 'https://example.form.io',\n conditional: {\n json: {\n '===': [{\n \"var\": 'data.action'\n }, 'url']\n }\n }\n}, {\n type: 'datagrid',\n key: 'headers',\n input: true,\n weight: 130,\n label: 'Headers',\n addAnother: 'Add Header',\n tooltip: 'Headers Properties and Values for your request',\n components: [{\n key: 'header',\n label: 'Header',\n input: true,\n type: 'textfield'\n }, {\n key: 'value',\n label: 'Value',\n input: true,\n type: 'textfield'\n }],\n conditional: {\n json: {\n '===': [{\n \"var\": 'data.action'\n }, 'url']\n }\n }\n}, {\n type: 'textarea',\n key: 'custom',\n label: 'Button Custom Logic',\n tooltip: 'The custom logic to evaluate when the button is clicked.',\n rows: 5,\n editor: 'ace',\n input: true,\n weight: 120,\n placeholder: \"data['mykey'] = data['anotherKey'];\",\n conditional: {\n json: {\n '===': [{\n \"var\": 'data.action'\n }, 'custom']\n }\n }\n}, {\n type: 'select',\n key: 'theme',\n label: 'Theme',\n input: true,\n tooltip: 'The color theme of this button.',\n dataSrc: 'values',\n weight: 140,\n data: {\n values: [{\n label: 'Primary',\n value: 'primary'\n }, {\n label: 'Secondary',\n value: 'secondary'\n }, {\n label: 'Info',\n value: 'info'\n }, {\n label: 'Success',\n value: 'success'\n }, {\n label: 'Danger',\n value: 'danger'\n }, {\n label: 'Warning',\n value: 'warning'\n }]\n }\n}, {\n type: 'select',\n key: 'size',\n label: 'Size',\n input: true,\n tooltip: 'The size of this button.',\n dataSrc: 'values',\n weight: 150,\n data: {\n values: [{\n label: 'Small',\n value: 'sm'\n }, {\n label: 'Medium',\n value: 'md'\n }, {\n label: 'Large',\n value: 'lg'\n }]\n }\n}, {\n type: 'textfield',\n key: 'leftIcon',\n label: 'Left Icon',\n input: true,\n placeholder: 'Enter icon classes',\n tooltip: \"This is the full icon class string to show the icon. Example: 'fa fa-plus'\",\n weight: 160\n}, {\n type: 'textfield',\n key: 'rightIcon',\n label: 'Right Icon',\n input: true,\n placeholder: 'Enter icon classes',\n tooltip: \"This is the full icon class string to show the icon. Example: 'fa fa-plus'\",\n weight: 170\n}, {\n type: 'select',\n input: true,\n weight: 180,\n label: 'Shortcut',\n key: 'shortcut',\n tooltip: 'Shortcut for this component.',\n dataSrc: 'custom',\n valueProperty: 'value',\n customDefaultValue: function customDefaultValue() {\n return '';\n },\n template: '{{ item.label }}',\n data: {\n custom: function custom(context) {\n return _builder[\"default\"].getAvailableShortcuts(_lodash[\"default\"].get(context, 'instance.options.editForm', {}), _lodash[\"default\"].get(context, 'instance.options.editComponent', {}));\n }\n }\n}, {\n type: 'checkbox',\n key: 'block',\n label: 'Block Button',\n input: true,\n weight: 155,\n tooltip: 'This control should span the full width of the bounding container.'\n}, {\n type: 'checkbox',\n key: 'disableOnInvalid',\n label: 'Disable on Form Invalid',\n tooltip: 'This will disable this field if the form is invalid.',\n input: true,\n weight: 620\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/button/editForm/Button.edit.display.js?"); /***/ }), @@ -543,7 +576,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\nvar _Components = _interopRequireDefault(__webpack_require__(/*! ../Components */ \"./lib/components/Components.js\"));\n\nvar _CheckboxEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/Checkbox.edit.data */ \"./lib/components/checkbox/editForm/Checkbox.edit.data.js\"));\n\nvar _CheckboxEdit2 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Checkbox.edit.display */ \"./lib/components/checkbox/editForm/Checkbox.edit.display.js\"));\n\nvar _CheckboxEdit3 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Checkbox.edit.validation */ \"./lib/components/checkbox/editForm/Checkbox.edit.validation.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _Components.default.baseEditForm.apply(_Components.default, [[{\n key: 'data',\n components: _CheckboxEdit.default\n }, {\n key: 'display',\n components: _CheckboxEdit2.default\n }, {\n key: 'validation',\n components: _CheckboxEdit3.default\n }, {\n key: 'addons',\n ignore: true\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/checkbox/Checkbox.form.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\nvar _Components = _interopRequireDefault(__webpack_require__(/*! ../Components */ \"./lib/components/Components.js\"));\nvar _CheckboxEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/Checkbox.edit.data */ \"./lib/components/checkbox/editForm/Checkbox.edit.data.js\"));\nvar _CheckboxEdit2 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Checkbox.edit.display */ \"./lib/components/checkbox/editForm/Checkbox.edit.display.js\"));\nvar _CheckboxEdit3 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Checkbox.edit.validation */ \"./lib/components/checkbox/editForm/Checkbox.edit.validation.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _Components[\"default\"].baseEditForm.apply(_Components[\"default\"], [[{\n key: 'data',\n components: _CheckboxEdit[\"default\"]\n }, {\n key: 'display',\n components: _CheckboxEdit2[\"default\"]\n }, {\n key: 'validation',\n components: _CheckboxEdit3[\"default\"]\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/checkbox/Checkbox.form.js?"); /***/ }), @@ -554,7 +587,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nvar _Field2 = _interopRequireDefault(__webpack_require__(/*! ../_classes/field/Field */ \"./lib/components/_classes/field/Field.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar CheckBoxComponent = /*#__PURE__*/function (_Field) {\n _inherits(CheckBoxComponent, _Field);\n\n var _super = _createSuper(CheckBoxComponent);\n\n function CheckBoxComponent() {\n _classCallCheck(this, CheckBoxComponent);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(CheckBoxComponent, [{\n key: \"defaultSchema\",\n get: function get() {\n return CheckBoxComponent.schema();\n }\n }, {\n key: \"defaultValue\",\n get: function get() {\n var name = this.component.name;\n\n var defaultValue = _get(_getPrototypeOf(CheckBoxComponent.prototype), \"defaultValue\", this);\n\n return name ? this.component[name] || this.emptyValue : (defaultValue || this.component.defaultValue || false).toString() === 'true';\n }\n }, {\n key: \"labelClass\",\n get: function get() {\n var className = '';\n\n if (this.isInputComponent && !this.options.inputsOnly && this.component.validate && this.component.validate.required) {\n className += ' field-required';\n }\n\n return \"\".concat(className);\n }\n }, {\n key: \"hasSetValue\",\n get: function get() {\n return this.hasValue();\n }\n }, {\n key: \"inputInfo\",\n get: function get() {\n var info = _get(_getPrototypeOf(CheckBoxComponent.prototype), \"elementInfo\", this).call(this);\n\n info.type = 'input';\n info.changeEvent = 'click';\n info.attr.type = this.component.inputType || 'checkbox';\n info.attr.class = 'form-check-input';\n\n if (this.component.name) {\n info.attr.name = \"data[\".concat(this.component.name, \"]\");\n }\n\n info.attr.value = this.component.value ? this.component.value : 0;\n info.label = this.t(this.component.label, {\n _userInput: true\n });\n info.labelClass = this.labelClass;\n return info;\n }\n }, {\n key: \"labelInfo\",\n get: function get() {\n return {\n hidden: true\n };\n }\n }, {\n key: \"render\",\n value: function render() {\n return _get(_getPrototypeOf(CheckBoxComponent.prototype), \"render\", this).call(this, this.renderTemplate('checkbox', {\n input: this.inputInfo,\n checked: this.checked,\n tooltip: this.interpolate(this.t(this.component.tooltip) || '', {\n _userInput: true\n }).replace(/(?:\\r\\n|\\r|\\n)/g, '
')\n }));\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n var _this = this;\n\n this.loadRefs(element, {\n input: 'multiple'\n });\n this.input = this.refs.input[0];\n\n if (this.refs.input) {\n this.addEventListener(this.input, this.inputInfo.changeEvent, function () {\n return _this.updateValue(null, {\n modified: true\n });\n });\n this.addShortcut(this.input);\n }\n\n return _get(_getPrototypeOf(CheckBoxComponent.prototype), \"attach\", this).call(this, element);\n }\n }, {\n key: \"detach\",\n value: function detach(element) {\n if (element && this.input) {\n this.removeShortcut(this.input);\n }\n\n _get(_getPrototypeOf(CheckBoxComponent.prototype), \"detach\", this).call(this);\n }\n }, {\n key: \"emptyValue\",\n get: function get() {\n return this.component.inputType === 'radio' ? null : false;\n }\n }, {\n key: \"isEmpty\",\n value: function isEmpty() {\n var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.dataValue;\n return _get(_getPrototypeOf(CheckBoxComponent.prototype), \"isEmpty\", this).call(this, value) || value === false;\n }\n }, {\n key: \"key\",\n get: function get() {\n return this.component.name ? this.component.name : _get(_getPrototypeOf(CheckBoxComponent.prototype), \"key\", this);\n }\n }, {\n key: \"getValueAt\",\n value: function getValueAt(index) {\n if (this.component.name) {\n return this.refs.input[index].checked ? this.component.value : '';\n }\n\n return !!this.refs.input[index].checked;\n }\n }, {\n key: \"getValue\",\n value: function getValue() {\n var value = _get(_getPrototypeOf(CheckBoxComponent.prototype), \"getValue\", this).call(this);\n\n if (this.component.name) {\n return value ? this.setCheckedState(value) : this.setCheckedState(this.dataValue);\n } else {\n return value === '' ? this.dataValue : !!value;\n }\n }\n }, {\n key: \"checked\",\n get: function get() {\n if (this.component.name) {\n return this.dataValue === this.component.value;\n }\n\n return !!this.dataValue;\n }\n }, {\n key: \"setCheckedState\",\n value: function setCheckedState(value) {\n if (!this.input) {\n return;\n }\n\n if (this.component.name) {\n this.input.value = value === this.component.value ? this.component.value : 0;\n this.input.checked = value === this.component.value ? 1 : 0;\n } else if (value === 'on') {\n this.input.value = 1;\n this.input.checked = 1;\n } else if (value === 'off') {\n this.input.value = 0;\n this.input.checked = 0;\n } else if (value) {\n this.input.value = 1;\n this.input.checked = 1;\n } else {\n this.input.value = 0;\n this.input.checked = 0;\n }\n\n if (this.input.checked) {\n this.input.setAttribute('checked', true);\n } else {\n this.input.removeAttribute('checked');\n }\n\n return value;\n }\n }, {\n key: \"setValue\",\n value: function setValue(value) {\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n if (this.setCheckedState(value) !== undefined || !this.input && value !== undefined && (this.visible || this.conditionallyVisible() || !this.component.clearOnHide)) {\n var changed = this.updateValue(value, flags);\n\n if (this.isHtmlRenderMode() && flags && flags.fromSubmission && changed) {\n this.redraw();\n }\n\n return changed;\n }\n\n return false;\n }\n }, {\n key: \"getValueAsString\",\n value: function getValueAsString(value) {\n var _this$component = this.component,\n componentName = _this$component.name,\n componentValue = _this$component.value;\n var hasValue = componentName ? _lodash.default.isEqual(value, componentValue) : value;\n return this.t(hasValue ? 'Yes' : 'No');\n }\n }, {\n key: \"updateValue\",\n value: function updateValue(value, flags) {\n // If this is a radio and is alredy checked, uncheck it.\n if (this.component.name && flags.modified && this.dataValue === this.component.value) {\n this.input.checked = 0;\n this.input.value = 0;\n this.dataValue = '';\n }\n\n var changed = _get(_getPrototypeOf(CheckBoxComponent.prototype), \"updateValue\", this).call(this, value, flags); // Update attributes of the input element\n\n\n if (changed && this.input) {\n if (this.input.checked) {\n this.input.setAttribute('checked', 'true');\n } else {\n this.input.removeAttribute('checked');\n }\n }\n\n return changed;\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _Field2.default.schema.apply(_Field2.default, [{\n type: 'checkbox',\n inputType: 'checkbox',\n label: 'Checkbox',\n key: 'checkbox',\n dataGridLabel: true,\n labelPosition: 'right',\n value: '',\n name: ''\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Checkbox',\n group: 'basic',\n icon: 'check-square',\n documentation: '/userguide/forms/form-components#check-box',\n weight: 50,\n schema: CheckBoxComponent.schema()\n };\n }\n }]);\n\n return CheckBoxComponent;\n}(_Field2.default);\n\nexports[\"default\"] = CheckBoxComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/checkbox/Checkbox.js?"); +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-string.js */ \"./node_modules/core-js/modules/es.date.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nvar _Field2 = _interopRequireDefault(__webpack_require__(/*! ../_classes/field/Field */ \"./lib/components/_classes/field/Field.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar CheckBoxComponent = /*#__PURE__*/function (_Field) {\n _inherits(CheckBoxComponent, _Field);\n var _super = _createSuper(CheckBoxComponent);\n function CheckBoxComponent() {\n _classCallCheck(this, CheckBoxComponent);\n return _super.apply(this, arguments);\n }\n _createClass(CheckBoxComponent, [{\n key: \"defaultSchema\",\n get: function get() {\n return CheckBoxComponent.schema();\n }\n }, {\n key: \"defaultValue\",\n get: function get() {\n var name = this.component.name;\n var defaultValue = _get(_getPrototypeOf(CheckBoxComponent.prototype), \"defaultValue\", this);\n return name ? this.component[name] || this.emptyValue : (defaultValue || this.component.defaultValue || false).toString() === 'true';\n }\n }, {\n key: \"labelClass\",\n get: function get() {\n var className = '';\n if (this.isInputComponent && !this.options.inputsOnly && this.component.validate && this.component.validate.required) {\n className += ' field-required';\n }\n return \"\".concat(className);\n }\n }, {\n key: \"hasSetValue\",\n get: function get() {\n return this.hasValue();\n }\n }, {\n key: \"inputInfo\",\n get: function get() {\n var info = _get(_getPrototypeOf(CheckBoxComponent.prototype), \"elementInfo\", this).call(this);\n info.type = 'input';\n info.changeEvent = 'click';\n info.attr.type = this.component.inputType || 'checkbox';\n info.attr[\"class\"] = 'form-check-input';\n if (this.component.name) {\n info.attr.name = \"data[\".concat(this.component.name, \"]\");\n }\n info.attr.value = this.component.value ? this.component.value : 0;\n info.label = this.t(this.component.label, {\n _userInput: true\n });\n info.labelClass = this.labelClass;\n return info;\n }\n }, {\n key: \"labelInfo\",\n get: function get() {\n return {\n hidden: true\n };\n }\n }, {\n key: \"render\",\n value: function render() {\n return _get(_getPrototypeOf(CheckBoxComponent.prototype), \"render\", this).call(this, this.renderTemplate('checkbox', {\n input: this.inputInfo,\n checked: this.checked,\n tooltip: this.interpolate(this.t(this.component.tooltip) || '', {\n _userInput: true\n }).replace(/(?:\\r\\n|\\r|\\n)/g, '
')\n }));\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n var _this = this;\n this.loadRefs(element, {\n input: 'multiple'\n });\n this.input = this.refs.input[0];\n if (this.refs.input) {\n this.addEventListener(this.input, this.inputInfo.changeEvent, function () {\n return _this.updateValue(null, {\n modified: true\n });\n });\n this.addShortcut(this.input);\n }\n return _get(_getPrototypeOf(CheckBoxComponent.prototype), \"attach\", this).call(this, element);\n }\n }, {\n key: \"detach\",\n value: function detach(element) {\n if (element && this.input) {\n this.removeShortcut(this.input);\n }\n _get(_getPrototypeOf(CheckBoxComponent.prototype), \"detach\", this).call(this);\n }\n }, {\n key: \"emptyValue\",\n get: function get() {\n return this.component.inputType === 'radio' ? null : false;\n }\n }, {\n key: \"isEmpty\",\n value: function isEmpty() {\n var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.dataValue;\n return _get(_getPrototypeOf(CheckBoxComponent.prototype), \"isEmpty\", this).call(this, value) || value === false;\n }\n }, {\n key: \"key\",\n get: function get() {\n return this.component.name ? this.component.name : _get(_getPrototypeOf(CheckBoxComponent.prototype), \"key\", this);\n }\n }, {\n key: \"getValueAt\",\n value: function getValueAt(index) {\n if (this.component.name) {\n return this.refs.input[index].checked ? this.component.value : '';\n }\n return !!this.refs.input[index].checked;\n }\n }, {\n key: \"getValue\",\n value: function getValue() {\n var value = _get(_getPrototypeOf(CheckBoxComponent.prototype), \"getValue\", this).call(this);\n if (this.component.name) {\n return value ? this.setCheckedState(value) : this.setCheckedState(this.dataValue);\n } else {\n return value === '' ? this.dataValue : !!value;\n }\n }\n }, {\n key: \"checked\",\n get: function get() {\n if (this.component.name) {\n return this.dataValue === this.component.value;\n }\n return !!this.dataValue;\n }\n }, {\n key: \"setCheckedState\",\n value: function setCheckedState(value) {\n if (!this.input) {\n return;\n }\n if (this.component.name) {\n this.input.value = value === this.component.value ? this.component.value : 0;\n this.input.checked = value === this.component.value ? 1 : 0;\n } else if (value === 'on') {\n this.input.value = 1;\n this.input.checked = 1;\n } else if (value === 'off') {\n this.input.value = 0;\n this.input.checked = 0;\n } else if (value) {\n this.input.value = 1;\n this.input.checked = 1;\n } else {\n this.input.value = 0;\n this.input.checked = 0;\n }\n if (this.input.checked) {\n this.input.setAttribute('checked', true);\n } else {\n this.input.removeAttribute('checked');\n }\n return value;\n }\n }, {\n key: \"setValue\",\n value: function setValue(value) {\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n if (this.setCheckedState(value) !== undefined || !this.input && value !== undefined && (this.visible || this.conditionallyVisible() || !this.component.clearOnHide)) {\n var changed = this.updateValue(value, flags);\n if (this.isHtmlRenderMode() && flags && flags.fromSubmission && changed) {\n this.redraw();\n }\n return changed;\n }\n return false;\n }\n }, {\n key: \"getValueAsString\",\n value: function getValueAsString(value) {\n var _this$component = this.component,\n componentName = _this$component.name,\n componentValue = _this$component.value;\n var hasValue = componentName ? _lodash[\"default\"].isEqual(value, componentValue) : value;\n return this.t(hasValue ? 'Yes' : 'No');\n }\n }, {\n key: \"updateValue\",\n value: function updateValue(value, flags) {\n // If this is a radio and is alredy checked, uncheck it.\n if (this.component.name && flags.modified && this.dataValue === this.component.value) {\n this.input.checked = 0;\n this.input.value = 0;\n this.dataValue = '';\n this.updateOnChange(flags, true);\n }\n var changed = _get(_getPrototypeOf(CheckBoxComponent.prototype), \"updateValue\", this).call(this, value, flags);\n\n // Update attributes of the input element\n if (changed && this.input) {\n if (this.input.checked) {\n this.input.setAttribute('checked', 'true');\n } else {\n this.input.removeAttribute('checked');\n }\n }\n return changed;\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _Field2[\"default\"].schema.apply(_Field2[\"default\"], [{\n type: 'checkbox',\n inputType: 'checkbox',\n label: 'Checkbox',\n key: 'checkbox',\n dataGridLabel: true,\n labelPosition: 'right',\n value: '',\n name: ''\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Checkbox',\n group: 'basic',\n icon: 'check-square',\n documentation: '/userguide/form-building/form-components#check-box',\n weight: 50,\n schema: CheckBoxComponent.schema()\n };\n }\n }]);\n return CheckBoxComponent;\n}(_Field2[\"default\"]);\nexports[\"default\"] = CheckBoxComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/checkbox/Checkbox.js?"); /***/ }), @@ -562,10 +595,10 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /*!****************************************************************!*\ !*** ./lib/components/checkbox/editForm/Checkbox.edit.data.js ***! \****************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'multiple',\n ignore: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/checkbox/editForm/Checkbox.edit.data.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'multiple',\n ignore: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/checkbox/editForm/Checkbox.edit.data.js?"); /***/ }), @@ -576,7 +609,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _builder = _interopRequireDefault(__webpack_require__(/*! ../../../utils/builder */ \"./lib/utils/builder.js\"));\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = [{\n key: 'labelPosition',\n ignore: true\n}, {\n key: 'placeholder',\n ignore: true\n}, {\n type: 'select',\n input: true,\n weight: 350,\n label: 'Shortcut',\n key: 'shortcut',\n tooltip: 'Shortcut for this component.',\n dataSrc: 'custom',\n valueProperty: 'value',\n customDefaultValue: function customDefaultValue() {\n return '';\n },\n template: '{{ item.label }}',\n data: {\n custom: function custom(context) {\n return _builder.default.getAvailableShortcuts(_lodash.default.get(context, 'instance.options.editForm', {}), _lodash.default.get(context, 'instance.options.editComponent', {}));\n }\n }\n}, {\n type: 'select',\n input: true,\n key: 'inputType',\n label: 'Input Type',\n tooltip: 'This is the input type used for this checkbox.',\n dataSrc: 'values',\n weight: 410,\n data: {\n values: [{\n label: 'Checkbox',\n value: 'checkbox'\n }, {\n label: 'Radio',\n value: 'radio'\n }]\n }\n}, {\n type: 'textfield',\n input: true,\n key: 'name',\n label: 'Radio Key',\n tooltip: 'The key used to trigger the radio button toggle.',\n weight: 420,\n conditional: {\n json: {\n '===': [{\n var: 'data.inputType'\n }, 'radio']\n }\n }\n}, {\n type: 'textfield',\n input: true,\n label: 'Radio Value',\n key: 'value',\n tooltip: 'The value used with this radio button.',\n weight: 430,\n conditional: {\n json: {\n '===': [{\n var: 'data.inputType'\n }, 'radio']\n }\n }\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/checkbox/editForm/Checkbox.edit.display.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _builder = _interopRequireDefault(__webpack_require__(/*! ../../../utils/builder */ \"./lib/utils/builder.js\"));\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = [{\n key: 'labelPosition',\n ignore: true\n}, {\n key: 'placeholder',\n ignore: true\n}, {\n type: 'select',\n input: true,\n weight: 350,\n label: 'Shortcut',\n key: 'shortcut',\n tooltip: 'Shortcut for this component.',\n dataSrc: 'custom',\n valueProperty: 'value',\n customDefaultValue: function customDefaultValue() {\n return '';\n },\n template: '{{ item.label }}',\n data: {\n custom: function custom(context) {\n return _builder[\"default\"].getAvailableShortcuts(_lodash[\"default\"].get(context, 'instance.options.editForm', {}), _lodash[\"default\"].get(context, 'instance.options.editComponent', {}));\n }\n }\n}, {\n type: 'select',\n input: true,\n key: 'inputType',\n label: 'Input Type',\n tooltip: 'This is the input type used for this checkbox.',\n dataSrc: 'values',\n weight: 410,\n data: {\n values: [{\n label: 'Checkbox',\n value: 'checkbox'\n }, {\n label: 'Radio',\n value: 'radio'\n }]\n }\n}, {\n type: 'textfield',\n input: true,\n key: 'name',\n label: 'Radio Key',\n tooltip: 'The key used to trigger the radio button toggle.',\n weight: 420,\n conditional: {\n json: {\n '===': [{\n \"var\": 'data.inputType'\n }, 'radio']\n }\n }\n}, {\n type: 'textfield',\n input: true,\n label: 'Radio Value',\n key: 'value',\n tooltip: 'The value used with this radio button.',\n weight: 430,\n conditional: {\n json: {\n '===': [{\n \"var\": 'data.inputType'\n }, 'radio']\n }\n }\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/checkbox/editForm/Checkbox.edit.display.js?"); /***/ }), @@ -584,10 +617,10 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /*!**********************************************************************!*\ !*** ./lib/components/checkbox/editForm/Checkbox.edit.validation.js ***! \**********************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'validateOn',\n ignore: true\n}, {\n key: 'unique',\n ignore: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/checkbox/editForm/Checkbox.edit.validation.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'validateOn',\n ignore: true\n}, {\n key: 'unique',\n ignore: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/checkbox/editForm/Checkbox.edit.validation.js?"); /***/ }), @@ -598,7 +631,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\nvar _NestedComponent = _interopRequireDefault(__webpack_require__(/*! ../_classes/nested/NestedComponent.form */ \"./lib/components/_classes/nested/NestedComponent.form.js\"));\n\nvar _ColumnsEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/Columns.edit.display */ \"./lib/components/columns/editForm/Columns.edit.display.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _NestedComponent.default.apply(void 0, [[{\n key: 'display',\n components: _ColumnsEdit.default\n }, {\n key: 'addons',\n ignore: true\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/columns/Columns.form.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\nvar _NestedComponent = _interopRequireDefault(__webpack_require__(/*! ../_classes/nested/NestedComponent.form */ \"./lib/components/_classes/nested/NestedComponent.form.js\"));\nvar _ColumnsEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/Columns.edit.display */ \"./lib/components/columns/editForm/Columns.edit.display.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _NestedComponent[\"default\"].apply(void 0, [[{\n key: 'display',\n components: _ColumnsEdit[\"default\"]\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/columns/Columns.form.js?"); /***/ }), @@ -609,7 +642,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.from.js */ \"./node_modules/core-js/modules/es.array.from.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.slice.js */ \"./node_modules/core-js/modules/es.array.slice.js\");\n\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nvar _NestedComponent2 = _interopRequireDefault(__webpack_require__(/*! ../_classes/nested/NestedComponent */ \"./lib/components/_classes/nested/NestedComponent.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar ColumnsComponent = /*#__PURE__*/function (_NestedComponent) {\n _inherits(ColumnsComponent, _NestedComponent);\n\n var _super = _createSuper(ColumnsComponent);\n\n function ColumnsComponent(component, options, data) {\n var _this;\n\n _classCallCheck(this, ColumnsComponent);\n\n _this = _super.call(this, component, options, data);\n _this.rows = [];\n return _this;\n }\n\n _createClass(ColumnsComponent, [{\n key: \"schema\",\n get: function get() {\n var _schema$columns,\n _this2 = this;\n\n var schema = _lodash.default.omit(_get(_getPrototypeOf(ColumnsComponent.prototype), \"schema\", this), ['components']);\n\n (_schema$columns = schema.columns) === null || _schema$columns === void 0 ? void 0 : _schema$columns.map(function (column, colIndex) {\n column.components.map(function (comp, compIndex) {\n var clonedComp = _lodash.default.clone(comp);\n\n clonedComp.internal = true;\n\n var component = _this2.createComponent(clonedComp);\n\n delete component.component.internal;\n schema.columns[colIndex].components[compIndex] = component.schema;\n });\n });\n return schema;\n }\n }, {\n key: \"defaultSchema\",\n get: function get() {\n return ColumnsComponent.schema();\n }\n }, {\n key: \"className\",\n get: function get() {\n return \"row \".concat(_get(_getPrototypeOf(ColumnsComponent.prototype), \"className\", this));\n }\n }, {\n key: \"columnKey\",\n get: function get() {\n return \"column-\".concat(this.id);\n }\n }, {\n key: \"init\",\n value: function init() {\n var _this3 = this;\n\n _get(_getPrototypeOf(ColumnsComponent.prototype), \"init\", this).call(this);\n\n this.columns = [];\n\n _lodash.default.each(this.component.columns, function (column, index) {\n _this3.columns[index] = [];\n\n if (!column.size) {\n column.size = 'md';\n }\n\n column.currentWidth = column.width || 0; // Ensure there is a components array.\n\n if (!Array.isArray(column.components)) {\n column.components = [];\n }\n\n _lodash.default.each(column.components, function (comp) {\n var component = _this3.createComponent(comp);\n\n component.column = index;\n\n _this3.columns[index].push(component);\n });\n });\n\n if (this.component.autoAdjust && this.options.display !== 'pdf') {\n this.justify();\n }\n\n this.rows = this.groupByRow();\n }\n }, {\n key: \"labelIsHidden\",\n value: function labelIsHidden() {\n return true;\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this4 = this;\n\n return _get(_getPrototypeOf(ColumnsComponent.prototype), \"render\", this).call(this, this.renderTemplate('columns', {\n columnKey: this.columnKey,\n columnComponents: this.columns.map(function (column) {\n return _this4.renderComponents(column);\n })\n }));\n }\n }, {\n key: \"justifyColumn\",\n value: function justifyColumn(items, index) {\n var toAdjust = _lodash.default.every(items, function (item) {\n return !item.visible;\n });\n\n var column = this.component.columns[index];\n var width = toAdjust && items.length ? 0 : column.width;\n var shouldRedraw = !_lodash.default.isEqual(width, column.currentWidth);\n column.currentWidth = width;\n return shouldRedraw;\n }\n }, {\n key: \"justify\",\n value: function justify() {\n var _this5 = this;\n\n return this.columns.reduce(function (redraw, items, index) {\n return _this5.justifyColumn(items, index) || redraw;\n }, false);\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n var _this6 = this;\n\n this.loadRefs(element, _defineProperty({}, this.columnKey, 'multiple'));\n\n var superAttach = _get(_getPrototypeOf(ColumnsComponent.prototype), \"attach\", this).call(this, element);\n\n if (this.refs[this.columnKey]) {\n this.refs[this.columnKey].forEach(function (column, index) {\n return _this6.attachComponents(column, _this6.columns[index], _this6.component.columns[index].components);\n });\n }\n\n return superAttach;\n }\n }, {\n key: \"gridSize\",\n get: function get() {\n return 12;\n }\n /**\n * Group columns in rows.\n * @return {Array.}\n */\n\n }, {\n key: \"groupByRow\",\n value: function groupByRow() {\n var _this7 = this;\n\n var initVal = {\n stack: [],\n rows: []\n };\n\n var width = function width(x) {\n return x.component.width;\n };\n\n var result = _lodash.default.reduce(this.components, function (acc, next) {\n var stack = [].concat(_toConsumableArray(acc.stack), [next]);\n\n if (_lodash.default.sumBy(stack, width) <= _this7.gridSize) {\n acc.stack = stack;\n return acc;\n } else {\n acc.rows = [].concat(_toConsumableArray(acc.rows), [acc.stack]);\n acc.stack = [next];\n return acc;\n }\n }, initVal);\n\n return _lodash.default.concat(result.rows, [result.stack]);\n }\n }, {\n key: \"checkData\",\n value: function checkData(data, flags, row, components) {\n var isValid = _get(_getPrototypeOf(ColumnsComponent.prototype), \"checkData\", this).call(this, data, flags, row, components);\n\n if (this.component.autoAdjust && this.options.display !== 'pdf') {\n var redraw = this.justify();\n\n if (redraw) {\n this.redraw();\n }\n }\n\n return isValid;\n }\n }, {\n key: \"detach\",\n value: function detach(all) {\n _get(_getPrototypeOf(ColumnsComponent.prototype), \"detach\", this).call(this, all);\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n _get(_getPrototypeOf(ColumnsComponent.prototype), \"destroy\", this).call(this);\n\n this.columns = [];\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _NestedComponent2.default.schema.apply(_NestedComponent2.default, [{\n label: 'Columns',\n key: 'columns',\n type: 'columns',\n columns: [{\n components: [],\n width: 6,\n offset: 0,\n push: 0,\n pull: 0,\n size: 'md'\n }, {\n components: [],\n width: 6,\n offset: 0,\n push: 0,\n pull: 0,\n size: 'md'\n }],\n clearOnHide: false,\n input: false,\n tableView: false,\n persistent: false,\n autoAdjust: false\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Columns',\n icon: 'columns',\n group: 'layout',\n documentation: '/userguide/forms/layout-components#columns',\n weight: 10,\n schema: ColumnsComponent.schema()\n };\n }\n }]);\n\n return ColumnsComponent;\n}(_NestedComponent2.default);\n\nexports[\"default\"] = ColumnsComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/columns/Columns.js?"); +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.from.js */ \"./node_modules/core-js/modules/es.array.from.js\");\n__webpack_require__(/*! core-js/modules/es.array.slice.js */ \"./node_modules/core-js/modules/es.array.slice.js\");\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n__webpack_require__(/*! core-js/modules/es.array.is-array.js */ \"./node_modules/core-js/modules/es.array.is-array.js\");\n__webpack_require__(/*! core-js/modules/es.array.every.js */ \"./node_modules/core-js/modules/es.array.every.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.array.reduce.js */ \"./node_modules/core-js/modules/es.array.reduce.js\");\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nvar _NestedComponent2 = _interopRequireDefault(__webpack_require__(/*! ../_classes/nested/NestedComponent */ \"./lib/components/_classes/nested/NestedComponent.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar ColumnsComponent = /*#__PURE__*/function (_NestedComponent) {\n _inherits(ColumnsComponent, _NestedComponent);\n var _super = _createSuper(ColumnsComponent);\n function ColumnsComponent(component, options, data) {\n var _this;\n _classCallCheck(this, ColumnsComponent);\n _this = _super.call(this, component, options, data);\n _this.rows = [];\n return _this;\n }\n _createClass(ColumnsComponent, [{\n key: \"schema\",\n get: function get() {\n var _schema$columns,\n _this2 = this;\n var schema = _lodash[\"default\"].omit(_get(_getPrototypeOf(ColumnsComponent.prototype), \"schema\", this), ['components']);\n (_schema$columns = schema.columns) === null || _schema$columns === void 0 ? void 0 : _schema$columns.map(function (column, colIndex) {\n column.components.map(function (comp, compIndex) {\n var clonedComp = _lodash[\"default\"].clone(comp);\n clonedComp.internal = true;\n var component = _this2.createComponent(clonedComp);\n delete component.component.internal;\n schema.columns[colIndex].components[compIndex] = component.schema;\n });\n });\n return schema;\n }\n }, {\n key: \"defaultSchema\",\n get: function get() {\n return ColumnsComponent.schema();\n }\n }, {\n key: \"className\",\n get: function get() {\n return \"row \".concat(_get(_getPrototypeOf(ColumnsComponent.prototype), \"className\", this));\n }\n }, {\n key: \"columnKey\",\n get: function get() {\n return \"column-\".concat(this.id);\n }\n }, {\n key: \"init\",\n value: function init() {\n var _this3 = this;\n _get(_getPrototypeOf(ColumnsComponent.prototype), \"init\", this).call(this);\n this.columns = [];\n _lodash[\"default\"].each(this.component.columns, function (column, index) {\n _this3.columns[index] = [];\n if (!column.size) {\n column.size = 'md';\n }\n column.currentWidth = column.width || 0;\n // Ensure there is a components array.\n if (!Array.isArray(column.components)) {\n column.components = [];\n }\n _lodash[\"default\"].each(column.components, function (comp) {\n var component = _this3.createComponent(comp);\n component.column = index;\n _this3.columns[index].push(component);\n });\n });\n if (this.component.autoAdjust && this.options.display !== 'pdf') {\n this.justify();\n }\n this.rows = this.groupByRow();\n }\n }, {\n key: \"labelIsHidden\",\n value: function labelIsHidden() {\n return true;\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this4 = this;\n return _get(_getPrototypeOf(ColumnsComponent.prototype), \"render\", this).call(this, this.renderTemplate('columns', {\n columnKey: this.columnKey,\n columnComponents: this.columns.map(function (column) {\n return _this4.renderComponents(column);\n })\n }));\n }\n }, {\n key: \"justifyColumn\",\n value: function justifyColumn(items, index) {\n var toAdjust = _lodash[\"default\"].every(items, function (item) {\n return !item.visible;\n });\n var column = this.component.columns[index];\n var width = toAdjust && items.length ? 0 : column.width;\n var shouldRedraw = !_lodash[\"default\"].isEqual(width, column.currentWidth);\n column.currentWidth = width;\n return shouldRedraw;\n }\n }, {\n key: \"justify\",\n value: function justify() {\n var _this5 = this;\n return this.columns.reduce(function (redraw, items, index) {\n return _this5.justifyColumn(items, index) || redraw;\n }, false);\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n var _this6 = this;\n this.loadRefs(element, _defineProperty({}, this.columnKey, 'multiple'));\n var superAttach = _get(_getPrototypeOf(ColumnsComponent.prototype), \"attach\", this).call(this, element);\n if (this.refs[this.columnKey]) {\n this.refs[this.columnKey].forEach(function (column, index) {\n return _this6.attachComponents(column, _this6.columns[index], _this6.component.columns[index].components);\n });\n }\n return superAttach;\n }\n }, {\n key: \"gridSize\",\n get: function get() {\n return 12;\n }\n\n /**\n * Group columns in rows.\n * @return {Array.}\n */\n }, {\n key: \"groupByRow\",\n value: function groupByRow() {\n var _this7 = this;\n var initVal = {\n stack: [],\n rows: []\n };\n var width = function width(x) {\n return x.component.width;\n };\n var result = _lodash[\"default\"].reduce(this.components, function (acc, next) {\n var stack = [].concat(_toConsumableArray(acc.stack), [next]);\n if (_lodash[\"default\"].sumBy(stack, width) <= _this7.gridSize) {\n acc.stack = stack;\n return acc;\n } else {\n acc.rows = [].concat(_toConsumableArray(acc.rows), [acc.stack]);\n acc.stack = [next];\n return acc;\n }\n }, initVal);\n return _lodash[\"default\"].concat(result.rows, [result.stack]);\n }\n }, {\n key: \"checkData\",\n value: function checkData(data, flags, row, components) {\n var isValid = _get(_getPrototypeOf(ColumnsComponent.prototype), \"checkData\", this).call(this, data, flags, row, components);\n if (this.component.autoAdjust && this.options.display !== 'pdf') {\n var redraw = this.justify();\n if (redraw) {\n this.redraw();\n }\n }\n return isValid;\n }\n }, {\n key: \"detach\",\n value: function detach(all) {\n _get(_getPrototypeOf(ColumnsComponent.prototype), \"detach\", this).call(this, all);\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n _get(_getPrototypeOf(ColumnsComponent.prototype), \"destroy\", this).call(this);\n this.columns = [];\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _NestedComponent2[\"default\"].schema.apply(_NestedComponent2[\"default\"], [{\n label: 'Columns',\n key: 'columns',\n type: 'columns',\n columns: [{\n components: [],\n width: 6,\n offset: 0,\n push: 0,\n pull: 0,\n size: 'md'\n }, {\n components: [],\n width: 6,\n offset: 0,\n push: 0,\n pull: 0,\n size: 'md'\n }],\n clearOnHide: false,\n input: false,\n tableView: false,\n persistent: false,\n autoAdjust: false\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Columns',\n icon: 'columns',\n group: 'layout',\n documentation: '/userguide/form-building/layout-components#columns',\n weight: 10,\n schema: ColumnsComponent.schema()\n };\n }\n }]);\n return ColumnsComponent;\n}(_NestedComponent2[\"default\"]);\nexports[\"default\"] = ColumnsComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/columns/Columns.js?"); /***/ }), @@ -617,10 +650,10 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /*!*****************************************************************!*\ !*** ./lib/components/columns/editForm/Columns.edit.display.js ***! \*****************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'labelPosition',\n ignore: true\n}, {\n key: 'placeholder',\n ignore: true\n}, {\n key: 'description',\n ignore: true\n}, {\n key: 'tooltip',\n ignore: true\n}, {\n key: 'autofocus',\n ignore: true\n}, {\n key: 'tabindex',\n ignore: true\n}, {\n key: 'disabled',\n ignore: true\n}, {\n key: 'tableView',\n ignore: true\n}, {\n weight: 150,\n type: 'datagrid',\n input: true,\n key: 'columns',\n label: 'Column Properties',\n addAnother: 'Add Column',\n tooltip: 'The width, offset, push, and pull settings for each column.',\n reorder: true,\n components: [{\n type: 'hidden',\n key: 'components',\n defaultValue: []\n }, {\n type: 'select',\n key: 'size',\n defaultValue: 'md',\n label: 'Size',\n data: {\n values: [{\n label: 'xs',\n value: 'xs'\n }, {\n label: 'sm',\n value: 'sm'\n }, {\n label: 'md',\n value: 'md'\n }, {\n label: 'lg',\n value: 'lg'\n }, {\n label: 'xl',\n value: 'xl'\n }]\n }\n }, {\n type: 'number',\n key: 'width',\n defaultValue: 6,\n label: 'Width'\n }, {\n type: 'number',\n key: 'offset',\n defaultValue: 0,\n label: 'Offset'\n }, {\n type: 'number',\n key: 'push',\n defaultValue: 0,\n label: 'Push'\n }, {\n type: 'number',\n key: 'pull',\n defaultValue: 0,\n label: 'Pull'\n }]\n}, {\n weight: 160,\n type: 'checkbox',\n label: 'Auto adjust columns',\n tooltip: 'Will automatically adjust columns based on if nested components are hidden.',\n key: 'autoAdjust',\n input: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/columns/editForm/Columns.edit.display.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'labelPosition',\n ignore: true\n}, {\n key: 'placeholder',\n ignore: true\n}, {\n key: 'description',\n ignore: true\n}, {\n key: 'tooltip',\n ignore: true\n}, {\n key: 'autofocus',\n ignore: true\n}, {\n key: 'tabindex',\n ignore: true\n}, {\n key: 'disabled',\n ignore: true\n}, {\n key: 'tableView',\n ignore: true\n}, {\n weight: 150,\n type: 'datagrid',\n input: true,\n key: 'columns',\n label: 'Column Properties',\n addAnother: 'Add Column',\n tooltip: 'The width, offset, push, and pull settings for each column.',\n reorder: true,\n components: [{\n type: 'hidden',\n key: 'components',\n defaultValue: []\n }, {\n type: 'select',\n key: 'size',\n defaultValue: 'md',\n label: 'Size',\n data: {\n values: [{\n label: 'xs',\n value: 'xs'\n }, {\n label: 'sm',\n value: 'sm'\n }, {\n label: 'md',\n value: 'md'\n }, {\n label: 'lg',\n value: 'lg'\n }, {\n label: 'xl',\n value: 'xl'\n }]\n }\n }, {\n type: 'number',\n key: 'width',\n defaultValue: 6,\n label: 'Width'\n }, {\n type: 'number',\n key: 'offset',\n defaultValue: 0,\n label: 'Offset'\n }, {\n type: 'number',\n key: 'push',\n defaultValue: 0,\n label: 'Push'\n }, {\n type: 'number',\n key: 'pull',\n defaultValue: 0,\n label: 'Pull'\n }]\n}, {\n weight: 160,\n type: 'checkbox',\n label: 'Auto adjust columns',\n tooltip: 'Will automatically adjust columns based on if nested components are hidden.',\n key: 'autoAdjust',\n input: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/columns/editForm/Columns.edit.display.js?"); /***/ }), @@ -631,7 +664,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\nvar _Components = _interopRequireDefault(__webpack_require__(/*! ../Components */ \"./lib/components/Components.js\"));\n\nvar _ContainerEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/Container.edit.display */ \"./lib/components/container/editForm/Container.edit.display.js\"));\n\nvar _ContainerEdit2 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Container.edit.data */ \"./lib/components/container/editForm/Container.edit.data.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _Components.default.baseEditForm.apply(_Components.default, [[{\n key: 'display',\n components: _ContainerEdit.default\n }, {\n key: 'data',\n components: _ContainerEdit2.default\n }, {\n key: 'addons',\n ignore: true\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/container/Container.form.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\nvar _Components = _interopRequireDefault(__webpack_require__(/*! ../Components */ \"./lib/components/Components.js\"));\nvar _ContainerEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/Container.edit.display */ \"./lib/components/container/editForm/Container.edit.display.js\"));\nvar _ContainerEdit2 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Container.edit.data */ \"./lib/components/container/editForm/Container.edit.data.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _Components[\"default\"].baseEditForm.apply(_Components[\"default\"], [[{\n key: 'display',\n components: _ContainerEdit[\"default\"]\n }, {\n key: 'data',\n components: _ContainerEdit2[\"default\"]\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/container/Container.form.js?"); /***/ }), @@ -642,7 +675,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nvar _utils = __webpack_require__(/*! ../../utils/utils */ \"./lib/utils/utils.js\");\n\nvar _Component = _interopRequireDefault(__webpack_require__(/*! ../_classes/component/Component */ \"./lib/components/_classes/component/Component.js\"));\n\nvar _Field = _interopRequireDefault(__webpack_require__(/*! ../_classes/field/Field */ \"./lib/components/_classes/field/Field.js\"));\n\nvar _NestedDataComponent2 = _interopRequireDefault(__webpack_require__(/*! ../_classes/nesteddata/NestedDataComponent */ \"./lib/components/_classes/nesteddata/NestedDataComponent.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar ContainerComponent = /*#__PURE__*/function (_NestedDataComponent) {\n _inherits(ContainerComponent, _NestedDataComponent);\n\n var _super = _createSuper(ContainerComponent);\n\n function ContainerComponent() {\n var _this;\n\n _classCallCheck(this, ContainerComponent);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n _this.type = 'container';\n return _this;\n }\n\n _createClass(ContainerComponent, [{\n key: \"addComponents\",\n value: function addComponents(data, options) {\n return _get(_getPrototypeOf(ContainerComponent.prototype), \"addComponents\", this).call(this, this.dataValue, options);\n }\n }, {\n key: \"defaultSchema\",\n get: function get() {\n return ContainerComponent.schema();\n }\n }, {\n key: \"emptyValue\",\n get: function get() {\n return {};\n }\n }, {\n key: \"templateName\",\n get: function get() {\n return 'container';\n }\n }, {\n key: \"componentContext\",\n value: function componentContext() {\n return this.dataValue;\n }\n }, {\n key: \"checkData\",\n value: function checkData(data, flags, row, components) {\n var _this2 = this;\n\n data = data || this.rootValue;\n flags = flags || {};\n row = row || this.data;\n components = components && _lodash.default.isArray(components) ? components : this.getComponents();\n return components.reduce(function (valid, comp) {\n return comp.checkData(data, flags, _this2.dataValue) && valid;\n }, _Component.default.prototype.checkData.call(this, data, flags, row));\n }\n }, {\n key: \"focus\",\n value: function focus() {\n var focusableElements = (0, _utils.getFocusableElements)(this.element);\n\n if (focusableElements && focusableElements[0]) {\n focusableElements[0].focus();\n }\n }\n }, {\n key: \"checkConditions\",\n value: function checkConditions(data, flags, row) {\n var _this3 = this;\n\n // check conditions of parent component first, because it may influence on visibility of it's children\n var check = _Field.default.prototype.checkConditions.call(this, data, flags, row);\n\n this.getComponents().forEach(function (comp) {\n return comp.checkConditions(data, flags, _this3.dataValue);\n });\n return check;\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len2 = arguments.length, extend = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n extend[_key2] = arguments[_key2];\n }\n\n return _NestedDataComponent2.default.schema.apply(_NestedDataComponent2.default, [{\n label: 'Container',\n type: 'container',\n key: 'container',\n clearOnHide: true,\n input: true,\n tree: true,\n hideLabel: true,\n components: []\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Container',\n icon: 'folder-open',\n group: 'data',\n documentation: '/userguide/forms/data-components#container',\n weight: 10,\n schema: ContainerComponent.schema()\n };\n }\n }]);\n\n return ContainerComponent;\n}(_NestedDataComponent2.default);\n\nexports[\"default\"] = ContainerComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/container/Container.js?"); +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.array.reduce.js */ \"./node_modules/core-js/modules/es.array.reduce.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nvar _utils = __webpack_require__(/*! ../../utils/utils */ \"./lib/utils/utils.js\");\nvar _Component = _interopRequireDefault(__webpack_require__(/*! ../_classes/component/Component */ \"./lib/components/_classes/component/Component.js\"));\nvar _Field = _interopRequireDefault(__webpack_require__(/*! ../_classes/field/Field */ \"./lib/components/_classes/field/Field.js\"));\nvar _NestedDataComponent2 = _interopRequireDefault(__webpack_require__(/*! ../_classes/nesteddata/NestedDataComponent */ \"./lib/components/_classes/nesteddata/NestedDataComponent.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar ContainerComponent = /*#__PURE__*/function (_NestedDataComponent) {\n _inherits(ContainerComponent, _NestedDataComponent);\n var _super = _createSuper(ContainerComponent);\n function ContainerComponent() {\n var _this;\n _classCallCheck(this, ContainerComponent);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _this.type = 'container';\n return _this;\n }\n _createClass(ContainerComponent, [{\n key: \"addComponents\",\n value: function addComponents(data, options) {\n return _get(_getPrototypeOf(ContainerComponent.prototype), \"addComponents\", this).call(this, this.dataValue, options);\n }\n }, {\n key: \"defaultSchema\",\n get: function get() {\n return ContainerComponent.schema();\n }\n }, {\n key: \"emptyValue\",\n get: function get() {\n return {};\n }\n }, {\n key: \"templateName\",\n get: function get() {\n return 'container';\n }\n }, {\n key: \"componentContext\",\n value: function componentContext() {\n return this.dataValue;\n }\n }, {\n key: \"checkData\",\n value: function checkData(data, flags, row, components) {\n var _this2 = this;\n data = data || this.rootValue;\n flags = flags || {};\n row = row || this.data;\n components = components && _lodash[\"default\"].isArray(components) ? components : this.getComponents();\n return components.reduce(function (valid, comp) {\n return comp.checkData(data, flags, _this2.dataValue) && valid;\n }, _Component[\"default\"].prototype.checkData.call(this, data, flags, row));\n }\n }, {\n key: \"checkChildComponentsValidity\",\n value: function checkChildComponentsValidity(data, dirty, row, silentCheck, isParentValid) {\n return _get(_getPrototypeOf(ContainerComponent.prototype), \"checkChildComponentsValidity\", this).call(this, data, dirty, this.dataValue, silentCheck, isParentValid);\n }\n }, {\n key: \"focus\",\n value: function focus() {\n var focusableElements = (0, _utils.getFocusableElements)(this.element);\n if (focusableElements && focusableElements[0]) {\n focusableElements[0].focus();\n }\n }\n }, {\n key: \"checkConditions\",\n value: function checkConditions(data, flags, row) {\n var _this3 = this;\n // check conditions of parent component first, because it may influence on visibility of it's children\n var check = _Field[\"default\"].prototype.checkConditions.call(this, data, flags, row);\n this.getComponents().forEach(function (comp) {\n return comp.checkConditions(data, flags, _this3.dataValue);\n });\n return check;\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len2 = arguments.length, extend = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n extend[_key2] = arguments[_key2];\n }\n return _NestedDataComponent2[\"default\"].schema.apply(_NestedDataComponent2[\"default\"], [{\n label: 'Container',\n type: 'container',\n key: 'container',\n clearOnHide: true,\n input: true,\n tree: true,\n hideLabel: true,\n components: []\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Container',\n icon: 'folder-open',\n group: 'data',\n documentation: '/userguide/form-building/data-components#container',\n weight: 10,\n schema: ContainerComponent.schema()\n };\n }\n }]);\n return ContainerComponent;\n}(_NestedDataComponent2[\"default\"]);\nexports[\"default\"] = ContainerComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/container/Container.js?"); /***/ }), @@ -650,10 +683,10 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /*!******************************************************************!*\ !*** ./lib/components/container/editForm/Container.edit.data.js ***! \******************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'multiple',\n ignore: true\n}, {\n key: 'allowCalculateOverride',\n ignore: true\n}, {\n key: 'defaultValue',\n ignore: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/container/editForm/Container.edit.data.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'multiple',\n ignore: true\n}, {\n key: 'allowCalculateOverride',\n ignore: true\n}, {\n key: 'defaultValue',\n ignore: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/container/editForm/Container.edit.data.js?"); /***/ }), @@ -661,10 +694,10 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /*!*********************************************************************!*\ !*** ./lib/components/container/editForm/Container.edit.display.js ***! \*********************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'placeholder',\n ignore: true\n}, {\n key: 'description',\n ignore: true\n}, {\n key: 'autofocus',\n ignore: true\n}, {\n key: 'tabindex',\n ignore: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/container/editForm/Container.edit.display.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'placeholder',\n ignore: true\n}, {\n key: 'description',\n ignore: true\n}, {\n key: 'autofocus',\n ignore: true\n}, {\n key: 'tabindex',\n ignore: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/container/editForm/Container.edit.display.js?"); /***/ }), @@ -675,7 +708,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\nvar _Components = _interopRequireDefault(__webpack_require__(/*! ../Components */ \"./lib/components/Components.js\"));\n\nvar _ContentEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/Content.edit.display */ \"./lib/components/content/editForm/Content.edit.display.js\"));\n\nvar _ContentEdit2 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Content.edit.logic */ \"./lib/components/content/editForm/Content.edit.logic.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n var editForm = _Components.default.baseEditForm.apply(_Components.default, [[{\n key: 'display',\n components: _ContentEdit.default\n }, {\n key: 'data',\n ignore: true\n }, {\n key: 'validation',\n ignore: true\n }, {\n key: 'logic',\n components: _ContentEdit2.default\n }, {\n key: 'addons',\n ignore: true\n }]].concat(extend)); // Add content as full width above the settings.\n\n\n editForm.components = [{\n weight: 0,\n type: 'textarea',\n editor: 'ckeditor',\n label: 'Content',\n hideLabel: true,\n input: true,\n key: 'html',\n as: 'html',\n rows: 3,\n tooltip: 'The HTML template for the result data items.'\n }].concat(editForm.components);\n return editForm;\n}\n\n//# sourceURL=webpack://Formio/./lib/components/content/Content.form.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\nvar _Components = _interopRequireDefault(__webpack_require__(/*! ../Components */ \"./lib/components/Components.js\"));\nvar _ContentEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/Content.edit.display */ \"./lib/components/content/editForm/Content.edit.display.js\"));\nvar _ContentEdit2 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Content.edit.logic */ \"./lib/components/content/editForm/Content.edit.logic.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n var editForm = _Components[\"default\"].baseEditForm.apply(_Components[\"default\"], [[{\n key: 'display',\n components: _ContentEdit[\"default\"]\n }, {\n key: 'data',\n ignore: true\n }, {\n key: 'validation',\n ignore: true\n }, {\n key: 'logic',\n components: _ContentEdit2[\"default\"]\n }]].concat(extend));\n // Add content as full width above the settings.\n editForm.components = [{\n weight: 0,\n type: 'textarea',\n editor: 'ckeditor',\n label: 'Content',\n hideLabel: true,\n input: true,\n key: 'html',\n as: 'html',\n rows: 3,\n tooltip: 'The HTML template for the result data items.'\n }].concat(editForm.components);\n return editForm;\n}\n\n//# sourceURL=webpack://Formio/./lib/components/content/Content.form.js?"); /***/ }), @@ -686,7 +719,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\nvar _Component2 = _interopRequireDefault(__webpack_require__(/*! ../_classes/component/Component */ \"./lib/components/_classes/component/Component.js\"));\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar ContentComponent = /*#__PURE__*/function (_Component) {\n _inherits(ContentComponent, _Component);\n\n var _super = _createSuper(ContentComponent);\n\n function ContentComponent() {\n _classCallCheck(this, ContentComponent);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(ContentComponent, [{\n key: \"defaultSchema\",\n get: function get() {\n return ContentComponent.schema();\n }\n }, {\n key: \"content\",\n get: function get() {\n if (this.builderMode) {\n return this.component.html || 'Content';\n }\n\n var submission = _lodash.default.get(this.root, 'submission', {});\n\n return this.component.html ? this.interpolate(this.component.html, {\n metadata: submission.metadata || {},\n submission: submission,\n data: this.rootValue,\n row: this.data\n }) : '';\n }\n }, {\n key: \"render\",\n value: function render() {\n return _get(_getPrototypeOf(ContentComponent.prototype), \"render\", this).call(this, this.renderTemplate('html', {\n tag: 'div',\n attrs: [],\n content: this.content\n }));\n }\n }, {\n key: \"dataReady\",\n get: function get() {\n var _this$root;\n\n return ((_this$root = this.root) === null || _this$root === void 0 ? void 0 : _this$root.submissionReady) || _nativePromiseOnly.default.resolve();\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n var _this = this;\n\n this.loadRefs(element, {\n html: 'single'\n });\n this.dataReady.then(function () {\n if (_this.refs.html) {\n _this.setContent(_this.refs.html, _this.content);\n }\n });\n\n if (this.component.refreshOnChange) {\n this.on('change', function () {\n if (_this.refs.html) {\n _this.setContent(_this.refs.html, _this.content);\n }\n }, true);\n }\n\n return _get(_getPrototypeOf(ContentComponent.prototype), \"attach\", this).call(this, element);\n }\n }, {\n key: \"emptyValue\",\n get: function get() {\n return '';\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _Component2.default.schema.apply(_Component2.default, [{\n label: 'Content',\n type: 'content',\n key: 'content',\n input: false,\n html: ''\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Content',\n group: 'layout',\n icon: 'html5',\n preview: false,\n documentation: '/userguide/forms/layout-components#content',\n weight: 5,\n schema: ContentComponent.schema()\n };\n }\n }]);\n\n return ContentComponent;\n}(_Component2.default);\n\nexports[\"default\"] = ContentComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/content/Content.js?"); +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _Component2 = _interopRequireDefault(__webpack_require__(/*! ../_classes/component/Component */ \"./lib/components/_classes/component/Component.js\"));\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar ContentComponent = /*#__PURE__*/function (_Component) {\n _inherits(ContentComponent, _Component);\n var _super = _createSuper(ContentComponent);\n function ContentComponent() {\n _classCallCheck(this, ContentComponent);\n return _super.apply(this, arguments);\n }\n _createClass(ContentComponent, [{\n key: \"defaultSchema\",\n get: function get() {\n return ContentComponent.schema();\n }\n }, {\n key: \"content\",\n get: function get() {\n if (this.builderMode) {\n return this.component.html || 'Content';\n }\n var submission = _lodash[\"default\"].get(this.root, 'submission', {});\n return this.component.html ? this.interpolate(this.component.html, {\n metadata: submission.metadata || {},\n submission: submission,\n data: this.rootValue,\n row: this.data\n }) : '';\n }\n }, {\n key: \"render\",\n value: function render() {\n return _get(_getPrototypeOf(ContentComponent.prototype), \"render\", this).call(this, this.renderTemplate('html', {\n tag: 'div',\n attrs: [],\n content: this.content\n }));\n }\n }, {\n key: \"dataReady\",\n get: function get() {\n var _this$root;\n return ((_this$root = this.root) === null || _this$root === void 0 ? void 0 : _this$root.submissionReady) || _nativePromiseOnly[\"default\"].resolve();\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n var _this = this;\n this.loadRefs(element, {\n html: 'single'\n });\n this.dataReady.then(function () {\n if (_this.refs.html) {\n _this.setContent(_this.refs.html, _this.content);\n }\n });\n if (this.component.refreshOnChange) {\n this.on('change', function () {\n if (_this.refs.html) {\n _this.setContent(_this.refs.html, _this.content);\n }\n }, true);\n }\n return _get(_getPrototypeOf(ContentComponent.prototype), \"attach\", this).call(this, element);\n }\n }, {\n key: \"emptyValue\",\n get: function get() {\n return '';\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _Component2[\"default\"].schema.apply(_Component2[\"default\"], [{\n label: 'Content',\n type: 'content',\n key: 'content',\n input: false,\n html: ''\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Content',\n group: 'layout',\n icon: 'html5',\n preview: false,\n documentation: '/userguide/form-building/layout-components#content',\n weight: 5,\n schema: ContentComponent.schema()\n };\n }\n }]);\n return ContentComponent;\n}(_Component2[\"default\"]);\nexports[\"default\"] = ContentComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/content/Content.js?"); /***/ }), @@ -694,10 +727,10 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /*!*****************************************************************!*\ !*** ./lib/components/content/editForm/Content.edit.display.js ***! \*****************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'labelPosition',\n ignore: true\n}, {\n key: 'placeholder',\n ignore: true\n}, {\n key: 'description',\n ignore: true\n}, {\n key: 'tooltip',\n ignore: true\n}, {\n key: 'hideLabel',\n ignore: true\n}, {\n key: 'autofocus',\n ignore: true\n}, {\n key: 'disabled',\n ignore: true\n}, {\n key: 'tabindex',\n ignore: true\n}, {\n key: 'tableView',\n ignore: true\n}, {\n weight: 700,\n type: 'checkbox',\n label: 'Refresh On Change',\n tooltip: 'Rerender the field whenever a value on the form changes.',\n key: 'refreshOnChange',\n input: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/content/editForm/Content.edit.display.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'labelPosition',\n ignore: true\n}, {\n key: 'placeholder',\n ignore: true\n}, {\n key: 'description',\n ignore: true\n}, {\n key: 'tooltip',\n ignore: true\n}, {\n key: 'hideLabel',\n ignore: true\n}, {\n key: 'autofocus',\n ignore: true\n}, {\n key: 'disabled',\n ignore: true\n}, {\n key: 'tabindex',\n ignore: true\n}, {\n key: 'tableView',\n ignore: true\n}, {\n weight: 700,\n type: 'checkbox',\n label: 'Refresh On Change',\n tooltip: 'Rerender the field whenever a value on the form changes.',\n key: 'refreshOnChange',\n input: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/content/editForm/Content.edit.display.js?"); /***/ }), @@ -705,10 +738,10 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /*!***************************************************************!*\ !*** ./lib/components/content/editForm/Content.edit.logic.js ***! \***************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'logic',\n components: [{\n key: 'actions',\n components: [{\n key: 'actionPanel',\n components: [{\n data: {\n json: [{\n label: 'Hidden',\n value: 'hidden',\n type: 'boolean'\n }, {\n label: 'Required',\n value: 'validate.required',\n type: 'boolean'\n }, {\n label: 'Disabled',\n value: 'disabled',\n type: 'boolean'\n }, {\n label: 'Label',\n value: 'label',\n type: 'string'\n }, {\n label: 'Title',\n value: 'title',\n type: 'string'\n }, {\n label: 'Tooltip',\n value: 'tooltip',\n type: 'string'\n }, {\n label: 'Description',\n value: 'description',\n type: 'string'\n }, {\n label: 'Placeholder',\n value: 'placeholder',\n type: 'string'\n }, {\n label: 'CSS Class',\n value: 'className',\n type: 'string'\n }, {\n label: 'Container Custom Class',\n value: 'customClass',\n type: 'string'\n }, {\n label: 'Content',\n value: 'html',\n type: 'string',\n component: 'content'\n }]\n },\n key: 'property'\n }, {\n type: 'textarea',\n editor: 'ace',\n rows: 10,\n as: 'html',\n label: 'Content',\n tooltip: 'The content of this HTML element.',\n defaultValue: '
Content
',\n key: 'content',\n weight: 30,\n input: true,\n customConditional: function customConditional(context) {\n return context.row.type === 'property' && context.row.hasOwnProperty('property') && context.row.property.type === 'string' && context.row.property.component === 'content';\n }\n }]\n }]\n }]\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/content/editForm/Content.edit.logic.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'logic',\n components: [{\n key: 'actions',\n components: [{\n key: 'actionPanel',\n components: [{\n data: {\n json: [{\n label: 'Hidden',\n value: 'hidden',\n type: 'boolean'\n }, {\n label: 'Required',\n value: 'validate.required',\n type: 'boolean'\n }, {\n label: 'Disabled',\n value: 'disabled',\n type: 'boolean'\n }, {\n label: 'Label',\n value: 'label',\n type: 'string'\n }, {\n label: 'Title',\n value: 'title',\n type: 'string'\n }, {\n label: 'Tooltip',\n value: 'tooltip',\n type: 'string'\n }, {\n label: 'Description',\n value: 'description',\n type: 'string'\n }, {\n label: 'Placeholder',\n value: 'placeholder',\n type: 'string'\n }, {\n label: 'CSS Class',\n value: 'className',\n type: 'string'\n }, {\n label: 'Container Custom Class',\n value: 'customClass',\n type: 'string'\n }, {\n label: 'Content',\n value: 'html',\n type: 'string',\n component: 'content'\n }]\n },\n key: 'property'\n }, {\n type: 'textarea',\n editor: 'ace',\n rows: 10,\n as: 'html',\n label: 'Content',\n tooltip: 'The content of this HTML element.',\n defaultValue: '
Content
',\n key: 'content',\n weight: 30,\n input: true,\n customConditional: function customConditional(context) {\n return context.row.type === 'property' && context.row.hasOwnProperty('property') && context.row.property.type === 'string' && context.row.property.component === 'content';\n }\n }]\n }]\n }]\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/content/editForm/Content.edit.logic.js?"); /***/ }), @@ -719,7 +752,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\nvar _TextField = _interopRequireDefault(__webpack_require__(/*! ../textfield/TextField.form */ \"./lib/components/textfield/TextField.form.js\"));\n\nvar _CurrencyEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/Currency.edit.display */ \"./lib/components/currency/editForm/Currency.edit.display.js\"));\n\nvar _CurrencyEdit2 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Currency.edit.data */ \"./lib/components/currency/editForm/Currency.edit.data.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _TextField.default.apply(void 0, [[{\n key: 'display',\n components: _CurrencyEdit.default\n }, {\n key: 'data',\n components: _CurrencyEdit2.default\n }, {\n key: 'validation',\n components: [{\n key: 'validate.minLength',\n ignore: true\n }, {\n key: 'validate.maxLength',\n ignore: true\n }, {\n key: 'validate.minWords',\n ignore: true\n }, {\n key: 'validate.maxWords',\n ignore: true\n }, {\n key: 'validate.pattern',\n ignore: true\n }]\n }, {\n key: 'addons',\n ignore: true\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/currency/Currency.form.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\nvar _TextField = _interopRequireDefault(__webpack_require__(/*! ../textfield/TextField.form */ \"./lib/components/textfield/TextField.form.js\"));\nvar _CurrencyEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/Currency.edit.display */ \"./lib/components/currency/editForm/Currency.edit.display.js\"));\nvar _CurrencyEdit2 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Currency.edit.data */ \"./lib/components/currency/editForm/Currency.edit.data.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _TextField[\"default\"].apply(void 0, [[{\n key: 'display',\n components: _CurrencyEdit[\"default\"]\n }, {\n key: 'data',\n components: _CurrencyEdit2[\"default\"]\n }, {\n key: 'validation',\n components: [{\n key: 'validate.minLength',\n ignore: true\n }, {\n key: 'validate.maxLength',\n ignore: true\n }, {\n key: 'validate.minWords',\n ignore: true\n }, {\n key: 'validate.maxWords',\n ignore: true\n }, {\n key: 'validate.pattern',\n ignore: true\n }]\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/currency/Currency.form.js?"); /***/ }), @@ -730,7 +763,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.slice.js */ \"./node_modules/core-js/modules/es.array.slice.js\");\n\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.from.js */ \"./node_modules/core-js/modules/es.array.from.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.array.includes.js */ \"./node_modules/core-js/modules/es.array.includes.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.includes.js */ \"./node_modules/core-js/modules/es.string.includes.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.split.js */ \"./node_modules/core-js/modules/es.string.split.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.join.js */ \"./node_modules/core-js/modules/es.array.join.js\");\n\n__webpack_require__(/*! core-js/modules/es.number.is-nan.js */ \"./node_modules/core-js/modules/es.number.is-nan.js\");\n\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\nvar _textMaskAddons = __webpack_require__(/*! @formio/text-mask-addons */ \"./node_modules/@formio/text-mask-addons/dist/textMaskAddons.js\");\n\nvar _vanillaTextMask = __webpack_require__(/*! @formio/vanilla-text-mask */ \"./node_modules/@formio/vanilla-text-mask/dist/vanillaTextMask.js\");\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nvar _utils = __webpack_require__(/*! ../../utils/utils */ \"./lib/utils/utils.js\");\n\nvar _Number = _interopRequireDefault(__webpack_require__(/*! ../number/Number */ \"./lib/components/number/Number.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { 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\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar CurrencyComponent = /*#__PURE__*/function (_NumberComponent) {\n _inherits(CurrencyComponent, _NumberComponent);\n\n var _super = _createSuper(CurrencyComponent);\n\n function CurrencyComponent(component, options, data) {\n _classCallCheck(this, CurrencyComponent);\n\n // Currency should default to have a delimiter unless otherwise specified.\n if (component && !component.hasOwnProperty('delimiter')) {\n component.delimiter = true;\n }\n\n return _super.call(this, component, options, data);\n }\n /**\n * Creates the number mask for currency numbers.\n *\n * @return {*}\n */\n\n\n _createClass(CurrencyComponent, [{\n key: \"createNumberMask\",\n value: function createNumberMask() {\n var decimalLimit = _lodash.default.get(this.component, 'decimalLimit', 2);\n\n var affixes = (0, _utils.getCurrencyAffixes)({\n currency: this.component.currency,\n decimalLimit: decimalLimit,\n decimalSeparator: this.decimalSeparator,\n lang: this.options.language\n });\n this.currencyPrefix = this.options.prefix || affixes.prefix;\n this.currencySuffix = this.options.suffix || affixes.suffix;\n return (0, _textMaskAddons.createNumberMask)({\n prefix: this.currencyPrefix,\n suffix: this.currencySuffix,\n thousandsSeparatorSymbol: _lodash.default.get(this.component, 'thousandsSeparator', this.delimiter),\n decimalSymbol: _lodash.default.get(this.component, 'decimalSymbol', this.decimalSeparator),\n decimalLimit: decimalLimit,\n allowNegative: _lodash.default.get(this.component, 'allowNegative', true),\n allowDecimal: this.isDecimalAllowed()\n });\n }\n }, {\n key: \"isDecimalAllowed\",\n value: function isDecimalAllowed() {\n return _lodash.default.get(this.component, 'allowDecimal', true);\n }\n }, {\n key: \"setInputMask\",\n value: function setInputMask(input) {\n var affixes = (0, _utils.getCurrencyAffixes)({\n currency: this.component.currency,\n decimalSeparator: this.decimalSeparator,\n lang: this.options.language\n });\n var numberPattern = \"\".concat(affixes.prefix, \"[0-9\");\n numberPattern += this.decimalSeparator || '';\n numberPattern += this.delimiter || '';\n numberPattern += ']*';\n input.setAttribute('pattern', numberPattern);\n input.mask = (0, _vanillaTextMask.maskInput)({\n inputElement: input,\n mask: this.numberMask || '',\n pipe: function pipe(conformedValue) {\n if (conformedValue === '$0._') {\n // Delay to allow mask to update first.\n setTimeout(function () {\n var caretPosition = input.value.length - 1;\n input.setSelectionRange(caretPosition, caretPosition);\n });\n }\n\n return conformedValue;\n },\n shadowRoot: this.root ? this.root.shadowRoot : null\n });\n }\n }, {\n key: \"defaultSchema\",\n get: function get() {\n return CurrencyComponent.schema();\n }\n }, {\n key: \"parseNumber\",\n value: function parseNumber(value) {\n return _get(_getPrototypeOf(CurrencyComponent.prototype), \"parseNumber\", this).call(this, this.stripPrefixSuffix(value));\n }\n }, {\n key: \"parseValue\",\n value: function parseValue(value) {\n return _get(_getPrototypeOf(CurrencyComponent.prototype), \"parseValue\", this).call(this, this.stripPrefixSuffix(value));\n }\n }, {\n key: \"addZerosAndFormatValue\",\n value: function addZerosAndFormatValue(value) {\n if (!value && value !== 0) return;\n\n var decimalLimit = _lodash.default.get(this.component, 'decimalLimit', 2);\n\n var integerPart;\n var decimalPart = '';\n var decimalPartNumbers = [];\n var negativeValueSymbol = '-';\n var hasPrefix = this.currencyPrefix ? value.includes(this.currencyPrefix) : false;\n var hasSuffix = this.currencySuffix ? value.includes(this.currencySuffix) : false;\n var isNegative = value.includes(negativeValueSymbol) || false;\n value = this.stripPrefixSuffix(isNegative ? value.replace(negativeValueSymbol, '') : value);\n\n if (value.includes(this.decimalSeparator)) {\n var _value$split = value.split(this.decimalSeparator);\n\n var _value$split2 = _slicedToArray(_value$split, 2);\n\n integerPart = _value$split2[0];\n decimalPart = _value$split2[1];\n decimalPartNumbers = _toConsumableArray(decimalPart.split(''));\n } else {\n integerPart = value;\n }\n\n if (decimalPart.length < decimalLimit) {\n while (decimalPartNumbers.length < decimalLimit) {\n decimalPartNumbers.push('0');\n }\n }\n\n var formattedValue = \"\".concat(isNegative ? negativeValueSymbol : '').concat(hasPrefix ? this.currencyPrefix : '').concat(integerPart).concat(this.decimalSeparator).concat(decimalPartNumbers.join('')).concat(hasSuffix ? this.currencySuffix : '');\n return _get(_getPrototypeOf(CurrencyComponent.prototype), \"formatValue\", this).call(this, formattedValue);\n }\n }, {\n key: \"getValueAsString\",\n value: function getValueAsString(value, options) {\n var stringValue = _get(_getPrototypeOf(CurrencyComponent.prototype), \"getValueAsString\", this).call(this, value, options); // eslint-disable-next-line eqeqeq\n\n\n if (value || value == '0') {\n return this.addZerosAndFormatValue(stringValue);\n }\n\n return stringValue;\n }\n }, {\n key: \"formatValue\",\n value: function formatValue(value) {\n if (value || value === '0') {\n return this.addZerosAndFormatValue(value);\n }\n\n return _get(_getPrototypeOf(CurrencyComponent.prototype), \"formatValue\", this).call(this, value);\n }\n }, {\n key: \"stripPrefixSuffix\",\n value: function stripPrefixSuffix(value) {\n if (typeof value === 'string') {\n try {\n var hasPrefix = this.currencyPrefix ? value.includes(this.currencyPrefix) : false;\n var hasSuffix = this.currencySuffix ? value.includes(this.currencySuffix) : false;\n var hasDelimiter = value.includes(this.delimiter);\n var hasDecimalSeparator = value.includes(this.decimalSeparator);\n\n if (this.currencyPrefix) {\n value = value.replace(this.currencyPrefix, '');\n }\n\n if (this.currencySuffix) {\n value = value.replace(this.currencySuffix, '');\n } //when we enter $ in the field using dashboard, it contains '_' that is NaN\n\n\n if ((hasPrefix || hasSuffix) && !hasDelimiter && !hasDecimalSeparator && (Number.isNaN(+value) || !value)) {\n value = '0';\n }\n } catch (err) {// If value doesn't have a replace method, continue on as before.\n }\n }\n\n return value;\n }\n }, {\n key: \"addFocusBlurEvents\",\n value: function addFocusBlurEvents(element) {\n var _this = this;\n\n _get(_getPrototypeOf(CurrencyComponent.prototype), \"addFocusBlurEvents\", this).call(this, element);\n\n this.addEventListener(element, 'focus', function () {\n if (element.defaultValue === element.value) {\n element.setSelectionRange(0, element.defaultValue.length);\n }\n });\n this.addEventListener(element, 'blur', function () {\n element.value = _this.getValueAsString(_this.addZerosAndFormatValue(_this.parseValue(element.value)));\n });\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _Number.default.schema.apply(_Number.default, [{\n type: 'currency',\n label: 'Currency',\n key: 'currency'\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Currency',\n group: 'advanced',\n icon: 'usd',\n documentation: '/userguide/forms/form-components#currency',\n weight: 70,\n schema: CurrencyComponent.schema()\n };\n }\n }]);\n\n return CurrencyComponent;\n}(_Number.default);\n\nexports[\"default\"] = CurrencyComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/currency/Currency.js?"); +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.slice.js */ \"./node_modules/core-js/modules/es.array.slice.js\");\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n__webpack_require__(/*! core-js/modules/es.array.from.js */ \"./node_modules/core-js/modules/es.array.from.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/web.timers.js */ \"./node_modules/core-js/modules/web.timers.js\");\n__webpack_require__(/*! core-js/modules/es.array.includes.js */ \"./node_modules/core-js/modules/es.array.includes.js\");\n__webpack_require__(/*! core-js/modules/es.string.includes.js */ \"./node_modules/core-js/modules/es.string.includes.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n__webpack_require__(/*! core-js/modules/es.string.split.js */ \"./node_modules/core-js/modules/es.string.split.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.array.join.js */ \"./node_modules/core-js/modules/es.array.join.js\");\n__webpack_require__(/*! core-js/modules/es.array.is-array.js */ \"./node_modules/core-js/modules/es.array.is-array.js\");\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n__webpack_require__(/*! core-js/modules/es.number.is-nan.js */ \"./node_modules/core-js/modules/es.number.is-nan.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _textMaskAddons = __webpack_require__(/*! @formio/text-mask-addons */ \"./node_modules/@formio/text-mask-addons/dist/textMaskAddons.js\");\nvar _vanillaTextMask = __webpack_require__(/*! @formio/vanilla-text-mask */ \"./node_modules/@formio/vanilla-text-mask/dist/vanillaTextMask.js\");\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nvar _utils = __webpack_require__(/*! ../../utils/utils */ \"./lib/utils/utils.js\");\nvar _Number = _interopRequireDefault(__webpack_require__(/*! ../number/Number */ \"./lib/components/number/Number.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\nfunction _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : \"undefined\" != typeof Symbol && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) { ; } } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i[\"return\"] && (_r = _i[\"return\"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar CurrencyComponent = /*#__PURE__*/function (_NumberComponent) {\n _inherits(CurrencyComponent, _NumberComponent);\n var _super = _createSuper(CurrencyComponent);\n function CurrencyComponent(component, options, data) {\n _classCallCheck(this, CurrencyComponent);\n // Currency should default to have a delimiter unless otherwise specified.\n if (component && !component.hasOwnProperty('delimiter')) {\n component.delimiter = true;\n }\n return _super.call(this, component, options, data);\n }\n\n /**\n * Creates the number mask for currency numbers.\n *\n * @return {*}\n */\n _createClass(CurrencyComponent, [{\n key: \"createNumberMask\",\n value: function createNumberMask() {\n var decimalLimit = _lodash[\"default\"].get(this.component, 'decimalLimit', 2);\n var affixes = (0, _utils.getCurrencyAffixes)({\n currency: this.component.currency,\n decimalLimit: decimalLimit,\n decimalSeparator: this.decimalSeparator,\n lang: this.options.language\n });\n this.currencyPrefix = this.options.prefix || affixes.prefix;\n this.currencySuffix = this.options.suffix || affixes.suffix;\n return (0, _textMaskAddons.createNumberMask)({\n prefix: this.currencyPrefix,\n suffix: this.currencySuffix,\n thousandsSeparatorSymbol: _lodash[\"default\"].get(this.component, 'thousandsSeparator', this.delimiter),\n decimalSymbol: _lodash[\"default\"].get(this.component, 'decimalSymbol', this.decimalSeparator),\n decimalLimit: decimalLimit,\n allowNegative: _lodash[\"default\"].get(this.component, 'allowNegative', true),\n allowDecimal: this.isDecimalAllowed()\n });\n }\n }, {\n key: \"isDecimalAllowed\",\n value: function isDecimalAllowed() {\n return _lodash[\"default\"].get(this.component, 'allowDecimal', true);\n }\n }, {\n key: \"setInputMask\",\n value: function setInputMask(input) {\n var affixes = (0, _utils.getCurrencyAffixes)({\n currency: this.component.currency,\n decimalSeparator: this.decimalSeparator,\n lang: this.options.language\n });\n var numberPattern = \"\".concat(affixes.prefix, \"[0-9\");\n numberPattern += this.decimalSeparator || '';\n numberPattern += this.delimiter || '';\n numberPattern += ']*';\n input.setAttribute('pattern', numberPattern);\n input.mask = (0, _vanillaTextMask.maskInput)({\n inputElement: input,\n mask: this.numberMask || '',\n pipe: function pipe(conformedValue) {\n if (conformedValue === '$0._') {\n // Delay to allow mask to update first.\n setTimeout(function () {\n var caretPosition = input.value.length - 1;\n input.setSelectionRange(caretPosition, caretPosition);\n });\n }\n return conformedValue;\n },\n shadowRoot: this.root ? this.root.shadowRoot : null\n });\n }\n }, {\n key: \"defaultSchema\",\n get: function get() {\n return CurrencyComponent.schema();\n }\n }, {\n key: \"parseNumber\",\n value: function parseNumber(value) {\n return _get(_getPrototypeOf(CurrencyComponent.prototype), \"parseNumber\", this).call(this, this.stripPrefixSuffix(value));\n }\n }, {\n key: \"parseValue\",\n value: function parseValue(value) {\n return _get(_getPrototypeOf(CurrencyComponent.prototype), \"parseValue\", this).call(this, this.stripPrefixSuffix(value));\n }\n }, {\n key: \"addZerosAndFormatValue\",\n value: function addZerosAndFormatValue(value) {\n if (!value && value !== 0) return;\n var decimalLimit = _lodash[\"default\"].get(this.component, 'decimalLimit', 2);\n var integerPart;\n var decimalPart = '';\n var decimalPartNumbers = [];\n var negativeValueSymbol = '-';\n var hasPrefix = this.currencyPrefix ? value.includes(this.currencyPrefix) : false;\n var hasSuffix = this.currencySuffix ? value.includes(this.currencySuffix) : false;\n var isNegative = value.includes(negativeValueSymbol) || false;\n value = this.stripPrefixSuffix(isNegative ? value.replace(negativeValueSymbol, '') : value);\n if (value.includes(this.decimalSeparator)) {\n var _value$split = value.split(this.decimalSeparator);\n var _value$split2 = _slicedToArray(_value$split, 2);\n integerPart = _value$split2[0];\n decimalPart = _value$split2[1];\n decimalPartNumbers = _toConsumableArray(decimalPart.split(''));\n } else {\n integerPart = value;\n }\n if (decimalPart.length < decimalLimit) {\n while (decimalPartNumbers.length < decimalLimit) {\n decimalPartNumbers.push('0');\n }\n }\n var formattedValue = \"\".concat(isNegative ? negativeValueSymbol : '').concat(hasPrefix ? this.currencyPrefix : '').concat(integerPart).concat(this.decimalSeparator).concat(decimalPartNumbers.join('')).concat(hasSuffix ? this.currencySuffix : '');\n return _get(_getPrototypeOf(CurrencyComponent.prototype), \"formatValue\", this).call(this, formattedValue);\n }\n }, {\n key: \"getValueAsString\",\n value: function getValueAsString(value, options) {\n var _this = this;\n var stringValue = _get(_getPrototypeOf(CurrencyComponent.prototype), \"getValueAsString\", this).call(this, value, options);\n\n // eslint-disable-next-line eqeqeq\n if (value || value == '0') {\n if (Array.isArray(value)) {\n return value.map(function (val) {\n return _this.addZerosAndFormatValue(_get(_getPrototypeOf(CurrencyComponent.prototype), \"getValueAsString\", _this).call(_this, val, options));\n }).join(', ');\n }\n return this.addZerosAndFormatValue(stringValue);\n }\n return stringValue;\n }\n }, {\n key: \"formatValue\",\n value: function formatValue(value) {\n if (value || value === '0') {\n return this.addZerosAndFormatValue(value);\n }\n return _get(_getPrototypeOf(CurrencyComponent.prototype), \"formatValue\", this).call(this, value);\n }\n }, {\n key: \"stripPrefixSuffix\",\n value: function stripPrefixSuffix(value) {\n if (typeof value === 'string') {\n try {\n var hasPrefix = this.currencyPrefix ? value.includes(this.currencyPrefix) : false;\n var hasSuffix = this.currencySuffix ? value.includes(this.currencySuffix) : false;\n var hasDelimiter = value.includes(this.delimiter);\n var hasDecimalSeparator = value.includes(this.decimalSeparator);\n if (this.currencyPrefix) {\n value = value.replace(this.currencyPrefix, '');\n }\n if (this.currencySuffix) {\n value = value.replace(this.currencySuffix, '');\n }\n //when we enter $ in the field using dashboard, it contains '_' that is NaN\n if ((hasPrefix || hasSuffix) && !hasDelimiter && !hasDecimalSeparator && (Number.isNaN(+value) || !value)) {\n value = '0';\n }\n } catch (err) {\n // If value doesn't have a replace method, continue on as before.\n }\n }\n return value;\n }\n }, {\n key: \"addFocusBlurEvents\",\n value: function addFocusBlurEvents(element) {\n var _this2 = this;\n _get(_getPrototypeOf(CurrencyComponent.prototype), \"addFocusBlurEvents\", this).call(this, element);\n this.addEventListener(element, 'focus', function () {\n if (element.defaultValue === element.value) {\n element.setSelectionRange(0, element.defaultValue.length);\n }\n });\n this.addEventListener(element, 'blur', function () {\n element.value = _this2.getValueAsString(_this2.addZerosAndFormatValue(_this2.parseValue(element.value)));\n });\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _Number[\"default\"].schema.apply(_Number[\"default\"], [{\n type: 'currency',\n label: 'Currency',\n key: 'currency'\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Currency',\n group: 'advanced',\n icon: 'usd',\n documentation: '/userguide/form-building/advanced-components#currency',\n weight: 70,\n schema: CurrencyComponent.schema()\n };\n }\n }]);\n return CurrencyComponent;\n}(_Number[\"default\"]);\nexports[\"default\"] = CurrencyComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/currency/Currency.js?"); /***/ }), @@ -738,10 +771,10 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /*!****************************************************************!*\ !*** ./lib/components/currency/editForm/Currency.edit.data.js ***! \****************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n type: 'select',\n input: true,\n weight: 50,\n key: 'currency',\n label: 'Currency',\n tooltip: 'The currency to use in currency formatting. Possible values are (ISO-4217) currency codes.',\n defaultValue: 'USD',\n dataSrc: 'values',\n data: {\n values: [{\n label: 'US Dollar (USD)',\n value: 'USD'\n }, {\n label: 'Euro (EUR)',\n value: 'EUR'\n }, {\n label: 'Pound Sterling (GBP)',\n value: 'GBP'\n }, {\n label: 'Australian Dollar (AUD)',\n value: 'AUD'\n }, {\n label: 'Afghani (AFN)',\n value: 'AFN'\n }, {\n label: 'Lek (ALL)',\n value: 'ALL'\n }, {\n label: 'Algerian Dinar (DZD)',\n value: 'DZD'\n }, {\n label: 'Kwanza (AOA)',\n value: 'AOA'\n }, {\n label: 'East Caribbean Dollar (XCD)',\n value: 'XCD'\n }, {\n label: 'Argentine Peso (ARS)',\n value: 'ARS'\n }, {\n label: 'Armenian Dram (AMD)',\n value: 'AMD'\n }, {\n label: 'Aruban Florin (AWG)',\n value: 'AWG'\n }, {\n label: 'Azerbaijan Manat (AZN)',\n value: 'AZN'\n }, {\n label: 'Bahamian Dollar (BSD)',\n value: 'BSD'\n }, {\n label: 'Bahraini Dinar (BHD)',\n value: 'BHD'\n }, {\n label: 'Taka (BDT)',\n value: 'BDT'\n }, {\n label: 'Barbados Dollar (BBD)',\n value: 'BBD'\n }, {\n label: 'Belarusian Ruble (BYN)',\n value: 'BYN'\n }, {\n label: 'Belize Dollar (BZD)',\n value: 'BZD'\n }, {\n label: 'CFA Franc BCEAO (XOF)',\n value: 'XOF'\n }, {\n label: 'Bermudian Dollar (BMD)',\n value: 'BMD'\n }, {\n label: 'Indian Rupee (INR)',\n value: 'INR'\n }, {\n label: 'Ngultrum (BTN)',\n value: 'BTN'\n }, {\n label: 'Boliviano (BOB)',\n value: 'BOB'\n }, {\n label: 'Mvdol (BOV)',\n value: 'BOV'\n }, {\n label: 'Convertible Mark (BAM)',\n value: 'BAM'\n }, {\n label: 'Pula (BWP)',\n value: 'BWP'\n }, {\n label: 'Norwegian Krone (NOK)',\n value: 'NOK'\n }, {\n label: 'Brazilian Real (BRL)',\n value: 'BRL'\n }, {\n label: 'Brunei Dollar (BND)',\n value: 'BND'\n }, {\n label: 'Bulgarian Lev (BGN)',\n value: 'BGN'\n }, {\n label: 'Burundi Franc (BIF)',\n value: 'BIF'\n }, {\n label: 'Cabo Verde Escudo (CVE)',\n value: 'CVE'\n }, {\n label: 'Riel (KHR)',\n value: 'KHR'\n }, {\n label: 'CFA Franc BEAC (XAF)',\n value: 'XAF'\n }, {\n label: 'Canadian Dollar (CAD)',\n value: 'CAD'\n }, {\n label: 'Cayman Islands Dollar (KYD)',\n value: 'KYD'\n }, {\n label: 'Chilean Peso (CLP)',\n value: 'CLP'\n }, {\n label: 'Unidad de Fomento (CLF)',\n value: 'CLF'\n }, {\n label: 'Yuan Renminbi (CNY)',\n value: 'CNY'\n }, {\n label: 'Colombian Peso (COP)',\n value: 'COP'\n }, {\n label: 'Unidad de Valor Real (COU)',\n value: 'COU'\n }, {\n label: 'Comorian Franc (KMF)',\n value: 'KMF'\n }, {\n label: 'Congolese Franc (CDF)',\n value: 'CDF'\n }, {\n label: 'New Zealand Dollar (NZD)',\n value: 'NZD'\n }, {\n label: 'Costa Rican Colon (CRC)',\n value: 'CRC'\n }, {\n label: 'Kuna (HRK)',\n value: 'HRK'\n }, {\n label: 'Cuban Peso (CUP)',\n value: 'CUP'\n }, {\n label: 'Peso Convertible (CUC)',\n value: 'CUC'\n }, {\n label: 'Netherlands Antillean Guilder (ANG)',\n value: 'ANG'\n }, {\n label: 'Czech Koruna (CZK)',\n value: 'CZK'\n }, {\n label: 'Danish Krone (DKK)',\n value: 'DKK'\n }, {\n label: 'Djibouti Franc (DJF)',\n value: 'DJF'\n }, {\n label: 'Dominican Peso (DOP)',\n value: 'DOP'\n }, {\n label: 'Egyptian Pound (EGP)',\n value: 'EGP'\n }, {\n label: 'El Salvador Colon (SVC)',\n value: 'SVC'\n }, {\n label: 'Nakfa (ERN)',\n value: 'ERN'\n }, {\n label: 'Ethiopian Birr (ETB)',\n value: 'ETB'\n }, {\n label: 'Falkland Islands Pound (FKP)',\n value: 'FKP'\n }, {\n label: 'Fiji Dollar (FJD)',\n value: 'FJD'\n }, {\n label: 'CFP Franc (XPF)',\n value: 'XPF'\n }, {\n label: 'Dalasi (GMD)',\n value: 'GMD'\n }, {\n label: 'Lari (GEL)',\n value: 'GEL'\n }, {\n label: 'Ghana Cedi (GHS)',\n value: 'GHS'\n }, {\n label: 'Gibraltar Pound (GIP)',\n value: 'GIP'\n }, {\n label: 'Quetzal (GTQ)',\n value: 'GTQ'\n }, {\n label: 'Guinean Franc (GNF)',\n value: 'GNF'\n }, {\n label: 'Guyana Dollar (GYD)',\n value: 'GYD'\n }, {\n label: 'Gourde (HTG)',\n value: 'HTG'\n }, {\n label: 'Lempira (HNL)',\n value: 'HNL'\n }, {\n label: 'Hong Kong Dollar (HKD)',\n value: 'HKD'\n }, {\n label: 'Forint (HUF)',\n value: 'HUF'\n }, {\n label: 'Iceland Krona (ISK)',\n value: 'ISK'\n }, {\n label: 'Indian Rupee (INR)',\n value: 'INR'\n }, {\n label: 'Rupiah (IDR)',\n value: 'IDR'\n }, {\n label: 'SDR (Special Drawing Right) (XDR)',\n value: 'XDR'\n }, {\n label: 'Iranian Rial (IRR)',\n value: 'IRR'\n }, {\n label: 'Iraqi Dinar (IQD)',\n value: 'IQD'\n }, {\n label: 'New Israeli Sheqel (ILS)',\n value: 'ILS'\n }, {\n label: 'Jamaican Dollar (JMD)',\n value: 'JMD'\n }, {\n label: 'Yen (JPY)',\n value: 'JPY'\n }, {\n label: 'Jordanian Dinar (JOD)',\n value: 'JOD'\n }, {\n label: 'Tenge (KZT)',\n value: 'KZT'\n }, {\n label: 'Kenyan Shilling (KES)',\n value: 'KES'\n }, {\n label: 'North Korean Won (KPW)',\n value: 'KPW'\n }, {\n label: 'Won (KRW)',\n value: 'KRW'\n }, {\n label: 'Kuwaiti Dinar (KWD)',\n value: 'KWD'\n }, {\n label: 'Som (KGS)',\n value: 'KGS'\n }, {\n label: 'Lao Kip (LAK)',\n value: 'LAK'\n }, {\n label: 'Lebanese Pound (LBP)',\n value: 'LBP'\n }, {\n label: 'Loti (LSL)',\n value: 'LSL'\n }, {\n label: 'Rand (ZAR)',\n value: 'ZAR'\n }, {\n label: 'Liberian Dollar (LRD)',\n value: 'LRD'\n }, {\n label: 'Libyan Dinar (LYD)',\n value: 'LYD'\n }, {\n label: 'Swiss Franc (CHF)',\n value: 'CHF'\n }, {\n label: 'Pataca (MOP)',\n value: 'MOP'\n }, {\n label: 'Denar (MKD)',\n value: 'MKD'\n }, {\n label: 'Malagasy Ariary (MGA)',\n value: 'MGA'\n }, {\n label: 'Malawi Kwacha (MWK)',\n value: 'MWK'\n }, {\n label: 'Malaysian Ringgit (MYR)',\n value: 'MYR'\n }, {\n label: 'Rufiyaa (MVR)',\n value: 'MVR'\n }, {\n label: 'Ouguiya (MRU)',\n value: 'MRU'\n }, {\n label: 'Mauritius Rupee (MUR)',\n value: 'MUR'\n }, {\n label: 'ADB Unit of Account (XUA)',\n value: 'XUA'\n }, {\n label: 'Mexican Peso (MXN)',\n value: 'MXN'\n }, {\n label: 'Mexican Unidad de Inversion (UDI) (MXV)',\n value: 'MXV'\n }, {\n label: 'Moldovan Leu (MDL)',\n value: 'MDL'\n }, {\n label: 'Tugrik (MNT)',\n value: 'MNT'\n }, {\n label: 'Moroccan Dirham (MAD)',\n value: 'MAD'\n }, {\n label: 'Mozambique Metical (MZN)',\n value: 'MZN'\n }, {\n label: 'Kyat (MMK)',\n value: 'MMK'\n }, {\n label: 'Namibia Dollar (NAD)',\n value: 'NAD'\n }, {\n label: 'Nepalese Rupee (NPR)',\n value: 'NPR'\n }, {\n label: 'Cordoba Oro (NIO)',\n value: 'NIO'\n }, {\n label: 'Naira (NGN)',\n value: 'NGN'\n }, {\n label: 'Rial Omani (OMR)',\n value: 'OMR'\n }, {\n label: 'Pakistan Rupee (PKR)',\n value: 'PKR'\n }, {\n label: 'Balboa (PAB)',\n value: 'PAB'\n }, {\n label: 'Kina (PGK)',\n value: 'PGK'\n }, {\n label: 'Guarani (PYG)',\n value: 'PYG'\n }, {\n label: 'Sol (PEN)',\n value: 'PEN'\n }, {\n label: 'Philippine Peso (PHP)',\n value: 'PHP'\n }, {\n label: 'Zloty (PLN)',\n value: 'PLN'\n }, {\n label: 'Qatari Rial (QAR)',\n value: 'QAR'\n }, {\n label: 'Romanian Leu (RON)',\n value: 'RON'\n }, {\n label: 'Russian Ruble (RUB)',\n value: 'RUB'\n }, {\n label: 'Rwanda Franc (RWF)',\n value: 'RWF'\n }, {\n label: 'Saint Helena Pound (SHP)',\n value: 'SHP'\n }, {\n label: 'Tala (WST)',\n value: 'WST'\n }, {\n label: 'Dobra (STN)',\n value: 'STN'\n }, {\n label: 'Saudi Riyal (SAR)',\n value: 'SAR'\n }, {\n label: 'Serbian Dinar (RSD)',\n value: 'RSD'\n }, {\n label: 'Seychelles Rupee (SCR)',\n value: 'SCR'\n }, {\n label: 'Leone (SLL)',\n value: 'SLL'\n }, {\n label: 'Singapore Dollar (SGD)',\n value: 'SGD'\n }, {\n label: 'Sucre (XSU)',\n value: 'XSU'\n }, {\n label: 'Solomon Islands Dollar (SBD)',\n value: 'SBD'\n }, {\n label: 'Somali Shilling (SOS)',\n value: 'SOS'\n }, {\n label: 'South Sudanese Pound (SSP)',\n value: 'SSP'\n }, {\n label: 'Sri Lanka Rupee (LKR)',\n value: 'LKR'\n }, {\n label: 'Sudanese Pound (SDG)',\n value: 'SDG'\n }, {\n label: 'Surinam Dollar (SRD)',\n value: 'SRD'\n }, {\n label: 'Lilangeni (SZL)',\n value: 'SZL'\n }, {\n label: 'Swedish Krona (SEK)',\n value: 'SEK'\n }, {\n label: 'WIR Euro (CHE)',\n value: 'CHE'\n }, {\n label: 'WIR Franc (CHW)',\n value: 'CHW'\n }, {\n label: 'Syrian Pound (SYP)',\n value: 'SYP'\n }, {\n label: 'New Taiwan Dollar (TWD)',\n value: 'TWD'\n }, {\n label: 'Somoni (TJS)',\n value: 'TJS'\n }, {\n label: 'Tanzanian Shilling (TZS)',\n value: 'TZS'\n }, {\n label: 'Baht (THB)',\n value: 'THB'\n }, {\n label: 'Pa’anga (TOP)',\n value: 'TOP'\n }, {\n label: 'Trinidad and Tobago Dollar (TTD)',\n value: 'TTD'\n }, {\n label: 'Tunisian Dinar (TND)',\n value: 'TND'\n }, {\n label: 'Turkish Lira (TRY)',\n value: 'TRY'\n }, {\n label: 'Turkmenistan New Manat (TMT)',\n value: 'TMT'\n }, {\n label: 'Uganda Shilling (UGX)',\n value: 'UGX'\n }, {\n label: 'Hryvnia (UAH)',\n value: 'UAH'\n }, {\n label: 'UAE Dirham (AED)',\n value: 'AED'\n }, {\n label: 'US Dollar (Next day) (USN)',\n value: 'USN'\n }, {\n label: 'Peso Uruguayo (UYU)',\n value: 'UYU'\n }, {\n label: 'Uruguay Peso en Unidades Indexadas (UYI)',\n value: 'UYI'\n }, {\n label: 'Unidad Previsional (UYW)',\n value: 'UYW'\n }, {\n label: 'Uzbekistan Sum (UZS)',\n value: 'UZS'\n }, {\n label: 'Vatu (VUV)',\n value: 'VUV'\n }, {\n label: 'Bolívar Soberano (VES)',\n value: 'VES'\n }, {\n label: 'Dong (VND)',\n value: 'VND'\n }, {\n label: 'Yemeni Rial (YER)',\n value: 'YER'\n }, {\n label: 'Zambian Kwacha (ZMW)',\n value: 'ZMW'\n }, {\n label: 'Zimbabwe Dollar (ZWL),',\n value: 'ZWL'\n }]\n }\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/currency/editForm/Currency.edit.data.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n type: 'select',\n input: true,\n weight: 50,\n key: 'currency',\n label: 'Currency',\n tooltip: 'The currency to use in currency formatting. Possible values are (ISO-4217) currency codes.',\n defaultValue: 'USD',\n dataSrc: 'values',\n data: {\n values: [{\n label: 'US Dollar (USD)',\n value: 'USD'\n }, {\n label: 'Euro (EUR)',\n value: 'EUR'\n }, {\n label: 'Pound Sterling (GBP)',\n value: 'GBP'\n }, {\n label: 'Australian Dollar (AUD)',\n value: 'AUD'\n }, {\n label: 'Afghani (AFN)',\n value: 'AFN'\n }, {\n label: 'Lek (ALL)',\n value: 'ALL'\n }, {\n label: 'Algerian Dinar (DZD)',\n value: 'DZD'\n }, {\n label: 'Kwanza (AOA)',\n value: 'AOA'\n }, {\n label: 'East Caribbean Dollar (XCD)',\n value: 'XCD'\n }, {\n label: 'Argentine Peso (ARS)',\n value: 'ARS'\n }, {\n label: 'Armenian Dram (AMD)',\n value: 'AMD'\n }, {\n label: 'Aruban Florin (AWG)',\n value: 'AWG'\n }, {\n label: 'Azerbaijan Manat (AZN)',\n value: 'AZN'\n }, {\n label: 'Bahamian Dollar (BSD)',\n value: 'BSD'\n }, {\n label: 'Bahraini Dinar (BHD)',\n value: 'BHD'\n }, {\n label: 'Taka (BDT)',\n value: 'BDT'\n }, {\n label: 'Barbados Dollar (BBD)',\n value: 'BBD'\n }, {\n label: 'Belarusian Ruble (BYN)',\n value: 'BYN'\n }, {\n label: 'Belize Dollar (BZD)',\n value: 'BZD'\n }, {\n label: 'CFA Franc BCEAO (XOF)',\n value: 'XOF'\n }, {\n label: 'Bermudian Dollar (BMD)',\n value: 'BMD'\n }, {\n label: 'Indian Rupee (INR)',\n value: 'INR'\n }, {\n label: 'Ngultrum (BTN)',\n value: 'BTN'\n }, {\n label: 'Boliviano (BOB)',\n value: 'BOB'\n }, {\n label: 'Mvdol (BOV)',\n value: 'BOV'\n }, {\n label: 'Convertible Mark (BAM)',\n value: 'BAM'\n }, {\n label: 'Pula (BWP)',\n value: 'BWP'\n }, {\n label: 'Norwegian Krone (NOK)',\n value: 'NOK'\n }, {\n label: 'Brazilian Real (BRL)',\n value: 'BRL'\n }, {\n label: 'Brunei Dollar (BND)',\n value: 'BND'\n }, {\n label: 'Bulgarian Lev (BGN)',\n value: 'BGN'\n }, {\n label: 'Burundi Franc (BIF)',\n value: 'BIF'\n }, {\n label: 'Cabo Verde Escudo (CVE)',\n value: 'CVE'\n }, {\n label: 'Riel (KHR)',\n value: 'KHR'\n }, {\n label: 'CFA Franc BEAC (XAF)',\n value: 'XAF'\n }, {\n label: 'Canadian Dollar (CAD)',\n value: 'CAD'\n }, {\n label: 'Cayman Islands Dollar (KYD)',\n value: 'KYD'\n }, {\n label: 'Chilean Peso (CLP)',\n value: 'CLP'\n }, {\n label: 'Unidad de Fomento (CLF)',\n value: 'CLF'\n }, {\n label: 'Yuan Renminbi (CNY)',\n value: 'CNY'\n }, {\n label: 'Colombian Peso (COP)',\n value: 'COP'\n }, {\n label: 'Unidad de Valor Real (COU)',\n value: 'COU'\n }, {\n label: 'Comorian Franc (KMF)',\n value: 'KMF'\n }, {\n label: 'Congolese Franc (CDF)',\n value: 'CDF'\n }, {\n label: 'New Zealand Dollar (NZD)',\n value: 'NZD'\n }, {\n label: 'Costa Rican Colon (CRC)',\n value: 'CRC'\n }, {\n label: 'Kuna (HRK)',\n value: 'HRK'\n }, {\n label: 'Cuban Peso (CUP)',\n value: 'CUP'\n }, {\n label: 'Peso Convertible (CUC)',\n value: 'CUC'\n }, {\n label: 'Netherlands Antillean Guilder (ANG)',\n value: 'ANG'\n }, {\n label: 'Czech Koruna (CZK)',\n value: 'CZK'\n }, {\n label: 'Danish Krone (DKK)',\n value: 'DKK'\n }, {\n label: 'Djibouti Franc (DJF)',\n value: 'DJF'\n }, {\n label: 'Dominican Peso (DOP)',\n value: 'DOP'\n }, {\n label: 'Egyptian Pound (EGP)',\n value: 'EGP'\n }, {\n label: 'El Salvador Colon (SVC)',\n value: 'SVC'\n }, {\n label: 'Nakfa (ERN)',\n value: 'ERN'\n }, {\n label: 'Ethiopian Birr (ETB)',\n value: 'ETB'\n }, {\n label: 'Falkland Islands Pound (FKP)',\n value: 'FKP'\n }, {\n label: 'Fiji Dollar (FJD)',\n value: 'FJD'\n }, {\n label: 'CFP Franc (XPF)',\n value: 'XPF'\n }, {\n label: 'Dalasi (GMD)',\n value: 'GMD'\n }, {\n label: 'Lari (GEL)',\n value: 'GEL'\n }, {\n label: 'Ghana Cedi (GHS)',\n value: 'GHS'\n }, {\n label: 'Gibraltar Pound (GIP)',\n value: 'GIP'\n }, {\n label: 'Quetzal (GTQ)',\n value: 'GTQ'\n }, {\n label: 'Guinean Franc (GNF)',\n value: 'GNF'\n }, {\n label: 'Guyana Dollar (GYD)',\n value: 'GYD'\n }, {\n label: 'Gourde (HTG)',\n value: 'HTG'\n }, {\n label: 'Lempira (HNL)',\n value: 'HNL'\n }, {\n label: 'Hong Kong Dollar (HKD)',\n value: 'HKD'\n }, {\n label: 'Forint (HUF)',\n value: 'HUF'\n }, {\n label: 'Iceland Krona (ISK)',\n value: 'ISK'\n }, {\n label: 'Indian Rupee (INR)',\n value: 'INR'\n }, {\n label: 'Rupiah (IDR)',\n value: 'IDR'\n }, {\n label: 'SDR (Special Drawing Right) (XDR)',\n value: 'XDR'\n }, {\n label: 'Iranian Rial (IRR)',\n value: 'IRR'\n }, {\n label: 'Iraqi Dinar (IQD)',\n value: 'IQD'\n }, {\n label: 'New Israeli Sheqel (ILS)',\n value: 'ILS'\n }, {\n label: 'Jamaican Dollar (JMD)',\n value: 'JMD'\n }, {\n label: 'Yen (JPY)',\n value: 'JPY'\n }, {\n label: 'Jordanian Dinar (JOD)',\n value: 'JOD'\n }, {\n label: 'Tenge (KZT)',\n value: 'KZT'\n }, {\n label: 'Kenyan Shilling (KES)',\n value: 'KES'\n }, {\n label: 'North Korean Won (KPW)',\n value: 'KPW'\n }, {\n label: 'Won (KRW)',\n value: 'KRW'\n }, {\n label: 'Kuwaiti Dinar (KWD)',\n value: 'KWD'\n }, {\n label: 'Som (KGS)',\n value: 'KGS'\n }, {\n label: 'Lao Kip (LAK)',\n value: 'LAK'\n }, {\n label: 'Lebanese Pound (LBP)',\n value: 'LBP'\n }, {\n label: 'Loti (LSL)',\n value: 'LSL'\n }, {\n label: 'Rand (ZAR)',\n value: 'ZAR'\n }, {\n label: 'Liberian Dollar (LRD)',\n value: 'LRD'\n }, {\n label: 'Libyan Dinar (LYD)',\n value: 'LYD'\n }, {\n label: 'Swiss Franc (CHF)',\n value: 'CHF'\n }, {\n label: 'Pataca (MOP)',\n value: 'MOP'\n }, {\n label: 'Denar (MKD)',\n value: 'MKD'\n }, {\n label: 'Malagasy Ariary (MGA)',\n value: 'MGA'\n }, {\n label: 'Malawi Kwacha (MWK)',\n value: 'MWK'\n }, {\n label: 'Malaysian Ringgit (MYR)',\n value: 'MYR'\n }, {\n label: 'Rufiyaa (MVR)',\n value: 'MVR'\n }, {\n label: 'Ouguiya (MRU)',\n value: 'MRU'\n }, {\n label: 'Mauritius Rupee (MUR)',\n value: 'MUR'\n }, {\n label: 'ADB Unit of Account (XUA)',\n value: 'XUA'\n }, {\n label: 'Mexican Peso (MXN)',\n value: 'MXN'\n }, {\n label: 'Mexican Unidad de Inversion (UDI) (MXV)',\n value: 'MXV'\n }, {\n label: 'Moldovan Leu (MDL)',\n value: 'MDL'\n }, {\n label: 'Tugrik (MNT)',\n value: 'MNT'\n }, {\n label: 'Moroccan Dirham (MAD)',\n value: 'MAD'\n }, {\n label: 'Mozambique Metical (MZN)',\n value: 'MZN'\n }, {\n label: 'Kyat (MMK)',\n value: 'MMK'\n }, {\n label: 'Namibia Dollar (NAD)',\n value: 'NAD'\n }, {\n label: 'Nepalese Rupee (NPR)',\n value: 'NPR'\n }, {\n label: 'Cordoba Oro (NIO)',\n value: 'NIO'\n }, {\n label: 'Naira (NGN)',\n value: 'NGN'\n }, {\n label: 'Rial Omani (OMR)',\n value: 'OMR'\n }, {\n label: 'Pakistan Rupee (PKR)',\n value: 'PKR'\n }, {\n label: 'Balboa (PAB)',\n value: 'PAB'\n }, {\n label: 'Kina (PGK)',\n value: 'PGK'\n }, {\n label: 'Guarani (PYG)',\n value: 'PYG'\n }, {\n label: 'Sol (PEN)',\n value: 'PEN'\n }, {\n label: 'Philippine Peso (PHP)',\n value: 'PHP'\n }, {\n label: 'Zloty (PLN)',\n value: 'PLN'\n }, {\n label: 'Qatari Rial (QAR)',\n value: 'QAR'\n }, {\n label: 'Romanian Leu (RON)',\n value: 'RON'\n }, {\n label: 'Russian Ruble (RUB)',\n value: 'RUB'\n }, {\n label: 'Rwanda Franc (RWF)',\n value: 'RWF'\n }, {\n label: 'Saint Helena Pound (SHP)',\n value: 'SHP'\n }, {\n label: 'Tala (WST)',\n value: 'WST'\n }, {\n label: 'Dobra (STN)',\n value: 'STN'\n }, {\n label: 'Saudi Riyal (SAR)',\n value: 'SAR'\n }, {\n label: 'Serbian Dinar (RSD)',\n value: 'RSD'\n }, {\n label: 'Seychelles Rupee (SCR)',\n value: 'SCR'\n }, {\n label: 'Leone (SLL)',\n value: 'SLL'\n }, {\n label: 'Singapore Dollar (SGD)',\n value: 'SGD'\n }, {\n label: 'Sucre (XSU)',\n value: 'XSU'\n }, {\n label: 'Solomon Islands Dollar (SBD)',\n value: 'SBD'\n }, {\n label: 'Somali Shilling (SOS)',\n value: 'SOS'\n }, {\n label: 'South Sudanese Pound (SSP)',\n value: 'SSP'\n }, {\n label: 'Sri Lanka Rupee (LKR)',\n value: 'LKR'\n }, {\n label: 'Sudanese Pound (SDG)',\n value: 'SDG'\n }, {\n label: 'Surinam Dollar (SRD)',\n value: 'SRD'\n }, {\n label: 'Lilangeni (SZL)',\n value: 'SZL'\n }, {\n label: 'Swedish Krona (SEK)',\n value: 'SEK'\n }, {\n label: 'WIR Euro (CHE)',\n value: 'CHE'\n }, {\n label: 'WIR Franc (CHW)',\n value: 'CHW'\n }, {\n label: 'Syrian Pound (SYP)',\n value: 'SYP'\n }, {\n label: 'New Taiwan Dollar (TWD)',\n value: 'TWD'\n }, {\n label: 'Somoni (TJS)',\n value: 'TJS'\n }, {\n label: 'Tanzanian Shilling (TZS)',\n value: 'TZS'\n }, {\n label: 'Baht (THB)',\n value: 'THB'\n }, {\n label: 'Pa’anga (TOP)',\n value: 'TOP'\n }, {\n label: 'Trinidad and Tobago Dollar (TTD)',\n value: 'TTD'\n }, {\n label: 'Tunisian Dinar (TND)',\n value: 'TND'\n }, {\n label: 'Turkish Lira (TRY)',\n value: 'TRY'\n }, {\n label: 'Turkmenistan New Manat (TMT)',\n value: 'TMT'\n }, {\n label: 'Uganda Shilling (UGX)',\n value: 'UGX'\n }, {\n label: 'Hryvnia (UAH)',\n value: 'UAH'\n }, {\n label: 'UAE Dirham (AED)',\n value: 'AED'\n }, {\n label: 'US Dollar (Next day) (USN)',\n value: 'USN'\n }, {\n label: 'Peso Uruguayo (UYU)',\n value: 'UYU'\n }, {\n label: 'Uruguay Peso en Unidades Indexadas (UYI)',\n value: 'UYI'\n }, {\n label: 'Unidad Previsional (UYW)',\n value: 'UYW'\n }, {\n label: 'Uzbekistan Sum (UZS)',\n value: 'UZS'\n }, {\n label: 'Vatu (VUV)',\n value: 'VUV'\n }, {\n label: 'Bolívar Soberano (VES)',\n value: 'VES'\n }, {\n label: 'Dong (VND)',\n value: 'VND'\n }, {\n label: 'Yemeni Rial (YER)',\n value: 'YER'\n }, {\n label: 'Zambian Kwacha (ZMW)',\n value: 'ZMW'\n }, {\n label: 'Zimbabwe Dollar (ZWL),',\n value: 'ZWL'\n }]\n }\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/currency/editForm/Currency.edit.data.js?"); /***/ }), @@ -749,10 +782,10 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /*!*******************************************************************!*\ !*** ./lib/components/currency/editForm/Currency.edit.display.js ***! \*******************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'inputMask',\n ignore: true\n}, {\n key: 'allowMultipleMasks',\n ignore: true\n}, {\n key: 'showWordCount',\n ignore: true\n}, {\n key: 'showCharCount',\n ignore: true\n}, {\n type: 'textfield',\n input: true,\n weight: 310,\n key: 'prefix',\n label: 'prefix',\n tooltip: 'Specify the prefix symbol after the component (e.g.: USD, EUR)'\n}, {\n type: 'textfield',\n input: true,\n weight: 320,\n key: 'suffix',\n label: 'suffix',\n tooltip: 'Specify the suffix symbol after the component (e.g.: USD, EUR).'\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/currency/editForm/Currency.edit.display.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'inputMask',\n ignore: true\n}, {\n key: 'allowMultipleMasks',\n ignore: true\n}, {\n key: 'showWordCount',\n ignore: true\n}, {\n key: 'showCharCount',\n ignore: true\n}, {\n type: 'textfield',\n input: true,\n weight: 310,\n key: 'prefix',\n label: 'prefix',\n tooltip: 'Specify the prefix symbol after the component (e.g.: USD, EUR)'\n}, {\n type: 'textfield',\n input: true,\n weight: 320,\n key: 'suffix',\n label: 'suffix',\n tooltip: 'Specify the suffix symbol after the component (e.g.: USD, EUR).'\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/currency/editForm/Currency.edit.display.js?"); /***/ }), @@ -763,7 +796,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\nvar _Components = _interopRequireDefault(__webpack_require__(/*! ../Components */ \"./lib/components/Components.js\"));\n\nvar _DataGridEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/DataGrid.edit.data */ \"./lib/components/datagrid/editForm/DataGrid.edit.data.js\"));\n\nvar _DataGridEdit2 = _interopRequireDefault(__webpack_require__(/*! ./editForm/DataGrid.edit.display */ \"./lib/components/datagrid/editForm/DataGrid.edit.display.js\"));\n\nvar _DataGridEdit3 = _interopRequireDefault(__webpack_require__(/*! ./editForm/DataGrid.edit.validation */ \"./lib/components/datagrid/editForm/DataGrid.edit.validation.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _Components.default.baseEditForm.apply(_Components.default, [[{\n key: 'display',\n components: _DataGridEdit2.default\n }, {\n key: 'data',\n components: _DataGridEdit.default\n }, {\n key: 'validation',\n components: _DataGridEdit3.default\n }, {\n key: 'addons',\n ignore: true\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/datagrid/DataGrid.form.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\nvar _Components = _interopRequireDefault(__webpack_require__(/*! ../Components */ \"./lib/components/Components.js\"));\nvar _DataGridEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/DataGrid.edit.data */ \"./lib/components/datagrid/editForm/DataGrid.edit.data.js\"));\nvar _DataGridEdit2 = _interopRequireDefault(__webpack_require__(/*! ./editForm/DataGrid.edit.display */ \"./lib/components/datagrid/editForm/DataGrid.edit.display.js\"));\nvar _DataGridEdit3 = _interopRequireDefault(__webpack_require__(/*! ./editForm/DataGrid.edit.validation */ \"./lib/components/datagrid/editForm/DataGrid.edit.validation.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _Components[\"default\"].baseEditForm.apply(_Components[\"default\"], [[{\n key: 'display',\n components: _DataGridEdit2[\"default\"]\n }, {\n key: 'data',\n components: _DataGridEdit[\"default\"]\n }, {\n key: 'validation',\n components: _DataGridEdit3[\"default\"]\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/datagrid/DataGrid.form.js?"); /***/ }), @@ -774,7 +807,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.set.js */ \"./node_modules/core-js/modules/es.reflect.set.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.from.js */ \"./node_modules/core-js/modules/es.array.from.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptors.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.slice.js */ \"./node_modules/core-js/modules/es.array.slice.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.includes.js */ \"./node_modules/core-js/modules/es.array.includes.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.values.js */ \"./node_modules/core-js/modules/es.object.values.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.splice.js */ \"./node_modules/core-js/modules/es.array.splice.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.find.js */ \"./node_modules/core-js/modules/es.array.find.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.find-index.js */ \"./node_modules/core-js/modules/es.array.find-index.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.entries.js */ \"./node_modules/core-js/modules/es.object.entries.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nvar _NestedArrayComponent2 = _interopRequireDefault(__webpack_require__(/*! ../_classes/nestedarray/NestedArrayComponent */ \"./lib/components/_classes/nestedarray/NestedArrayComponent.js\"));\n\nvar _utils = __webpack_require__(/*! ../../utils/utils */ \"./lib/utils/utils.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _toArray(arr) { return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest(); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { 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\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction set(target, property, value, receiver) { if (typeof Reflect !== \"undefined\" && Reflect.set) { set = Reflect.set; } else { set = function set(target, property, value, receiver) { var base = _superPropBase(target, property); var desc; if (base) { desc = Object.getOwnPropertyDescriptor(base, property); if (desc.set) { desc.set.call(receiver, value); return true; } else if (!desc.writable) { return false; } } desc = Object.getOwnPropertyDescriptor(receiver, property); if (desc) { if (!desc.writable) { return false; } desc.value = value; Object.defineProperty(receiver, property, desc); } else { _defineProperty(receiver, property, value); } return true; }; } return set(target, property, value, receiver); }\n\nfunction _set(target, property, value, receiver, isStrict) { var s = set(target, property, value, receiver || target); if (!s && isStrict) { throw new Error('failed to set property'); } return value; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar dragula;\n\nif (typeof window !== 'undefined') {\n // Import from \"dist\" because it would require and \"global\" would not be defined in Angular apps.\n dragula = __webpack_require__(/*! dragula/dist/dragula */ \"./node_modules/dragula/dist/dragula.js\");\n}\n\nvar DataGridComponent = /*#__PURE__*/function (_NestedArrayComponent) {\n _inherits(DataGridComponent, _NestedArrayComponent);\n\n var _super = _createSuper(DataGridComponent);\n\n function DataGridComponent() {\n var _this;\n\n _classCallCheck(this, DataGridComponent);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n _this.type = 'datagrid';\n _this.tabIndex = 0;\n return _this;\n }\n\n _createClass(DataGridComponent, [{\n key: \"init\",\n value: function init() {\n this.components = this.components || []; // Add new values based on minLength.\n\n this.rows = [];\n this.columns = _toConsumableArray(this.component.components);\n\n if (this.initRows || !_lodash.default.isEqual(this.dataValue, this.emptyValue)) {\n this.createRows(true);\n }\n\n this.visibleColumns = {};\n this.prevHasAddButton = this.hasAddButton();\n this.checkColumns();\n }\n }, {\n key: \"dataValue\",\n get: function get() {\n var dataValue = _get(_getPrototypeOf(DataGridComponent.prototype), \"dataValue\", this);\n\n if (!dataValue || !Array.isArray(dataValue)) {\n return this.emptyValue;\n }\n\n return dataValue;\n },\n set: function set(value) {\n _set(_getPrototypeOf(DataGridComponent.prototype), \"dataValue\", value, this, true);\n }\n }, {\n key: \"defaultSchema\",\n get: function get() {\n return DataGridComponent.schema();\n }\n }, {\n key: \"initEmpty\",\n get: function get() {\n return this.component.initEmpty || this.component.noFirstRow;\n }\n }, {\n key: \"initRows\",\n get: function get() {\n return this.builderMode || this.path === 'defaultValue' || !this.initEmpty;\n }\n }, {\n key: \"emptyValue\",\n get: function get() {\n return this.initEmpty ? [] : [{}];\n }\n }, {\n key: \"addAnotherPosition\",\n get: function get() {\n return _lodash.default.get(this.component, 'addAnotherPosition', 'bottom');\n }\n }, {\n key: \"minLength\",\n get: function get() {\n if (this.hasRowGroups()) {\n return _lodash.default.sum(this.getGroupSizes());\n } else {\n return _lodash.default.get(this.component, 'validate.minLength', 0);\n }\n }\n }, {\n key: \"defaultValue\",\n get: function get() {\n var isBuilderMode = this.builderMode;\n var isEmptyInit = this.initEmpty; // Ensure we have one and only one row in builder mode.\n\n if (isBuilderMode || isEmptyInit && !this.dataValue.length) {\n return isEmptyInit && !isBuilderMode ? [] : [{}];\n }\n\n var value = _get(_getPrototypeOf(DataGridComponent.prototype), \"defaultValue\", this);\n\n var defaultValue;\n\n if (Array.isArray(value)) {\n defaultValue = value;\n } else if (value && _typeof(value) === 'object') {\n defaultValue = [value];\n } else {\n defaultValue = this.emptyValue;\n }\n\n for (var dIndex = defaultValue.length; dIndex < this.minLength; dIndex++) {\n defaultValue.push({});\n }\n\n return defaultValue;\n }\n }, {\n key: \"disabled\",\n get: function get() {\n return _get(_getPrototypeOf(DataGridComponent.prototype), \"disabled\", this);\n },\n set: function set(disabled) {\n _set(_getPrototypeOf(DataGridComponent.prototype), \"disabled\", disabled, this, true);\n\n _lodash.default.each(this.refs[\"\".concat(this.datagridKey, \"-addRow\")], function (button) {\n button.disabled = disabled;\n });\n\n _lodash.default.each(this.refs[\"\".concat(this.datagridKey, \"-removeRow\")], function (button) {\n button.disabled = disabled;\n });\n }\n }, {\n key: \"datagridKey\",\n get: function get() {\n return \"datagrid-\".concat(this.key);\n }\n }, {\n key: \"allowReorder\",\n get: function get() {\n return !this.options.readOnly && _lodash.default.get(this.component, 'reorder', false);\n }\n }, {\n key: \"iteratableRows\",\n get: function get() {\n var _this2 = this;\n\n return this.rows.map(function (row, index) {\n return {\n components: row,\n data: _this2.dataValue[index]\n };\n });\n }\n /**\n * Split rows into chunks.\n * @param {Number[]} groups - array of numbers where each item is size of group\n * @param {Array} rows - rows collection\n * @return {Array}\n */\n\n }, {\n key: \"getRowChunks\",\n value: function getRowChunks(groups, rows) {\n var _groups$reduce = groups.reduce(function (_ref, size) {\n var _ref2 = _slicedToArray(_ref, 2),\n startIndex = _ref2[0],\n acc = _ref2[1];\n\n var endIndex = startIndex + size;\n return [endIndex, [].concat(_toConsumableArray(acc), [[startIndex, endIndex]])];\n }, [0, []]),\n _groups$reduce2 = _slicedToArray(_groups$reduce, 2),\n chunks = _groups$reduce2[1];\n\n return chunks.map(function (range) {\n return _lodash.default.slice.apply(_lodash.default, [rows].concat(_toConsumableArray(range)));\n });\n }\n /**\n * Create groups object.\n * Each key in object represents index of first row in group.\n * @return {Object}\n */\n\n }, {\n key: \"getGroups\",\n value: function getGroups() {\n var groups = _lodash.default.get(this.component, 'rowGroups', []);\n\n var sizes = _lodash.default.map(groups, 'numberOfRows').slice(0, -1);\n\n var indexes = sizes.reduce(function (groupIndexes, size) {\n var last = groupIndexes[groupIndexes.length - 1];\n return groupIndexes.concat(last + size);\n }, [0]);\n return groups.reduce(function (gidxs, group, idx) {\n return _objectSpread(_objectSpread({}, gidxs), {}, _defineProperty({}, indexes[idx], group));\n }, {});\n }\n /**\n * Retrun group sizes.\n * @return {Number[]}\n */\n\n }, {\n key: \"getGroupSizes\",\n value: function getGroupSizes() {\n return _lodash.default.map(_lodash.default.get(this.component, 'rowGroups', []), 'numberOfRows');\n }\n }, {\n key: \"hasRowGroups\",\n value: function hasRowGroups() {\n return _lodash.default.get(this, 'component.enableRowGroups', false) && !this.builderMode;\n }\n }, {\n key: \"totalRowsNumber\",\n value: function totalRowsNumber(groups) {\n return _lodash.default.sum(_lodash.default.map(groups, 'numberOfRows'));\n }\n }, {\n key: \"setStaticValue\",\n value: function setStaticValue(n) {\n this.dataValue = _lodash.default.range(n).map(function () {\n return {};\n });\n }\n }, {\n key: \"hasExtraColumn\",\n value: function hasExtraColumn() {\n return this.hasRemoveButtons() || this.canAddColumn;\n }\n }, {\n key: \"hasRemoveButtons\",\n value: function hasRemoveButtons() {\n return !this.builderMode && !this.component.disableAddingRemovingRows && !this.options.readOnly && !this.disabled && this.fullMode && this.dataValue.length > _lodash.default.get(this.component, 'validate.minLength', 0);\n }\n }, {\n key: \"hasTopSubmit\",\n value: function hasTopSubmit() {\n return this.hasAddButton() && ['top', 'both'].includes(this.addAnotherPosition);\n }\n }, {\n key: \"hasBottomSubmit\",\n value: function hasBottomSubmit() {\n return this.hasAddButton() && ['bottom', 'both'].includes(this.addAnotherPosition);\n }\n }, {\n key: \"canAddColumn\",\n get: function get() {\n return this.builderMode;\n }\n }, {\n key: \"render\",\n value: function render() {\n var columns = this.getColumns();\n var columnExtra = 0;\n var hasRemoveButtons = this.hasRemoveButtons();\n\n if (this.component.reorder) {\n columnExtra++;\n }\n\n if (hasRemoveButtons) {\n columnExtra++;\n }\n\n if (this.canAddColumn) {\n columnExtra++;\n }\n\n var colWidth = Math.floor(12 / (columns.length + columnExtra));\n return _get(_getPrototypeOf(DataGridComponent.prototype), \"render\", this).call(this, this.renderTemplate('datagrid', {\n rows: this.getRows(),\n columns: columns,\n groups: this.hasRowGroups() ? this.getGroups() : [],\n visibleColumns: this.visibleColumns,\n hasToggle: _lodash.default.get(this, 'component.groupToggle', false),\n hasHeader: this.hasHeader(),\n hasExtraColumn: this.hasExtraColumn(),\n hasAddButton: this.hasAddButton(),\n hasRemoveButtons: hasRemoveButtons,\n hasTopSubmit: this.hasTopSubmit(),\n hasBottomSubmit: this.hasBottomSubmit(),\n hasGroups: this.hasRowGroups(),\n numColumns: columns.length + (this.hasExtraColumn() ? 1 : 0),\n datagridKey: this.datagridKey,\n allowReorder: this.allowReorder,\n builder: this.builderMode,\n canAddColumn: this.canAddColumn,\n tabIndex: this.tabIndex,\n placeholder: this.renderTemplate('builderPlaceholder', {\n position: this.componentComponents.length\n }),\n colWidth: colWidth.toString()\n }));\n }\n }, {\n key: \"getRows\",\n value: function getRows() {\n return this.rows.map(function (row) {\n var components = {};\n\n _lodash.default.each(row, function (col, key) {\n components[key] = col.render();\n });\n\n return components;\n });\n }\n }, {\n key: \"getColumns\",\n value: function getColumns() {\n var _this3 = this;\n\n return this.columns.filter(function (comp) {\n return !_this3.visibleColumns.hasOwnProperty(comp.key) || _this3.visibleColumns[comp.key];\n });\n }\n }, {\n key: \"hasHeader\",\n value: function hasHeader() {\n return this.component.components.reduce(function (hasHeader, col) {\n // If any of the components has a title and it isn't hidden, display the header.\n return hasHeader || (col.label || col.title) && !col.hideLabel;\n }, false);\n }\n }, {\n key: \"loadRefs\",\n value: function loadRefs(element, refs) {\n _get(_getPrototypeOf(DataGridComponent.prototype), \"loadRefs\", this).call(this, element, refs);\n\n if (refs['messageContainer'] === 'single') {\n var container = _lodash.default.last(element.querySelectorAll('[ref=messageContainer]'));\n\n this.refs['messageContainer'] = container || this.refs['messageContainer'];\n }\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n var _this$loadRefs,\n _this4 = this;\n\n this.loadRefs(element, (_this$loadRefs = {}, _defineProperty(_this$loadRefs, \"\".concat(this.datagridKey, \"-row\"), 'multiple'), _defineProperty(_this$loadRefs, \"\".concat(this.datagridKey, \"-tbody\"), 'single'), _defineProperty(_this$loadRefs, \"\".concat(this.datagridKey, \"-addRow\"), 'multiple'), _defineProperty(_this$loadRefs, \"\".concat(this.datagridKey, \"-removeRow\"), 'multiple'), _defineProperty(_this$loadRefs, \"\".concat(this.datagridKey, \"-group-header\"), 'multiple'), _defineProperty(_this$loadRefs, this.datagridKey, 'multiple'), _defineProperty(_this$loadRefs, 'messageContainer', 'single'), _this$loadRefs));\n\n if (this.allowReorder) {\n this.refs[\"\".concat(this.datagridKey, \"-row\")].forEach(function (row, index) {\n row.dragInfo = {\n index: index\n };\n });\n\n if (dragula) {\n this.dragula = dragula([this.refs[\"\".concat(this.datagridKey, \"-tbody\")]], {\n moves: function moves(_draggedElement, _oldParent, clickedElement) {\n var clickedElementKey = clickedElement.getAttribute('data-key');\n\n var oldParentKey = _oldParent.getAttribute('data-key'); //Check if the clicked button belongs to that container, if false, it belongs to the nested container\n\n\n if (oldParentKey === clickedElementKey) {\n return clickedElement.classList.contains('formio-drag-button');\n }\n }\n }).on('drop', this.onReorder.bind(this));\n this.dragula.on('cloned', function (el, original) {\n if (el && el.children && original && original.children) {\n original.children.forEach(function (child, index) {\n var styles = getComputedStyle(child, null);\n\n if (styles.cssText !== '') {\n el.children[index].style.cssText = styles.cssText;\n } else {\n var cssText = Object.values(styles).reduce(function (css, propertyName) {\n return \"\".concat(css).concat(propertyName, \":\").concat(styles.getPropertyValue(propertyName), \";\");\n }, '');\n el.children[index].style.cssText = cssText;\n }\n });\n }\n });\n }\n }\n\n this.refs[\"\".concat(this.datagridKey, \"-addRow\")].forEach(function (addButton) {\n _this4.addEventListener(addButton, 'click', _this4.addRow.bind(_this4));\n });\n this.refs[\"\".concat(this.datagridKey, \"-removeRow\")].forEach(function (removeButton, index) {\n _this4.addEventListener(removeButton, 'click', _this4.removeRow.bind(_this4, index));\n });\n\n if (this.hasRowGroups()) {\n this.refs.chunks = this.getRowChunks(this.getGroupSizes(), this.refs[\"\".concat(this.datagridKey, \"-row\")]);\n this.refs[\"\".concat(this.datagridKey, \"-group-header\")].forEach(function (header, index) {\n _this4.addEventListener(header, 'click', function () {\n return _this4.toggleGroup(header, index);\n });\n });\n }\n\n var columns = this.getColumns();\n var rowLength = columns.length;\n this.rows.forEach(function (row, rowIndex) {\n var columnIndex = 0;\n columns.forEach(function (col) {\n _this4.attachComponents(_this4.refs[_this4.datagridKey][rowIndex * rowLength + columnIndex], [_this4.rows[rowIndex][col.key]], _this4.getComponentsContainer());\n\n columnIndex++;\n });\n });\n return _get(_getPrototypeOf(DataGridComponent.prototype), \"attach\", this).call(this, element);\n }\n }, {\n key: \"getComponentsContainer\",\n value: function getComponentsContainer() {\n return this.component.components;\n }\n }, {\n key: \"onReorder\",\n value: function onReorder(element, _target, _source, sibling) {\n if (!element.dragInfo || sibling && !sibling.dragInfo) {\n console.warn('There is no Drag Info available for either dragged or sibling element');\n return;\n }\n\n var oldPosition = element.dragInfo.index; //should drop at next sibling position; no next sibling means drop to last position\n\n var newPosition = sibling ? sibling.dragInfo.index : this.dataValue.length;\n var movedBelow = newPosition > oldPosition;\n var dataValue = (0, _utils.fastCloneDeep)(this.dataValue);\n var draggedRowData = dataValue[oldPosition]; //insert element at new position\n\n dataValue.splice(newPosition, 0, draggedRowData); //remove element from old position (if was moved above, after insertion it's at +1 index)\n\n dataValue.splice(movedBelow ? oldPosition : oldPosition + 1, 1); //need to re-build rows to re-calculate indexes and other indexed fields for component instance (like rows for ex.)\n\n this.setValue(dataValue, {\n isReordered: true\n });\n this.rebuild();\n }\n }, {\n key: \"focusOnNewRowElement\",\n value: function focusOnNewRowElement(row) {\n Object.keys(row).find(function (key) {\n var focusableElements = (0, _utils.getFocusableElements)(row[key].element);\n\n if (focusableElements && focusableElements[0]) {\n focusableElements[0].focus();\n return true;\n }\n\n return false;\n });\n }\n }, {\n key: \"addRow\",\n value: function addRow() {\n var _this5 = this;\n\n var index = this.rows.length; // Handle length mismatch between rows and dataValue\n\n if (this.dataValue.length === index) {\n this.dataValue.push({});\n }\n\n var row;\n var dataValue = this.dataValue;\n var defaultValue = this.defaultValue;\n\n if (this.initEmpty && defaultValue[index]) {\n row = defaultValue[index];\n dataValue[index] = row;\n } else {\n row = dataValue[index];\n }\n\n this.rows[index] = this.createRowComponents(row, index);\n this.emit('dataGridAddRow', {\n component: this.component,\n row: row\n });\n this.checkConditions();\n this.triggerChange();\n this.redraw().then(function () {\n _this5.focusOnNewRowElement(_this5.rows[index]);\n });\n }\n }, {\n key: \"updateComponentsRowIndex\",\n value: function updateComponentsRowIndex(components, rowIndex) {\n var _this6 = this;\n\n components.forEach(function (component, colIndex) {\n var _component$options;\n\n if ((_component$options = component.options) !== null && _component$options !== void 0 && _component$options.name) {\n var newName = \"[\".concat(_this6.key, \"][\").concat(rowIndex, \"]\");\n component.options.name = component.options.name.replace(\"[\".concat(_this6.key, \"][\").concat(component.rowIndex, \"]\"), newName);\n }\n\n component.rowIndex = rowIndex;\n component.row = \"\".concat(rowIndex, \"-\").concat(colIndex);\n component.path = _this6.calculateComponentPath(component);\n });\n }\n }, {\n key: \"updateRowsComponents\",\n value: function updateRowsComponents(rowIndex) {\n var _this7 = this;\n\n this.rows.slice(rowIndex).forEach(function (row, index) {\n _this7.updateComponentsRowIndex(Object.values(row), rowIndex + index);\n });\n }\n }, {\n key: \"removeRow\",\n value: function removeRow(index) {\n this.splice(index, {\n isReordered: true\n });\n this.emit('dataGridDeleteRow', {\n index: index\n });\n\n var _this$rows$splice = this.rows.splice(index, 1),\n _this$rows$splice2 = _slicedToArray(_this$rows$splice, 1),\n row = _this$rows$splice2[0];\n\n this.removeRowComponents(row);\n this.updateRowsComponents(index);\n this.setValue(this.dataValue, {\n isReordered: true\n });\n this.redraw();\n }\n }, {\n key: \"removeRowComponents\",\n value: function removeRowComponents(row) {\n var _this8 = this;\n\n _lodash.default.each(row, function (component) {\n return _this8.removeComponent(component);\n });\n }\n }, {\n key: \"getRowValues\",\n value: function getRowValues() {\n return this.dataValue;\n }\n }, {\n key: \"setRowComponentsData\",\n value: function setRowComponentsData(rowIndex, rowData) {\n _lodash.default.each(this.rows[rowIndex], function (component) {\n component.data = rowData;\n });\n }\n }, {\n key: \"createRows\",\n value: function createRows(init, rebuild) {\n var _this9 = this;\n\n var added = false;\n var rowValues = this.getRowValues(); // Create any missing rows.\n\n rowValues.forEach(function (row, index) {\n if (!rebuild && _this9.rows[index]) {\n _this9.setRowComponentsData(index, row);\n } else {\n if (_this9.rows[index]) {\n _this9.removeRowComponents(_this9.rows[index]);\n }\n\n _this9.rows[index] = _this9.createRowComponents(row, index);\n added = true;\n }\n }); // Delete any extra rows.\n\n var removedRows = this.rows.splice(rowValues.length);\n var removed = !!removedRows.length; // Delete components of extra rows (to make sure that this.components contain only components of exisiting rows)\n\n if (removed) {\n removedRows.forEach(function (row) {\n return _this9.removeRowComponents(row);\n });\n }\n\n if (!init && (added || removed)) {\n this.redraw();\n }\n\n return added;\n }\n }, {\n key: \"createRowComponents\",\n value: function createRowComponents(row, rowIndex) {\n var _this10 = this;\n\n var components = {};\n this.tabIndex = 0;\n this.component.components.map(function (col, colIndex) {\n var options = _lodash.default.clone(_this10.options);\n\n options.name += \"[\".concat(rowIndex, \"]\");\n options.row = \"\".concat(rowIndex, \"-\").concat(colIndex);\n var columnComponent;\n\n if (_this10.builderMode) {\n col.id = col.id + rowIndex;\n columnComponent = col;\n } else {\n columnComponent = _objectSpread(_objectSpread({}, col), {}, {\n id: col.id + rowIndex\n });\n }\n\n var component = _this10.createComponent(columnComponent, options, row);\n\n component.parentDisabled = !!_this10.disabled;\n component.rowIndex = rowIndex;\n component.inDataGrid = true;\n\n if (columnComponent.tabindex && parseInt(columnComponent.tabindex) > _this10.tabIndex) {\n _this10.tabIndex = parseInt(columnComponent.tabindex);\n }\n\n components[col.key] = component;\n });\n return components;\n }\n /**\n * Checks the validity of this datagrid.\n *\n * @param data\n * @param dirty\n * @return {*}\n */\n\n }, {\n key: \"checkValidity\",\n value: function checkValidity(data, dirty, row, silentCheck) {\n data = data || this.rootValue;\n row = row || this.data;\n\n if (!this.checkCondition(row, data)) {\n this.setCustomValidity('');\n return true;\n }\n\n if (!this.checkComponentValidity(data, dirty, row, {\n silentCheck: silentCheck\n })) {\n return false;\n }\n\n var isValid = this.checkRows('checkValidity', data, dirty, true, silentCheck);\n this.checkModal(isValid, dirty);\n return isValid;\n }\n }, {\n key: \"checkColumns\",\n value: function checkColumns(data) {\n var _this11 = this;\n\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n data = data || this.rootValue;\n var show = false;\n\n if (!this.rows || !this.rows.length) {\n return {\n rebuild: false,\n show: false\n };\n }\n\n if (this.builderMode) {\n return {\n rebuild: false,\n show: true\n };\n }\n\n var visibility = {};\n var logicRebuild = false;\n var dataValue = this.dataValue;\n this.rows.forEach(function (row, rowIndex) {\n _lodash.default.each(row, function (col, key) {\n if (col && typeof col.checkConditions === 'function') {\n var firstRowCheck = visibility[key] === undefined;\n visibility[key] = !!visibility[key] || col.checkConditions(data, flags, dataValue[rowIndex]) && col.type !== 'hidden';\n\n if (col.component.logic && firstRowCheck) {\n var compIndex = _lodash.default.findIndex(_this11.columns, ['key', key]);\n\n if (!_lodash.default.isEqual(_this11.columns[compIndex], col.component)) {\n logicRebuild = true;\n _this11.columns[compIndex] = col.component;\n }\n }\n }\n });\n });\n var rebuild = !_lodash.default.isEqual(visibility, this.visibleColumns) || logicRebuild;\n\n _lodash.default.each(visibility, function (col) {\n show |= col;\n });\n\n this.visibleColumns = visibility;\n return {\n rebuild: rebuild,\n show: show\n };\n }\n }, {\n key: \"checkComponentConditions\",\n value: function checkComponentConditions(data, flags, row) {\n var isVisible = this.visible; // If table isn't visible, don't bother calculating columns.\n\n if (!_get(_getPrototypeOf(DataGridComponent.prototype), \"checkComponentConditions\", this).call(this, data, flags, row)) {\n return false;\n }\n\n var _this$checkColumns = this.checkColumns(data, flags),\n rebuild = _this$checkColumns.rebuild,\n show = _this$checkColumns.show; // Check if a rebuild is needed or the visibility changes.\n\n\n if (rebuild || !isVisible) {\n this.createRows(false, rebuild);\n } // Return if this table should show.\n\n\n return show;\n }\n }, {\n key: \"setValue\",\n value: function setValue(value) {\n var _this12 = this;\n\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n if (!value) {\n this.dataValue = this.defaultValue;\n this.createRows();\n return false;\n }\n\n if (!Array.isArray(value)) {\n if (_typeof(value) === 'object') {\n value = [value];\n } else {\n this.createRows();\n value = [{}];\n }\n } // Make sure we always have at least one row.\n // NOTE: Removing this will break \"Public Configurations\" in portal. ;)\n\n\n if (value && !value.length && !this.initEmpty) {\n value.push({});\n }\n\n var isSettingSubmission = flags.fromSubmission && !_lodash.default.isEqual(value, this.emptyValue);\n var changed = this.hasChanged(value, this.dataValue);\n this.dataValue = value;\n\n if (this.initRows || isSettingSubmission) {\n if (!this.createRows() && changed) {\n this.redraw();\n }\n }\n\n if (this.componentModal && isSettingSubmission) {\n this.componentModal.setValue(value);\n }\n\n this.rows.forEach(function (row, rowIndex) {\n if (value.length <= rowIndex) {\n return;\n }\n\n _lodash.default.each(row, function (col) {\n col.rowIndex = rowIndex;\n\n _this12.setNestedValue(col, value[rowIndex], flags);\n });\n });\n this.updateOnChange(flags, changed);\n return changed;\n }\n }, {\n key: \"restoreComponentsContext\",\n value: function restoreComponentsContext() {\n var _this13 = this;\n\n this.rows.forEach(function (row, index) {\n return _lodash.default.forIn(row, function (component) {\n return component.data = _this13.dataValue[index];\n });\n });\n }\n }, {\n key: \"getComponent\",\n value: function getComponent(path, fn) {\n path = Array.isArray(path) ? path : [path];\n\n var _path = path,\n _path2 = _toArray(_path),\n key = _path2[0],\n remainingPath = _path2.slice(1);\n\n var result = [];\n\n if (_lodash.default.isNumber(key) && remainingPath.length) {\n var compKey = remainingPath.pop();\n result = this.rows[key][compKey]; // If the component is inside a Layout Component, try to find it among all the row's components\n\n if (!result) {\n Object.entries(this.rows[key]).forEach(function (_ref3) {\n var _ref4 = _slicedToArray(_ref3, 2),\n comp = _ref4[1];\n\n if ('getComponent' in comp) {\n var possibleResult = comp.getComponent([compKey], fn);\n\n if (possibleResult) {\n result = possibleResult;\n }\n }\n });\n }\n\n if (result && _lodash.default.isFunction(fn)) {\n fn(result, this.getComponents());\n }\n\n if (remainingPath.length && 'getComponent' in result) {\n return result.getComponent(remainingPath, fn);\n }\n\n return result;\n }\n\n if (!_lodash.default.isString(key)) {\n return result;\n }\n\n this.everyComponent(function (component, components) {\n if (component.component.key === key) {\n var comp = component;\n\n if (remainingPath.length > 0 && 'getComponent' in component) {\n comp = component.getComponent(remainingPath, fn);\n } else if (fn) {\n fn(component, components);\n }\n\n result = result.concat(comp);\n }\n });\n return result.length > 0 ? result : null;\n }\n }, {\n key: \"toggleGroup\",\n value: function toggleGroup(element, index) {\n element.classList.toggle('collapsed');\n\n _lodash.default.each(this.refs.chunks[index], function (row) {\n row.classList.toggle('hidden');\n });\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len2 = arguments.length, extend = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n extend[_key2] = arguments[_key2];\n }\n\n return _NestedArrayComponent2.default.schema.apply(_NestedArrayComponent2.default, [{\n label: 'Data Grid',\n key: 'dataGrid',\n type: 'datagrid',\n clearOnHide: true,\n input: true,\n tree: true,\n components: []\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Data Grid',\n icon: 'th',\n group: 'data',\n documentation: '/userguide/forms/data-components#data-grid',\n weight: 30,\n schema: DataGridComponent.schema()\n };\n }\n }]);\n\n return DataGridComponent;\n}(_NestedArrayComponent2.default);\n\nexports[\"default\"] = DataGridComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/datagrid/DataGrid.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.set.js */ \"./node_modules/core-js/modules/es.reflect.set.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.from.js */ \"./node_modules/core-js/modules/es.array.from.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptors.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-properties.js */ \"./node_modules/core-js/modules/es.object.define-properties.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.array.is-array.js */ \"./node_modules/core-js/modules/es.array.is-array.js\");\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n__webpack_require__(/*! core-js/modules/es.array.reduce.js */ \"./node_modules/core-js/modules/es.array.reduce.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.array.slice.js */ \"./node_modules/core-js/modules/es.array.slice.js\");\n__webpack_require__(/*! core-js/modules/es.array.includes.js */ \"./node_modules/core-js/modules/es.array.includes.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-string.js */ \"./node_modules/core-js/modules/es.date.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.values.js */ \"./node_modules/core-js/modules/es.object.values.js\");\n__webpack_require__(/*! core-js/modules/es.array.splice.js */ \"./node_modules/core-js/modules/es.array.splice.js\");\n__webpack_require__(/*! core-js/modules/es.array.find.js */ \"./node_modules/core-js/modules/es.array.find.js\");\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n__webpack_require__(/*! core-js/modules/es.parse-int.js */ \"./node_modules/core-js/modules/es.parse-int.js\");\n__webpack_require__(/*! core-js/modules/es.array.find-index.js */ \"./node_modules/core-js/modules/es.array.find-index.js\");\n__webpack_require__(/*! core-js/modules/es.object.entries.js */ \"./node_modules/core-js/modules/es.object.entries.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nvar _NestedArrayComponent2 = _interopRequireDefault(__webpack_require__(/*! ../_classes/nestedarray/NestedArrayComponent */ \"./lib/components/_classes/nestedarray/NestedArrayComponent.js\"));\nvar _utils = __webpack_require__(/*! ../../utils/utils */ \"./lib/utils/utils.js\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _toArray(arr) { return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest(); }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : \"undefined\" != typeof Symbol && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) { ; } } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i[\"return\"] && (_r = _i[\"return\"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction set(target, property, value, receiver) { if (typeof Reflect !== \"undefined\" && Reflect.set) { set = Reflect.set; } else { set = function set(target, property, value, receiver) { var base = _superPropBase(target, property); var desc; if (base) { desc = Object.getOwnPropertyDescriptor(base, property); if (desc.set) { desc.set.call(receiver, value); return true; } else if (!desc.writable) { return false; } } desc = Object.getOwnPropertyDescriptor(receiver, property); if (desc) { if (!desc.writable) { return false; } desc.value = value; Object.defineProperty(receiver, property, desc); } else { _defineProperty(receiver, property, value); } return true; }; } return set(target, property, value, receiver); }\nfunction _set(target, property, value, receiver, isStrict) { var s = set(target, property, value, receiver || target); if (!s && isStrict) { throw new Error('failed to set property'); } return value; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar dragula;\nif (typeof window !== 'undefined') {\n // Import from \"dist\" because it would require and \"global\" would not be defined in Angular apps.\n dragula = __webpack_require__(/*! dragula/dist/dragula */ \"./node_modules/dragula/dist/dragula.js\");\n}\nvar DataGridComponent = /*#__PURE__*/function (_NestedArrayComponent) {\n _inherits(DataGridComponent, _NestedArrayComponent);\n var _super = _createSuper(DataGridComponent);\n function DataGridComponent() {\n var _this;\n _classCallCheck(this, DataGridComponent);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _this.type = 'datagrid';\n _this.tabIndex = 0;\n return _this;\n }\n _createClass(DataGridComponent, [{\n key: \"init\",\n value: function init() {\n this.components = this.components || [];\n\n // Add new values based on minLength.\n this.rows = [];\n this.columns = _toConsumableArray(this.component.components);\n if (this.initRows || !_lodash[\"default\"].isEqual(this.dataValue, this.emptyValue)) {\n this.createRows(true);\n }\n this.visibleColumns = {};\n this.prevHasAddButton = this.hasAddButton();\n this.checkColumns();\n }\n }, {\n key: \"dataValue\",\n get: function get() {\n var dataValue = _get(_getPrototypeOf(DataGridComponent.prototype), \"dataValue\", this);\n if (!dataValue || !Array.isArray(dataValue)) {\n return this.emptyValue;\n }\n return dataValue;\n },\n set: function set(value) {\n _set(_getPrototypeOf(DataGridComponent.prototype), \"dataValue\", value, this, true);\n }\n }, {\n key: \"defaultSchema\",\n get: function get() {\n return DataGridComponent.schema();\n }\n }, {\n key: \"initEmpty\",\n get: function get() {\n return this.component.initEmpty || this.component.noFirstRow;\n }\n }, {\n key: \"initRows\",\n get: function get() {\n return this.builderMode || this.path === 'defaultValue' || !this.initEmpty;\n }\n }, {\n key: \"emptyValue\",\n get: function get() {\n return this.initEmpty ? [] : [{}];\n }\n }, {\n key: \"addAnotherPosition\",\n get: function get() {\n return _lodash[\"default\"].get(this.component, 'addAnotherPosition', 'bottom');\n }\n }, {\n key: \"minLength\",\n get: function get() {\n if (this.hasRowGroups()) {\n return _lodash[\"default\"].sum(this.getGroupSizes());\n } else {\n return _lodash[\"default\"].get(this.component, 'validate.minLength', 0);\n }\n }\n }, {\n key: \"defaultValue\",\n get: function get() {\n var isBuilderMode = this.builderMode;\n var isEmptyInit = this.initEmpty;\n // Ensure we have one and only one row in builder mode.\n if (isBuilderMode || isEmptyInit && !this.dataValue.length) {\n return isEmptyInit && !isBuilderMode ? [] : [{}];\n }\n var value = _get(_getPrototypeOf(DataGridComponent.prototype), \"defaultValue\", this);\n var defaultValue;\n if (Array.isArray(value)) {\n defaultValue = value;\n } else if (value && _typeof(value) === 'object') {\n defaultValue = [value];\n } else {\n defaultValue = this.emptyValue;\n }\n for (var dIndex = defaultValue.length; dIndex < this.minLength; dIndex++) {\n defaultValue.push({});\n }\n return defaultValue;\n }\n }, {\n key: \"disabled\",\n get: function get() {\n return _get(_getPrototypeOf(DataGridComponent.prototype), \"disabled\", this);\n },\n set: function set(disabled) {\n _set(_getPrototypeOf(DataGridComponent.prototype), \"disabled\", disabled, this, true);\n _lodash[\"default\"].each(this.refs[\"\".concat(this.datagridKey, \"-addRow\")], function (button) {\n button.disabled = disabled;\n });\n _lodash[\"default\"].each(this.refs[\"\".concat(this.datagridKey, \"-removeRow\")], function (button) {\n button.disabled = disabled;\n });\n }\n }, {\n key: \"datagridKey\",\n get: function get() {\n return \"datagrid-\".concat(this.key);\n }\n }, {\n key: \"allowReorder\",\n get: function get() {\n return !this.options.readOnly && _lodash[\"default\"].get(this.component, 'reorder', false);\n }\n }, {\n key: \"iteratableRows\",\n get: function get() {\n var _this2 = this;\n return this.rows.map(function (row, index) {\n return {\n components: row,\n data: _this2.dataValue[index]\n };\n });\n }\n\n /**\n * Split rows into chunks.\n * @param {Number[]} groups - array of numbers where each item is size of group\n * @param {Array} rows - rows collection\n * @return {Array}\n */\n }, {\n key: \"getRowChunks\",\n value: function getRowChunks(groups, rows) {\n var _groups$reduce = groups.reduce(function (_ref, size) {\n var _ref2 = _slicedToArray(_ref, 2),\n startIndex = _ref2[0],\n acc = _ref2[1];\n var endIndex = startIndex + size;\n return [endIndex, [].concat(_toConsumableArray(acc), [[startIndex, endIndex]])];\n }, [0, []]),\n _groups$reduce2 = _slicedToArray(_groups$reduce, 2),\n chunks = _groups$reduce2[1];\n return chunks.map(function (range) {\n return _lodash[\"default\"].slice.apply(_lodash[\"default\"], [rows].concat(_toConsumableArray(range)));\n });\n }\n\n /**\n * Create groups object.\n * Each key in object represents index of first row in group.\n * @return {Object}\n */\n }, {\n key: \"getGroups\",\n value: function getGroups() {\n var groups = _lodash[\"default\"].get(this.component, 'rowGroups', []);\n var sizes = _lodash[\"default\"].map(groups, 'numberOfRows').slice(0, -1);\n var indexes = sizes.reduce(function (groupIndexes, size) {\n var last = groupIndexes[groupIndexes.length - 1];\n return groupIndexes.concat(last + size);\n }, [0]);\n return groups.reduce(function (gidxs, group, idx) {\n return _objectSpread(_objectSpread({}, gidxs), {}, _defineProperty({}, indexes[idx], group));\n }, {});\n }\n\n /**\n * Retrun group sizes.\n * @return {Number[]}\n */\n }, {\n key: \"getGroupSizes\",\n value: function getGroupSizes() {\n return _lodash[\"default\"].map(_lodash[\"default\"].get(this.component, 'rowGroups', []), 'numberOfRows');\n }\n }, {\n key: \"hasRowGroups\",\n value: function hasRowGroups() {\n return _lodash[\"default\"].get(this, 'component.enableRowGroups', false) && !this.builderMode;\n }\n }, {\n key: \"totalRowsNumber\",\n value: function totalRowsNumber(groups) {\n return _lodash[\"default\"].sum(_lodash[\"default\"].map(groups, 'numberOfRows'));\n }\n }, {\n key: \"setStaticValue\",\n value: function setStaticValue(n) {\n this.dataValue = _lodash[\"default\"].range(n).map(function () {\n return {};\n });\n }\n }, {\n key: \"hasExtraColumn\",\n value: function hasExtraColumn() {\n return this.hasRemoveButtons() || this.canAddColumn;\n }\n }, {\n key: \"hasRemoveButtons\",\n value: function hasRemoveButtons() {\n return !this.builderMode && !this.component.disableAddingRemovingRows && !this.options.readOnly && !this.disabled && this.fullMode && this.dataValue.length > _lodash[\"default\"].get(this.component, 'validate.minLength', 0);\n }\n }, {\n key: \"hasTopSubmit\",\n value: function hasTopSubmit() {\n return this.hasAddButton() && ['top', 'both'].includes(this.addAnotherPosition);\n }\n }, {\n key: \"hasBottomSubmit\",\n value: function hasBottomSubmit() {\n return this.hasAddButton() && ['bottom', 'both'].includes(this.addAnotherPosition);\n }\n }, {\n key: \"canAddColumn\",\n get: function get() {\n return this.builderMode;\n }\n }, {\n key: \"render\",\n value: function render() {\n var columns = this.getColumns();\n var columnExtra = 0;\n var hasRemoveButtons = this.hasRemoveButtons();\n if (this.component.reorder) {\n columnExtra++;\n }\n if (hasRemoveButtons) {\n columnExtra++;\n }\n if (this.canAddColumn) {\n columnExtra++;\n }\n var colWidth = Math.floor(12 / (columns.length + columnExtra));\n return _get(_getPrototypeOf(DataGridComponent.prototype), \"render\", this).call(this, this.renderTemplate('datagrid', {\n rows: this.getRows(),\n columns: columns,\n groups: this.hasRowGroups() ? this.getGroups() : [],\n visibleColumns: this.visibleColumns,\n hasToggle: _lodash[\"default\"].get(this, 'component.groupToggle', false),\n hasHeader: this.hasHeader(),\n hasExtraColumn: this.hasExtraColumn(),\n hasAddButton: this.hasAddButton(),\n hasRemoveButtons: hasRemoveButtons,\n hasTopSubmit: this.hasTopSubmit(),\n hasBottomSubmit: this.hasBottomSubmit(),\n hasGroups: this.hasRowGroups(),\n numColumns: columns.length + (this.hasExtraColumn() ? 1 : 0),\n datagridKey: this.datagridKey,\n allowReorder: this.allowReorder,\n builder: this.builderMode,\n canAddColumn: this.canAddColumn,\n tabIndex: this.tabIndex,\n placeholder: this.renderTemplate('builderPlaceholder', {\n position: this.componentComponents.length\n }),\n colWidth: colWidth.toString()\n }));\n }\n }, {\n key: \"getRows\",\n value: function getRows() {\n return this.rows.map(function (row) {\n var components = {};\n _lodash[\"default\"].each(row, function (col, key) {\n components[key] = col.render();\n });\n return components;\n });\n }\n }, {\n key: \"getColumns\",\n value: function getColumns() {\n var _this3 = this;\n return this.columns.filter(function (comp) {\n return !_this3.visibleColumns.hasOwnProperty(comp.key) || _this3.visibleColumns[comp.key];\n });\n }\n }, {\n key: \"hasHeader\",\n value: function hasHeader() {\n return this.component.components.reduce(function (hasHeader, col) {\n // If any of the components has a title and it isn't hidden, display the header.\n return hasHeader || (col.label || col.title) && !col.hideLabel;\n }, false);\n }\n }, {\n key: \"loadRefs\",\n value: function loadRefs(element, refs) {\n _get(_getPrototypeOf(DataGridComponent.prototype), \"loadRefs\", this).call(this, element, refs);\n if (refs['messageContainer'] === 'single') {\n var container = _lodash[\"default\"].last(element.querySelectorAll('[ref=messageContainer]'));\n this.refs['messageContainer'] = container || this.refs['messageContainer'];\n }\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n var _this$loadRefs,\n _this4 = this;\n this.loadRefs(element, (_this$loadRefs = {}, _defineProperty(_this$loadRefs, \"\".concat(this.datagridKey, \"-row\"), 'multiple'), _defineProperty(_this$loadRefs, \"\".concat(this.datagridKey, \"-tbody\"), 'single'), _defineProperty(_this$loadRefs, \"\".concat(this.datagridKey, \"-addRow\"), 'multiple'), _defineProperty(_this$loadRefs, \"\".concat(this.datagridKey, \"-removeRow\"), 'multiple'), _defineProperty(_this$loadRefs, \"\".concat(this.datagridKey, \"-group-header\"), 'multiple'), _defineProperty(_this$loadRefs, this.datagridKey, 'multiple'), _defineProperty(_this$loadRefs, 'messageContainer', 'single'), _this$loadRefs));\n if (this.allowReorder) {\n this.refs[\"\".concat(this.datagridKey, \"-row\")].forEach(function (row, index) {\n row.dragInfo = {\n index: index\n };\n });\n if (dragula) {\n this.dragula = dragula([this.refs[\"\".concat(this.datagridKey, \"-tbody\")]], {\n moves: function moves(_draggedElement, _oldParent, clickedElement) {\n var clickedElementKey = clickedElement.getAttribute('data-key');\n var oldParentKey = _oldParent.getAttribute('data-key');\n\n //Check if the clicked button belongs to that container, if false, it belongs to the nested container\n if (oldParentKey === clickedElementKey) {\n return clickedElement.classList.contains('formio-drag-button');\n }\n }\n }).on('drop', this.onReorder.bind(this));\n this.dragula.on('cloned', function (el, original) {\n if (el && el.children && original && original.children) {\n _lodash[\"default\"].each(original.children, function (child, index) {\n var styles = getComputedStyle(child, null);\n if (styles.cssText !== '') {\n el.children[index].style.cssText = styles.cssText;\n } else {\n var cssText = Object.values(styles).reduce(function (css, propertyName) {\n return \"\".concat(css).concat(propertyName, \":\").concat(styles.getPropertyValue(propertyName), \";\");\n }, '');\n el.children[index].style.cssText = cssText;\n }\n });\n }\n });\n }\n }\n this.refs[\"\".concat(this.datagridKey, \"-addRow\")].forEach(function (addButton) {\n _this4.addEventListener(addButton, 'click', _this4.addRow.bind(_this4));\n });\n this.refs[\"\".concat(this.datagridKey, \"-removeRow\")].forEach(function (removeButton, index) {\n _this4.addEventListener(removeButton, 'click', _this4.removeRow.bind(_this4, index));\n });\n if (this.hasRowGroups()) {\n this.refs.chunks = this.getRowChunks(this.getGroupSizes(), this.refs[\"\".concat(this.datagridKey, \"-row\")]);\n this.refs[\"\".concat(this.datagridKey, \"-group-header\")].forEach(function (header, index) {\n _this4.addEventListener(header, 'click', function () {\n return _this4.toggleGroup(header, index);\n });\n });\n }\n var columns = this.getColumns();\n var rowLength = columns.length;\n this.rows.forEach(function (row, rowIndex) {\n var columnIndex = 0;\n columns.forEach(function (col) {\n _this4.attachComponents(_this4.refs[_this4.datagridKey][rowIndex * rowLength + columnIndex], [_this4.rows[rowIndex][col.key]], _this4.getComponentsContainer());\n columnIndex++;\n });\n });\n return _get(_getPrototypeOf(DataGridComponent.prototype), \"attach\", this).call(this, element);\n }\n }, {\n key: \"getComponentsContainer\",\n value: function getComponentsContainer() {\n return this.component.components;\n }\n }, {\n key: \"onReorder\",\n value: function onReorder(element, _target, _source, sibling) {\n if (!element.dragInfo || sibling && !sibling.dragInfo) {\n console.warn('There is no Drag Info available for either dragged or sibling element');\n return;\n }\n var oldPosition = element.dragInfo.index;\n //should drop at next sibling position; no next sibling means drop to last position\n var newPosition = sibling ? sibling.dragInfo.index : this.dataValue.length;\n var movedBelow = newPosition > oldPosition;\n var dataValue = (0, _utils.fastCloneDeep)(this.dataValue);\n var draggedRowData = dataValue[oldPosition];\n\n //insert element at new position\n dataValue.splice(newPosition, 0, draggedRowData);\n //remove element from old position (if was moved above, after insertion it's at +1 index)\n dataValue.splice(movedBelow ? oldPosition : oldPosition + 1, 1);\n\n //need to re-build rows to re-calculate indexes and other indexed fields for component instance (like rows for ex.)\n this.setValue(dataValue, {\n isReordered: true\n });\n this.rebuild();\n }\n }, {\n key: \"focusOnNewRowElement\",\n value: function focusOnNewRowElement(row) {\n Object.keys(row).find(function (key) {\n var focusableElements = (0, _utils.getFocusableElements)(row[key].element);\n if (focusableElements && focusableElements[0]) {\n focusableElements[0].focus();\n return true;\n }\n return false;\n });\n }\n }, {\n key: \"addRow\",\n value: function addRow() {\n var _this5 = this;\n var index = this.rows.length;\n\n // Handle length mismatch between rows and dataValue\n if (this.dataValue.length === index) {\n this.dataValue.push({});\n }\n var row;\n var dataValue = this.dataValue;\n var defaultValue = this.defaultValue;\n if (this.initEmpty && defaultValue[index]) {\n row = defaultValue[index];\n dataValue[index] = row;\n } else {\n row = dataValue[index];\n }\n this.rows[index] = this.createRowComponents(row, index);\n this.emit('dataGridAddRow', {\n component: this.component,\n row: row\n });\n this.checkConditions();\n this.triggerChange();\n this.redraw().then(function () {\n _this5.focusOnNewRowElement(_this5.rows[index]);\n });\n }\n }, {\n key: \"updateComponentsRowIndex\",\n value: function updateComponentsRowIndex(components, rowIndex) {\n var _this6 = this;\n components.forEach(function (component, colIndex) {\n var _component$options;\n if ((_component$options = component.options) !== null && _component$options !== void 0 && _component$options.name) {\n var newName = \"[\".concat(_this6.key, \"][\").concat(rowIndex, \"]\");\n component.options.name = component.options.name.replace(\"[\".concat(_this6.key, \"][\").concat(component.rowIndex, \"]\"), newName);\n }\n component.rowIndex = rowIndex;\n component.row = \"\".concat(rowIndex, \"-\").concat(colIndex);\n component.path = _this6.calculateComponentPath(component);\n });\n }\n }, {\n key: \"updateRowsComponents\",\n value: function updateRowsComponents(rowIndex) {\n var _this7 = this;\n this.rows.slice(rowIndex).forEach(function (row, index) {\n _this7.updateComponentsRowIndex(Object.values(row), rowIndex + index);\n });\n }\n }, {\n key: \"removeRow\",\n value: function removeRow(index) {\n this.splice(index, {\n isReordered: true\n });\n this.emit('dataGridDeleteRow', {\n index: index\n });\n var _this$rows$splice = this.rows.splice(index, 1),\n _this$rows$splice2 = _slicedToArray(_this$rows$splice, 1),\n row = _this$rows$splice2[0];\n this.removeRowComponents(row);\n this.updateRowsComponents(index);\n this.setValue(this.dataValue, {\n isReordered: true\n });\n this.redraw();\n }\n }, {\n key: \"removeRowComponents\",\n value: function removeRowComponents(row) {\n var _this8 = this;\n _lodash[\"default\"].each(row, function (component) {\n return _this8.removeComponent(component);\n });\n }\n }, {\n key: \"getRowValues\",\n value: function getRowValues() {\n return this.dataValue;\n }\n }, {\n key: \"setRowComponentsData\",\n value: function setRowComponentsData(rowIndex, rowData) {\n _lodash[\"default\"].each(this.rows[rowIndex], function (component) {\n component.data = rowData;\n });\n }\n }, {\n key: \"createRows\",\n value: function createRows(init, rebuild) {\n var _this9 = this;\n var added = false;\n var rowValues = this.getRowValues();\n // Create any missing rows.\n rowValues.forEach(function (row, index) {\n if (!rebuild && _this9.rows[index]) {\n _this9.setRowComponentsData(index, row);\n } else {\n if (_this9.rows[index]) {\n _this9.removeRowComponents(_this9.rows[index]);\n }\n _this9.rows[index] = _this9.createRowComponents(row, index);\n added = true;\n }\n });\n // Delete any extra rows.\n var removedRows = this.rows.splice(rowValues.length);\n var removed = !!removedRows.length;\n // Delete components of extra rows (to make sure that this.components contain only components of exisiting rows)\n if (removed) {\n removedRows.forEach(function (row) {\n return _this9.removeRowComponents(row);\n });\n }\n if (!init && (added || removed)) {\n this.redraw();\n }\n return added;\n }\n }, {\n key: \"createRowComponents\",\n value: function createRowComponents(row, rowIndex) {\n var _this10 = this;\n var components = {};\n this.tabIndex = 0;\n this.component.components.map(function (col, colIndex) {\n var options = _lodash[\"default\"].clone(_this10.options);\n options.name += \"[\".concat(rowIndex, \"]\");\n options.row = \"\".concat(rowIndex, \"-\").concat(colIndex);\n var columnComponent;\n if (_this10.builderMode) {\n col.id = col.id + rowIndex;\n columnComponent = col;\n } else {\n columnComponent = _objectSpread(_objectSpread({}, col), {}, {\n id: col.id + rowIndex\n });\n }\n var component = _this10.createComponent(columnComponent, options, row);\n component.parentDisabled = !!_this10.disabled;\n component.rowIndex = rowIndex;\n component.inDataGrid = true;\n if (columnComponent.tabindex && parseInt(columnComponent.tabindex) > _this10.tabIndex) {\n _this10.tabIndex = parseInt(columnComponent.tabindex);\n }\n components[col.key] = component;\n });\n return components;\n }\n\n /**\n * Checks the validity of this datagrid.\n *\n * @param data\n * @param dirty\n * @return {*}\n */\n }, {\n key: \"checkValidity\",\n value: function checkValidity(data, dirty, row, silentCheck) {\n data = data || this.rootValue;\n row = row || this.data;\n if (!this.checkCondition(row, data)) {\n this.setCustomValidity('');\n return true;\n }\n if (!this.checkComponentValidity(data, dirty, row, {\n silentCheck: silentCheck\n })) {\n return false;\n }\n var isValid = this.checkRows('checkValidity', data, dirty, true, silentCheck);\n this.checkModal(isValid, dirty);\n return isValid;\n }\n }, {\n key: \"checkColumns\",\n value: function checkColumns(data) {\n var _this11 = this;\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n data = data || this.rootValue;\n var show = false;\n if (!this.rows || !this.rows.length) {\n return {\n rebuild: false,\n show: false\n };\n }\n if (this.builderMode) {\n return {\n rebuild: false,\n show: true\n };\n }\n var visibility = {};\n var logicRebuild = false;\n var dataValue = this.dataValue;\n this.rows.forEach(function (row, rowIndex) {\n _lodash[\"default\"].each(row, function (col, key) {\n if (col && typeof col.checkConditions === 'function') {\n var firstRowCheck = visibility[key] === undefined;\n visibility[key] = !!visibility[key] || col.checkConditions(data, flags, dataValue[rowIndex]) && col.type !== 'hidden';\n if (col.component.logic && firstRowCheck) {\n var compIndex = _lodash[\"default\"].findIndex(_this11.columns, ['key', key]);\n if (!_lodash[\"default\"].isEqual(_this11.columns[compIndex], col.component)) {\n logicRebuild = true;\n _this11.columns[compIndex] = col.component;\n }\n }\n }\n });\n });\n var rebuild = !_lodash[\"default\"].isEqual(visibility, this.visibleColumns) || logicRebuild;\n _lodash[\"default\"].each(visibility, function (col) {\n show |= col;\n });\n this.visibleColumns = visibility;\n return {\n rebuild: rebuild,\n show: show\n };\n }\n }, {\n key: \"checkComponentConditions\",\n value: function checkComponentConditions(data, flags, row) {\n var isVisible = this.visible;\n // If table isn't visible, don't bother calculating columns.\n if (!_get(_getPrototypeOf(DataGridComponent.prototype), \"checkComponentConditions\", this).call(this, data, flags, row)) {\n return false;\n }\n var _this$checkColumns = this.checkColumns(data, flags),\n rebuild = _this$checkColumns.rebuild,\n show = _this$checkColumns.show;\n // Check if a rebuild is needed or the visibility changes.\n if (rebuild || !isVisible) {\n this.createRows(false, rebuild);\n }\n\n // Return if this table should show.\n return show;\n }\n }, {\n key: \"setValue\",\n value: function setValue(value) {\n var _this12 = this;\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n if (!value) {\n this.dataValue = this.defaultValue;\n this.createRows();\n return false;\n }\n if (!Array.isArray(value)) {\n if (_typeof(value) === 'object') {\n value = [value];\n } else {\n this.createRows();\n value = [{}];\n }\n }\n\n // Make sure we always have at least one row.\n // NOTE: Removing this will break \"Public Configurations\" in portal. ;)\n if (value && !value.length && !this.initEmpty) {\n value.push({});\n }\n var isSettingSubmission = flags.fromSubmission && !_lodash[\"default\"].isEqual(value, this.emptyValue);\n var changed = this.hasChanged(value, this.dataValue);\n this.dataValue = value;\n if (this.initRows || isSettingSubmission) {\n if (!this.createRows() && changed) {\n this.redraw();\n }\n }\n if (this.componentModal && isSettingSubmission) {\n this.componentModal.setValue(value);\n }\n this.rows.forEach(function (row, rowIndex) {\n if (value.length <= rowIndex) {\n return;\n }\n _lodash[\"default\"].each(row, function (col) {\n col.rowIndex = rowIndex;\n _this12.setNestedValue(col, value[rowIndex], flags);\n });\n });\n this.updateOnChange(flags, changed);\n return changed;\n }\n }, {\n key: \"restoreComponentsContext\",\n value: function restoreComponentsContext() {\n var _this13 = this;\n this.rows.forEach(function (row, index) {\n return _lodash[\"default\"].forIn(row, function (component) {\n return component.data = _this13.dataValue[index];\n });\n });\n }\n }, {\n key: \"getComponent\",\n value: function getComponent(path, fn) {\n path = Array.isArray(path) ? path : [path];\n var _path = path,\n _path2 = _toArray(_path),\n key = _path2[0],\n remainingPath = _path2.slice(1);\n var result = [];\n if (_lodash[\"default\"].isNumber(key) && remainingPath.length) {\n var compKey = remainingPath.pop();\n result = this.rows[key][compKey];\n // If the component is inside a Layout Component, try to find it among all the row's components\n if (!result) {\n Object.entries(this.rows[key]).forEach(function (_ref3) {\n var _ref4 = _slicedToArray(_ref3, 2),\n comp = _ref4[1];\n if ('getComponent' in comp) {\n var possibleResult = comp.getComponent([compKey], fn);\n if (possibleResult) {\n result = possibleResult;\n }\n }\n });\n }\n if (result && _lodash[\"default\"].isFunction(fn)) {\n fn(result, this.getComponents());\n }\n if (remainingPath.length && 'getComponent' in result) {\n return result.getComponent(remainingPath, fn);\n }\n return result;\n }\n if (!_lodash[\"default\"].isString(key)) {\n return result;\n }\n this.everyComponent(function (component, components) {\n if (component.component.key === key) {\n var comp = component;\n if (remainingPath.length > 0 && 'getComponent' in component) {\n comp = component.getComponent(remainingPath, fn);\n } else if (fn) {\n fn(component, components);\n }\n result = result.concat(comp);\n }\n });\n return result.length > 0 ? result : null;\n }\n }, {\n key: \"toggleGroup\",\n value: function toggleGroup(element, index) {\n element.classList.toggle('collapsed');\n _lodash[\"default\"].each(this.refs.chunks[index], function (row) {\n row.classList.toggle('hidden');\n });\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len2 = arguments.length, extend = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n extend[_key2] = arguments[_key2];\n }\n return _NestedArrayComponent2[\"default\"].schema.apply(_NestedArrayComponent2[\"default\"], [{\n label: 'Data Grid',\n key: 'dataGrid',\n type: 'datagrid',\n clearOnHide: true,\n input: true,\n tree: true,\n components: []\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Data Grid',\n icon: 'th',\n group: 'data',\n documentation: '/userguide/form-building/data-components#data-grid',\n weight: 30,\n schema: DataGridComponent.schema()\n };\n }\n }]);\n return DataGridComponent;\n}(_NestedArrayComponent2[\"default\"]);\nexports[\"default\"] = DataGridComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/datagrid/DataGrid.js?"); /***/ }), @@ -782,10 +815,10 @@ eval("\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \". /*!****************************************************************!*\ !*** ./lib/components/datagrid/editForm/DataGrid.edit.data.js ***! \****************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'multiple',\n ignore: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/datagrid/editForm/DataGrid.edit.data.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'multiple',\n ignore: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/datagrid/editForm/DataGrid.edit.data.js?"); /***/ }), @@ -793,10 +826,10 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /*!*******************************************************************!*\ !*** ./lib/components/datagrid/editForm/DataGrid.edit.display.js ***! \*******************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'placeholder',\n ignore: true\n}, {\n type: 'checkbox',\n label: 'Disable Adding / Removing Rows',\n key: 'disableAddingRemovingRows',\n tooltip: 'Check if you want to hide Add Another button and Remove Row button',\n weight: 405,\n input: true,\n clearOnHide: false,\n customConditional: function customConditional(context) {\n return !context.data.enableRowGroups;\n },\n calculateValue: function calculateValue(context) {\n return context.data.enableRowGroups ? true : context.data.disableAddingRemovingRows;\n }\n}, {\n weight: 406,\n type: 'textarea',\n input: true,\n key: 'conditionalAddButton',\n label: 'Conditional Add Button',\n placeholder: 'show = ...',\n tooltip: 'Specify condition when Add Button should be displayed.',\n editor: 'ace',\n as: 'javascript',\n wysiwyg: {\n minLines: 3\n }\n}, {\n type: 'checkbox',\n label: 'Allow Reorder',\n key: 'reorder',\n weight: 407,\n input: true\n}, {\n type: 'textfield',\n label: 'Add Another Text',\n key: 'addAnother',\n tooltip: 'Set the text of the Add Another button.',\n placeholder: 'Add Another',\n weight: 410,\n input: true,\n customConditional: function customConditional(context) {\n return !context.data.disableAddingRemovingRows;\n }\n}, {\n type: 'select',\n label: 'Add Another Position',\n key: 'addAnotherPosition',\n dataSrc: 'values',\n tooltip: 'Position for Add Another button with respect to Data Grid Array.',\n defaultValue: 'bottom',\n input: true,\n data: {\n values: [{\n label: 'Top',\n value: 'top'\n }, {\n label: 'Bottom',\n value: 'bottom'\n }, {\n label: 'Both',\n value: 'both'\n }]\n },\n weight: 411,\n customConditional: function customConditional(context) {\n return !context.data.disableAddingRemovingRows;\n }\n}, {\n type: 'checkbox',\n label: 'Equal column width',\n key: 'layoutFixed',\n weight: 430,\n input: true\n}, {\n key: 'enableRowGroups',\n type: 'checkbox',\n label: 'Enable Row Groups',\n weight: 440,\n input: true\n}, {\n label: 'Groups',\n disableAddingRemovingRows: false,\n defaultOpen: false,\n addAnother: '',\n addAnotherPosition: 'bottom',\n mask: false,\n tableView: true,\n alwaysEnabled: false,\n type: 'datagrid',\n input: true,\n key: 'rowGroups',\n reorder: true,\n components: [{\n label: 'Label',\n allowMultipleMasks: false,\n showWordCount: false,\n showCharCount: false,\n tableView: true,\n alwaysEnabled: false,\n type: 'textfield',\n input: true,\n key: 'label',\n widget: {\n type: ''\n },\n row: '0-0'\n }, {\n label: 'Number of Rows',\n mask: false,\n tableView: true,\n alwaysEnabled: false,\n type: 'number',\n input: true,\n key: 'numberOfRows',\n row: '0-1'\n }],\n weight: 441,\n conditional: {\n json: {\n var: 'data.enableRowGroups'\n }\n }\n}, {\n label: 'Hide Group on Header Click',\n type: 'checkbox',\n input: true,\n key: 'groupToggle',\n weight: 442,\n conditional: {\n json: {\n var: 'data.enableRowGroups'\n }\n }\n}, {\n label: 'Initialize Empty',\n type: 'checkbox',\n input: true,\n key: 'initEmpty',\n tooltip: 'The DataGrid will have no visible rows when initialized.',\n weight: 450\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/datagrid/editForm/DataGrid.edit.display.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'placeholder',\n ignore: true\n}, {\n type: 'checkbox',\n label: 'Disable Adding / Removing Rows',\n key: 'disableAddingRemovingRows',\n tooltip: 'Check if you want to hide Add Another button and Remove Row button',\n weight: 405,\n input: true,\n clearOnHide: false,\n customConditional: function customConditional(context) {\n return !context.data.enableRowGroups;\n },\n calculateValue: function calculateValue(context) {\n return context.data.enableRowGroups ? true : context.data.disableAddingRemovingRows;\n }\n}, {\n weight: 406,\n type: 'textarea',\n input: true,\n key: 'conditionalAddButton',\n label: 'Conditional Add Button',\n placeholder: 'show = ...',\n tooltip: 'Specify condition when Add Button should be displayed.',\n editor: 'ace',\n as: 'javascript',\n wysiwyg: {\n minLines: 3\n }\n}, {\n type: 'checkbox',\n label: 'Allow Reorder',\n key: 'reorder',\n weight: 407,\n input: true\n}, {\n type: 'textfield',\n label: 'Add Another Text',\n key: 'addAnother',\n tooltip: 'Set the text of the Add Another button.',\n placeholder: 'Add Another',\n weight: 410,\n input: true,\n customConditional: function customConditional(context) {\n return !context.data.disableAddingRemovingRows;\n }\n}, {\n type: 'select',\n label: 'Add Another Position',\n key: 'addAnotherPosition',\n dataSrc: 'values',\n tooltip: 'Position for Add Another button with respect to Data Grid Array.',\n defaultValue: 'bottom',\n input: true,\n data: {\n values: [{\n label: 'Top',\n value: 'top'\n }, {\n label: 'Bottom',\n value: 'bottom'\n }, {\n label: 'Both',\n value: 'both'\n }]\n },\n weight: 411,\n customConditional: function customConditional(context) {\n return !context.data.disableAddingRemovingRows;\n }\n}, {\n type: 'checkbox',\n label: 'Equal column width',\n key: 'layoutFixed',\n weight: 430,\n input: true\n}, {\n key: 'enableRowGroups',\n type: 'checkbox',\n label: 'Enable Row Groups',\n weight: 440,\n input: true\n}, {\n label: 'Groups',\n disableAddingRemovingRows: false,\n defaultOpen: false,\n addAnother: '',\n addAnotherPosition: 'bottom',\n mask: false,\n tableView: true,\n alwaysEnabled: false,\n type: 'datagrid',\n input: true,\n key: 'rowGroups',\n reorder: true,\n components: [{\n label: 'Label',\n allowMultipleMasks: false,\n showWordCount: false,\n showCharCount: false,\n tableView: true,\n alwaysEnabled: false,\n type: 'textfield',\n input: true,\n key: 'label',\n widget: {\n type: ''\n },\n row: '0-0'\n }, {\n label: 'Number of Rows',\n mask: false,\n tableView: true,\n alwaysEnabled: false,\n type: 'number',\n input: true,\n key: 'numberOfRows',\n row: '0-1'\n }],\n weight: 441,\n conditional: {\n json: {\n \"var\": 'data.enableRowGroups'\n }\n }\n}, {\n label: 'Hide Group on Header Click',\n type: 'checkbox',\n input: true,\n key: 'groupToggle',\n weight: 442,\n conditional: {\n json: {\n \"var\": 'data.enableRowGroups'\n }\n }\n}, {\n label: 'Initialize Empty',\n type: 'checkbox',\n input: true,\n key: 'initEmpty',\n tooltip: 'The DataGrid will have no visible rows when initialized.',\n weight: 450\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/datagrid/editForm/DataGrid.edit.display.js?"); /***/ }), @@ -804,10 +837,10 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /*!**********************************************************************!*\ !*** ./lib/components/datagrid/editForm/DataGrid.edit.validation.js ***! \**********************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n ignore: true,\n key: 'unique'\n}, {\n weight: 110,\n key: 'validate.minLength',\n label: 'Minimum Length',\n placeholder: 'Minimum Length',\n type: 'textfield',\n tooltip: 'The minimum length requirement this field must meet.',\n input: true\n}, {\n weight: 120,\n key: 'validate.maxLength',\n label: 'Maximum Length',\n placeholder: 'Maximum Length',\n type: 'textfield',\n tooltip: 'The maximum length requirement this field must meet.',\n input: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/datagrid/editForm/DataGrid.edit.validation.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n ignore: true,\n key: 'unique'\n}, {\n weight: 110,\n key: 'validate.minLength',\n label: 'Minimum Length',\n placeholder: 'Minimum Length',\n type: 'textfield',\n tooltip: 'The minimum length requirement this field must meet.',\n input: true\n}, {\n weight: 120,\n key: 'validate.maxLength',\n label: 'Maximum Length',\n placeholder: 'Maximum Length',\n type: 'textfield',\n tooltip: 'The maximum length requirement this field must meet.',\n input: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/datagrid/editForm/DataGrid.edit.validation.js?"); /***/ }), @@ -818,7 +851,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\nvar _Components = _interopRequireDefault(__webpack_require__(/*! ../Components */ \"./lib/components/Components.js\"));\n\nvar _DataMapEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/DataMap.edit.data */ \"./lib/components/datamap/editForm/DataMap.edit.data.js\"));\n\nvar _DataMapEdit2 = _interopRequireDefault(__webpack_require__(/*! ./editForm/DataMap.edit.display */ \"./lib/components/datamap/editForm/DataMap.edit.display.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _Components.default.baseEditForm.apply(_Components.default, [[{\n key: 'display',\n components: _DataMapEdit2.default\n }, {\n key: 'data',\n components: _DataMapEdit.default\n }, {\n key: 'addons',\n ignore: true\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/datamap/DataMap.form.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\nvar _Components = _interopRequireDefault(__webpack_require__(/*! ../Components */ \"./lib/components/Components.js\"));\nvar _DataMapEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/DataMap.edit.data */ \"./lib/components/datamap/editForm/DataMap.edit.data.js\"));\nvar _DataMapEdit2 = _interopRequireDefault(__webpack_require__(/*! ./editForm/DataMap.edit.display */ \"./lib/components/datamap/editForm/DataMap.edit.display.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _Components[\"default\"].baseEditForm.apply(_Components[\"default\"], [[{\n key: 'display',\n components: _DataMapEdit2[\"default\"]\n }, {\n key: 'data',\n components: _DataMapEdit[\"default\"]\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/datamap/DataMap.form.js?"); /***/ }), @@ -829,7 +862,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.set.js */ \"./node_modules/core-js/modules/es.reflect.set.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.find.js */ \"./node_modules/core-js/modules/es.array.find.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.assign.js */ \"./node_modules/core-js/modules/es.object.assign.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.splice.js */ \"./node_modules/core-js/modules/es.array.splice.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\nvar _Component = _interopRequireDefault(__webpack_require__(/*! ../_classes/component/Component */ \"./lib/components/_classes/component/Component.js\"));\n\nvar _DataGrid = _interopRequireDefault(__webpack_require__(/*! ../datagrid/DataGrid */ \"./lib/components/datagrid/DataGrid.js\"));\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nvar _eventemitter = _interopRequireDefault(__webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\"));\n\nvar _utils = __webpack_require__(/*! ../../utils/utils */ \"./lib/utils/utils.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction set(target, property, value, receiver) { if (typeof Reflect !== \"undefined\" && Reflect.set) { set = Reflect.set; } else { set = function set(target, property, value, receiver) { var base = _superPropBase(target, property); var desc; if (base) { desc = Object.getOwnPropertyDescriptor(base, property); if (desc.set) { desc.set.call(receiver, value); return true; } else if (!desc.writable) { return false; } } desc = Object.getOwnPropertyDescriptor(receiver, property); if (desc) { if (!desc.writable) { return false; } desc.value = value; Object.defineProperty(receiver, property, desc); } else { _defineProperty(receiver, property, value); } return true; }; } return set(target, property, value, receiver); }\n\nfunction _set(target, property, value, receiver, isStrict) { var s = set(target, property, value, receiver || target); if (!s && isStrict) { throw new Error('failed to set property'); } return value; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar DataMapComponent = /*#__PURE__*/function (_DataGridComponent) {\n _inherits(DataMapComponent, _DataGridComponent);\n\n var _super = _createSuper(DataMapComponent);\n\n function DataMapComponent(component, options, data) {\n var _this;\n\n _classCallCheck(this, DataMapComponent);\n\n _this = _super.call(this, component, options, data);\n _this.type = 'datamap';\n return _this;\n }\n\n _createClass(DataMapComponent, [{\n key: \"schema\",\n get: function get() {\n var schema = _get(_getPrototypeOf(DataMapComponent.prototype), \"schema\", this);\n\n if (this.components && this.components.length > 0) {\n schema.valueComponent = this.components[this.components.length - 1].schema;\n }\n\n return _lodash.default.omit(schema, 'components');\n }\n }, {\n key: \"init\",\n value: function init() {\n this.components = [];\n this.rows = [];\n this.createRows();\n this.visibleColumns = _defineProperty({\n key: true\n }, this.valueKey, true);\n this.component.valueComponent.hideLabel = true;\n }\n }, {\n key: \"defaultSchema\",\n get: function get() {\n return DataMapComponent.schema();\n }\n }, {\n key: \"emptyValue\",\n get: function get() {\n return {};\n }\n }, {\n key: \"dataValue\",\n get: function get() {\n if (!this.key || !this.visible && this.component.clearOnHide) {\n return this.emptyValue;\n }\n\n if (!this.hasValue() && this.shouldAddDefaultValue) {\n this.dataValue = this.emptyValue;\n }\n\n return _lodash.default.get(this.data, this.key);\n },\n set: function set(value) {\n _set(_getPrototypeOf(DataMapComponent.prototype), \"dataValue\", value, this, true);\n }\n }, {\n key: \"defaultValue\",\n get: function get() {\n var value = _get(_getPrototypeOf(DataMapComponent.prototype), \"defaultValue\", this);\n\n if (Array.isArray(value)) {\n return value[0];\n }\n\n return this.emptyValue;\n }\n }, {\n key: \"keySchema\",\n get: function get() {\n return {\n type: 'textfield',\n input: true,\n hideLabel: true,\n label: this.component.keyLabel || 'Key',\n key: '__key',\n disableBuilderActions: true\n };\n }\n }, {\n key: \"valueKey\",\n get: function get() {\n return this.component.valueComponent.key;\n }\n }, {\n key: \"getRowValues\",\n value: function getRowValues() {\n var dataValue = this.dataValue;\n\n if (this.builderMode) {\n return [dataValue];\n }\n\n if (_lodash.default.isEmpty(dataValue)) {\n return [];\n }\n\n return Object.keys(dataValue).map(function () {\n return dataValue;\n });\n }\n }, {\n key: \"getComponentsContainer\",\n value: function getComponentsContainer() {\n if (this.builderMode) {\n return this.getComponents().map(function (comp) {\n return comp.component;\n });\n }\n\n return _get(_getPrototypeOf(DataMapComponent.prototype), \"getComponentsContainer\", this).call(this);\n }\n }, {\n key: \"iteratableRows\",\n get: function get() {\n return this.rows.map(function (row) {\n return Object.keys(row).map(function (key) {\n return {\n components: row[key],\n data: row[key].dataValue\n };\n });\n });\n }\n }, {\n key: \"componentContext\",\n value: function componentContext(component) {\n return this.iteratableRows[component.row].find(function (comp) {\n return comp.components.key === component.key;\n }).data;\n }\n }, {\n key: \"hasHeader\",\n value: function hasHeader() {\n return true;\n }\n }, {\n key: \"hasRemoveButtons\",\n value: function hasRemoveButtons() {\n return !this.component.disableAddingRemovingRows && !this.options.readOnly && !this.disabled && this.fullMode;\n }\n }, {\n key: \"getColumns\",\n value: function getColumns() {\n var keySchema = Object.assign({}, this.keySchema);\n var valueSchema = Object.assign({}, this.component.valueComponent);\n keySchema.hideLabel = false;\n valueSchema.hideLabel = false;\n return this.component.keyBeforeValue ? [keySchema, valueSchema] : [valueSchema, keySchema];\n }\n }, {\n key: \"getRowKey\",\n value: function getRowKey(rowIndex) {\n var keys = Object.keys(this.dataValue);\n\n if (!keys[rowIndex]) {\n keys[rowIndex] = (0, _utils.uniqueKey)(this.dataValue, this.defaultRowKey);\n }\n\n return keys[rowIndex];\n }\n }, {\n key: \"defaultRowKey\",\n get: function get() {\n return 'key';\n }\n }, {\n key: \"setRowComponentsData\",\n value: function setRowComponentsData(rowIndex, rowData) {\n _lodash.default.each(this.rows[rowIndex], function (component) {\n if (component.key === '__key') {\n component.data = {\n '__key': Object.keys(rowData)[rowIndex]\n };\n } else {\n component.data = rowData;\n }\n });\n }\n }, {\n key: \"getValueAsString\",\n value: function getValueAsString(value, options) {\n var _this2 = this;\n\n if (options !== null && options !== void 0 && options.email && this.visible && !this.skipInEmail && _lodash.default.isObject(value)) {\n var result = \"\\n \\n \\n \";\n result = Object.keys(value).reduce(function (result, key) {\n result += \"\\n \\n \\n \\n \\n \");\n return result;\n }, result);\n result += \"\\n \\n
\".concat(key, \"\").concat(_this2.getView(value[key], options), \"
\\n \";\n return result;\n }\n\n if (_lodash.default.isEmpty(value)) {\n return '';\n }\n\n if (options !== null && options !== void 0 && options.modalPreview) {\n delete options.modalPreview;\n return this.getDataValueAsTable(value, options);\n }\n\n return _typeof(value) === 'object' ? '[Complex Data]' : value;\n }\n }, {\n key: \"getDataValueAsTable\",\n value: function getDataValueAsTable(value, options) {\n var _this3 = this;\n\n var result = \"\\n \\n \\n \";\n\n if (this.visible && _lodash.default.isObject(value)) {\n Object.keys(value).forEach(function (key) {\n result += \"\\n \\n \\n \\n \\n \");\n });\n }\n\n result += \"\\n \\n
\".concat(key, \"\").concat(_this3.getView(value[key], options), \"
\\n \";\n return result;\n }\n }, {\n key: \"createRowComponents\",\n value: function createRowComponents(row, rowIndex) {\n var _this4 = this;\n\n // Use original value component API key in builder mode to be able to edit value component\n var key = this.builderMode ? this.valueKey : this.getRowKey(rowIndex); // Create a new event emitter since fields are isolated.\n\n var options = _lodash.default.clone(this.options);\n\n options.events = new _eventemitter.default();\n options.name += \"[\".concat(rowIndex, \"]\");\n options.row = \"\".concat(rowIndex);\n var components = {};\n components['__key'] = this.createComponent(this.keySchema, options, {\n __key: this.builderMode ? this.defaultRowKey : key\n });\n components['__key'].on('componentChange', function (event) {\n var dataValue = _this4.dataValue;\n var newKey = (0, _utils.uniqueKey)(dataValue, event.value);\n dataValue[newKey] = dataValue[key];\n delete dataValue[key];\n var comp = components[_this4.valueKey];\n comp.component.key = newKey;\n comp.path = _this4.calculateComponentPath(comp);\n key = newKey;\n });\n\n var valueComponent = _lodash.default.clone(this.component.valueComponent);\n\n valueComponent.key = key;\n var componentOptions = this.options;\n componentOptions.row = options.row;\n components[this.valueKey] = this.createComponent(valueComponent, componentOptions, this.dataValue);\n return components;\n }\n }, {\n key: \"canAddColumn\",\n get: function get() {\n return false;\n }\n }, {\n key: \"addChildComponent\",\n value: function addChildComponent(component) {\n this.component.valueComponent = component;\n }\n }, {\n key: \"saveChildComponent\",\n value: function saveChildComponent(component) {\n // Update the Value Component, the Key Component is not allowed to edit\n if (component.key !== this.keySchema.key) {\n this.component.valueComponent = component;\n }\n }\n }, {\n key: \"removeChildComponent\",\n value: function removeChildComponent() {\n var defaultSchema = DataMapComponent.schema();\n this.component.valueComponent = defaultSchema.valueComponent;\n }\n }, {\n key: \"addRow\",\n value: function addRow() {\n var index = this.rows.length;\n this.rows[index] = this.createRowComponents(this.dataValue, index);\n this.redraw();\n this.triggerChange();\n }\n }, {\n key: \"removeRow\",\n value: function removeRow(index) {\n var keys = Object.keys(this.dataValue);\n\n if (keys[index]) {\n delete this.dataValue[keys[index]];\n }\n\n this.rows.splice(index, 1);\n this.redraw();\n this.triggerChange();\n }\n }, {\n key: \"setValue\",\n value: function setValue(value) {\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var changed = this.hasChanged(value, this.dataValue);\n this.dataValue = value;\n this.createRows();\n this.updateOnChange(flags, changed);\n return changed;\n }\n }, {\n key: \"checkColumns\",\n value: function checkColumns() {\n return {\n rebuild: false,\n show: true\n };\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _Component.default.schema.apply(_Component.default, [{\n label: 'Data Map',\n key: 'dataMap',\n type: 'datamap',\n clearOnHide: true,\n addAnother: 'Add Another',\n disableAddingRemovingRows: false,\n keyBeforeValue: true,\n valueComponent: {\n type: 'textfield',\n key: 'value',\n label: 'Value',\n input: true\n },\n input: true,\n validate: {\n maxLength: 0,\n minLength: 0\n }\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Data Map',\n icon: 'th-list',\n group: 'data',\n documentation: '/userguide/forms/data-components#data-map',\n weight: 20,\n schema: DataMapComponent.schema()\n };\n }\n }]);\n\n return DataMapComponent;\n}(_DataGrid.default);\n\nexports[\"default\"] = DataMapComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/datamap/DataMap.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.set.js */ \"./node_modules/core-js/modules/es.reflect.set.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.array.is-array.js */ \"./node_modules/core-js/modules/es.array.is-array.js\");\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n__webpack_require__(/*! core-js/modules/es.array.find.js */ \"./node_modules/core-js/modules/es.array.find.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.object.assign.js */ \"./node_modules/core-js/modules/es.object.assign.js\");\n__webpack_require__(/*! core-js/modules/es.array.reduce.js */ \"./node_modules/core-js/modules/es.array.reduce.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n__webpack_require__(/*! core-js/modules/es.array.splice.js */ \"./node_modules/core-js/modules/es.array.splice.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _Component = _interopRequireDefault(__webpack_require__(/*! ../_classes/component/Component */ \"./lib/components/_classes/component/Component.js\"));\nvar _DataGrid = _interopRequireDefault(__webpack_require__(/*! ../datagrid/DataGrid */ \"./lib/components/datagrid/DataGrid.js\"));\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nvar _eventemitter = _interopRequireDefault(__webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\"));\nvar _utils = __webpack_require__(/*! ../../utils/utils */ \"./lib/utils/utils.js\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction set(target, property, value, receiver) { if (typeof Reflect !== \"undefined\" && Reflect.set) { set = Reflect.set; } else { set = function set(target, property, value, receiver) { var base = _superPropBase(target, property); var desc; if (base) { desc = Object.getOwnPropertyDescriptor(base, property); if (desc.set) { desc.set.call(receiver, value); return true; } else if (!desc.writable) { return false; } } desc = Object.getOwnPropertyDescriptor(receiver, property); if (desc) { if (!desc.writable) { return false; } desc.value = value; Object.defineProperty(receiver, property, desc); } else { _defineProperty(receiver, property, value); } return true; }; } return set(target, property, value, receiver); }\nfunction _set(target, property, value, receiver, isStrict) { var s = set(target, property, value, receiver || target); if (!s && isStrict) { throw new Error('failed to set property'); } return value; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar DataMapComponent = /*#__PURE__*/function (_DataGridComponent) {\n _inherits(DataMapComponent, _DataGridComponent);\n var _super = _createSuper(DataMapComponent);\n function DataMapComponent(component, options, data) {\n var _this;\n _classCallCheck(this, DataMapComponent);\n _this = _super.call(this, component, options, data);\n _this.type = 'datamap';\n return _this;\n }\n _createClass(DataMapComponent, [{\n key: \"schema\",\n get: function get() {\n var schema = _get(_getPrototypeOf(DataMapComponent.prototype), \"schema\", this);\n if (this.components && this.components.length > 0) {\n schema.valueComponent = this.components[this.components.length - 1].schema;\n }\n return _lodash[\"default\"].omit(schema, 'components');\n }\n }, {\n key: \"init\",\n value: function init() {\n this.components = [];\n this.rows = [];\n this.createRows();\n this.visibleColumns = _defineProperty({\n key: true\n }, this.valueKey, true);\n this.component.valueComponent.hideLabel = true;\n }\n }, {\n key: \"defaultSchema\",\n get: function get() {\n return DataMapComponent.schema();\n }\n }, {\n key: \"emptyValue\",\n get: function get() {\n return {};\n }\n }, {\n key: \"dataValue\",\n get: function get() {\n if (!this.key || !this.visible && this.component.clearOnHide) {\n return this.emptyValue;\n }\n if (!this.hasValue() && this.shouldAddDefaultValue) {\n this.dataValue = this.emptyValue;\n }\n return _lodash[\"default\"].get(this.data, this.key);\n },\n set: function set(value) {\n _set(_getPrototypeOf(DataMapComponent.prototype), \"dataValue\", value, this, true);\n }\n }, {\n key: \"defaultValue\",\n get: function get() {\n var value = _get(_getPrototypeOf(DataMapComponent.prototype), \"defaultValue\", this);\n if (Array.isArray(value)) {\n return value[0];\n }\n return this.emptyValue;\n }\n }, {\n key: \"keySchema\",\n get: function get() {\n return {\n type: 'textfield',\n input: true,\n hideLabel: true,\n label: this.component.keyLabel || 'Key',\n key: '__key',\n disableBuilderActions: true\n };\n }\n }, {\n key: \"valueKey\",\n get: function get() {\n return this.component.valueComponent.key;\n }\n }, {\n key: \"getRowValues\",\n value: function getRowValues() {\n var dataValue = this.dataValue;\n if (this.builderMode) {\n return [dataValue];\n }\n if (_lodash[\"default\"].isEmpty(dataValue)) {\n return [];\n }\n return Object.keys(dataValue).map(function () {\n return dataValue;\n });\n }\n }, {\n key: \"getComponentsContainer\",\n value: function getComponentsContainer() {\n if (this.builderMode) {\n return this.getComponents().map(function (comp) {\n return comp.component;\n });\n }\n return _get(_getPrototypeOf(DataMapComponent.prototype), \"getComponentsContainer\", this).call(this);\n }\n }, {\n key: \"iteratableRows\",\n get: function get() {\n return this.rows.map(function (row) {\n return Object.keys(row).map(function (key) {\n return {\n components: row[key],\n data: row[key].dataValue\n };\n });\n });\n }\n }, {\n key: \"componentContext\",\n value: function componentContext(component) {\n return this.iteratableRows[component.row].find(function (comp) {\n return comp.components.key === component.key;\n }).data;\n }\n }, {\n key: \"hasHeader\",\n value: function hasHeader() {\n return true;\n }\n }, {\n key: \"hasRemoveButtons\",\n value: function hasRemoveButtons() {\n return !this.component.disableAddingRemovingRows && !this.options.readOnly && !this.disabled && this.fullMode;\n }\n }, {\n key: \"getColumns\",\n value: function getColumns() {\n var keySchema = Object.assign({}, this.keySchema);\n var valueSchema = Object.assign({}, this.component.valueComponent);\n keySchema.hideLabel = false;\n valueSchema.hideLabel = false;\n return this.component.keyBeforeValue ? [keySchema, valueSchema] : [valueSchema, keySchema];\n }\n }, {\n key: \"getRowKey\",\n value: function getRowKey(rowIndex) {\n var keys = Object.keys(this.dataValue);\n if (!keys[rowIndex]) {\n keys[rowIndex] = (0, _utils.uniqueKey)(this.dataValue, this.defaultRowKey);\n }\n return keys[rowIndex];\n }\n }, {\n key: \"defaultRowKey\",\n get: function get() {\n return 'key';\n }\n }, {\n key: \"setRowComponentsData\",\n value: function setRowComponentsData(rowIndex, rowData) {\n _lodash[\"default\"].each(this.rows[rowIndex], function (component) {\n if (component.key === '__key') {\n component.data = {\n '__key': Object.keys(rowData)[rowIndex]\n };\n } else {\n component.data = rowData;\n }\n });\n }\n }, {\n key: \"getValueAsString\",\n value: function getValueAsString(value, options) {\n var _this2 = this;\n if (options !== null && options !== void 0 && options.email && this.visible && !this.skipInEmail && _lodash[\"default\"].isObject(value)) {\n var result = \"\\n \\n \\n \";\n result = Object.keys(value).reduce(function (result, key) {\n result += \"\\n \\n \\n \\n \\n \");\n return result;\n }, result);\n result += \"\\n \\n
\".concat(key, \"\").concat(_this2.getView(value[key], options), \"
\\n \";\n return result;\n }\n if (_lodash[\"default\"].isEmpty(value)) {\n return '';\n }\n if (options !== null && options !== void 0 && options.modalPreview) {\n delete options.modalPreview;\n return this.getDataValueAsTable(value, options);\n }\n return _typeof(value) === 'object' ? '[Complex Data]' : value;\n }\n }, {\n key: \"getDataValueAsTable\",\n value: function getDataValueAsTable(value, options) {\n var _this3 = this;\n var result = \"\\n \\n \\n \";\n if (this.visible && _lodash[\"default\"].isObject(value)) {\n Object.keys(value).forEach(function (key) {\n result += \"\\n \\n \\n \\n \\n \");\n });\n }\n result += \"\\n \\n
\".concat(key, \"\").concat(_this3.getView(value[key], options), \"
\\n \";\n return result;\n }\n }, {\n key: \"createRowComponents\",\n value: function createRowComponents(row, rowIndex) {\n var _this4 = this;\n // Use original value component API key in builder mode to be able to edit value component\n var key = this.builderMode ? this.valueKey : this.getRowKey(rowIndex);\n\n // Create a new event emitter since fields are isolated.\n var options = _lodash[\"default\"].clone(this.options);\n options.events = new _eventemitter[\"default\"]();\n options.name += \"[\".concat(rowIndex, \"]\");\n options.row = \"\".concat(rowIndex);\n var components = {};\n components['__key'] = this.createComponent(this.keySchema, options, {\n __key: this.builderMode ? this.defaultRowKey : key\n });\n components['__key'].on('componentChange', function (event) {\n var dataValue = _this4.dataValue;\n var newKey = (0, _utils.uniqueKey)(dataValue, event.value);\n dataValue[newKey] = dataValue[key];\n delete dataValue[key];\n var comp = components[_this4.valueKey];\n comp.component.key = newKey;\n comp.path = _this4.calculateComponentPath(comp);\n key = newKey;\n });\n var valueComponent = _lodash[\"default\"].clone(this.component.valueComponent);\n valueComponent.key = key;\n var componentOptions = this.options;\n componentOptions.row = options.row;\n components[this.valueKey] = this.createComponent(valueComponent, componentOptions, this.dataValue);\n return components;\n }\n }, {\n key: \"canAddColumn\",\n get: function get() {\n return false;\n }\n }, {\n key: \"addChildComponent\",\n value: function addChildComponent(component) {\n this.component.valueComponent = component;\n }\n }, {\n key: \"saveChildComponent\",\n value: function saveChildComponent(component) {\n // Update the Value Component, the Key Component is not allowed to edit\n if (component.key !== this.keySchema.key) {\n this.component.valueComponent = component;\n }\n }\n }, {\n key: \"removeChildComponent\",\n value: function removeChildComponent() {\n var defaultSchema = DataMapComponent.schema();\n this.component.valueComponent = defaultSchema.valueComponent;\n }\n }, {\n key: \"addRow\",\n value: function addRow() {\n var index = this.rows.length;\n this.rows[index] = this.createRowComponents(this.dataValue, index);\n this.redraw();\n this.triggerChange();\n }\n }, {\n key: \"removeRow\",\n value: function removeRow(index) {\n var keys = Object.keys(this.dataValue);\n if (keys[index]) {\n delete this.dataValue[keys[index]];\n }\n this.rows.splice(index, 1);\n this.redraw();\n this.triggerChange();\n }\n }, {\n key: \"setValue\",\n value: function setValue(value) {\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var changed = this.hasChanged(value, this.dataValue);\n this.dataValue = value;\n this.createRows();\n this.updateOnChange(flags, changed);\n return changed;\n }\n }, {\n key: \"checkColumns\",\n value: function checkColumns() {\n return {\n rebuild: false,\n show: true\n };\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _Component[\"default\"].schema.apply(_Component[\"default\"], [{\n label: 'Data Map',\n key: 'dataMap',\n type: 'datamap',\n clearOnHide: true,\n addAnother: 'Add Another',\n disableAddingRemovingRows: false,\n keyBeforeValue: true,\n valueComponent: {\n type: 'textfield',\n key: 'value',\n label: 'Value',\n input: true\n },\n input: true,\n validate: {\n maxLength: 0,\n minLength: 0\n }\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Data Map',\n icon: 'th-list',\n group: 'data',\n documentation: '/userguide/form-building/data-components#data-map',\n weight: 20,\n schema: DataMapComponent.schema()\n };\n }\n }]);\n return DataMapComponent;\n}(_DataGrid[\"default\"]);\nexports[\"default\"] = DataMapComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/datamap/DataMap.js?"); /***/ }), @@ -837,10 +870,10 @@ eval("\n\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_ /*!**************************************************************!*\ !*** ./lib/components/datamap/editForm/DataMap.edit.data.js ***! \**************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'multiple',\n ignore: true\n}, {\n key: 'defaultValue',\n ignore: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/datamap/editForm/DataMap.edit.data.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'multiple',\n ignore: true\n}, {\n key: 'defaultValue',\n ignore: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/datamap/editForm/DataMap.edit.data.js?"); /***/ }), @@ -848,10 +881,10 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /*!*****************************************************************!*\ !*** ./lib/components/datamap/editForm/DataMap.edit.display.js ***! \*****************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'placeholder',\n ignore: true\n}, {\n key: 'tabindex',\n ignore: true\n}, {\n type: 'textfield',\n label: 'Label for Key column',\n key: 'keyLabel',\n tooltip: 'Provide a label text for Key column (otherwise \\'Key\\' will be used)',\n weight: 404,\n input: true\n}, {\n type: 'checkbox',\n label: 'Disable Adding / Removing Rows',\n key: 'disableAddingRemovingRows',\n tooltip: 'Check if you want to hide Add Another button and Remove Row button',\n weight: 405,\n input: true\n}, {\n type: 'checkbox',\n label: 'Show key column before value',\n key: 'keyBeforeValue',\n tooltip: 'Check if you would like to show the Key before the Value column.',\n weight: 406,\n input: true\n}, {\n type: 'textfield',\n label: 'Add Another Text',\n key: 'addAnother',\n tooltip: 'Set the text of the Add Another button.',\n placeholder: 'Add Another',\n weight: 410,\n input: true,\n customConditional: function customConditional(context) {\n return !context.data.disableAddingRemovingRows;\n }\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/datamap/editForm/DataMap.edit.display.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'placeholder',\n ignore: true\n}, {\n key: 'tabindex',\n ignore: true\n}, {\n type: 'textfield',\n label: 'Label for Key column',\n key: 'keyLabel',\n tooltip: 'Provide a label text for Key column (otherwise \\'Key\\' will be used)',\n weight: 404,\n input: true\n}, {\n type: 'checkbox',\n label: 'Disable Adding / Removing Rows',\n key: 'disableAddingRemovingRows',\n tooltip: 'Check if you want to hide Add Another button and Remove Row button',\n weight: 405,\n input: true\n}, {\n type: 'checkbox',\n label: 'Show key column before value',\n key: 'keyBeforeValue',\n tooltip: 'Check if you would like to show the Key before the Value column.',\n weight: 406,\n input: true\n}, {\n type: 'textfield',\n label: 'Add Another Text',\n key: 'addAnother',\n tooltip: 'Set the text of the Add Another button.',\n placeholder: 'Add Another',\n weight: 410,\n input: true,\n customConditional: function customConditional(context) {\n return !context.data.disableAddingRemovingRows;\n }\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/datamap/editForm/DataMap.edit.display.js?"); /***/ }), @@ -862,7 +895,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\nvar _Components = _interopRequireDefault(__webpack_require__(/*! ../Components */ \"./lib/components/Components.js\"));\n\nvar _DateTimeEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/DateTime.edit.data */ \"./lib/components/datetime/editForm/DateTime.edit.data.js\"));\n\nvar _DateTimeEdit2 = _interopRequireDefault(__webpack_require__(/*! ./editForm/DateTime.edit.date */ \"./lib/components/datetime/editForm/DateTime.edit.date.js\"));\n\nvar _DateTimeEdit3 = _interopRequireDefault(__webpack_require__(/*! ./editForm/DateTime.edit.display */ \"./lib/components/datetime/editForm/DateTime.edit.display.js\"));\n\nvar _DateTimeEdit4 = _interopRequireDefault(__webpack_require__(/*! ./editForm/DateTime.edit.time */ \"./lib/components/datetime/editForm/DateTime.edit.time.js\"));\n\nvar _DateTimeEdit5 = _interopRequireDefault(__webpack_require__(/*! ./editForm/DateTime.edit.validation */ \"./lib/components/datetime/editForm/DateTime.edit.validation.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _Components.default.baseEditForm.apply(_Components.default, [[{\n key: 'display',\n components: _DateTimeEdit3.default\n }, {\n label: 'Date',\n key: 'date',\n weight: 1,\n components: _DateTimeEdit2.default\n }, {\n label: 'Time',\n key: 'time',\n weight: 2,\n components: _DateTimeEdit4.default\n }, {\n key: 'data',\n components: _DateTimeEdit.default\n }, {\n key: 'validation',\n components: _DateTimeEdit5.default\n }, {\n key: 'addons',\n ignore: true\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/datetime/DateTime.form.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\nvar _Components = _interopRequireDefault(__webpack_require__(/*! ../Components */ \"./lib/components/Components.js\"));\nvar _DateTimeEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/DateTime.edit.data */ \"./lib/components/datetime/editForm/DateTime.edit.data.js\"));\nvar _DateTimeEdit2 = _interopRequireDefault(__webpack_require__(/*! ./editForm/DateTime.edit.date */ \"./lib/components/datetime/editForm/DateTime.edit.date.js\"));\nvar _DateTimeEdit3 = _interopRequireDefault(__webpack_require__(/*! ./editForm/DateTime.edit.display */ \"./lib/components/datetime/editForm/DateTime.edit.display.js\"));\nvar _DateTimeEdit4 = _interopRequireDefault(__webpack_require__(/*! ./editForm/DateTime.edit.time */ \"./lib/components/datetime/editForm/DateTime.edit.time.js\"));\nvar _DateTimeEdit5 = _interopRequireDefault(__webpack_require__(/*! ./editForm/DateTime.edit.validation */ \"./lib/components/datetime/editForm/DateTime.edit.validation.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _Components[\"default\"].baseEditForm.apply(_Components[\"default\"], [[{\n key: 'display',\n components: _DateTimeEdit3[\"default\"]\n }, {\n label: 'Date',\n key: 'date',\n weight: 1,\n components: _DateTimeEdit2[\"default\"]\n }, {\n label: 'Time',\n key: 'time',\n weight: 2,\n components: _DateTimeEdit4[\"default\"]\n }, {\n key: 'data',\n components: _DateTimeEdit[\"default\"]\n }, {\n key: 'validation',\n components: _DateTimeEdit5[\"default\"]\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/datetime/DateTime.form.js?"); /***/ }), @@ -873,7 +906,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptors.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nvar _moment = _interopRequireDefault(__webpack_require__(/*! moment */ \"./node_modules/moment/moment.js\"));\n\nvar _Input2 = _interopRequireDefault(__webpack_require__(/*! ../_classes/input/Input */ \"./lib/components/_classes/input/Input.js\"));\n\nvar _utils = _interopRequireDefault(__webpack_require__(/*! ../../utils */ \"./lib/utils/index.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar DateTimeComponent = /*#__PURE__*/function (_Input) {\n _inherits(DateTimeComponent, _Input);\n\n var _super = _createSuper(DateTimeComponent);\n\n function DateTimeComponent(component, options, data) {\n var _this;\n\n _classCallCheck(this, DateTimeComponent);\n\n _this = _super.call(this, component, options, data);\n var timezone = _this.component.timezone || _this.options.timezone;\n var time24hr = !_lodash.default.get(_this.component, 'timePicker.showMeridian', true); // Change the format to map to the settings.\n\n if (!_this.component.enableDate) {\n _this.component.format = _this.component.format.replace(/yyyy-MM-dd /g, '');\n }\n\n if (!_this.component.enableTime) {\n _this.component.format = _this.component.format.replace(/ hh:mm a$/g, '');\n } else if (time24hr) {\n _this.component.format = _this.component.format.replace(/hh:mm a$/g, 'HH:mm');\n } else {\n _this.component.format = _this.component.format.replace(/HH:mm$/g, 'hh:mm a');\n }\n\n var customOptions = _this.component.customOptions || {};\n\n if (typeof customOptions === 'string') {\n try {\n customOptions = JSON.parse(customOptions);\n } catch (err) {\n console.warn(err.message);\n customOptions = {};\n }\n }\n /* eslint-disable camelcase */\n\n\n _this.component.widget = _objectSpread({\n type: 'calendar',\n timezone: timezone,\n displayInTimezone: _lodash.default.get(_this.component, 'displayInTimezone', 'viewer'),\n submissionTimezone: _this.submissionTimezone,\n locale: _this.options.language,\n useLocaleSettings: _lodash.default.get(_this.component, 'useLocaleSettings', false),\n allowInput: _lodash.default.get(_this.component, 'allowInput', true),\n mode: 'single',\n enableTime: _lodash.default.get(_this.component, 'enableTime', true),\n noCalendar: !_lodash.default.get(_this.component, 'enableDate', true),\n format: _this.component.format,\n hourIncrement: _lodash.default.get(_this.component, 'timePicker.hourStep', 1),\n minuteIncrement: _lodash.default.get(_this.component, 'timePicker.minuteStep', 5),\n time_24hr: time24hr,\n readOnly: _this.options.readOnly,\n minDate: _lodash.default.get(_this.component, 'datePicker.minDate'),\n disabledDates: _lodash.default.get(_this.component, 'datePicker.disable'),\n disableWeekends: _lodash.default.get(_this.component, 'datePicker.disableWeekends'),\n disableWeekdays: _lodash.default.get(_this.component, 'datePicker.disableWeekdays'),\n disableFunction: _lodash.default.get(_this.component, 'datePicker.disableFunction'),\n maxDate: _lodash.default.get(_this.component, 'datePicker.maxDate')\n }, customOptions);\n /* eslint-enable camelcase */\n // Add the validators date.\n\n _this.validators.push('date');\n\n return _this;\n }\n\n _createClass(DateTimeComponent, [{\n key: \"performInputMapping\",\n value: function performInputMapping(input) {\n if (input.widget && input.widget.settings) {\n input.widget.settings.submissionTimezone = this.submissionTimezone;\n }\n\n return input;\n }\n }, {\n key: \"defaultSchema\",\n get: function get() {\n return DateTimeComponent.schema();\n }\n }, {\n key: \"defaultValue\",\n get: function get() {\n var defaultValue = _get(_getPrototypeOf(DateTimeComponent.prototype), \"defaultValue\", this);\n\n if (!defaultValue && this.component.defaultDate) {\n defaultValue = _utils.default.getDateSetting(this.component.defaultDate);\n defaultValue = defaultValue ? defaultValue.toISOString() : '';\n }\n\n return defaultValue;\n }\n }, {\n key: \"emptyValue\",\n get: function get() {\n return '';\n }\n }, {\n key: \"momentFormat\",\n get: function get() {\n return _utils.default.convertFormatToMoment(this.component.format);\n }\n }, {\n key: \"isEmpty\",\n value: function isEmpty() {\n var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.dataValue;\n\n if (value && value.toString() === 'Invalid Date') {\n return true;\n }\n\n return _get(_getPrototypeOf(DateTimeComponent.prototype), \"isEmpty\", this).call(this, value);\n }\n }, {\n key: \"formatValue\",\n value: function formatValue(input) {\n var result = _moment.default.utc(input).toISOString();\n\n return result === 'Invalid date' ? input : result;\n }\n }, {\n key: \"isEqual\",\n value: function isEqual(valueA) {\n var valueB = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.dataValue;\n return this.isEmpty(valueA) && this.isEmpty(valueB) || _moment.default.utc(valueA).format(this.momentFormat) === _moment.default.utc(valueB).format(this.momentFormat);\n }\n }, {\n key: \"createWrapper\",\n value: function createWrapper() {\n return false;\n }\n }, {\n key: \"checkValidity\",\n value: function checkValidity(data, dirty, rowData) {\n if (this.refs.input) {\n this.refs.input.forEach(function (input) {\n if (input.widget && input.widget.enteredDate) {\n dirty = true;\n }\n });\n }\n\n return _get(_getPrototypeOf(DateTimeComponent.prototype), \"checkValidity\", this).call(this, data, dirty, rowData);\n }\n }, {\n key: \"getValueAsString\",\n value: function getValueAsString(value) {\n var format = _utils.default.convertFormatToMoment(this.component.format);\n\n return (value ? (0, _moment.default)(value).format(format) : value) || '';\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _Input2.default.schema.apply(_Input2.default, [{\n type: 'datetime',\n label: 'Date / Time',\n key: 'dateTime',\n format: 'yyyy-MM-dd hh:mm a',\n useLocaleSettings: false,\n allowInput: true,\n enableDate: true,\n enableTime: true,\n defaultValue: '',\n defaultDate: '',\n displayInTimezone: 'viewer',\n timezone: '',\n datepickerMode: 'day',\n datePicker: {\n showWeeks: true,\n startingDay: 0,\n initDate: '',\n minMode: 'day',\n maxMode: 'year',\n yearRows: 4,\n yearColumns: 5,\n minDate: null,\n maxDate: null\n },\n timePicker: {\n hourStep: 1,\n minuteStep: 1,\n showMeridian: true,\n readonlyInput: false,\n mousewheel: true,\n arrowkeys: true\n },\n customOptions: {}\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Date / Time',\n group: 'advanced',\n icon: 'calendar',\n documentation: '/userguide/forms/form-components#date-time',\n weight: 40,\n schema: DateTimeComponent.schema()\n };\n }\n }]);\n\n return DateTimeComponent;\n}(_Input2.default);\n\nexports[\"default\"] = DateTimeComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/datetime/DateTime.js?"); +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptors.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-properties.js */ \"./node_modules/core-js/modules/es.object.define-properties.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-iso-string.js */ \"./node_modules/core-js/modules/es.date.to-iso-string.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-string.js */ \"./node_modules/core-js/modules/es.date.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.string.match.js */ \"./node_modules/core-js/modules/es.string.match.js\");\n__webpack_require__(/*! core-js/modules/es.string.trim.js */ \"./node_modules/core-js/modules/es.string.trim.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nvar _moment = _interopRequireDefault(__webpack_require__(/*! moment */ \"./node_modules/moment/moment.js\"));\nvar _Input2 = _interopRequireDefault(__webpack_require__(/*! ../_classes/input/Input */ \"./lib/components/_classes/input/Input.js\"));\nvar _utils = _interopRequireDefault(__webpack_require__(/*! ../../utils */ \"./lib/utils/index.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar DateTimeComponent = /*#__PURE__*/function (_Input) {\n _inherits(DateTimeComponent, _Input);\n var _super = _createSuper(DateTimeComponent);\n function DateTimeComponent(component, options, data) {\n var _this;\n _classCallCheck(this, DateTimeComponent);\n _this = _super.call(this, component, options, data);\n var timezone = _this.component.timezone || _this.options.timezone;\n var time24hr = !_lodash[\"default\"].get(_this.component, 'timePicker.showMeridian', true);\n\n // Change the format to map to the settings.\n if (!_this.component.enableDate) {\n _this.component.format = _this.component.format.replace(/yyyy-MM-dd /g, '');\n }\n if (!_this.component.enableTime) {\n _this.component.format = _this.component.format.replace(/ hh:mm a$/g, '');\n } else if (time24hr) {\n _this.component.format = _this.component.format.replace(/hh:mm a$/g, 'HH:mm');\n } else {\n _this.component.format = _this.component.format.replace(/HH:mm$/g, 'hh:mm a');\n }\n var customOptions = _this.component.customOptions || {};\n if (typeof customOptions === 'string') {\n try {\n customOptions = JSON.parse(customOptions);\n } catch (err) {\n console.warn(err.message);\n customOptions = {};\n }\n }\n\n /* eslint-disable camelcase */\n _this.component.widget = _objectSpread({\n type: 'calendar',\n timezone: timezone,\n displayInTimezone: _lodash[\"default\"].get(_this.component, 'displayInTimezone', 'viewer'),\n locale: _this.options.language,\n useLocaleSettings: _lodash[\"default\"].get(_this.component, 'useLocaleSettings', false),\n allowInput: _lodash[\"default\"].get(_this.component, 'allowInput', true),\n mode: 'single',\n enableTime: _lodash[\"default\"].get(_this.component, 'enableTime', true),\n noCalendar: !_lodash[\"default\"].get(_this.component, 'enableDate', true),\n format: _this.component.format,\n hourIncrement: _lodash[\"default\"].get(_this.component, 'timePicker.hourStep', 1),\n minuteIncrement: _lodash[\"default\"].get(_this.component, 'timePicker.minuteStep', 5),\n time_24hr: time24hr,\n readOnly: _this.options.readOnly,\n minDate: _lodash[\"default\"].get(_this.component, 'datePicker.minDate'),\n disabledDates: _lodash[\"default\"].get(_this.component, 'datePicker.disable'),\n disableWeekends: _lodash[\"default\"].get(_this.component, 'datePicker.disableWeekends'),\n disableWeekdays: _lodash[\"default\"].get(_this.component, 'datePicker.disableWeekdays'),\n disableFunction: _lodash[\"default\"].get(_this.component, 'datePicker.disableFunction'),\n maxDate: _lodash[\"default\"].get(_this.component, 'datePicker.maxDate')\n }, customOptions);\n /* eslint-enable camelcase */\n\n // Add the validators date.\n _this.validators.push('date');\n return _this;\n }\n _createClass(DateTimeComponent, [{\n key: \"defaultSchema\",\n get: function get() {\n return DateTimeComponent.schema();\n }\n }, {\n key: \"defaultValue\",\n get: function get() {\n var defaultValue = _get(_getPrototypeOf(DateTimeComponent.prototype), \"defaultValue\", this);\n if (!defaultValue && this.component.defaultDate) {\n defaultValue = _utils[\"default\"].getDateSetting(this.component.defaultDate);\n defaultValue = defaultValue ? defaultValue.toISOString() : '';\n }\n return defaultValue;\n }\n }, {\n key: \"emptyValue\",\n get: function get() {\n return '';\n }\n }, {\n key: \"momentFormat\",\n get: function get() {\n return _utils[\"default\"].convertFormatToMoment(this.component.format);\n }\n }, {\n key: \"isEmpty\",\n value: function isEmpty() {\n var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.dataValue;\n if (value && value.toString() === 'Invalid Date') {\n return true;\n }\n return _get(_getPrototypeOf(DateTimeComponent.prototype), \"isEmpty\", this).call(this, value);\n }\n }, {\n key: \"formatValue\",\n value: function formatValue(input) {\n var result = _moment[\"default\"].utc(input).toISOString();\n return result === 'Invalid date' ? input : result;\n }\n }, {\n key: \"isEqual\",\n value: function isEqual(valueA) {\n var valueB = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.dataValue;\n return this.isEmpty(valueA) && this.isEmpty(valueB) || _moment[\"default\"].utc(valueA).format(this.momentFormat) === _moment[\"default\"].utc(valueB).format(this.momentFormat);\n }\n }, {\n key: \"createWrapper\",\n value: function createWrapper() {\n return false;\n }\n }, {\n key: \"checkValidity\",\n value: function checkValidity(data, dirty, rowData) {\n if (this.refs.input) {\n this.refs.input.forEach(function (input) {\n if (input.widget && input.widget.enteredDate) {\n dirty = true;\n }\n });\n }\n return _get(_getPrototypeOf(DateTimeComponent.prototype), \"checkValidity\", this).call(this, data, dirty, rowData);\n }\n }, {\n key: \"getValueAsString\",\n value: function getValueAsString(value) {\n var format = _utils[\"default\"].convertFormatToMoment(this.component.format);\n format += format.match(/z$/) ? '' : ' z';\n var timezone = this.timezone;\n if (value && !this.attached && timezone) {\n return _lodash[\"default\"].trim(_utils[\"default\"].momentDate(value, format, timezone).format(format));\n }\n return (value ? _lodash[\"default\"].trim((0, _moment[\"default\"])(value).format(format)) : value) || '';\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _Input2[\"default\"].schema.apply(_Input2[\"default\"], [{\n type: 'datetime',\n label: 'Date / Time',\n key: 'dateTime',\n format: 'yyyy-MM-dd hh:mm a',\n useLocaleSettings: false,\n allowInput: true,\n enableDate: true,\n enableTime: true,\n defaultValue: '',\n defaultDate: '',\n displayInTimezone: 'viewer',\n timezone: '',\n datepickerMode: 'day',\n datePicker: {\n showWeeks: true,\n startingDay: 0,\n initDate: '',\n minMode: 'day',\n maxMode: 'year',\n yearRows: 4,\n yearColumns: 5,\n minDate: null,\n maxDate: null\n },\n timePicker: {\n hourStep: 1,\n minuteStep: 1,\n showMeridian: true,\n readonlyInput: false,\n mousewheel: true,\n arrowkeys: true\n },\n customOptions: {}\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Date / Time',\n group: 'advanced',\n icon: 'calendar',\n documentation: '/userguide/form-building/advanced-components#date-and-time',\n weight: 40,\n schema: DateTimeComponent.schema()\n };\n }\n }]);\n return DateTimeComponent;\n}(_Input2[\"default\"]);\nexports[\"default\"] = DateTimeComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/datetime/DateTime.js?"); /***/ }), @@ -881,10 +914,10 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /*!****************************************************************!*\ !*** ./lib/components/datetime/editForm/DateTime.edit.data.js ***! \****************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n type: 'textfield',\n input: true,\n key: 'defaultDate',\n label: 'Default Date',\n placeholder: 'moment()',\n tooltip: 'You can use Moment.js functions to set the default value to a specific date. For example: \\n \\n moment().subtract(10, \\'days\\')',\n weight: 6\n}, {\n type: 'textarea',\n as: 'json',\n editor: 'ace',\n weight: 28,\n input: true,\n key: 'customOptions',\n label: 'Flatpickr options',\n tooltip: 'A raw JSON object to use as options for the Date / Time component (Flatpickr).',\n defaultValue: {}\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/datetime/editForm/DateTime.edit.data.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n type: 'textfield',\n input: true,\n key: 'defaultDate',\n label: 'Default Date',\n placeholder: 'moment()',\n tooltip: 'You can use Moment.js functions to set the default value to a specific date. For example: \\n \\n moment().subtract(10, \\'days\\')',\n weight: 6\n}, {\n type: 'textarea',\n as: 'json',\n editor: 'ace',\n weight: 28,\n input: true,\n key: 'customOptions',\n label: 'Flatpickr options',\n tooltip: 'A raw JSON object to use as options for the Date / Time component (Flatpickr).',\n defaultValue: {}\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/datetime/editForm/DateTime.edit.data.js?"); /***/ }), @@ -895,7 +928,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _Evaluator = _interopRequireDefault(__webpack_require__(/*! ../../../utils/Evaluator */ \"./lib/utils/Evaluator.js\"));\n\nvar _utils = _interopRequireDefault(__webpack_require__(/*! ../../_classes/component/editForm/utils */ \"./lib/components/_classes/component/editForm/utils.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = [{\n type: 'checkbox',\n input: true,\n key: 'enableDate',\n label: 'Enable Date Input',\n weight: 0,\n tooltip: 'Enables date input for this field.'\n}, {\n type: 'tags',\n input: true,\n key: 'datePicker.disable',\n label: 'Disable specific dates or dates by range',\n placeholder: '(yyyy-MM-dd) or (yyyy-MM-dd - yyyy-MM-dd)',\n tooltip: 'Add dates that you want to blacklist. For example: \\n \\n 2025-02-21',\n validate: {\n custom: 'if (_.isEmpty(input)) {\\n return true;\\n}\\nconst dates = _.isArray(input) ?\\ninput : input.split(component.delimeter);\\nconst isValid = _.every(dates, (data) => \\n !!data.match(/\\\\d{4}-\\\\d{2}-\\\\d{2}/g));\\nvalid = isValid || \\'Invalid date\\';'\n },\n weight: 21\n}, {\n type: 'panel',\n title: 'Custom Disabled Dates',\n collapsible: true,\n collapsed: true,\n style: {\n 'margin-bottom': '10px'\n },\n key: 'panel-disable-function',\n customConditional: function customConditional() {\n return !_Evaluator.default.noeval || _Evaluator.default.protectedEval;\n },\n components: [_utils.default.logicVariablesTable('dateThe date object.'), {\n type: 'textarea',\n input: true,\n editor: 'ace',\n key: 'datePicker.disableFunction',\n label: 'Disabling dates by a function',\n description: 'For more information check out the Docs',\n weight: 22\n }, {\n type: 'htmlelement',\n tag: 'div',\n content: '

Example

' + \"
// Disable all weekends
date.getDay() === 0 || date.getDay() === 6
\\n \"\n }]\n}, {\n type: 'checkbox',\n input: true,\n key: 'datePicker.disableWeekends',\n label: 'Disable weekends',\n tooltip: 'Check to disable weekends',\n weight: 23\n}, {\n type: 'checkbox',\n input: true,\n key: 'datePicker.disableWeekdays',\n label: 'Disable weekdays',\n tooltip: 'Check to disable weekdays',\n weight: 23\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/datetime/editForm/DateTime.edit.date.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _Evaluator = _interopRequireDefault(__webpack_require__(/*! ../../../utils/Evaluator */ \"./lib/utils/Evaluator.js\"));\nvar _utils = _interopRequireDefault(__webpack_require__(/*! ../../_classes/component/editForm/utils */ \"./lib/components/_classes/component/editForm/utils.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = [{\n type: 'checkbox',\n input: true,\n key: 'enableDate',\n label: 'Enable Date Input',\n weight: 0,\n tooltip: 'Enables date input for this field.'\n}, {\n type: 'tags',\n input: true,\n key: 'datePicker.disable',\n label: 'Disable specific dates or dates by range',\n placeholder: '(yyyy-MM-dd) or (yyyy-MM-dd - yyyy-MM-dd)',\n tooltip: 'Add dates that you want to blacklist. For example: \\n \\n 2025-02-21',\n validate: {\n custom: 'if (_.isEmpty(input)) {\\n return true;\\n}\\nconst dates = _.isArray(input) ?\\ninput : input.split(component.delimeter);\\nconst isValid = _.every(dates, (data) => \\n !!data.match(/\\\\d{4}-\\\\d{2}-\\\\d{2}/g));\\nvalid = isValid || \\'Invalid date\\';'\n },\n weight: 21\n}, {\n type: 'panel',\n title: 'Custom Disabled Dates',\n collapsible: true,\n collapsed: true,\n style: {\n 'margin-bottom': '10px'\n },\n key: 'panel-disable-function',\n customConditional: function customConditional() {\n return !_Evaluator[\"default\"].noeval || _Evaluator[\"default\"].protectedEval;\n },\n components: [_utils[\"default\"].logicVariablesTable('dateThe date object.'), {\n type: 'textarea',\n input: true,\n editor: 'ace',\n key: 'datePicker.disableFunction',\n label: 'Disabling dates by a function',\n description: 'For more information check out the Docs',\n weight: 22\n }, {\n type: 'htmlelement',\n tag: 'div',\n content: '

Example

' + \"
// Disable all weekends
date.getDay() === 0 || date.getDay() === 6
\\n \"\n }]\n}, {\n type: 'checkbox',\n input: true,\n key: 'datePicker.disableWeekends',\n label: 'Disable weekends',\n tooltip: 'Check to disable weekends',\n weight: 23\n}, {\n type: 'checkbox',\n input: true,\n key: 'datePicker.disableWeekdays',\n label: 'Disable weekdays',\n tooltip: 'Check to disable weekdays',\n weight: 23\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/datetime/editForm/DateTime.edit.date.js?"); /***/ }), @@ -903,10 +936,10 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /*!*******************************************************************!*\ !*** ./lib/components/datetime/editForm/DateTime.edit.display.js ***! \*******************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n type: 'select',\n input: true,\n key: 'displayInTimezone',\n label: 'Display in Timezone',\n tooltip: 'This will display the captured date time in the select timezone.',\n weight: 30,\n defaultValue: 'viewer',\n dataSrc: 'values',\n data: {\n values: [{\n label: 'of Viewer',\n value: 'viewer'\n }, {\n label: 'of Submission',\n value: 'submission'\n }, {\n label: 'of Location',\n value: 'location'\n }, {\n label: 'UTC',\n value: 'utc'\n }]\n }\n}, {\n type: 'select',\n input: true,\n key: 'timezone',\n label: 'Select Timezone',\n tooltip: 'Select the timezone you wish to display this Date',\n weight: 31,\n lazyLoad: true,\n defaultValue: '',\n valueProperty: 'name',\n dataSrc: 'url',\n data: {\n url: 'https://cdn.form.io/timezones.json'\n },\n template: '{{ item.label }}',\n conditional: {\n json: {\n '===': [{\n var: 'data.displayInTimezone'\n }, 'location']\n }\n }\n}, {\n type: 'checkbox',\n input: true,\n key: 'useLocaleSettings',\n label: 'Use Locale Settings',\n tooltip: 'Use locale settings to display date and time.',\n weight: 51\n}, {\n type: 'checkbox',\n input: true,\n key: 'allowInput',\n label: 'Allow Manual Input',\n tooltip: 'Check this if you would like to allow the user to manually enter in the date.',\n weight: 51\n}, {\n type: 'textfield',\n input: true,\n key: 'format',\n label: 'Format',\n placeholder: 'Format',\n description: 'Use formats provided by DateParser Codes',\n tooltip: 'The date format for displaying the datetime value.',\n weight: 52\n}, {\n type: 'editgrid',\n input: true,\n key: 'shortcutButtons',\n label: 'Shortcut Buttons',\n description: 'You can specify few buttons which will be shown above the calendar. Use Label to specify the name of the button and onClick to specify which date/time will be set when user clicks the button. E.g, date = new Date()',\n templates: {\n header: '
\\n
Label
\\n
onClick
\\n
',\n row: '
\\n
\\n {{ flattenedComponents.label.getView(row.label) }}\\n
\\n
\\n {{ flattenedComponents.onClick.getView(row.onClick) }}\\n
\\n {% if (!instance.disabled) { %}\\n
\\n
\\n \\n {% if (!instance.hasRemoveButtons || instance.hasRemoveButtons()) { %}\\n \\n {% } %}\\n
\\n
\\n {% } %}\\n
'\n },\n components: [{\n label: 'Label',\n key: 'label',\n type: 'textfield',\n input: true,\n validate: {\n required: true\n }\n }, {\n label: 'onClick',\n key: 'onClick',\n type: 'textarea',\n editor: 'ace',\n input: true,\n validate: {\n required: true\n }\n }],\n defaultValue: []\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/datetime/editForm/DateTime.edit.display.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n type: 'select',\n input: true,\n key: 'displayInTimezone',\n label: 'Display in Timezone',\n tooltip: 'This will display the captured date time in the select timezone.',\n weight: 30,\n defaultValue: 'viewer',\n dataSrc: 'values',\n data: {\n values: [{\n label: 'of Viewer',\n value: 'viewer'\n }, {\n label: 'of Submission',\n value: 'submission'\n }, {\n label: 'of Location',\n value: 'location'\n }, {\n label: 'UTC',\n value: 'utc'\n }]\n }\n}, {\n type: 'select',\n input: true,\n key: 'timezone',\n label: 'Select Timezone',\n tooltip: 'Select the timezone you wish to display this Date',\n weight: 31,\n lazyLoad: true,\n defaultValue: '',\n valueProperty: 'name',\n dataSrc: 'url',\n data: {\n url: '{{options.cdnUrl}}/timezones.json'\n },\n template: '{{ item.label }}',\n conditional: {\n json: {\n '===': [{\n \"var\": 'data.displayInTimezone'\n }, 'location']\n }\n }\n}, {\n type: 'checkbox',\n input: true,\n key: 'useLocaleSettings',\n label: 'Use Locale Settings',\n tooltip: 'Use locale settings to display date and time.',\n weight: 51\n}, {\n type: 'checkbox',\n input: true,\n key: 'allowInput',\n label: 'Allow Manual Input',\n tooltip: 'Check this if you would like to allow the user to manually enter in the date.',\n weight: 51\n}, {\n type: 'textfield',\n input: true,\n key: 'format',\n label: 'Format',\n placeholder: 'Format',\n description: 'Use formats provided by DateParser Codes',\n tooltip: 'The date format for displaying the datetime value.',\n weight: 52\n}, {\n type: 'editgrid',\n input: true,\n key: 'shortcutButtons',\n label: 'Shortcut Buttons',\n description: 'You can specify few buttons which will be shown above the calendar. Use Label to specify the name of the button and onClick to specify which date/time will be set when user clicks the button. E.g, date = new Date()',\n templates: {\n header: '
\\n
Label
\\n
onClick
\\n
',\n row: '
\\n
\\n {{ flattenedComponents.label.getView(row.label) }}\\n
\\n
\\n {{ flattenedComponents.onClick.getView(row.onClick) }}\\n
\\n {% if (!instance.disabled) { %}\\n
\\n
\\n \\n {% if (!instance.hasRemoveButtons || instance.hasRemoveButtons()) { %}\\n \\n {% } %}\\n
\\n
\\n {% } %}\\n
'\n },\n components: [{\n label: 'Label',\n key: 'label',\n type: 'textfield',\n input: true,\n validate: {\n required: true\n }\n }, {\n label: 'onClick',\n key: 'onClick',\n type: 'textarea',\n editor: 'ace',\n input: true,\n validate: {\n required: true\n }\n }],\n defaultValue: []\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/datetime/editForm/DateTime.edit.display.js?"); /***/ }), @@ -914,10 +947,10 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /*!****************************************************************!*\ !*** ./lib/components/datetime/editForm/DateTime.edit.time.js ***! \****************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n type: 'checkbox',\n input: true,\n key: 'enableTime',\n label: 'Enable Time Input',\n tooltip: 'Enables time input for this field.',\n weight: 0\n}, {\n type: 'number',\n input: true,\n key: 'timePicker.hourStep',\n label: 'Hour Step Size',\n tooltip: 'The number of hours to increment/decrement in the time picker.',\n weight: 10\n}, {\n type: 'number',\n input: true,\n key: 'timePicker.minuteStep',\n label: 'Minute Step Size',\n tooltip: 'The number of minutes to increment/decrement in the time picker.',\n weight: 20\n}, {\n type: 'checkbox',\n input: true,\n key: 'timePicker.showMeridian',\n label: '12 Hour Time (AM/PM)',\n tooltip: 'Display time in 12 hour time with AM/PM.',\n weight: 30\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/datetime/editForm/DateTime.edit.time.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n type: 'checkbox',\n input: true,\n key: 'enableTime',\n label: 'Enable Time Input',\n tooltip: 'Enables time input for this field.',\n weight: 0\n}, {\n type: 'number',\n input: true,\n key: 'timePicker.hourStep',\n label: 'Hour Step Size',\n tooltip: 'The number of hours to increment/decrement in the time picker.',\n weight: 10\n}, {\n type: 'number',\n input: true,\n key: 'timePicker.minuteStep',\n label: 'Minute Step Size',\n tooltip: 'The number of minutes to increment/decrement in the time picker.',\n weight: 20\n}, {\n type: 'checkbox',\n input: true,\n key: 'timePicker.showMeridian',\n label: '12 Hour Time (AM/PM)',\n tooltip: 'Display time in 12 hour time with AM/PM.',\n weight: 30\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/datetime/editForm/DateTime.edit.time.js?"); /***/ }), @@ -925,10 +958,10 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /*!**********************************************************************!*\ !*** ./lib/components/datetime/editForm/DateTime.edit.validation.js ***! \**********************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n type: 'checkbox',\n input: true,\n key: 'enableMinDateInput',\n label: 'Use Input to add moment.js for minDate',\n persistent: false,\n weight: 10,\n tooltip: 'Enables to use input for moment functions instead of calendar.'\n}, {\n type: 'datetime',\n input: true,\n key: 'datePicker.minDate',\n label: 'Use calendar to set minDate',\n skipMerge: true,\n weight: 10,\n tooltip: 'Enables to use calendar to set date.',\n customConditional: function customConditional(_ref) {\n var data = _ref.data,\n component = _ref.component;\n\n if (component.datePicker && component.datePicker.minDate && component.datePicker.minDate.indexOf('moment') !== -1) {\n return false;\n }\n\n return !data.enableMinDateInput;\n }\n}, {\n type: 'textfield',\n input: true,\n enableTime: false,\n key: 'datePicker.minDate',\n skipMerge: true,\n label: 'Minimum Date',\n weight: 10,\n tooltip: 'The minimum date that can be picked. You can also use Moment.js functions. For example: \\n \\n moment().subtract(10, \\'days\\')',\n customConditional: function customConditional(_ref2) {\n var data = _ref2.data,\n component = _ref2.component;\n\n if (component.datePicker && component.datePicker.minDate && component.datePicker.minDate.indexOf('moment') !== -1) {\n return true;\n }\n\n return data.enableMinDateInput;\n }\n}, {\n type: 'checkbox',\n input: true,\n key: 'enableMaxDateInput',\n label: 'Use Input to add moment.js for maxDate',\n persistent: false,\n weight: 20,\n tooltip: 'Enables to use input for moment functions instead of calendar.'\n}, {\n type: 'datetime',\n input: true,\n key: 'datePicker.maxDate',\n skipMerge: true,\n label: 'Use calendar to set maxDate',\n weight: 20,\n tooltip: 'Enables to use calendar to set date.',\n customConditional: function customConditional(_ref3) {\n var data = _ref3.data,\n component = _ref3.component;\n\n if (component.datePicker && component.datePicker.maxDate && component.datePicker.maxDate.indexOf('moment') !== -1) {\n return false;\n }\n\n return !data.enableMaxDateInput;\n }\n}, {\n type: 'textfield',\n input: true,\n enableTime: false,\n key: 'datePicker.maxDate',\n skipMerge: true,\n label: 'Maximum Date',\n tooltip: 'The maximum date that can be picked. You can also use Moment.js functions. For example: \\n \\n moment().add(10, \\'days\\')',\n weight: 20,\n customConditional: function customConditional(_ref4) {\n var data = _ref4.data,\n component = _ref4.component;\n\n if (component.datePicker && component.datePicker.maxDate && component.datePicker.maxDate.indexOf('moment') !== -1) {\n return true;\n }\n\n return data.enableMaxDateInput;\n }\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/datetime/editForm/DateTime.edit.validation.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.array.index-of.js */ \"./node_modules/core-js/modules/es.array.index-of.js\");\nvar _default = [{\n type: 'checkbox',\n input: true,\n key: 'enableMinDateInput',\n label: 'Use Input to add moment.js for minDate',\n persistent: false,\n weight: 10,\n tooltip: 'Enables to use input for moment functions instead of calendar.'\n}, {\n type: 'datetime',\n input: true,\n key: 'datePicker.minDate',\n label: 'Use calendar to set minDate',\n skipMerge: true,\n weight: 10,\n tooltip: 'Enables to use calendar to set date.',\n customConditional: function customConditional(_ref) {\n var data = _ref.data,\n component = _ref.component;\n if (component.datePicker && component.datePicker.minDate && component.datePicker.minDate.indexOf('moment') !== -1) {\n return false;\n }\n return !data.enableMinDateInput;\n }\n}, {\n type: 'textfield',\n input: true,\n enableTime: false,\n key: 'datePicker.minDate',\n skipMerge: true,\n label: 'Minimum Date',\n weight: 10,\n tooltip: 'The minimum date that can be picked. You can also use Moment.js functions. For example: \\n \\n moment().subtract(10, \\'days\\')',\n customConditional: function customConditional(_ref2) {\n var data = _ref2.data,\n component = _ref2.component;\n if (component.datePicker && component.datePicker.minDate && component.datePicker.minDate.indexOf('moment') !== -1) {\n return true;\n }\n return data.enableMinDateInput;\n }\n}, {\n type: 'checkbox',\n input: true,\n key: 'enableMaxDateInput',\n label: 'Use Input to add moment.js for maxDate',\n persistent: false,\n weight: 20,\n tooltip: 'Enables to use input for moment functions instead of calendar.'\n}, {\n type: 'datetime',\n input: true,\n key: 'datePicker.maxDate',\n skipMerge: true,\n label: 'Use calendar to set maxDate',\n weight: 20,\n tooltip: 'Enables to use calendar to set date.',\n customConditional: function customConditional(_ref3) {\n var data = _ref3.data,\n component = _ref3.component;\n if (component.datePicker && component.datePicker.maxDate && component.datePicker.maxDate.indexOf('moment') !== -1) {\n return false;\n }\n return !data.enableMaxDateInput;\n }\n}, {\n type: 'textfield',\n input: true,\n enableTime: false,\n key: 'datePicker.maxDate',\n skipMerge: true,\n label: 'Maximum Date',\n tooltip: 'The maximum date that can be picked. You can also use Moment.js functions. For example: \\n \\n moment().add(10, \\'days\\')',\n weight: 20,\n customConditional: function customConditional(_ref4) {\n var data = _ref4.data,\n component = _ref4.component;\n if (component.datePicker && component.datePicker.maxDate && component.datePicker.maxDate.indexOf('moment') !== -1) {\n return true;\n }\n return data.enableMaxDateInput;\n }\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/datetime/editForm/DateTime.edit.validation.js?"); /***/ }), @@ -939,7 +972,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\nvar _Components = _interopRequireDefault(__webpack_require__(/*! ../Components */ \"./lib/components/Components.js\"));\n\nvar _DayEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/Day.edit.data */ \"./lib/components/day/editForm/Day.edit.data.js\"));\n\nvar _DayEdit2 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Day.edit.display */ \"./lib/components/day/editForm/Day.edit.display.js\"));\n\nvar _DayEdit3 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Day.edit.validation */ \"./lib/components/day/editForm/Day.edit.validation.js\"));\n\nvar _DayEdit4 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Day.edit.day */ \"./lib/components/day/editForm/Day.edit.day.js\"));\n\nvar _DayEdit5 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Day.edit.month */ \"./lib/components/day/editForm/Day.edit.month.js\"));\n\nvar _DayEdit6 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Day.edit.year */ \"./lib/components/day/editForm/Day.edit.year.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _Components.default.baseEditForm.apply(_Components.default, [[{\n key: 'display',\n components: _DayEdit2.default\n }, {\n key: 'data',\n components: _DayEdit.default\n }, {\n key: 'validation',\n components: _DayEdit3.default\n }, {\n key: 'day',\n label: 'Day',\n weight: 3,\n components: _DayEdit4.default\n }, {\n key: 'month',\n label: 'Month',\n weight: 3,\n components: _DayEdit5.default\n }, {\n key: 'year',\n label: 'Year',\n weight: 3,\n components: _DayEdit6.default\n }, {\n key: 'addons',\n ignore: true\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/day/Day.form.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\nvar _Components = _interopRequireDefault(__webpack_require__(/*! ../Components */ \"./lib/components/Components.js\"));\nvar _DayEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/Day.edit.data */ \"./lib/components/day/editForm/Day.edit.data.js\"));\nvar _DayEdit2 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Day.edit.display */ \"./lib/components/day/editForm/Day.edit.display.js\"));\nvar _DayEdit3 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Day.edit.validation */ \"./lib/components/day/editForm/Day.edit.validation.js\"));\nvar _DayEdit4 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Day.edit.day */ \"./lib/components/day/editForm/Day.edit.day.js\"));\nvar _DayEdit5 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Day.edit.month */ \"./lib/components/day/editForm/Day.edit.month.js\"));\nvar _DayEdit6 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Day.edit.year */ \"./lib/components/day/editForm/Day.edit.year.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _Components[\"default\"].baseEditForm.apply(_Components[\"default\"], [[{\n key: 'display',\n components: _DayEdit2[\"default\"]\n }, {\n key: 'data',\n components: _DayEdit[\"default\"]\n }, {\n key: 'validation',\n components: _DayEdit3[\"default\"]\n }, {\n key: 'day',\n label: 'Day',\n weight: 3,\n components: _DayEdit4[\"default\"]\n }, {\n key: 'month',\n label: 'Month',\n weight: 3,\n components: _DayEdit5[\"default\"]\n }, {\n key: 'year',\n label: 'Year',\n weight: 3,\n components: _DayEdit6[\"default\"]\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/day/Day.form.js?"); /***/ }), @@ -950,7 +983,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.set.js */ \"./node_modules/core-js/modules/es.reflect.set.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.slice.js */ \"./node_modules/core-js/modules/es.array.slice.js\");\n\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.from.js */ \"./node_modules/core-js/modules/es.array.from.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.split.js */ \"./node_modules/core-js/modules/es.string.split.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.join.js */ \"./node_modules/core-js/modules/es.array.join.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.pad-start.js */ \"./node_modules/core-js/modules/es.string.pad-start.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nvar _Field2 = _interopRequireDefault(__webpack_require__(/*! ../_classes/field/Field */ \"./lib/components/_classes/field/Field.js\"));\n\nvar _utils = __webpack_require__(/*! ../../utils/utils */ \"./lib/utils/utils.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { 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\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction set(target, property, value, receiver) { if (typeof Reflect !== \"undefined\" && Reflect.set) { set = Reflect.set; } else { set = function set(target, property, value, receiver) { var base = _superPropBase(target, property); var desc; if (base) { desc = Object.getOwnPropertyDescriptor(base, property); if (desc.set) { desc.set.call(receiver, value); return true; } else if (!desc.writable) { return false; } } desc = Object.getOwnPropertyDescriptor(receiver, property); if (desc) { if (!desc.writable) { return false; } desc.value = value; Object.defineProperty(receiver, property, desc); } else { _defineProperty(receiver, property, value); } return true; }; } return set(target, property, value, receiver); }\n\nfunction _set(target, property, value, receiver, isStrict) { var s = set(target, property, value, receiver || target); if (!s && isStrict) { throw new Error('failed to set property'); } return value; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar DayComponent = /*#__PURE__*/function (_Field) {\n _inherits(DayComponent, _Field);\n\n var _super = _createSuper(DayComponent);\n\n function DayComponent() {\n _classCallCheck(this, DayComponent);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(DayComponent, [{\n key: \"emptyValue\",\n get:\n /**\n * The empty value for day component.\n *\n * @return {'00/00/0000'}\n */\n function get() {\n return '00/00/0000';\n }\n }, {\n key: \"valueMask\",\n get: function get() {\n return /^\\d{2}\\/\\d{2}\\/\\d{4}$/;\n }\n }, {\n key: \"dayRequired\",\n get: function get() {\n return this.showDay && _lodash.default.get(this.component, 'fields.day.required', false);\n }\n }, {\n key: \"showDay\",\n get: function get() {\n return !_lodash.default.get(this.component, 'fields.day.hide', false);\n }\n }, {\n key: \"monthRequired\",\n get: function get() {\n return this.showMonth && _lodash.default.get(this.component, 'fields.month.required', false);\n }\n }, {\n key: \"showMonth\",\n get: function get() {\n return !_lodash.default.get(this.component, 'fields.month.hide', false);\n }\n }, {\n key: \"yearRequired\",\n get: function get() {\n return this.showYear && _lodash.default.get(this.component, 'fields.year.required', false);\n }\n }, {\n key: \"showYear\",\n get: function get() {\n return !_lodash.default.get(this.component, 'fields.year.hide', false);\n }\n }, {\n key: \"defaultSchema\",\n get: function get() {\n return DayComponent.schema();\n }\n }, {\n key: \"shouldDisabled\",\n get: function get() {\n return _get(_getPrototypeOf(DayComponent.prototype), \"shouldDisabled\", this) || this.parentDisabled;\n }\n }, {\n key: \"inputInfo\",\n get: function get() {\n var info = _get(_getPrototypeOf(DayComponent.prototype), \"elementInfo\", this).call(this);\n\n info.type = 'input';\n info.attr.type = 'hidden';\n info.changeEvent = 'input';\n return info;\n }\n }, {\n key: \"inputDefinition\",\n value: function inputDefinition(name) {\n var min, max;\n\n if (name === 'day') {\n min = 1;\n max = 31;\n }\n\n if (name === 'month') {\n min = 1;\n max = 12;\n }\n\n if (name === 'year') {\n min = _lodash.default.get(this.component, 'fields.year.minYear', 1900) || 1900;\n max = _lodash.default.get(this.component, 'fields.year.maxYear', 2030) || 1900;\n }\n\n return {\n type: 'input',\n ref: name,\n attr: {\n id: \"\".concat(this.component.key, \"-\").concat(name),\n class: \"form-control \".concat(this.transform('class', \"formio-day-component-\".concat(name))),\n type: this.component.fields[name].type === 'select' ? 'select' : 'number',\n placeholder: this.component.fields[name].placeholder,\n step: 1,\n min: min,\n max: max\n }\n };\n }\n }, {\n key: \"selectDefinition\",\n value: function selectDefinition(name) {\n return {\n multiple: false,\n ref: name,\n widget: 'html5',\n attr: {\n id: \"\".concat(this.component.key, \"-\").concat(name),\n class: 'form-control',\n name: name,\n lang: this.options.language\n }\n };\n }\n }, {\n key: \"days\",\n get: function get() {\n if (this._days) {\n return this._days;\n }\n\n this._days = [{\n value: '',\n label: _lodash.default.get(this.component, 'fields.day.placeholder', '')\n }];\n\n for (var x = 1; x <= 31; x++) {\n this._days.push({\n value: x,\n label: x.toString()\n });\n }\n\n return this._days;\n }\n }, {\n key: \"months\",\n get: function get() {\n if (this._months) {\n return this._months;\n }\n\n this._months = [{\n value: '',\n label: _lodash.default.get(this.component, 'fields.month.placeholder') || (this.hideInputLabels ? this.t('Month') : '')\n }, {\n value: 1,\n label: 'January'\n }, {\n value: 2,\n label: 'February'\n }, {\n value: 3,\n label: 'March'\n }, {\n value: 4,\n label: 'April'\n }, {\n value: 5,\n label: 'May'\n }, {\n value: 6,\n label: 'June'\n }, {\n value: 7,\n label: 'July'\n }, {\n value: 8,\n label: 'August'\n }, {\n value: 9,\n label: 'September'\n }, {\n value: 10,\n label: 'October'\n }, {\n value: 11,\n label: 'November'\n }, {\n value: 12,\n label: 'December'\n }];\n return this._months;\n }\n }, {\n key: \"years\",\n get: function get() {\n if (this._years) {\n return this._years;\n }\n\n this._years = [{\n value: '',\n label: _lodash.default.get(this.component, 'fields.year.placeholder', '')\n }];\n var minYears = _lodash.default.get(this.component, 'fields.year.minYear', 1900) || 1900;\n var maxYears = _lodash.default.get(this.component, 'fields.year.maxYear', 2030) || 2030;\n\n for (var x = minYears; x <= maxYears; x++) {\n this._years.push({\n value: x,\n label: x.toString()\n });\n }\n\n return this._years;\n }\n }, {\n key: \"setErrorClasses\",\n value: function setErrorClasses(elements, dirty, hasError) {\n _get(_getPrototypeOf(DayComponent.prototype), \"setErrorClasses\", this).call(this, elements, dirty, hasError);\n\n _get(_getPrototypeOf(DayComponent.prototype), \"setErrorClasses\", this).call(this, [this.refs.day, this.refs.month, this.refs.year], dirty, hasError);\n }\n }, {\n key: \"removeInputError\",\n value: function removeInputError(elements) {\n _get(_getPrototypeOf(DayComponent.prototype), \"removeInputError\", this).call(this, [this.refs.day, this.refs.month, this.refs.year]);\n\n _get(_getPrototypeOf(DayComponent.prototype), \"removeInputError\", this).call(this, elements);\n }\n }, {\n key: \"init\",\n value: function init() {\n _get(_getPrototypeOf(DayComponent.prototype), \"init\", this).call(this);\n\n this.validators = this.validators.concat(['day', 'maxDate', 'minDate', 'minYear', 'maxYear']);\n var minYear = this.component.fields.year.minYear;\n var maxYear = this.component.fields.year.maxYear;\n this.component.maxYear = maxYear;\n this.component.minYear = minYear;\n var dateFormatInfo = (0, _utils.getLocaleDateFormatInfo)(this.options.language);\n this.dayFirst = this.component.useLocaleSettings ? dateFormatInfo.dayFirst : this.component.dayFirst;\n }\n }, {\n key: \"render\",\n value: function render() {\n if (this.isHtmlRenderMode()) {\n return _get(_getPrototypeOf(DayComponent.prototype), \"render\", this).call(this, this.renderTemplate('input'));\n }\n\n return _get(_getPrototypeOf(DayComponent.prototype), \"render\", this).call(this, this.renderTemplate('day', {\n dayFirst: this.dayFirst,\n showDay: this.showDay,\n showMonth: this.showMonth,\n showYear: this.showYear,\n day: this.renderField('day'),\n month: this.renderField('month'),\n year: this.renderField('year')\n }));\n }\n }, {\n key: \"renderField\",\n value: function renderField(name) {\n var _this = this;\n\n if (this.component.fields[name].type === 'select') {\n return this.renderTemplate('select', {\n input: this.selectDefinition(name),\n selectOptions: this[\"\".concat(name, \"s\")].reduce(function (html, option) {\n return html + _this.renderTemplate('selectOption', {\n option: option,\n selected: false,\n attrs: {}\n });\n }, '')\n });\n } else {\n return this.renderTemplate('input', {\n prefix: this.prefix,\n suffix: this.suffix,\n input: this.inputDefinition(name)\n });\n }\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n var _this2 = this;\n\n this.loadRefs(element, {\n day: 'single',\n month: 'single',\n year: 'single',\n input: 'multiple'\n });\n\n var superAttach = _get(_getPrototypeOf(DayComponent.prototype), \"attach\", this).call(this, element);\n\n if (this.shouldDisabled) {\n this.setDisabled(this.refs.day, true);\n this.setDisabled(this.refs.month, true);\n this.setDisabled(this.refs.year, true);\n\n if (this.refs.input) {\n this.refs.input.forEach(function (input) {\n return _this2.setDisabled(input, true);\n });\n }\n } else {\n this.addEventListener(this.refs.day, 'input', function () {\n return _this2.updateValue(null, {\n modified: true\n });\n }); // TODO: Need to rework this to work with day select as well.\n // Change day max input when month changes.\n\n this.addEventListener(this.refs.month, 'input', function () {\n var maxDay = _this2.refs.year ? parseInt(new Date(_this2.refs.year.value, _this2.refs.month.value, 0).getDate(), 10) : '';\n\n var day = _this2.getFieldValue('day');\n\n if (!_this2.component.fields.day.hide && maxDay) {\n _this2.refs.day.max = maxDay;\n }\n\n if (maxDay && day > maxDay) {\n _this2.refs.day.value = _this2.refs.day.max;\n }\n\n _this2.updateValue(null, {\n modified: true\n });\n });\n this.addEventListener(this.refs.year, 'input', function () {\n return _this2.updateValue(null, {\n modified: true\n });\n });\n this.addEventListener(this.refs.input, this.info.changeEvent, function () {\n return _this2.updateValue(null, {\n modified: true\n });\n });\n }\n\n this.setValue(this.dataValue); // Force the disabled state with getters and setters.\n\n this.disabled = this.shouldDisabled;\n return superAttach;\n }\n }, {\n key: \"validateRequired\",\n value: function validateRequired(setting, value) {\n var _this$parts = this.parts,\n day = _this$parts.day,\n month = _this$parts.month,\n year = _this$parts.year;\n\n if (this.dayRequired && !day) {\n return false;\n }\n\n if (this.monthRequired && !month) {\n return false;\n }\n\n if (this.yearRequired && !year) {\n return false;\n }\n\n if (!(0, _utils.boolValue)(setting)) {\n return true;\n }\n\n return !this.isEmpty(value);\n }\n }, {\n key: \"disabled\",\n set: function set(disabled) {\n _set(_getPrototypeOf(DayComponent.prototype), \"disabled\", disabled, this, true);\n\n if (!this.refs.year || !this.refs.month || !this.refs.day) {\n return;\n }\n\n if (disabled) {\n this.refs.year.setAttribute('disabled', 'disabled');\n this.refs.month.setAttribute('disabled', 'disabled');\n this.refs.day.setAttribute('disabled', 'disabled');\n } else {\n this.refs.year.removeAttribute('disabled');\n this.refs.month.removeAttribute('disabled');\n this.refs.day.removeAttribute('disabled');\n }\n }\n }, {\n key: \"normalizeValue\",\n value: function normalizeValue(value) {\n if (!value || this.valueMask.test(value)) {\n return value;\n }\n\n var dateParts = [];\n var valueParts = value.split('/');\n\n var getNextPart = function getNextPart(shouldTake, defaultValue) {\n return dateParts.push(shouldTake ? valueParts.shift() : defaultValue);\n };\n\n if (this.dayFirst) {\n getNextPart(this.showDay, '00');\n }\n\n getNextPart(this.showMonth, '00');\n\n if (!this.dayFirst) {\n getNextPart(this.showDay, '00');\n }\n\n getNextPart(this.showYear, '0000');\n return dateParts.join('/');\n }\n /**\n * Set the value at a specific index.\n *\n * @param index\n * @param value\n */\n\n }, {\n key: \"setValueAt\",\n value: function setValueAt(index, value) {\n // temporary solution to avoid input reset\n // on invalid date.\n if (!value || value === 'Invalid date') {\n return null;\n }\n\n var parts = value.split('/');\n var day;\n\n if (this.component.dayFirst) {\n day = parts.shift();\n }\n\n var month = parts.shift();\n\n if (!this.component.dayFirst) {\n day = parts.shift();\n }\n\n var year = parts.shift();\n\n if (this.refs.day && this.showDay) {\n this.refs.day.value = day === '00' ? '' : parseInt(day, 10);\n }\n\n if (this.refs.month && this.showMonth) {\n this.refs.month.value = month === '00' ? '' : parseInt(month, 10);\n }\n\n if (this.refs.year && this.showYear) {\n this.refs.year.value = year === '0000' ? '' : parseInt(year, 10);\n }\n }\n }, {\n key: \"getFieldValue\",\n value: function getFieldValue(name) {\n var parts = this.dataValue ? this.dataValue.split('/') : [];\n var val = 0;\n\n switch (name) {\n case 'month':\n val = parts[this.dayFirst ? 1 : 0];\n break;\n\n case 'day':\n val = parts[this.dayFirst ? 0 : 1];\n break;\n\n case 'year':\n val = parts[2];\n break;\n }\n\n val = parseInt(val, 10);\n return !_lodash.default.isNaN(val) && _lodash.default.isNumber(val) ? val : 0;\n }\n }, {\n key: \"parts\",\n get: function get() {\n return {\n day: this.getFieldValue('day'),\n month: this.getFieldValue('month'),\n year: this.getFieldValue('year')\n };\n }\n /**\n * Get the format for the value string.\n * @returns {string}\n */\n\n }, {\n key: \"format\",\n get: function get() {\n var format = '';\n\n if (this.component.dayFirst && this.showDay) {\n format += 'D/';\n }\n\n if (this.showMonth) {\n format += 'M/';\n }\n\n if (!this.component.dayFirst && this.showDay) {\n format += 'D/';\n }\n\n if (this.showYear) {\n format += 'YYYY';\n return format;\n } else {\n // Trim off the \"/\" from the end of the format string.\n return format.length ? format.substring(0, format.length - 1) : format;\n }\n }\n /**\n * Return the date for this component.\n *\n * @param value\n * @return {*}\n */\n\n }, {\n key: \"getDate\",\n value: function getDate(value) {\n var defaults = [],\n day,\n month,\n year; // Map positions to identifiers to get default values for each part of day\n\n var _ref = this.component.dayFirst ? [0, 1, 2] : [1, 0, 2],\n _ref2 = _slicedToArray(_ref, 3),\n DAY = _ref2[0],\n MONTH = _ref2[1],\n YEAR = _ref2[2];\n\n var defaultValue = value || this.component.defaultValue;\n\n if (defaultValue) {\n defaults = defaultValue.split('/').map(function (x) {\n return parseInt(x, 10);\n });\n }\n\n if (this.showDay && this.refs.day) {\n day = parseInt(this.refs.day.value, 10);\n }\n\n if (day === undefined || _lodash.default.isNaN(day)) {\n day = defaults[DAY] && !_lodash.default.isNaN(defaults[DAY]) ? defaults[DAY] : 0;\n }\n\n if (this.showMonth && this.refs.month) {\n // Months are 0 indexed.\n month = parseInt(this.refs.month.value, 10);\n }\n\n if (month === undefined || _lodash.default.isNaN(month)) {\n month = defaults[MONTH] && !_lodash.default.isNaN(defaults[MONTH]) ? defaults[MONTH] : 0;\n }\n\n if (this.showYear && this.refs.year) {\n year = parseInt(this.refs.year.value);\n }\n\n if (year === undefined || _lodash.default.isNaN(year)) {\n year = defaults[YEAR] && !_lodash.default.isNaN(defaults[YEAR]) ? defaults[YEAR] : 0;\n }\n\n var result;\n\n if (!day && !month && !year) {\n return null;\n } // add trailing zeros if the data is showed\n\n\n day = this.showDay ? day.toString().padStart(2, 0) : '';\n month = this.showMonth ? month.toString().padStart(2, 0) : '';\n year = this.showYear ? year.toString().padStart(4, 0) : '';\n\n if (this.component.dayFirst) {\n result = \"\".concat(day).concat(this.showDay && this.showMonth || this.showDay && this.showYear ? '/' : '').concat(month).concat(this.showMonth && this.showYear ? '/' : '').concat(year);\n } else {\n result = \"\".concat(month).concat(this.showDay && this.showMonth || this.showMonth && this.showYear ? '/' : '').concat(day).concat(this.showDay && this.showYear ? '/' : '').concat(year);\n }\n\n return result;\n }\n /**\n * Return the date object for this component.\n * @returns {Date}\n */\n\n }, {\n key: \"date\",\n get: function get() {\n return this.getDate();\n }\n }, {\n key: \"normalizeMinMaxDates\",\n value: function normalizeMinMaxDates() {\n return [this.component.minDate, this.component.maxDate].map(function (date) {\n return date ? date.split('-').reverse().join('/') : date;\n });\n }\n /**\n * Return the raw value.\n *\n * @returns {Date}\n */\n\n }, {\n key: \"validationValue\",\n get: function get() {\n var _ref3 = this.dayFirst ? this.normalizeMinMaxDates() : [this.component.minDate, this.component.maxDate];\n\n var _ref4 = _slicedToArray(_ref3, 2);\n\n this.component.minDate = _ref4[0];\n this.component.maxDate = _ref4[1];\n return this.dataValue;\n }\n }, {\n key: \"getValue\",\n value: function getValue() {\n var result = _get(_getPrototypeOf(DayComponent.prototype), \"getValue\", this).call(this);\n\n return !result ? this.dataValue : result;\n }\n /**\n * Get the value at a specific index.\n *\n * @param index\n * @returns {*}\n */\n\n }, {\n key: \"getValueAt\",\n value: function getValueAt(index) {\n var date = this.date || this.emptyValue;\n\n if (date) {\n this.refs.input[index].value = date;\n return this.refs.input[index].value;\n } else {\n this.refs.input[index].value = '';\n return null;\n }\n }\n /**\n * Get the input value of the date.\n *\n * @param value\n * @return {null}\n */\n\n }, {\n key: \"getValueAsString\",\n value: function getValueAsString(value) {\n return this.getDate(value) || '';\n }\n }, {\n key: \"focus\",\n value: function focus() {\n if (this.dayFirst && this.showDay || !this.dayFirst && !this.showMonth && this.showDay) {\n var _this$refs$day;\n\n (_this$refs$day = this.refs.day) === null || _this$refs$day === void 0 ? void 0 : _this$refs$day.focus();\n } else if (this.dayFirst && !this.showDay && this.showMonth || !this.dayFirst && this.showMonth) {\n var _this$refs$month;\n\n (_this$refs$month = this.refs.month) === null || _this$refs$month === void 0 ? void 0 : _this$refs$month.focus();\n } else if (!this.showDay && !this.showDay && this.showYear) {\n var _this$refs$year;\n\n (_this$refs$year = this.refs.year) === null || _this$refs$year === void 0 ? void 0 : _this$refs$year.focus();\n }\n }\n }, {\n key: \"isPartialDay\",\n value: function isPartialDay(value) {\n if (!value) {\n return false;\n }\n\n var _ref5 = this.component.dayFirst ? [0, 1, 2] : [1, 0, 2],\n _ref6 = _slicedToArray(_ref5, 3),\n DAY = _ref6[0],\n MONTH = _ref6[1],\n YEAR = _ref6[2];\n\n var values = value.split('/');\n return values[DAY] === '00' || values[MONTH] === '00' || values[YEAR] === '0000';\n }\n }, {\n key: \"getValidationFormat\",\n value: function getValidationFormat() {\n return this.dayFirst ? 'DD-MM-YYYY' : 'MM-DD-YYYY';\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _Field2.default.schema.apply(_Field2.default, [{\n type: 'day',\n label: 'Day',\n key: 'day',\n fields: {\n day: {\n type: 'number',\n placeholder: '',\n required: false\n },\n month: {\n type: 'select',\n placeholder: '',\n required: false\n },\n year: {\n type: 'number',\n placeholder: '',\n required: false\n }\n },\n dayFirst: false\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Day',\n group: 'advanced',\n icon: 'calendar',\n documentation: '/userguide/forms/form-components#day',\n weight: 50,\n schema: DayComponent.schema()\n };\n }\n }]);\n\n return DayComponent;\n}(_Field2.default);\n\nexports[\"default\"] = DayComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/day/Day.js?"); +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.set.js */ \"./node_modules/core-js/modules/es.reflect.set.js\");\n__webpack_require__(/*! core-js/modules/es.array.is-array.js */ \"./node_modules/core-js/modules/es.array.is-array.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.slice.js */ \"./node_modules/core-js/modules/es.array.slice.js\");\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n__webpack_require__(/*! core-js/modules/es.array.from.js */ \"./node_modules/core-js/modules/es.array.from.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-string.js */ \"./node_modules/core-js/modules/es.date.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.array.reduce.js */ \"./node_modules/core-js/modules/es.array.reduce.js\");\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.parse-int.js */ \"./node_modules/core-js/modules/es.parse-int.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n__webpack_require__(/*! core-js/modules/es.array.join.js */ \"./node_modules/core-js/modules/es.array.join.js\");\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n__webpack_require__(/*! core-js/modules/es.string.pad-start.js */ \"./node_modules/core-js/modules/es.string.pad-start.js\");\n__webpack_require__(/*! core-js/modules/es.array.reverse.js */ \"./node_modules/core-js/modules/es.array.reverse.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nvar _Field2 = _interopRequireDefault(__webpack_require__(/*! ../_classes/field/Field */ \"./lib/components/_classes/field/Field.js\"));\nvar _utils = __webpack_require__(/*! ../../utils/utils */ \"./lib/utils/utils.js\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\nfunction _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : \"undefined\" != typeof Symbol && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) { ; } } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i[\"return\"] && (_r = _i[\"return\"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction set(target, property, value, receiver) { if (typeof Reflect !== \"undefined\" && Reflect.set) { set = Reflect.set; } else { set = function set(target, property, value, receiver) { var base = _superPropBase(target, property); var desc; if (base) { desc = Object.getOwnPropertyDescriptor(base, property); if (desc.set) { desc.set.call(receiver, value); return true; } else if (!desc.writable) { return false; } } desc = Object.getOwnPropertyDescriptor(receiver, property); if (desc) { if (!desc.writable) { return false; } desc.value = value; Object.defineProperty(receiver, property, desc); } else { _defineProperty(receiver, property, value); } return true; }; } return set(target, property, value, receiver); }\nfunction _set(target, property, value, receiver, isStrict) { var s = set(target, property, value, receiver || target); if (!s && isStrict) { throw new Error('failed to set property'); } return value; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar DayComponent = /*#__PURE__*/function (_Field) {\n _inherits(DayComponent, _Field);\n var _super = _createSuper(DayComponent);\n function DayComponent() {\n _classCallCheck(this, DayComponent);\n return _super.apply(this, arguments);\n }\n _createClass(DayComponent, [{\n key: \"emptyValue\",\n get:\n /**\n * The empty value for day component.\n *\n * @return {'00/00/0000'}\n */\n function get() {\n return '00/00/0000';\n }\n }, {\n key: \"valueMask\",\n get: function get() {\n return /^\\d{2}\\/\\d{2}\\/\\d{4}$/;\n }\n }, {\n key: \"dayRequired\",\n get: function get() {\n return this.showDay && _lodash[\"default\"].get(this.component, 'fields.day.required', false);\n }\n }, {\n key: \"showDay\",\n get: function get() {\n return !_lodash[\"default\"].get(this.component, 'fields.day.hide', false);\n }\n }, {\n key: \"monthRequired\",\n get: function get() {\n return this.showMonth && _lodash[\"default\"].get(this.component, 'fields.month.required', false);\n }\n }, {\n key: \"showMonth\",\n get: function get() {\n return !_lodash[\"default\"].get(this.component, 'fields.month.hide', false);\n }\n }, {\n key: \"yearRequired\",\n get: function get() {\n return this.showYear && _lodash[\"default\"].get(this.component, 'fields.year.required', false);\n }\n }, {\n key: \"showYear\",\n get: function get() {\n return !_lodash[\"default\"].get(this.component, 'fields.year.hide', false);\n }\n }, {\n key: \"defaultSchema\",\n get: function get() {\n return DayComponent.schema();\n }\n }, {\n key: \"shouldDisabled\",\n get: function get() {\n return _get(_getPrototypeOf(DayComponent.prototype), \"shouldDisabled\", this) || this.parentDisabled;\n }\n }, {\n key: \"inputInfo\",\n get: function get() {\n var info = _get(_getPrototypeOf(DayComponent.prototype), \"elementInfo\", this).call(this);\n info.type = 'input';\n info.attr.type = 'hidden';\n info.changeEvent = 'input';\n return info;\n }\n }, {\n key: \"inputDefinition\",\n value: function inputDefinition(name) {\n var min, max;\n if (name === 'day') {\n min = 1;\n max = 31;\n }\n if (name === 'month') {\n min = 1;\n max = 12;\n }\n if (name === 'year') {\n min = _lodash[\"default\"].get(this.component, 'fields.year.minYear', 1900) || 1900;\n max = _lodash[\"default\"].get(this.component, 'fields.year.maxYear', 2030) || 1900;\n }\n return {\n type: 'input',\n ref: name,\n attr: {\n id: \"\".concat(this.component.key, \"-\").concat(name),\n \"class\": \"form-control \".concat(this.transform('class', \"formio-day-component-\".concat(name))),\n type: this.component.fields[name].type === 'select' ? 'select' : 'number',\n placeholder: this.component.fields[name].placeholder,\n step: 1,\n min: min,\n max: max\n }\n };\n }\n }, {\n key: \"selectDefinition\",\n value: function selectDefinition(name) {\n return {\n multiple: false,\n ref: name,\n widget: 'html5',\n attr: {\n id: \"\".concat(this.component.key, \"-\").concat(name),\n \"class\": 'form-control',\n name: name,\n lang: this.options.language\n }\n };\n }\n }, {\n key: \"days\",\n get: function get() {\n if (this._days) {\n return this._days;\n }\n this._days = [{\n value: '',\n label: _lodash[\"default\"].get(this.component, 'fields.day.placeholder', '')\n }];\n for (var x = 1; x <= 31; x++) {\n this._days.push({\n value: x,\n label: x.toString()\n });\n }\n return this._days;\n }\n }, {\n key: \"months\",\n get: function get() {\n if (this._months) {\n return this._months;\n }\n this._months = [{\n value: '',\n label: _lodash[\"default\"].get(this.component, 'fields.month.placeholder') || (this.hideInputLabels ? this.t('Month') : '')\n }, {\n value: 1,\n label: 'January'\n }, {\n value: 2,\n label: 'February'\n }, {\n value: 3,\n label: 'March'\n }, {\n value: 4,\n label: 'April'\n }, {\n value: 5,\n label: 'May'\n }, {\n value: 6,\n label: 'June'\n }, {\n value: 7,\n label: 'July'\n }, {\n value: 8,\n label: 'August'\n }, {\n value: 9,\n label: 'September'\n }, {\n value: 10,\n label: 'October'\n }, {\n value: 11,\n label: 'November'\n }, {\n value: 12,\n label: 'December'\n }];\n return this._months;\n }\n }, {\n key: \"years\",\n get: function get() {\n if (this._years) {\n return this._years;\n }\n this._years = [{\n value: '',\n label: _lodash[\"default\"].get(this.component, 'fields.year.placeholder', '')\n }];\n var minYears = _lodash[\"default\"].get(this.component, 'fields.year.minYear', 1900) || 1900;\n var maxYears = _lodash[\"default\"].get(this.component, 'fields.year.maxYear', 2030) || 2030;\n for (var x = minYears; x <= maxYears; x++) {\n this._years.push({\n value: x,\n label: x.toString()\n });\n }\n return this._years;\n }\n }, {\n key: \"setErrorClasses\",\n value: function setErrorClasses(elements, dirty, hasError) {\n _get(_getPrototypeOf(DayComponent.prototype), \"setErrorClasses\", this).call(this, elements, dirty, hasError);\n _get(_getPrototypeOf(DayComponent.prototype), \"setErrorClasses\", this).call(this, [this.refs.day, this.refs.month, this.refs.year], dirty, hasError);\n }\n }, {\n key: \"removeInputError\",\n value: function removeInputError(elements) {\n _get(_getPrototypeOf(DayComponent.prototype), \"removeInputError\", this).call(this, [this.refs.day, this.refs.month, this.refs.year]);\n _get(_getPrototypeOf(DayComponent.prototype), \"removeInputError\", this).call(this, elements);\n }\n }, {\n key: \"init\",\n value: function init() {\n _get(_getPrototypeOf(DayComponent.prototype), \"init\", this).call(this);\n this.validators = this.validators.concat(['day', 'maxDate', 'minDate', 'minYear', 'maxYear']);\n var minYear = this.component.fields.year.minYear;\n var maxYear = this.component.fields.year.maxYear;\n this.component.maxYear = maxYear;\n this.component.minYear = minYear;\n var dateFormatInfo = (0, _utils.getLocaleDateFormatInfo)(this.options.language);\n this.dayFirst = this.component.useLocaleSettings ? dateFormatInfo.dayFirst : this.component.dayFirst;\n }\n }, {\n key: \"render\",\n value: function render() {\n if (this.isHtmlRenderMode()) {\n return _get(_getPrototypeOf(DayComponent.prototype), \"render\", this).call(this, this.renderTemplate('input'));\n }\n return _get(_getPrototypeOf(DayComponent.prototype), \"render\", this).call(this, this.renderTemplate('day', {\n dayFirst: this.dayFirst,\n showDay: this.showDay,\n showMonth: this.showMonth,\n showYear: this.showYear,\n day: this.renderField('day'),\n month: this.renderField('month'),\n year: this.renderField('year')\n }));\n }\n }, {\n key: \"renderField\",\n value: function renderField(name) {\n var _this = this;\n if (this.component.fields[name].type === 'select') {\n return this.renderTemplate('select', {\n input: this.selectDefinition(name),\n selectOptions: this[\"\".concat(name, \"s\")].reduce(function (html, option) {\n return html + _this.renderTemplate('selectOption', {\n option: option,\n selected: false,\n attrs: {}\n });\n }, '')\n });\n } else {\n return this.renderTemplate('input', {\n prefix: this.prefix,\n suffix: this.suffix,\n input: this.inputDefinition(name)\n });\n }\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n var _this2 = this;\n this.loadRefs(element, {\n day: 'single',\n month: 'single',\n year: 'single',\n input: 'multiple'\n });\n var superAttach = _get(_getPrototypeOf(DayComponent.prototype), \"attach\", this).call(this, element);\n if (this.shouldDisabled) {\n this.setDisabled(this.refs.day, true);\n this.setDisabled(this.refs.month, true);\n this.setDisabled(this.refs.year, true);\n if (this.refs.input) {\n this.refs.input.forEach(function (input) {\n return _this2.setDisabled(input, true);\n });\n }\n } else {\n this.addEventListener(this.refs.day, 'input', function () {\n return _this2.updateValue(null, {\n modified: true\n });\n });\n // TODO: Need to rework this to work with day select as well.\n // Change day max input when month changes.\n this.addEventListener(this.refs.month, 'input', function () {\n var maxDay = _this2.refs.year ? parseInt(new Date(_this2.refs.year.value, _this2.refs.month.value, 0).getDate(), 10) : '';\n var day = _this2.getFieldValue('day');\n if (!_this2.component.fields.day.hide && maxDay) {\n _this2.refs.day.max = maxDay;\n }\n if (maxDay && day > maxDay) {\n _this2.refs.day.value = _this2.refs.day.max;\n }\n _this2.updateValue(null, {\n modified: true\n });\n });\n this.addEventListener(this.refs.year, 'input', function () {\n return _this2.updateValue(null, {\n modified: true\n });\n });\n this.addEventListener(this.refs.input, this.info.changeEvent, function () {\n return _this2.updateValue(null, {\n modified: true\n });\n });\n }\n this.setValue(this.dataValue);\n // Force the disabled state with getters and setters.\n this.disabled = this.shouldDisabled;\n return superAttach;\n }\n }, {\n key: \"validateRequired\",\n value: function validateRequired(setting, value) {\n var _this$parts = this.parts,\n day = _this$parts.day,\n month = _this$parts.month,\n year = _this$parts.year;\n if (this.dayRequired && !day) {\n return false;\n }\n if (this.monthRequired && !month) {\n return false;\n }\n if (this.yearRequired && !year) {\n return false;\n }\n if (!(0, _utils.boolValue)(setting)) {\n return true;\n }\n return !this.isEmpty(value);\n }\n }, {\n key: \"disabled\",\n set: function set(disabled) {\n _set(_getPrototypeOf(DayComponent.prototype), \"disabled\", disabled, this, true);\n if (!this.refs.year || !this.refs.month || !this.refs.day) {\n return;\n }\n if (disabled) {\n this.refs.year.setAttribute('disabled', 'disabled');\n this.refs.month.setAttribute('disabled', 'disabled');\n this.refs.day.setAttribute('disabled', 'disabled');\n } else {\n this.refs.year.removeAttribute('disabled');\n this.refs.month.removeAttribute('disabled');\n this.refs.day.removeAttribute('disabled');\n }\n }\n }, {\n key: \"normalizeValue\",\n value: function normalizeValue(value) {\n if (!value || this.valueMask.test(value)) {\n return value;\n }\n var dateParts = [];\n var valueParts = value.split('/');\n var _ref = this.component.dayFirst ? [0, 1, 2] : [1, 0, 2],\n _ref2 = _slicedToArray(_ref, 3),\n DAY = _ref2[0],\n MONTH = _ref2[1],\n YEAR = _ref2[2];\n var defaultValue = this.component.defaultValue ? this.component.defaultValue.split('/') : '';\n var getNextPart = function getNextPart(shouldTake, defaultValue) {\n return dateParts.push(shouldTake ? valueParts.shift() : defaultValue);\n };\n if (this.dayFirst) {\n getNextPart(this.showDay, defaultValue ? defaultValue[DAY] : '00');\n }\n getNextPart(this.showMonth, defaultValue ? defaultValue[MONTH] : '00');\n if (!this.dayFirst) {\n getNextPart(this.showDay, defaultValue ? defaultValue[DAY] : '00');\n }\n getNextPart(this.showYear, defaultValue ? defaultValue[YEAR] : '0000');\n return dateParts.join('/');\n }\n\n /**\n * Set the value at a specific index.\n *\n * @param index\n * @param value\n */\n }, {\n key: \"setValueAt\",\n value: function setValueAt(index, value) {\n // temporary solution to avoid input reset\n // on invalid date.\n if (!value || value === 'Invalid date') {\n return null;\n }\n var parts = value.split('/');\n var day;\n if (this.component.dayFirst) {\n day = parts.shift();\n }\n var month = parts.shift();\n if (!this.component.dayFirst) {\n day = parts.shift();\n }\n var year = parts.shift();\n if (this.refs.day && this.showDay) {\n this.refs.day.value = day === '00' ? '' : parseInt(day, 10);\n }\n if (this.refs.month && this.showMonth) {\n this.refs.month.value = month === '00' ? '' : parseInt(month, 10);\n }\n if (this.refs.year && this.showYear) {\n this.refs.year.value = year === '0000' ? '' : parseInt(year, 10);\n }\n }\n }, {\n key: \"getFieldValue\",\n value: function getFieldValue(name) {\n var parts = this.dataValue ? this.dataValue.split('/') : [];\n var val = 0;\n switch (name) {\n case 'month':\n val = parts[this.dayFirst ? 1 : 0];\n break;\n case 'day':\n val = parts[this.dayFirst ? 0 : 1];\n break;\n case 'year':\n val = parts[2];\n break;\n }\n val = parseInt(val, 10);\n return !_lodash[\"default\"].isNaN(val) && _lodash[\"default\"].isNumber(val) ? val : 0;\n }\n }, {\n key: \"parts\",\n get: function get() {\n return {\n day: this.getFieldValue('day'),\n month: this.getFieldValue('month'),\n year: this.getFieldValue('year')\n };\n }\n\n /**\n * Get the format for the value string.\n * @returns {string}\n */\n }, {\n key: \"format\",\n get: function get() {\n var format = '';\n if (this.component.dayFirst && this.showDay) {\n format += 'D/';\n }\n if (this.showMonth) {\n format += 'M/';\n }\n if (!this.component.dayFirst && this.showDay) {\n format += 'D/';\n }\n if (this.showYear) {\n format += 'YYYY';\n return format;\n } else {\n // Trim off the \"/\" from the end of the format string.\n return format.length ? format.substring(0, format.length - 1) : format;\n }\n }\n\n /**\n * Return the date for this component.\n *\n * @param value\n * @return {*}\n */\n }, {\n key: \"getDate\",\n value: function getDate(value) {\n var defaults = [],\n day,\n month,\n year;\n // Map positions to identifiers to get default values for each part of day\n var _ref3 = this.component.dayFirst ? [0, 1, 2] : [1, 0, 2],\n _ref4 = _slicedToArray(_ref3, 3),\n DAY = _ref4[0],\n MONTH = _ref4[1],\n YEAR = _ref4[2];\n var defaultValue = value || this.component.defaultValue;\n if (defaultValue) {\n defaults = defaultValue.split('/').map(function (x) {\n return parseInt(x, 10);\n });\n }\n if (this.showDay && this.refs.day) {\n day = parseInt(this.refs.day.value, 10);\n }\n if (day === undefined || _lodash[\"default\"].isNaN(day)) {\n day = defaults[DAY] && !_lodash[\"default\"].isNaN(defaults[DAY]) ? defaults[DAY] : 0;\n }\n if (this.showMonth && this.refs.month) {\n // Months are 0 indexed.\n month = parseInt(this.refs.month.value, 10);\n }\n if (month === undefined || _lodash[\"default\"].isNaN(month)) {\n month = defaults[MONTH] && !_lodash[\"default\"].isNaN(defaults[MONTH]) ? defaults[MONTH] : 0;\n }\n if (this.showYear && this.refs.year) {\n year = parseInt(this.refs.year.value);\n }\n if (year === undefined || _lodash[\"default\"].isNaN(year)) {\n year = defaults[YEAR] && !_lodash[\"default\"].isNaN(defaults[YEAR]) ? defaults[YEAR] : 0;\n }\n var result;\n if (!day && !month && !year) {\n return null;\n }\n\n // add trailing zeros if the data is showed\n day = this.showDay ? day.toString().padStart(2, 0) : '';\n month = this.showMonth ? month.toString().padStart(2, 0) : '';\n year = this.showYear ? year.toString().padStart(4, 0) : '';\n if (this.component.dayFirst) {\n result = \"\".concat(day).concat(this.showDay && this.showMonth || this.showDay && this.showYear ? '/' : '').concat(month).concat(this.showMonth && this.showYear ? '/' : '').concat(year);\n } else {\n result = \"\".concat(month).concat(this.showDay && this.showMonth || this.showMonth && this.showYear ? '/' : '').concat(day).concat(this.showDay && this.showYear ? '/' : '').concat(year);\n }\n return result;\n }\n\n /**\n * Return the date object for this component.\n * @returns {Date}\n */\n }, {\n key: \"date\",\n get: function get() {\n return this.getDate();\n }\n }, {\n key: \"normalizeMinMaxDates\",\n value: function normalizeMinMaxDates() {\n return [this.component.minDate, this.component.maxDate].map(function (date) {\n return date ? date.split('-').reverse().join('/') : date;\n });\n }\n\n /**\n * Return the raw value.\n *\n * @returns {Date}\n */\n }, {\n key: \"validationValue\",\n get: function get() {\n var _ref5 = this.dayFirst ? this.normalizeMinMaxDates() : [this.component.minDate, this.component.maxDate];\n var _ref6 = _slicedToArray(_ref5, 2);\n this.component.minDate = _ref6[0];\n this.component.maxDate = _ref6[1];\n return this.dataValue;\n }\n }, {\n key: \"getValue\",\n value: function getValue() {\n var result = _get(_getPrototypeOf(DayComponent.prototype), \"getValue\", this).call(this);\n return !result ? this.dataValue : result;\n }\n\n /**\n * Get the value at a specific index.\n *\n * @param index\n * @returns {*}\n */\n }, {\n key: \"getValueAt\",\n value: function getValueAt(index) {\n var date = this.date || this.emptyValue;\n if (date) {\n this.refs.input[index].value = date;\n return this.refs.input[index].value;\n } else {\n this.refs.input[index].value = '';\n return null;\n }\n }\n\n /**\n * Get the input value of the date.\n *\n * @param value\n * @return {null}\n */\n }, {\n key: \"getValueAsString\",\n value: function getValueAsString(value) {\n return this.getDate(value) || '';\n }\n }, {\n key: \"focus\",\n value: function focus() {\n if (this.dayFirst && this.showDay || !this.dayFirst && !this.showMonth && this.showDay) {\n var _this$refs$day;\n (_this$refs$day = this.refs.day) === null || _this$refs$day === void 0 ? void 0 : _this$refs$day.focus();\n } else if (this.dayFirst && !this.showDay && this.showMonth || !this.dayFirst && this.showMonth) {\n var _this$refs$month;\n (_this$refs$month = this.refs.month) === null || _this$refs$month === void 0 ? void 0 : _this$refs$month.focus();\n } else if (!this.showDay && !this.showDay && this.showYear) {\n var _this$refs$year;\n (_this$refs$year = this.refs.year) === null || _this$refs$year === void 0 ? void 0 : _this$refs$year.focus();\n }\n }\n }, {\n key: \"isPartialDay\",\n value: function isPartialDay(value) {\n if (!value) {\n return false;\n }\n var _ref7 = this.component.dayFirst ? [0, 1, 2] : [1, 0, 2],\n _ref8 = _slicedToArray(_ref7, 3),\n DAY = _ref8[0],\n MONTH = _ref8[1],\n YEAR = _ref8[2];\n var values = value.split('/');\n return values[DAY] === '00' || values[MONTH] === '00' || values[YEAR] === '0000';\n }\n }, {\n key: \"getValidationFormat\",\n value: function getValidationFormat() {\n return this.dayFirst ? 'DD-MM-YYYY' : 'MM-DD-YYYY';\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _Field2[\"default\"].schema.apply(_Field2[\"default\"], [{\n type: 'day',\n label: 'Day',\n key: 'day',\n fields: {\n day: {\n type: 'number',\n placeholder: '',\n required: false\n },\n month: {\n type: 'select',\n placeholder: '',\n required: false\n },\n year: {\n type: 'number',\n placeholder: '',\n required: false\n }\n },\n dayFirst: false\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Day',\n group: 'advanced',\n icon: 'calendar',\n documentation: '/userguide/form-building/advanced-components#day',\n weight: 50,\n schema: DayComponent.schema()\n };\n }\n }]);\n return DayComponent;\n}(_Field2[\"default\"]);\nexports[\"default\"] = DayComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/day/Day.js?"); /***/ }), @@ -958,10 +991,10 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /*!******************************************************!*\ !*** ./lib/components/day/editForm/Day.edit.data.js ***! \******************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'multiple',\n ignore: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/day/editForm/Day.edit.data.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'multiple',\n ignore: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/day/editForm/Day.edit.data.js?"); /***/ }), @@ -969,10 +1002,10 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /*!*****************************************************!*\ !*** ./lib/components/day/editForm/Day.edit.day.js ***! \*****************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n wieght: 200,\n type: 'select',\n datasrc: 'values',\n key: 'fields.day.type',\n label: 'Type',\n data: {\n values: [{\n label: 'Number',\n value: 'number'\n }, {\n label: 'Select',\n value: 'select'\n }]\n }\n}, {\n weight: 210,\n type: 'textfield',\n input: true,\n key: 'fields.day.placeholder',\n label: 'Placeholder',\n placeholder: 'Day Placeholder',\n tooltip: 'The placeholder text that will appear when Day field is empty.'\n}, {\n weight: 215,\n type: 'checkbox',\n label: 'Hidden',\n tooltip: 'Hide the Day part of the component.',\n key: 'fields.day.hide',\n input: true\n}, {\n weight: 214,\n type: 'checkbox',\n label: 'Day First',\n tooltip: 'Display the Day field before the Month field.',\n key: 'dayFirst',\n input: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/day/editForm/Day.edit.day.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n wieght: 200,\n type: 'select',\n datasrc: 'values',\n key: 'fields.day.type',\n label: 'Type',\n data: {\n values: [{\n label: 'Number',\n value: 'number'\n }, {\n label: 'Select',\n value: 'select'\n }]\n }\n}, {\n weight: 210,\n type: 'textfield',\n input: true,\n key: 'fields.day.placeholder',\n label: 'Placeholder',\n placeholder: 'Day Placeholder',\n tooltip: 'The placeholder text that will appear when Day field is empty.'\n}, {\n weight: 215,\n type: 'checkbox',\n label: 'Hidden',\n tooltip: 'Hide the Day part of the component.',\n key: 'fields.day.hide',\n input: true\n}, {\n weight: 214,\n type: 'checkbox',\n label: 'Day First',\n tooltip: 'Display the Day field before the Month field.',\n key: 'dayFirst',\n input: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/day/editForm/Day.edit.day.js?"); /***/ }), @@ -980,10 +1013,10 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /*!*********************************************************!*\ !*** ./lib/components/day/editForm/Day.edit.display.js ***! \*********************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'labelPosition',\n ignore: true\n}, {\n weight: 15,\n type: 'checkbox',\n label: 'Hide Input Labels',\n tooltip: 'Hide the labels of component inputs. This allows you to show the labels in the form builder, but not when it is rendered.',\n key: 'hideInputLabels',\n input: true\n}, {\n type: 'select',\n input: true,\n key: 'inputsLabelPosition',\n label: 'Inputs Label Position',\n tooltip: 'Position for the labels for inputs for this field.',\n weight: 40,\n defaultValue: 'top',\n dataSrc: 'values',\n data: {\n values: [{\n label: 'Top',\n value: 'top'\n }, {\n label: 'Left',\n value: 'left'\n }, {\n label: 'Right',\n value: 'right'\n }, {\n label: 'Bottom',\n value: 'bottom'\n }]\n }\n}, {\n key: 'placeholder',\n ignore: true\n}, {\n weight: 213,\n type: 'checkbox',\n label: 'Use Locale Settings',\n tooltip: 'Use locale settings to display day.',\n key: 'useLocaleSettings',\n input: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/day/editForm/Day.edit.display.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'labelPosition',\n ignore: true\n}, {\n weight: 15,\n type: 'checkbox',\n label: 'Hide Input Labels',\n tooltip: 'Hide the labels of component inputs. This allows you to show the labels in the form builder, but not when it is rendered.',\n key: 'hideInputLabels',\n input: true\n}, {\n type: 'select',\n input: true,\n key: 'inputsLabelPosition',\n label: 'Inputs Label Position',\n tooltip: 'Position for the labels for inputs for this field.',\n weight: 40,\n defaultValue: 'top',\n dataSrc: 'values',\n data: {\n values: [{\n label: 'Top',\n value: 'top'\n }, {\n label: 'Left',\n value: 'left'\n }, {\n label: 'Right',\n value: 'right'\n }, {\n label: 'Bottom',\n value: 'bottom'\n }]\n }\n}, {\n key: 'placeholder',\n ignore: true\n}, {\n weight: 213,\n type: 'checkbox',\n label: 'Use Locale Settings',\n tooltip: 'Use locale settings to display day.',\n key: 'useLocaleSettings',\n input: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/day/editForm/Day.edit.display.js?"); /***/ }), @@ -991,10 +1024,10 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /*!*******************************************************!*\ !*** ./lib/components/day/editForm/Day.edit.month.js ***! \*******************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n wieght: 200,\n type: 'select',\n datasrc: 'values',\n key: 'fields.month.type',\n label: 'Type of input',\n data: {\n values: [{\n label: 'Number',\n value: 'number'\n }, {\n label: 'Select',\n value: 'select'\n }]\n }\n}, {\n weight: 210,\n type: 'textfield',\n input: true,\n key: 'fields.month.placeholder',\n label: 'Placeholder',\n placeholder: 'Month Placeholder',\n tooltip: 'The placeholder text that will appear when Month field is empty.'\n}, {\n weight: 215,\n type: 'checkbox',\n label: 'Hidden',\n tooltip: 'Hide the Month part of the component.',\n key: 'fields.month.hide',\n input: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/day/editForm/Day.edit.month.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n wieght: 200,\n type: 'select',\n datasrc: 'values',\n key: 'fields.month.type',\n label: 'Type of input',\n data: {\n values: [{\n label: 'Number',\n value: 'number'\n }, {\n label: 'Select',\n value: 'select'\n }]\n }\n}, {\n weight: 210,\n type: 'textfield',\n input: true,\n key: 'fields.month.placeholder',\n label: 'Placeholder',\n placeholder: 'Month Placeholder',\n tooltip: 'The placeholder text that will appear when Month field is empty.'\n}, {\n weight: 215,\n type: 'checkbox',\n label: 'Hidden',\n tooltip: 'Hide the Month part of the component.',\n key: 'fields.month.hide',\n input: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/day/editForm/Day.edit.month.js?"); /***/ }), @@ -1002,10 +1035,10 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /*!************************************************************!*\ !*** ./lib/components/day/editForm/Day.edit.validation.js ***! \************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'validate.required',\n ignore: true\n}, {\n key: 'validate.unique',\n ignore: true\n}, {\n weight: 0,\n type: 'checkbox',\n label: 'Require Day',\n tooltip: 'A required field must be filled in before the form can be submitted.',\n key: 'fields.day.required',\n input: true\n}, {\n weight: 10,\n type: 'checkbox',\n label: 'Require Month',\n tooltip: 'A required field must be filled in before the form can be submitted.',\n key: 'fields.month.required',\n input: true\n}, {\n weight: 20,\n type: 'checkbox',\n label: 'Require Year',\n tooltip: 'A required field must be filled in before the form can be submitted.',\n key: 'fields.year.required',\n input: true\n}, {\n weight: 40,\n type: 'textfield',\n label: 'Minimum Day',\n placeholder: 'yyyy-MM-dd',\n tooltip: 'A minimum date that can be set. You can also use Moment.js functions. For example: \\n \\n moment().subtract(10, \\'days\\')',\n key: 'minDate',\n input: true\n}, {\n weight: 30,\n type: 'textfield',\n label: 'Maximum Day',\n placeholder: 'yyyy-MM-dd',\n tooltip: 'A maximum day that can be set. You can also use Moment.js functions. For example: \\n \\n moment().add(10, \\'days\\')',\n key: 'maxDate',\n input: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/day/editForm/Day.edit.validation.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'validate.required',\n ignore: true\n}, {\n key: 'validate.unique',\n ignore: true\n}, {\n weight: 0,\n type: 'checkbox',\n label: 'Require Day',\n tooltip: 'A required field must be filled in before the form can be submitted.',\n key: 'fields.day.required',\n input: true\n}, {\n weight: 10,\n type: 'checkbox',\n label: 'Require Month',\n tooltip: 'A required field must be filled in before the form can be submitted.',\n key: 'fields.month.required',\n input: true\n}, {\n weight: 20,\n type: 'checkbox',\n label: 'Require Year',\n tooltip: 'A required field must be filled in before the form can be submitted.',\n key: 'fields.year.required',\n input: true\n}, {\n weight: 40,\n type: 'textfield',\n label: 'Minimum Day',\n placeholder: 'yyyy-MM-dd',\n tooltip: 'A minimum date that can be set. You can also use Moment.js functions. For example: \\n \\n moment().subtract(10, \\'days\\')',\n key: 'minDate',\n input: true\n}, {\n weight: 30,\n type: 'textfield',\n label: 'Maximum Day',\n placeholder: 'yyyy-MM-dd',\n tooltip: 'A maximum day that can be set. You can also use Moment.js functions. For example: \\n \\n moment().add(10, \\'days\\')',\n key: 'maxDate',\n input: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/day/editForm/Day.edit.validation.js?"); /***/ }), @@ -1013,10 +1046,10 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /*!******************************************************!*\ !*** ./lib/components/day/editForm/Day.edit.year.js ***! \******************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n wieght: 200,\n type: 'select',\n datasrc: 'values',\n key: 'fields.year.type',\n label: 'Type of input',\n data: {\n values: [{\n label: 'Number',\n value: 'number'\n }, {\n label: 'Select',\n value: 'select'\n }]\n }\n}, {\n weight: 203,\n type: 'number',\n input: true,\n key: 'fields.year.minYear',\n label: 'Minimum Year',\n placeholder: '1900',\n tooltip: 'The minimum year that can be entered.'\n}, {\n weight: 204,\n type: 'number',\n input: true,\n key: 'fields.year.maxYear',\n label: 'Maximum Year',\n placeholder: '2030',\n tooltip: 'The maximum year that can be entered.'\n}, {\n weight: 210,\n type: 'textfield',\n input: true,\n key: 'fields.year.placeholder',\n label: 'Placeholder',\n placeholder: 'Year Placeholder',\n tooltip: 'The placeholder text that will appear when Year field is empty.'\n}, {\n weight: 215,\n type: 'checkbox',\n label: 'Hidden',\n tooltip: 'Hide the Year part of the component.',\n key: 'fields.year.hide',\n input: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/day/editForm/Day.edit.year.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n wieght: 200,\n type: 'select',\n datasrc: 'values',\n key: 'fields.year.type',\n label: 'Type of input',\n data: {\n values: [{\n label: 'Number',\n value: 'number'\n }, {\n label: 'Select',\n value: 'select'\n }]\n }\n}, {\n weight: 203,\n type: 'number',\n input: true,\n key: 'fields.year.minYear',\n label: 'Minimum Year',\n placeholder: '1900',\n tooltip: 'The minimum year that can be entered.'\n}, {\n weight: 204,\n type: 'number',\n input: true,\n key: 'fields.year.maxYear',\n label: 'Maximum Year',\n placeholder: '2030',\n tooltip: 'The maximum year that can be entered.'\n}, {\n weight: 210,\n type: 'textfield',\n input: true,\n key: 'fields.year.placeholder',\n label: 'Placeholder',\n placeholder: 'Year Placeholder',\n tooltip: 'The placeholder text that will appear when Year field is empty.'\n}, {\n weight: 215,\n type: 'checkbox',\n label: 'Hidden',\n tooltip: 'Hide the Year part of the component.',\n key: 'fields.year.hide',\n input: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/day/editForm/Day.edit.year.js?"); /***/ }), @@ -1027,7 +1060,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\nvar _Components = _interopRequireDefault(__webpack_require__(/*! ../Components */ \"./lib/components/Components.js\"));\n\nvar _EditGridEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/EditGrid.edit.data */ \"./lib/components/editgrid/editForm/EditGrid.edit.data.js\"));\n\nvar _EditGridEdit2 = _interopRequireDefault(__webpack_require__(/*! ./editForm/EditGrid.edit.display */ \"./lib/components/editgrid/editForm/EditGrid.edit.display.js\"));\n\nvar _EditGridEdit3 = _interopRequireDefault(__webpack_require__(/*! ./editForm/EditGrid.edit.templates */ \"./lib/components/editgrid/editForm/EditGrid.edit.templates.js\"));\n\nvar _EditGridEdit4 = _interopRequireDefault(__webpack_require__(/*! ./editForm/EditGrid.edit.validation */ \"./lib/components/editgrid/editForm/EditGrid.edit.validation.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _Components.default.baseEditForm.apply(_Components.default, [[{\n label: 'Templates',\n key: 'templates',\n weight: 5,\n components: _EditGridEdit3.default\n }, {\n key: 'display',\n components: _EditGridEdit2.default\n }, {\n key: 'data',\n components: _EditGridEdit.default\n }, {\n key: 'validation',\n components: _EditGridEdit4.default\n }, {\n key: 'addons',\n ignore: true\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/editgrid/EditGrid.form.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\nvar _Components = _interopRequireDefault(__webpack_require__(/*! ../Components */ \"./lib/components/Components.js\"));\nvar _EditGridEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/EditGrid.edit.data */ \"./lib/components/editgrid/editForm/EditGrid.edit.data.js\"));\nvar _EditGridEdit2 = _interopRequireDefault(__webpack_require__(/*! ./editForm/EditGrid.edit.display */ \"./lib/components/editgrid/editForm/EditGrid.edit.display.js\"));\nvar _EditGridEdit3 = _interopRequireDefault(__webpack_require__(/*! ./editForm/EditGrid.edit.templates */ \"./lib/components/editgrid/editForm/EditGrid.edit.templates.js\"));\nvar _EditGridEdit4 = _interopRequireDefault(__webpack_require__(/*! ./editForm/EditGrid.edit.validation */ \"./lib/components/editgrid/editForm/EditGrid.edit.validation.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _Components[\"default\"].baseEditForm.apply(_Components[\"default\"], [[{\n label: 'Templates',\n key: 'templates',\n weight: 5,\n components: _EditGridEdit3[\"default\"]\n }, {\n key: 'display',\n components: _EditGridEdit2[\"default\"]\n }, {\n key: 'data',\n components: _EditGridEdit[\"default\"]\n }, {\n key: 'validation',\n components: _EditGridEdit4[\"default\"]\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/editgrid/EditGrid.form.js?"); /***/ }), @@ -1038,7 +1071,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.set.js */ \"./node_modules/core-js/modules/es.reflect.set.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptors.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.includes.js */ \"./node_modules/core-js/modules/es.array.includes.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.includes.js */ \"./node_modules/core-js/modules/es.string.includes.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.from.js */ \"./node_modules/core-js/modules/es.array.from.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.assign.js */ \"./node_modules/core-js/modules/es.object.assign.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.constructor.js */ \"./node_modules/core-js/modules/es.regexp.constructor.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.slice.js */ \"./node_modules/core-js/modules/es.array.slice.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.splice.js */ \"./node_modules/core-js/modules/es.array.splice.js\");\n\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\n\nvar _NestedArrayComponent2 = _interopRequireDefault(__webpack_require__(/*! ../_classes/nestedarray/NestedArrayComponent */ \"./lib/components/_classes/nestedarray/NestedArrayComponent.js\"));\n\nvar _Component = _interopRequireDefault(__webpack_require__(/*! ../_classes/component/Component */ \"./lib/components/_classes/component/Component.js\"));\n\nvar _Alert = _interopRequireDefault(__webpack_require__(/*! ../alert/Alert */ \"./lib/components/alert/Alert.js\"));\n\nvar _utils = __webpack_require__(/*! ../../utils/utils */ \"./lib/utils/utils.js\");\n\nvar _templates = _interopRequireDefault(__webpack_require__(/*! ./templates */ \"./lib/components/editgrid/templates/index.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction set(target, property, value, receiver) { if (typeof Reflect !== \"undefined\" && Reflect.set) { set = Reflect.set; } else { set = function set(target, property, value, receiver) { var base = _superPropBase(target, property); var desc; if (base) { desc = Object.getOwnPropertyDescriptor(base, property); if (desc.set) { desc.set.call(receiver, value); return true; } else if (!desc.writable) { return false; } } desc = Object.getOwnPropertyDescriptor(receiver, property); if (desc) { if (!desc.writable) { return false; } desc.value = value; Object.defineProperty(receiver, property, desc); } else { _defineProperty(receiver, property, value); } return true; }; } return set(target, property, value, receiver); }\n\nfunction _set(target, property, value, receiver, isStrict) { var s = set(target, property, value, receiver || target); if (!s && isStrict) { throw new Error('failed to set property'); } return value; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar EditRowState = {\n New: 'new',\n Editing: 'editing',\n Saved: 'saved',\n Viewing: 'viewing',\n Removed: 'removed',\n Draft: 'draft'\n};\n\nvar EditGridComponent = /*#__PURE__*/function (_NestedArrayComponent) {\n _inherits(EditGridComponent, _NestedArrayComponent);\n\n var _super = _createSuper(EditGridComponent);\n\n function EditGridComponent() {\n var _this;\n\n _classCallCheck(this, EditGridComponent);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n _this.type = 'editgrid';\n return _this;\n }\n\n _createClass(EditGridComponent, [{\n key: \"defaultDialogTemplate\",\n get: function get() {\n return \"\\n

\".concat(this.t('Do you want to clear data?'), \"

\\n
\\n \\n \\n
\\n \");\n }\n }, {\n key: \"defaultRowTemplate\",\n get: function get() {\n return this.displayAsTable ? EditGridComponent.defaultTableRowTemplate : EditGridComponent.defaultRowTemplate;\n }\n }, {\n key: \"defaultHeaderTemplate\",\n get: function get() {\n return this.displayAsTable ? EditGridComponent.defaultTableHeaderTemplate : EditGridComponent.defaultHeaderTemplate;\n }\n }, {\n key: \"rowTemplate\",\n get: function get() {\n var rowTemplate;\n\n if (_utils.Evaluator.noeval) {\n rowTemplate = this.displayAsTable ? _templates.default.tableRow : _templates.default.row;\n } else {\n rowTemplate = this.displayAsTable ? _lodash.default.get(this.component, 'templates.tableRow', this.defaultRowTemplate) : _lodash.default.get(this.component, 'templates.row', this.defaultRowTemplate);\n }\n\n return rowTemplate;\n }\n }, {\n key: \"headerTemplate\",\n get: function get() {\n var headerTemplate;\n\n if (_utils.Evaluator.noeval) {\n headerTemplate = this.displayAsTable ? _templates.default.tableHeader : _templates.default.header;\n } else {\n headerTemplate = this.displayAsTable ? _lodash.default.get(this.component, 'templates.tableHeader', this.defaultHeaderTemplate) : _lodash.default.get(this.component, 'templates.header', this.defaultHeaderTemplate);\n }\n\n return headerTemplate;\n }\n /**\n * Returns true if the component has nested components which don't trigger changes on the root level\n */\n\n }, {\n key: \"hasScopedChildren\",\n get: function get() {\n return !this.inlineEditMode;\n }\n }, {\n key: \"defaultSchema\",\n get: function get() {\n return EditGridComponent.schema();\n }\n }, {\n key: \"emptyValue\",\n get: function get() {\n return [];\n }\n }, {\n key: \"editgridKey\",\n get: function get() {\n return \"editgrid-\".concat(this.key);\n }\n }, {\n key: \"rowRef\",\n get: function get() {\n return \"\".concat(this.editgridKey, \"-row\");\n }\n }, {\n key: \"rowElements\",\n get: function get() {\n return this.refs[this.rowRef];\n }\n }, {\n key: \"rowRefs\",\n get: function get() {\n return this.refs[\"editgrid-\".concat(this.component.key, \"-row\")];\n }\n }, {\n key: \"addRowRef\",\n get: function get() {\n return \"\".concat(this.editgridKey, \"-addRow\");\n }\n }, {\n key: \"addRowElements\",\n get: function get() {\n return this.refs[this.addRowRef];\n }\n }, {\n key: \"saveRowRef\",\n get: function get() {\n return \"\".concat(this.editgridKey, \"-saveRow\");\n }\n }, {\n key: \"saveRowElements\",\n get: function get() {\n return this.refs[this.saveRowRef];\n }\n }, {\n key: \"cancelRowRef\",\n get: function get() {\n return \"\".concat(this.editgridKey, \"-cancelRow\");\n }\n }, {\n key: \"cancelRowElements\",\n get: function get() {\n return this.refs[this.cancelRowRef];\n }\n }, {\n key: \"inlineEditMode\",\n get: function get() {\n return this.component.inlineEdit;\n }\n }, {\n key: \"saveEditMode\",\n get: function get() {\n return !this.inlineEditMode;\n }\n }, {\n key: \"minLength\",\n get: function get() {\n return _lodash.default.get(this.component, 'validate.minLength', 0);\n }\n }, {\n key: \"data\",\n get: function get() {\n return this._data;\n },\n set: function set(value) {\n this._data = value;\n var data = this.dataValue;\n (this.editRows || []).forEach(function (row, index) {\n if (!data[index] && row.state !== EditRowState.New) {\n data[index] = {};\n }\n\n var rowData = data[index] || {};\n row.data = rowData;\n row.components.forEach(function (component) {\n component.data = rowData;\n });\n });\n }\n }, {\n key: \"dataValue\",\n get: function get() {\n return _get(_getPrototypeOf(EditGridComponent.prototype), \"dataValue\", this) || [];\n },\n set: function set(value) {\n _set(_getPrototypeOf(EditGridComponent.prototype), \"dataValue\", value, this, true);\n }\n }, {\n key: \"displayAsTable\",\n get: function get() {\n return this.component.displayAsTable;\n }\n }, {\n key: \"iteratableRows\",\n get: function get() {\n return this.editRows;\n }\n }, {\n key: \"defaultValue\",\n get: function get() {\n var value = _get(_getPrototypeOf(EditGridComponent.prototype), \"defaultValue\", this);\n\n var defaultValue = Array.isArray(value) ? value : [];\n\n _lodash.default.times(this.minLength - defaultValue.length, function () {\n return defaultValue.push({});\n });\n\n return defaultValue;\n }\n }, {\n key: \"hasRemoveButtons\",\n value: function hasRemoveButtons() {\n return !this.component.disableAddingRemovingRows && !this.options.readOnly && !this.disabled && this.fullMode && this.dataValue.length > _lodash.default.get(this.component, 'validate.minLength', 0);\n }\n }, {\n key: \"init\",\n value: function init() {\n var _this2 = this;\n\n if (this.builderMode) {\n this.editRows = [];\n return _get(_getPrototypeOf(EditGridComponent.prototype), \"init\", this).call(this);\n }\n\n this.components = this.components || [];\n var dataValue = this.dataValue;\n var openWhenEmpty = !dataValue.length && this.component.openWhenEmpty;\n\n if (openWhenEmpty) {\n var dataObj = {};\n this.editRows = [];\n this.createRow(dataObj, 0);\n } else {\n this.editRows = dataValue.map(function (row, rowIndex) {\n return {\n components: _this2.lazyLoad ? [] : _this2.createRowComponents(row, rowIndex),\n data: row,\n state: EditRowState.Saved,\n backup: null,\n error: null\n };\n });\n }\n\n this.prevHasAddButton = this.hasAddButton();\n this.checkData();\n }\n }, {\n key: \"isOpen\",\n value: function isOpen(editRow) {\n return [EditRowState.New, EditRowState.Editing, EditRowState.Viewing].includes(editRow.state);\n }\n }, {\n key: \"isComponentVisibleInSomeRow\",\n value: function isComponentVisibleInSomeRow(component) {\n var _this3 = this;\n\n var rows = this.editRows;\n var savedStates = [EditRowState.Saved, EditRowState.Editing, EditRowState.Draft];\n var savedRows = rows.filter(function (row) {\n return _lodash.default.includes(savedStates, row.state);\n });\n this.visibleInHeader = this.visibleInHeader || [];\n\n var changeVisibleInHeader = function changeVisibleInHeader(component, isVisible) {\n if (!isVisible) {\n _lodash.default.remove(_this3.visibleInHeader, function (key) {\n return key === component.key;\n });\n }\n\n if (isVisible && !_lodash.default.includes(_this3.visibleInHeader, component.key)) {\n _this3.visibleInHeader.push(component.key);\n }\n };\n\n if (_lodash.default.isEmpty(rows)) {\n var rowComponents = this.createRowComponents({}, 0);\n var checkComponent;\n (0, _utils.eachComponent)(rowComponents, function (comp) {\n if (comp.component.key === component.key) {\n checkComponent = comp;\n }\n\n comp.checkConditions();\n });\n var isVisible = checkComponent ? checkComponent.visible : true;\n\n _toConsumableArray(this.components).forEach(function (comp) {\n return _this3.removeComponent(comp, _this3.components);\n });\n\n changeVisibleInHeader(component, isVisible);\n return isVisible;\n }\n\n var isOpenRowWhenEmpty = _lodash.default.get(this.component, 'openWhenEmpty') && rows.length === 1 && rows[0].state === EditRowState.New;\n\n if (!_lodash.default.isEmpty(rows) && _lodash.default.isEmpty(savedRows) && !isOpenRowWhenEmpty) {\n return _lodash.default.includes(this.visibleInHeader, component.key);\n }\n\n return _lodash.default.some(isOpenRowWhenEmpty ? rows : savedRows, function (row, index) {\n var editingRow = row.state === EditRowState.Editing;\n var isVisible;\n\n if (!editingRow) {\n var flattenedComponents = _this3.flattenComponents(index);\n\n var instance = flattenedComponents[component.key];\n isVisible = instance ? instance.visible : true;\n changeVisibleInHeader(component, isVisible);\n } else {\n isVisible = _lodash.default.includes(_this3.visibleInHeader, component.key);\n }\n\n return isVisible;\n });\n }\n }, {\n key: \"render\",\n value: function render(children) {\n var _this4 = this;\n\n if (this.builderMode) {\n return _get(_getPrototypeOf(EditGridComponent.prototype), \"render\", this).call(this);\n }\n\n var dataValue = this.dataValue;\n var headerTemplate = this.headerTemplate;\n var t = this.t.bind(this);\n var templateName = this.displayAsTable ? 'editgridTable' : 'editgrid';\n return _get(_getPrototypeOf(EditGridComponent.prototype), \"render\", this).call(this, children || this.renderTemplate(templateName, {\n ref: {\n row: this.rowRef,\n addRow: this.addRowRef,\n saveRow: this.saveRowRef,\n cancelRow: this.cancelRowRef\n },\n header: this.renderString(headerTemplate, {\n displayValue: function displayValue(component) {\n return _this4.displayComponentValue(component, true);\n },\n components: this.component.components,\n value: dataValue,\n t: t\n }),\n footer: this.renderString(_lodash.default.get(this.component, 'templates.footer'), {\n components: this.component.components,\n value: dataValue,\n t: t\n }),\n rows: this.editRows.map(this.renderRow.bind(this)),\n openRows: this.editRows.map(function (row) {\n return _this4.isOpen(row);\n }),\n errors: this.editRows.map(function (row) {\n return row.error;\n }),\n hasAddButton: this.hasAddButton(),\n hasRemoveButtons: this.hasRemoveButtons()\n }));\n }\n }, {\n key: \"renderComponents\",\n value: function renderComponents(components) {\n components = components || this.getComponents();\n var children = components.map(function (component) {\n return component.render();\n });\n var templateName = this.displayAsTable && this.prevHasAddButton ? 'tableComponents' : 'components';\n return this.renderTemplate(templateName, {\n children: children,\n components: components\n });\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n var _this$loadRefs,\n _this5 = this;\n\n if (this.builderMode) {\n return _get(_getPrototypeOf(EditGridComponent.prototype), \"attach\", this).call(this, element);\n }\n\n this.loadRefs(element, (_this$loadRefs = {}, _defineProperty(_this$loadRefs, this.addRowRef, 'multiple'), _defineProperty(_this$loadRefs, this.saveRowRef, 'multiple'), _defineProperty(_this$loadRefs, this.cancelRowRef, 'multiple'), _defineProperty(_this$loadRefs, this.rowRef, 'multiple'), _this$loadRefs));\n this.addRowElements.forEach(function (addButton) {\n _this5.addEventListener(addButton, 'click', function () {\n return _this5.addRow();\n });\n });\n var openRowCount = 0;\n this.rowElements.forEach(function (row, rowIndex) {\n var editRow = _this5.editRows[rowIndex];\n\n if (editRow !== null && editRow !== void 0 && editRow.isRowSelected) {\n row.classList.add('selected');\n }\n\n if (_this5.isOpen(editRow)) {\n _this5.attachComponents(row, editRow.components);\n\n _this5.addEventListener(_this5.saveRowElements[openRowCount], 'click', function () {\n return _this5.saveRow(rowIndex, true);\n });\n\n _this5.addEventListener(_this5.cancelRowElements[openRowCount], 'click', function () {\n return _this5.cancelRow(rowIndex);\n });\n\n openRowCount++;\n } else {\n // Attach edit and remove button events.\n [{\n className: 'removeRow',\n event: 'click',\n action: function action() {\n return _this5.removeRow(rowIndex, true);\n }\n }, {\n className: 'editRow',\n event: 'click',\n action: function action() {\n _this5.editRow(rowIndex).then(function () {\n if (_this5.component.rowDrafts) {\n var _this5$root;\n\n _this5.validateRow(editRow, false);\n\n var hasErrors = editRow.errors && !!editRow.errors.length;\n var shouldShowRowErrorsAlert = _this5.component.modal && hasErrors && ((_this5$root = _this5.root) === null || _this5$root === void 0 ? void 0 : _this5$root.submitted);\n\n if (shouldShowRowErrorsAlert) {\n _this5.alert.showErrors(editRow.errors, false);\n\n editRow.alerts = true;\n }\n }\n });\n }\n }, {\n className: 'row',\n event: 'click',\n action: function action() {\n row.classList.toggle('selected');\n var eventName = 'editGridSelectRow';\n\n if (Array.from(row.classList).includes('selected')) {\n editRow.isRowSelected = true;\n } else {\n delete editRow.isRowSelected;\n eventName = 'editGridUnSelectRow';\n }\n\n _this5.emit(eventName, {\n component: _this5.component,\n data: _this5.dataValue[rowIndex]\n });\n }\n }].forEach(function (_ref) {\n var className = _ref.className,\n event = _ref.event,\n action = _ref.action;\n var elements = row.getElementsByClassName(className);\n Array.prototype.forEach.call(elements, function (element) {\n _this5.addEventListener(element, event, action);\n });\n });\n }\n }); // Add open class to the element if any edit grid row is open\n\n if (openRowCount) {\n this.addClass(this.refs.component, \"formio-component-\".concat(this.component.type, \"-row-open\"));\n } else {\n this.removeClass(this.refs.component, \"formio-component-\".concat(this.component.type, \"-row-open\"));\n }\n\n var superAttach = _get(_getPrototypeOf(EditGridComponent.prototype), \"attach\", this).call(this, element);\n\n this.loadRefs(element, {\n messageContainer: 'single-scope'\n });\n return superAttach;\n }\n }, {\n key: \"flattenRowDataValue\",\n value: function flattenRowDataValue(dataValue) {\n var _this6 = this;\n\n var flattened = {};\n Object.keys(dataValue).forEach(function (key) {\n if (_lodash.default.isObject(dataValue[key]) && !_lodash.default.isNil(dataValue[key])) {\n Object.assign(flattened, _this6.flattenRowDataValue(dataValue[key]));\n } else {\n flattened[key] = dataValue[key];\n }\n });\n return flattened;\n }\n }, {\n key: \"isComponentVisibleInRow\",\n value: function isComponentVisibleInRow(component, flattenedComponents) {\n var instance = flattenedComponents[component.key];\n return instance ? instance.visible : true;\n }\n }, {\n key: \"displayComponentValue\",\n value: function displayComponentValue(component, header) {\n return !!((!component.hasOwnProperty('tableView') || component.tableView) && header ? this.isComponentVisibleInSomeRow(component) : _lodash.default.includes(this.visibleInHeader, component.key));\n }\n }, {\n key: \"renderRow\",\n value: function renderRow(row, rowIndex) {\n var _this7 = this;\n\n var dataValue = this.dataValue;\n\n if (this.isOpen(row)) {\n return this.renderComponents(row.components);\n } else {\n var flattenedComponents = this.flattenComponents(rowIndex);\n var rowTemplate = this.rowTemplate;\n return this.renderString(rowTemplate, {\n row: dataValue[rowIndex] || {},\n data: this.data,\n rowIndex: rowIndex,\n components: this.component.components,\n flattenedComponents: flattenedComponents,\n displayValue: function displayValue(component) {\n return _this7.displayComponentValue(component);\n },\n isVisibleInRow: function isVisibleInRow(component) {\n return _this7.isComponentVisibleInRow(component, flattenedComponents);\n },\n getView: function getView(component, data) {\n var _instance$component, _instance$component2;\n\n var instance = flattenedComponents[component.key];\n var view = instance ? instance.getView(data || instance.dataValue) : ''; // If there is an html tag in view, don't allow it to be injected in template\n\n var htmlTagRegExp = new RegExp('<(.*?)>');\n return typeof view === 'string' && view.length && !((_instance$component = instance.component) !== null && _instance$component !== void 0 && _instance$component.template) && htmlTagRegExp.test(view) && ((_instance$component2 = instance.component) === null || _instance$component2 === void 0 ? void 0 : _instance$component2.inputFormat) !== 'html' ? \"\") : view;\n },\n state: this.editRows[rowIndex].state,\n t: this.t.bind(this)\n });\n }\n }\n }, {\n key: \"eachComponent\",\n value: function eachComponent(fn, rowIndex) {\n _lodash.default.each(this.getComponents(rowIndex), function (component, index) {\n if (fn(component, index) === false) {\n return false;\n }\n });\n }\n }, {\n key: \"restoreComponentsContext\",\n value: function restoreComponentsContext() {\n var _this8 = this;\n\n this.getComponents().forEach(function (component) {\n var _this8$editRows$compo;\n\n var rowData = _this8.dataValue[component.rowIndex];\n var editRowData = (_this8$editRows$compo = _this8.editRows[component.rowIndex]) === null || _this8$editRows$compo === void 0 ? void 0 : _this8$editRows$compo.data;\n component.data = rowData || editRowData;\n });\n }\n }, {\n key: \"flattenComponents\",\n value: function flattenComponents(rowIndex) {\n var result = {};\n this.everyComponent(function (component) {\n result[component.component.flattenAs || component.key] = component;\n }, rowIndex);\n return result;\n }\n }, {\n key: \"getComponents\",\n value: function getComponents(rowIndex) {\n // Ensure editrows is set.\n this.editRows = this.editRows || [];\n return this.builderMode ? _get(_getPrototypeOf(EditGridComponent.prototype), \"getComponents\", this).call(this) : _lodash.default.isNumber(rowIndex) ? this.editRows[rowIndex].components || [] : this.editRows.reduce(function (result, row) {\n return result.concat(row.components || []);\n }, []);\n }\n }, {\n key: \"destroyComponents\",\n value: function destroyComponents(rowIndex) {\n var _this9 = this;\n\n if (this.builderMode) {\n return _get(_getPrototypeOf(EditGridComponent.prototype), \"destroyComponents\", this).call(this);\n }\n\n var components = this.getComponents(rowIndex).slice();\n components.forEach(function (comp) {\n return _this9.removeComponent(comp, _this9.components);\n });\n }\n }, {\n key: \"createRow\",\n value: function createRow(dataObj, rowIndex) {\n var editRow = {\n components: this.createRowComponents(dataObj, rowIndex),\n data: dataObj,\n state: EditRowState.New,\n backup: null,\n error: null\n };\n this.editRows.push(editRow);\n\n if (this.inlineEditMode) {\n this.dataValue.push(dataObj);\n }\n\n return editRow;\n }\n }, {\n key: \"addRow\",\n value: function addRow() {\n if (this.options.readOnly) {\n return;\n }\n\n var dataObj = {};\n var rowIndex = this.editRows.length;\n var editRow = this.createRow(dataObj, rowIndex);\n\n if (this.inlineEditMode) {\n this.triggerChange();\n }\n\n this.emit('editGridAddRow', {\n component: this.component,\n row: editRow\n });\n this.checkRow('checkData', null, {}, editRow.data, editRow.components);\n\n if (this.component.modal) {\n this.addRowModal(rowIndex);\n } else {\n this.redraw();\n }\n\n return editRow;\n }\n }, {\n key: \"addRowModal\",\n value: function addRowModal(rowIndex) {\n var _this10 = this;\n\n var modalContent = this.ce('div');\n var editRow = this.editRows[rowIndex];\n editRow.willBeSaved = false;\n var components = editRow.components;\n modalContent.innerHTML = this.renderComponents(components);\n var dialog = this.component.modal ? this.createModal(modalContent, {}, function () {\n return _this10.showDialog(rowIndex);\n }) : undefined;\n dialog.classList.add(\"editgrid-row-modal-\".concat(this.id));\n editRow.dialog = dialog;\n\n if (this.alert) {\n this.alert.clear();\n this.alert = null;\n }\n\n this.alert = new _Alert.default(dialog.refs.dialogContents, this);\n this.addEventListener(dialog, 'close', function () {\n if (!editRow.willBeSaved) {\n if (_this10.editRows[rowIndex] && _this10.editRows[rowIndex].state !== EditRowState.New) {\n _this10.editRows[rowIndex].components.forEach(function (comp) {\n comp.setPristine(true);\n });\n }\n\n _this10.cancelRow(rowIndex);\n }\n\n if (_this10.alert) {\n _this10.alert.clear();\n\n _this10.alert = null;\n } // Remove references to dialog elements to prevent possible in some cases memory leaks\n\n\n delete editRow.confirmationDialog;\n delete editRow.dialog;\n });\n dialog.refs.dialogContents.appendChild(this.ce('button', {\n class: 'btn btn-primary',\n onClick: function onClick() {\n // After an attempt to save, all the components inside the row should become not pristine\n if (!_this10.component.rowDrafts) {\n editRow.components.forEach(function (comp) {\n return comp.setPristine(false);\n });\n }\n\n if (_this10.validateRow(editRow, true) || _this10.component.rowDrafts) {\n editRow.willBeSaved = true;\n dialog.close();\n\n _this10.saveRow(rowIndex, true);\n } else {\n _this10.alert.showErrors(editRow.errors, false);\n\n editRow.alerts = true;\n }\n }\n }, this.component.saveRow || 'Save'));\n return this.attachComponents(modalContent, components);\n }\n }, {\n key: \"showDialog\",\n value: function showDialog(rowIndex) {\n var editRow = this.editRows[rowIndex];\n\n if (_lodash.default.isEqual(editRow.backup, editRow.data)) {\n return _nativePromiseOnly.default.resolve();\n }\n\n var wrapper = this.ce('div', {\n ref: 'confirmationDialog'\n });\n var dialogContent = this.component.dialogTemplate || this.defaultDialogTemplate;\n wrapper.innerHTML = dialogContent;\n wrapper.refs = {};\n this.loadRefs.call(wrapper, wrapper, {\n dialogHeader: 'single',\n dialogCancelButton: 'single',\n dialogYesButton: 'single'\n });\n var dialog = this.createModal(wrapper);\n dialog.classList.add(\"editgrid-row-modal-confirmation-\".concat(this.id));\n\n var close = function close(event) {\n event.preventDefault();\n dialog.close();\n };\n\n var dialogResult;\n var promise = new _nativePromiseOnly.default(function (resolve, reject) {\n dialogResult = {\n resolve: resolve,\n reject: reject\n };\n });\n this.addEventListener(wrapper.refs.dialogYesButton, 'click', function (event) {\n close(event);\n dialogResult.resolve();\n });\n this.addEventListener(wrapper.refs.dialogCancelButton, 'click', function (event) {\n close(event);\n dialogResult.reject();\n });\n editRow.confirmationDialog = dialog;\n return promise;\n }\n }, {\n key: \"editRow\",\n value: function editRow(rowIndex) {\n var editRow = this.editRows[rowIndex];\n var isAlreadyEditing = editRow.state === EditRowState.Editing || editRow.state === EditRowState.New;\n\n if (!editRow || isAlreadyEditing) {\n return _nativePromiseOnly.default.resolve();\n }\n\n editRow.prevState = editRow.state;\n editRow.state = this.options.readOnly ? EditRowState.Viewing : EditRowState.Editing;\n\n if (this.lazyLoad && editRow.components.length === 0) {\n editRow.components = this.createRowComponents(editRow.data, rowIndex);\n }\n\n var dataSnapshot = (0, _utils.fastCloneDeep)(editRow.data);\n\n if (this.inlineEditMode) {\n editRow.backup = dataSnapshot;\n } else {\n editRow.backup = (0, _utils.fastCloneDeep)(editRow.data);\n editRow.data = dataSnapshot;\n this.restoreRowContext(editRow);\n }\n\n if (this.component.modal) {\n return this.addRowModal(rowIndex);\n }\n\n return this.redraw();\n }\n }, {\n key: \"clearErrors\",\n value: function clearErrors(rowIndex) {\n var editRow = this.editRows[rowIndex];\n\n if (editRow && Array.isArray(editRow.components)) {\n editRow.components.forEach(function (comp) {\n comp.setPristine(true);\n comp.setCustomValidity('');\n });\n }\n }\n }, {\n key: \"cancelRow\",\n value: function cancelRow(rowIndex) {\n if (this.options.readOnly) {\n return;\n }\n\n var editRow = this.editRows[rowIndex];\n\n switch (editRow.state) {\n case EditRowState.New:\n {\n editRow.state = EditRowState.Removed;\n this.clearErrors(rowIndex);\n this.destroyComponents(rowIndex);\n\n if (this.inlineEditMode) {\n this.splice(rowIndex);\n }\n\n this.editRows.splice(rowIndex, 1);\n this.openWhenEmpty();\n break;\n }\n\n case EditRowState.Editing:\n {\n editRow.state = editRow.prevState;\n\n if (this.inlineEditMode) {\n this.dataValue[rowIndex] = editRow.backup;\n }\n\n editRow.data = editRow.backup;\n editRow.backup = null;\n this.restoreRowContext(editRow);\n this.clearErrors(rowIndex);\n break;\n }\n }\n\n this.emit('editGridCancelRow', {\n instance: this,\n component: this.component,\n editRow: editRow\n });\n this.checkValidity(null, true);\n this.redraw();\n\n if (this.component.rowDrafts) {\n this.checkValidity(this.data, false);\n }\n }\n }, {\n key: \"saveRow\",\n value: function saveRow(rowIndex, modified) {\n var _this11 = this;\n\n var editRow = this.editRows[rowIndex];\n\n if (this.options.readOnly) {\n return;\n } // After an attempt to save, all the components inside the row should become not pristine\n\n\n if (!this.component.rowDrafts) {\n editRow.components.forEach(function (comp) {\n return comp.setPristine(false);\n });\n }\n\n var isRowValid = this.validateRow(editRow, true);\n\n if (!this.component.rowDrafts) {\n if (!isRowValid) {\n return false;\n }\n }\n\n if (this.saveEditMode) {\n var dataValue = this.dataValue;\n\n switch (editRow.state) {\n case EditRowState.New:\n {\n var newIndex = dataValue.length;\n dataValue.push(editRow.data);\n editRow.components.forEach(function (component) {\n return component.rowIndex = newIndex;\n });\n\n if (rowIndex !== newIndex) {\n this.editRows.splice(rowIndex, 1);\n this.editRows.splice(newIndex, 0, editRow);\n }\n\n break;\n }\n\n case EditRowState.Editing:\n {\n dataValue[rowIndex] = editRow.data;\n break;\n }\n }\n }\n\n editRow.state = this.component.rowDrafts && !isRowValid ? EditRowState.Draft : EditRowState.Saved;\n editRow.backup = null;\n this.updateValue();\n this.emit('editGridSaveRow', {\n component: this.component,\n row: editRow.data,\n instance: this\n });\n this.triggerChange({\n modified: modified,\n noPristineChangeOnModified: modified && this.component.rowDrafts,\n isolateRow: true\n });\n\n if (this.component.rowDrafts) {\n editRow.components.forEach(function (comp) {\n return comp.setPristine(_this11.pristine);\n });\n }\n\n this.checkValidity(null, true);\n this.redraw();\n\n if (editRow.alerts) {\n editRow.alerts = false;\n }\n\n return true;\n }\n }, {\n key: \"beforeFocus\",\n value: function beforeFocus(component) {\n if ('beforeFocus' in this.parent) {\n this.parent.beforeFocus(this);\n }\n\n var relativePath = this.getRelativePath(component.path);\n var arrayPath = (0, _utils.getArrayFromComponentPath)(relativePath);\n\n if (_lodash.default.isNumber(arrayPath[0])) {\n this.editRow(arrayPath[0]);\n }\n }\n }, {\n key: \"updateComponentsRowIndex\",\n value: function updateComponentsRowIndex(components, rowIndex) {\n components.forEach(function (component, colIndex) {\n component.rowIndex = rowIndex;\n component.row = \"\".concat(rowIndex, \"-\").concat(colIndex);\n });\n }\n }, {\n key: \"updateRowsComponents\",\n value: function updateRowsComponents(rowIndex) {\n var _this12 = this;\n\n this.editRows.slice(rowIndex).forEach(function (row, index) {\n _this12.updateComponentsRowIndex(row.components, rowIndex + index);\n });\n }\n }, {\n key: \"baseRemoveRow\",\n value: function baseRemoveRow(rowIndex) {\n var editRow = this.editRows[rowIndex];\n editRow.state = EditRowState.Removed;\n this.destroyComponents(rowIndex);\n return editRow;\n }\n }, {\n key: \"removeRow\",\n value: function removeRow(rowIndex, modified) {\n if (this.options.readOnly) {\n return;\n }\n\n this.clearErrors(rowIndex);\n this.baseRemoveRow(rowIndex);\n this.splice(rowIndex);\n this.emit('editGridDeleteRow', {\n index: rowIndex\n });\n this.editRows.splice(rowIndex, 1);\n this.openWhenEmpty();\n this.updateRowsComponents(rowIndex);\n this.updateValue();\n this.triggerChange({\n modified: modified,\n noPristineChangeOnModified: modified && this.component.rowDrafts,\n isolateRow: true\n });\n this.checkValidity(null, true);\n this.checkData();\n this.redraw();\n }\n }, {\n key: \"createRowComponents\",\n value: function createRowComponents(row, rowIndex) {\n var _this13 = this;\n\n return this.component.components.map(function (col, colIndex) {\n var column = _lodash.default.clone(col);\n\n var options = _lodash.default.clone(_this13.options);\n\n options.name += \"[\".concat(rowIndex, \"]\");\n options.row = \"\".concat(rowIndex, \"-\").concat(colIndex);\n\n options.onChange = function () {\n var _changed$instance$roo, _this13$root;\n\n var flags = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var changed = arguments.length > 1 ? arguments[1] : undefined;\n var modified = arguments.length > 2 ? arguments[2] : undefined;\n\n if ((_changed$instance$roo = changed.instance.root) !== null && _changed$instance$roo !== void 0 && _changed$instance$roo.id && ((_this13$root = _this13.root) === null || _this13$root === void 0 ? void 0 : _this13$root.id) !== changed.instance.root.id) {\n changed.instance.root.triggerChange(flags, changed, modified);\n } else if (!_this13.component.modal) {\n _this13.triggerRootChange(flags, changed, modified);\n }\n\n if (_this13.inlineEditMode) {\n return;\n }\n\n var editRow = _this13.editRows[rowIndex];\n\n if (editRow !== null && editRow !== void 0 && editRow.alerts) {\n _this13.checkData(null, _objectSpread(_objectSpread({}, flags), {}, {\n changed: changed,\n rowIndex: rowIndex\n }), _this13.data);\n } else if (editRow) {\n // If drafts allowed, perform validation silently if there was no attempt to submit a form\n var silentCheck = _this13.component.rowDrafts && !_this13.shouldValidateDraft(editRow);\n\n _this13.checkRow('checkData', null, _objectSpread(_objectSpread({}, flags), {}, {\n changed: changed,\n silentCheck: silentCheck\n }), editRow.data, editRow.components, silentCheck);\n }\n };\n\n var comp = _this13.createComponent(_lodash.default.assign({}, column, {\n row: options.row\n }), options, row);\n\n comp.rowIndex = rowIndex;\n comp.inEditGrid = true;\n return comp;\n });\n }\n }, {\n key: \"hasOpenRows\",\n value: function hasOpenRows() {\n var _this14 = this;\n\n return this.editRows.some(function (row) {\n return _this14.isOpen(row);\n });\n }\n }, {\n key: \"shouldValidateDraft\",\n value: function shouldValidateDraft(editRow) {\n var _this$root, _this$root2;\n\n // Draft rows should be validated only when there was an attempt to submit a form\n return editRow.state === EditRowState.Draft && !this.pristine && !((_this$root = this.root) !== null && _this$root !== void 0 && _this$root.pristine) && !this.hasOpenRows() || ((_this$root2 = this.root) === null || _this$root2 === void 0 ? void 0 : _this$root2.submitted);\n }\n }, {\n key: \"shouldValidateRow\",\n value: function shouldValidateRow(editRow, dirty) {\n return this.shouldValidateDraft(editRow) || editRow.state === EditRowState.Editing || editRow.alerts || dirty;\n }\n }, {\n key: \"validateRow\",\n value: function validateRow(editRow, dirty, forceSilentCheck) {\n var _this15 = this,\n _this$root3;\n\n var valid = true;\n\n var errorsSnapshot = _toConsumableArray(this.errors);\n\n if (this.shouldValidateRow(editRow, dirty)) {\n editRow.components.forEach(function (comp) {\n var silentCheck = _this15.component.rowDrafts && !_this15.shouldValidateDraft(editRow) || forceSilentCheck;\n valid &= comp.checkValidity(null, dirty, null, silentCheck);\n });\n }\n\n if (this.component.validate && this.component.validate.row) {\n valid = this.evaluate(this.component.validate.row, {\n valid: valid,\n row: editRow.data\n }, 'valid', true);\n\n if (valid.toString() !== 'true') {\n editRow.error = valid;\n valid = false;\n } else {\n editRow.error = null;\n }\n\n if (valid === null) {\n valid = \"Invalid row validation for \".concat(this.key);\n }\n }\n\n editRow.errors = !valid ? this.errors.filter(function (err) {\n return !errorsSnapshot.includes(err);\n }) : null;\n\n if (!this.component.rowDrafts || (_this$root3 = this.root) !== null && _this$root3 !== void 0 && _this$root3.submitted) {\n this.showRowErrorAlerts(editRow, !!valid);\n }\n\n return !!valid;\n }\n }, {\n key: \"showRowErrorAlerts\",\n value: function showRowErrorAlerts(editRow, valid) {\n if (editRow.alerts) {\n if (this.alert) {\n var _editRow$errors;\n\n if ((_editRow$errors = editRow.errors) !== null && _editRow$errors !== void 0 && _editRow$errors.length && !valid) {\n this.alert.showErrors(editRow.errors, false);\n editRow.alerts = true;\n } else {\n this.alert.clear();\n }\n }\n }\n }\n }, {\n key: \"checkValidity\",\n value: function checkValidity(data, dirty, row, silentCheck) {\n data = data || this.rootValue;\n row = row || this.data;\n\n if (!this.checkCondition(row, data)) {\n this.setCustomValidity('');\n return true;\n }\n\n return this.checkComponentValidity(data, dirty, row, {\n silentCheck: silentCheck\n });\n }\n }, {\n key: \"checkComponentValidity\",\n value: function checkComponentValidity(data, dirty, row) {\n var _this16 = this,\n _this$errors,\n _this$root5;\n\n var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n var silentCheck = options.silentCheck;\n var errorsLength = this.errors.length;\n\n var superValid = _get(_getPrototypeOf(EditGridComponent.prototype), \"checkComponentValidity\", this).call(this, data, dirty, row, options); // If super tells us that component invalid and there is no need to update alerts, just return false\n\n\n if (!superValid && !this.alert && !this.hasOpenRows()) {\n return false;\n }\n\n if (this.shouldSkipValidation(data, dirty, row)) {\n return true;\n }\n\n var rowsValid = true;\n var rowsEditing = false;\n this.editRows.forEach(function (editRow, index) {\n // Trigger all errors on the row.\n var rowValid = _this16.validateRow(editRow, dirty, silentCheck);\n\n rowsValid &= rowValid;\n\n if (_this16.rowRefs) {\n var rowContainer = _this16.rowRefs[index];\n\n if (rowContainer) {\n var errorContainer = rowContainer.querySelector('.editgrid-row-error');\n\n if (!rowValid && errorContainer && (!_this16.component.rowDrafts || _this16.shouldValidateDraft(editRow))) {\n _this16.addClass(errorContainer, 'help-block');\n\n errorContainer.textContent = _this16.t('invalidRowError');\n } else if (errorContainer) {\n errorContainer.textContent = '';\n }\n }\n } // If this is a dirty check, and any rows are still editing, we need to throw validation error.\n\n\n rowsEditing |= dirty && _this16.isOpen(editRow);\n });\n\n if (!rowsValid) {\n var _this$root4;\n\n if (!silentCheck && (!this.component.rowDrafts || (_this$root4 = this.root) !== null && _this$root4 !== void 0 && _this$root4.submitted)) {\n this.setCustomValidity(this.t('invalidRowsError'), dirty); // Delete this class, because otherwise all the components inside EditGrid will has red border even if they are valid\n\n this.removeClass(this.element, 'has-error');\n }\n\n return false;\n } else if (rowsEditing && this.saveEditMode) {\n this.setCustomValidity(this.t('unsavedRowsError'), dirty);\n return false;\n }\n\n var message = this.invalid || this.invalidMessage(data, dirty);\n\n if (((_this$errors = this.errors) === null || _this$errors === void 0 ? void 0 : _this$errors.length) !== errorsLength && (_this$root5 = this.root) !== null && _this$root5 !== void 0 && _this$root5.submitted && !message) {\n this.setCustomValidity(message, dirty);\n this.root.showErrors();\n } else {\n this.setCustomValidity(message, dirty);\n }\n\n return superValid;\n }\n }, {\n key: \"changeState\",\n value: function changeState(changed, flags) {\n if (changed || flags.resetValue && this.component.modalEdit) {\n this.rebuild();\n } else {\n this.redraw();\n }\n }\n }, {\n key: \"setValue\",\n value: function setValue(value) {\n var _this17 = this;\n\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n if (!value) {\n value = this.defaultValue;\n }\n\n if (!Array.isArray(value)) {\n if (_typeof(value) === 'object') {\n value = [value];\n } else {\n return false;\n }\n }\n\n var changed = this.hasChanged(value, this.dataValue);\n flags.noValidate = !changed;\n\n if (this.parent) {\n this.parent.checkComponentConditions();\n }\n\n this.dataValue = value; // Refresh editRow data when data changes.\n\n this.dataValue.forEach(function (row, rowIndex) {\n var editRow = _this17.editRows[rowIndex];\n\n if (editRow) {\n editRow.data = row;\n\n _this17.restoreRowContext(editRow, flags);\n\n editRow.state = EditRowState.Saved;\n editRow.backup = null;\n editRow.error = null;\n } else {\n _this17.editRows[rowIndex] = {\n components: _this17.lazyLoad ? [] : _this17.createRowComponents(row, rowIndex),\n data: row,\n state: EditRowState.Saved,\n backup: null,\n error: null\n };\n }\n });\n var dataLength = this.dataValue.length; // If the last row is a new row, then do not remove it.\n\n if (this.editRows[dataLength] && this.editRows[dataLength].state === EditRowState.New) {\n dataLength = dataLength + 1;\n }\n\n this.editRows.slice(dataLength).forEach(function (editRow, index) {\n return _this17.baseRemoveRow(dataLength + index);\n });\n this.editRows = this.editRows.slice(0, dataLength);\n this.openWhenEmpty();\n this.updateOnChange(flags, changed);\n this.checkData();\n this.changeState(changed, flags);\n return changed;\n }\n }, {\n key: \"openWhenEmpty\",\n value: function openWhenEmpty() {\n var shouldBeOpened = !this.dataValue.length && this.component.openWhenEmpty;\n var hasNoRows = !this.editRows.length;\n\n if (hasNoRows && shouldBeOpened && !this.builderMode) {\n var dataObj = {};\n this.createRow(dataObj, 0);\n }\n }\n }, {\n key: \"restoreRowContext\",\n value: function restoreRowContext(editRow) {\n var _this18 = this;\n\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n editRow.components.forEach(function (component) {\n component.data = editRow.data;\n\n _this18.setNestedValue(component, editRow.data, flags);\n });\n }\n }, {\n key: \"emptyRows\",\n value: function emptyRows() {\n var _this19 = this;\n\n this.editRows.forEach(function (editRow, index) {\n return _this19.destroyComponents(index);\n });\n this.editRows = [];\n }\n }, {\n key: \"resetValue\",\n value: function resetValue() {\n _get(_getPrototypeOf(EditGridComponent.prototype), \"resetValue\", this).call(this);\n\n this.emptyRows();\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len2 = arguments.length, extend = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n extend[_key2] = arguments[_key2];\n }\n\n return _NestedArrayComponent2.default.schema.apply(_NestedArrayComponent2.default, [{\n type: 'editgrid',\n label: 'Edit Grid',\n key: 'editGrid',\n clearOnHide: true,\n input: true,\n tree: true,\n removeRow: 'Cancel',\n defaultOpen: false,\n openWhenEmpty: false,\n modal: false,\n components: [],\n inlineEdit: false,\n templates: {\n header: EditGridComponent.defaultHeaderTemplate,\n row: EditGridComponent.defaultRowTemplate,\n tableHeader: EditGridComponent.defaultTableHeaderTemplate,\n tableRow: EditGridComponent.defaultTableRowTemplate,\n footer: ''\n }\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Edit Grid',\n icon: 'tasks',\n group: 'data',\n documentation: '/userguide/forms/data-components#edit-grid',\n weight: 30,\n schema: EditGridComponent.schema()\n };\n }\n }, {\n key: \"defaultHeaderTemplate\",\n get: function get() {\n return \"
\\n {% util.eachComponent(components, function(component) { %}\\n {% if (displayValue(component)) { %}\\n
{{ t(component.label) }}
\\n {% } %}\\n {% }) %}\\n
\";\n }\n }, {\n key: \"defaultTableHeaderTemplate\",\n get: function get() {\n return \"\\n \\n {% util.eachComponent(components, function(component) { %}\\n {% if (!component.hasOwnProperty('tableView') || component.tableView) { %}\\n {{ component.label }}\\n {% } %}\\n {% }) %}\\n {% if (!instance.options.readOnly && !instance.disabled) { %}\\n Actions\\n {% } %}\\n \\n \";\n }\n }, {\n key: \"defaultRowTemplate\",\n get: function get() {\n return \"
\\n {% util.eachComponent(components, function(component) { %}\\n {% if (displayValue(component)) { %}\\n
\\n {{ isVisibleInRow(component) ? getView(component, row[component.key]) : ''}}\\n
\\n {% } %}\\n {% }) %}\\n {% if (!instance.options.readOnly && !instance.disabled) { %}\\n
\\n
\\n \\n {% if (!instance.hasRemoveButtons || instance.hasRemoveButtons()) { %}\\n \\n {% } %}\\n
\\n
\\n {% } %}\\n
\";\n }\n }, {\n key: \"defaultTableRowTemplate\",\n get: function get() {\n return \"\\n {% util.eachComponent(components, function(component) { %}\\n {% if (!component.hasOwnProperty('tableView') || component.tableView) { %}\\n \\n {{ getView(component, row[component.key]) }}\\n \\n {% } %}\\n {% }) %}\\n {% if (!instance.options.readOnly && !instance.disabled) { %}\\n \\n
\\n \\n {% if (!instance.hasRemoveButtons || instance.hasRemoveButtons()) { %}\\n \\n {% } %}\\n
\\n \\n {% } %}\\n \";\n }\n }]);\n\n return EditGridComponent;\n}(_NestedArrayComponent2.default);\n\nexports[\"default\"] = EditGridComponent;\nEditGridComponent.prototype.hasChanged = _Component.default.prototype.hasChanged;\n\n//# sourceURL=webpack://Formio/./lib/components/editgrid/EditGrid.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.set.js */ \"./node_modules/core-js/modules/es.reflect.set.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptors.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-properties.js */ \"./node_modules/core-js/modules/es.object.define-properties.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.array.is-array.js */ \"./node_modules/core-js/modules/es.array.is-array.js\");\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n__webpack_require__(/*! core-js/modules/es.array.some.js */ \"./node_modules/core-js/modules/es.array.some.js\");\n__webpack_require__(/*! core-js/modules/es.array.includes.js */ \"./node_modules/core-js/modules/es.array.includes.js\");\n__webpack_require__(/*! core-js/modules/es.string.includes.js */ \"./node_modules/core-js/modules/es.string.includes.js\");\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.array.from.js */ \"./node_modules/core-js/modules/es.array.from.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n__webpack_require__(/*! core-js/modules/es.object.assign.js */ \"./node_modules/core-js/modules/es.object.assign.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.constructor.js */ \"./node_modules/core-js/modules/es.regexp.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n__webpack_require__(/*! core-js/modules/es.array.reduce.js */ \"./node_modules/core-js/modules/es.array.reduce.js\");\n__webpack_require__(/*! core-js/modules/es.array.slice.js */ \"./node_modules/core-js/modules/es.array.slice.js\");\n__webpack_require__(/*! core-js/modules/es.array.splice.js */ \"./node_modules/core-js/modules/es.array.splice.js\");\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-string.js */ \"./node_modules/core-js/modules/es.date.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\nvar _NestedArrayComponent2 = _interopRequireDefault(__webpack_require__(/*! ../_classes/nestedarray/NestedArrayComponent */ \"./lib/components/_classes/nestedarray/NestedArrayComponent.js\"));\nvar _Component = _interopRequireDefault(__webpack_require__(/*! ../_classes/component/Component */ \"./lib/components/_classes/component/Component.js\"));\nvar _Alert = _interopRequireDefault(__webpack_require__(/*! ../alert/Alert */ \"./lib/components/alert/Alert.js\"));\nvar _utils = __webpack_require__(/*! ../../utils/utils */ \"./lib/utils/utils.js\");\nvar _templates = _interopRequireDefault(__webpack_require__(/*! ./templates */ \"./lib/components/editgrid/templates/index.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction set(target, property, value, receiver) { if (typeof Reflect !== \"undefined\" && Reflect.set) { set = Reflect.set; } else { set = function set(target, property, value, receiver) { var base = _superPropBase(target, property); var desc; if (base) { desc = Object.getOwnPropertyDescriptor(base, property); if (desc.set) { desc.set.call(receiver, value); return true; } else if (!desc.writable) { return false; } } desc = Object.getOwnPropertyDescriptor(receiver, property); if (desc) { if (!desc.writable) { return false; } desc.value = value; Object.defineProperty(receiver, property, desc); } else { _defineProperty(receiver, property, value); } return true; }; } return set(target, property, value, receiver); }\nfunction _set(target, property, value, receiver, isStrict) { var s = set(target, property, value, receiver || target); if (!s && isStrict) { throw new Error('failed to set property'); } return value; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar EditRowState = {\n New: 'new',\n Editing: 'editing',\n Saved: 'saved',\n Viewing: 'viewing',\n Removed: 'removed',\n Draft: 'draft'\n};\nvar EditGridComponent = /*#__PURE__*/function (_NestedArrayComponent) {\n _inherits(EditGridComponent, _NestedArrayComponent);\n var _super = _createSuper(EditGridComponent);\n function EditGridComponent() {\n var _this;\n _classCallCheck(this, EditGridComponent);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _this.type = 'editgrid';\n return _this;\n }\n _createClass(EditGridComponent, [{\n key: \"defaultDialogTemplate\",\n get: function get() {\n return \"\\n

\".concat(this.t('Do you want to clear data?'), \"

\\n
\\n \\n \\n
\\n \");\n }\n }, {\n key: \"defaultRowTemplate\",\n get: function get() {\n return this.displayAsTable ? EditGridComponent.defaultTableRowTemplate : EditGridComponent.defaultRowTemplate;\n }\n }, {\n key: \"defaultHeaderTemplate\",\n get: function get() {\n return this.displayAsTable ? EditGridComponent.defaultTableHeaderTemplate : EditGridComponent.defaultHeaderTemplate;\n }\n }, {\n key: \"rowTemplate\",\n get: function get() {\n var rowTemplate;\n if (_utils.Evaluator.noeval) {\n rowTemplate = this.displayAsTable ? _templates[\"default\"].tableRow : _templates[\"default\"].row;\n } else {\n rowTemplate = this.displayAsTable ? _lodash[\"default\"].get(this.component, 'templates.tableRow', this.defaultRowTemplate) : _lodash[\"default\"].get(this.component, 'templates.row', this.defaultRowTemplate);\n }\n return rowTemplate;\n }\n }, {\n key: \"headerTemplate\",\n get: function get() {\n var headerTemplate;\n if (_utils.Evaluator.noeval) {\n headerTemplate = this.displayAsTable ? _templates[\"default\"].tableHeader : _templates[\"default\"].header;\n } else {\n headerTemplate = this.displayAsTable ? _lodash[\"default\"].get(this.component, 'templates.tableHeader', this.defaultHeaderTemplate) : _lodash[\"default\"].get(this.component, 'templates.header', this.defaultHeaderTemplate);\n }\n return headerTemplate;\n }\n\n /**\n * Returns true if the component has nested components which don't trigger changes on the root level\n */\n }, {\n key: \"hasScopedChildren\",\n get: function get() {\n return !this.inlineEditMode;\n }\n }, {\n key: \"defaultSchema\",\n get: function get() {\n return EditGridComponent.schema();\n }\n }, {\n key: \"emptyValue\",\n get: function get() {\n return [];\n }\n }, {\n key: \"editgridKey\",\n get: function get() {\n return \"editgrid-\".concat(this.key);\n }\n }, {\n key: \"rowRef\",\n get: function get() {\n return \"\".concat(this.editgridKey, \"-row\");\n }\n }, {\n key: \"rowElements\",\n get: function get() {\n return this.refs[this.rowRef];\n }\n }, {\n key: \"rowRefs\",\n get: function get() {\n return this.refs[\"editgrid-\".concat(this.component.key, \"-row\")];\n }\n }, {\n key: \"addRowRef\",\n get: function get() {\n return \"\".concat(this.editgridKey, \"-addRow\");\n }\n }, {\n key: \"addRowElements\",\n get: function get() {\n return this.refs[this.addRowRef];\n }\n }, {\n key: \"saveRowRef\",\n get: function get() {\n return \"\".concat(this.editgridKey, \"-saveRow\");\n }\n }, {\n key: \"saveRowElements\",\n get: function get() {\n return this.refs[this.saveRowRef];\n }\n }, {\n key: \"cancelRowRef\",\n get: function get() {\n return \"\".concat(this.editgridKey, \"-cancelRow\");\n }\n }, {\n key: \"cancelRowElements\",\n get: function get() {\n return this.refs[this.cancelRowRef];\n }\n }, {\n key: \"inlineEditMode\",\n get: function get() {\n return this.component.inlineEdit;\n }\n }, {\n key: \"saveEditMode\",\n get: function get() {\n return !this.inlineEditMode;\n }\n }, {\n key: \"minLength\",\n get: function get() {\n return _lodash[\"default\"].get(this.component, 'validate.minLength', 0);\n }\n }, {\n key: \"data\",\n get: function get() {\n return this._data;\n },\n set: function set(value) {\n this._data = value;\n var data = this.dataValue;\n (this.editRows || []).forEach(function (row, index) {\n if (!data[index] && row.state !== EditRowState.New) {\n data[index] = {};\n }\n var rowData = data[index] || {};\n row.data = rowData;\n row.components.forEach(function (component) {\n component.data = rowData;\n });\n });\n }\n }, {\n key: \"dataValue\",\n get: function get() {\n return _get(_getPrototypeOf(EditGridComponent.prototype), \"dataValue\", this) || [];\n },\n set: function set(value) {\n _set(_getPrototypeOf(EditGridComponent.prototype), \"dataValue\", value, this, true);\n }\n }, {\n key: \"displayAsTable\",\n get: function get() {\n return this.component.displayAsTable;\n }\n }, {\n key: \"iteratableRows\",\n get: function get() {\n return this.editRows;\n }\n }, {\n key: \"defaultValue\",\n get: function get() {\n var value = _get(_getPrototypeOf(EditGridComponent.prototype), \"defaultValue\", this);\n var defaultValue = Array.isArray(value) ? value : [];\n _lodash[\"default\"].times(this.minLength - defaultValue.length, function () {\n return defaultValue.push({});\n });\n return defaultValue;\n }\n }, {\n key: \"hasRemoveButtons\",\n value: function hasRemoveButtons() {\n return !this.component.disableAddingRemovingRows && !this.options.readOnly && !this.disabled && this.fullMode && this.dataValue.length > _lodash[\"default\"].get(this.component, 'validate.minLength', 0);\n }\n }, {\n key: \"init\",\n value: function init() {\n var _this2 = this;\n if (this.builderMode) {\n this.editRows = [];\n return _get(_getPrototypeOf(EditGridComponent.prototype), \"init\", this).call(this);\n }\n this.components = this.components || [];\n var dataValue = this.dataValue;\n var openWhenEmpty = !dataValue.length && this.component.openWhenEmpty;\n if (openWhenEmpty) {\n var dataObj = {};\n this.editRows = [];\n this.createRow(dataObj, 0);\n } else {\n this.editRows = dataValue.map(function (row, rowIndex) {\n return {\n components: _this2.lazyLoad ? [] : _this2.createRowComponents(row, rowIndex),\n data: row,\n state: EditRowState.Saved,\n backup: null,\n error: null,\n rowIndex: rowIndex\n };\n });\n }\n this.prevHasAddButton = this.hasAddButton();\n this.checkData();\n this.setVariableTypeComponents();\n if (this.variableTypeComponentsIndexes.length) {\n _lodash[\"default\"].each(this.editRows || [], function (editRow, rowIndex) {\n return _this2.checkRowVariableTypeComponents(editRow, rowIndex);\n });\n }\n }\n }, {\n key: \"checkRowVariableTypeComponents\",\n value: function checkRowVariableTypeComponents(editRow, rowIndex) {\n var rowComponents = editRow.components;\n if (_lodash[\"default\"].some(this.variableTypeComponentsIndexes, function (compIndex) {\n var variableTypeComp = rowComponents[compIndex];\n return variableTypeComp.type !== variableTypeComp.component.type;\n })) {\n editRow.components = this.createRowComponents(editRow.data, rowIndex, true);\n }\n }\n }, {\n key: \"setVariableTypeComponents\",\n value: function setVariableTypeComponents() {\n var _this3 = this;\n //set components which type is changing within a row (e.g.,by mergeComponentSchema action)\n this.variableTypeComponentsIndexes = [];\n _lodash[\"default\"].each(this.component.components, function (comp, index) {\n if (comp.typeChangeEnabled) {\n _this3.variableTypeComponentsIndexes.push(index);\n }\n });\n }\n }, {\n key: \"isOpen\",\n value: function isOpen(editRow) {\n return [EditRowState.New, EditRowState.Editing, EditRowState.Viewing].includes(editRow.state);\n }\n }, {\n key: \"isComponentVisibleInSomeRow\",\n value: function isComponentVisibleInSomeRow(component) {\n var _this4 = this;\n var rows = this.editRows;\n var savedStates = [EditRowState.Saved, EditRowState.Editing, EditRowState.Draft];\n var savedRows = rows.filter(function (row) {\n return _lodash[\"default\"].includes(savedStates, row.state);\n });\n this.visibleInHeader = this.visibleInHeader || [];\n var changeVisibleInHeader = function changeVisibleInHeader(component, isVisible) {\n if (!isVisible) {\n _lodash[\"default\"].remove(_this4.visibleInHeader, function (key) {\n return key === component.key;\n });\n }\n if (isVisible && !_lodash[\"default\"].includes(_this4.visibleInHeader, component.key)) {\n _this4.visibleInHeader.push(component.key);\n }\n };\n if (_lodash[\"default\"].isEmpty(rows)) {\n var rowComponents = this.createRowComponents({}, 0);\n var checkComponent;\n (0, _utils.eachComponent)(rowComponents, function (comp) {\n if (comp.component.key === component.key) {\n checkComponent = comp;\n }\n comp.checkConditions();\n });\n var isVisible = checkComponent ? checkComponent.visible : true;\n _toConsumableArray(this.components).forEach(function (comp) {\n return _this4.removeComponent(comp, _this4.components);\n });\n changeVisibleInHeader(component, isVisible);\n return isVisible;\n }\n var isOpenRowWhenEmpty = _lodash[\"default\"].get(this.component, 'openWhenEmpty') && rows.length === 1 && rows[0].state === EditRowState.New;\n if (!_lodash[\"default\"].isEmpty(rows) && _lodash[\"default\"].isEmpty(savedRows) && !isOpenRowWhenEmpty) {\n return _lodash[\"default\"].includes(this.visibleInHeader, component.key);\n }\n return _lodash[\"default\"].some(isOpenRowWhenEmpty ? rows : savedRows, function (row, index) {\n var editingRow = row.state === EditRowState.Editing;\n var isVisible;\n if (!editingRow) {\n var flattenedComponents = _this4.flattenComponents(index);\n var instance = flattenedComponents[component.key];\n isVisible = instance ? instance.visible : true;\n changeVisibleInHeader(component, isVisible);\n } else {\n isVisible = _lodash[\"default\"].includes(_this4.visibleInHeader, component.key);\n }\n return isVisible;\n });\n }\n }, {\n key: \"render\",\n value: function render(children) {\n var _this5 = this;\n if (this.builderMode) {\n return _get(_getPrototypeOf(EditGridComponent.prototype), \"render\", this).call(this);\n }\n var dataValue = this.dataValue;\n var headerTemplate = this.headerTemplate;\n var t = this.t.bind(this);\n var templateName = this.displayAsTable ? 'editgridTable' : 'editgrid';\n return _get(_getPrototypeOf(EditGridComponent.prototype), \"render\", this).call(this, children || this.renderTemplate(templateName, {\n ref: {\n row: this.rowRef,\n addRow: this.addRowRef,\n saveRow: this.saveRowRef,\n cancelRow: this.cancelRowRef\n },\n header: this.renderString(headerTemplate, {\n displayValue: function displayValue(component) {\n return _this5.displayComponentValue(component, true);\n },\n components: this.component.components,\n value: dataValue,\n t: t\n }),\n footer: this.renderString(_lodash[\"default\"].get(this.component, 'templates.footer'), {\n components: this.component.components,\n value: dataValue,\n t: t\n }),\n rows: this.editRows.map(this.renderRow.bind(this)),\n openRows: this.editRows.map(function (row) {\n return _this5.isOpen(row);\n }),\n errors: this.editRows.map(function (row) {\n return row.error;\n }),\n hasAddButton: this.hasAddButton(),\n hasRemoveButtons: this.hasRemoveButtons()\n }));\n }\n }, {\n key: \"renderComponents\",\n value: function renderComponents(components) {\n components = components || this.getComponents();\n var children = components.map(function (component) {\n return component.render();\n });\n var templateName = this.displayAsTable && this.prevHasAddButton ? 'tableComponents' : 'components';\n return this.renderTemplate(templateName, {\n children: children,\n components: components\n });\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n var _this$loadRefs,\n _this6 = this;\n if (this.builderMode) {\n return _get(_getPrototypeOf(EditGridComponent.prototype), \"attach\", this).call(this, element);\n }\n this.loadRefs(element, (_this$loadRefs = {}, _defineProperty(_this$loadRefs, this.addRowRef, 'multiple'), _defineProperty(_this$loadRefs, this.saveRowRef, 'multiple'), _defineProperty(_this$loadRefs, this.cancelRowRef, 'multiple'), _defineProperty(_this$loadRefs, this.rowRef, 'multiple'), _this$loadRefs));\n this.addRowElements.forEach(function (addButton) {\n _this6.addEventListener(addButton, 'click', function () {\n return _this6.addRow();\n });\n });\n var openRowCount = 0;\n this.rowElements.forEach(function (row, rowIndex) {\n var editRow = _this6.editRows[rowIndex];\n if (editRow !== null && editRow !== void 0 && editRow.isRowSelected) {\n row.classList.add('selected');\n }\n if (_this6.isOpen(editRow)) {\n _this6.attachComponents(row, editRow.components);\n _this6.addEventListener(_this6.saveRowElements[openRowCount], 'click', function () {\n return _this6.saveRow(rowIndex, true);\n });\n _this6.addEventListener(_this6.cancelRowElements[openRowCount], 'click', function () {\n return _this6.cancelRow(rowIndex);\n });\n openRowCount++;\n } else {\n // Attach edit and remove button events.\n [{\n className: 'removeRow',\n event: 'click',\n action: function action() {\n return _this6.removeRow(rowIndex, true);\n }\n }, {\n className: 'editRow',\n event: 'click',\n action: function action() {\n _this6.editRow(rowIndex).then(function () {\n if (_this6.component.rowDrafts) {\n var _this6$root;\n _this6.validateRow(editRow, false);\n var hasErrors = editRow.errors && !!editRow.errors.length;\n var shouldShowRowErrorsAlert = _this6.component.modal && hasErrors && ((_this6$root = _this6.root) === null || _this6$root === void 0 ? void 0 : _this6$root.submitted);\n if (shouldShowRowErrorsAlert) {\n _this6.alert.showErrors(editRow.errors, false);\n editRow.alerts = true;\n }\n }\n });\n }\n }, {\n className: 'row',\n event: 'click',\n action: function action() {\n row.classList.toggle('selected');\n var eventName = 'editGridSelectRow';\n if (Array.from(row.classList).includes('selected')) {\n editRow.isRowSelected = true;\n } else {\n delete editRow.isRowSelected;\n eventName = 'editGridUnSelectRow';\n }\n _this6.emit(eventName, {\n component: _this6.component,\n data: _this6.dataValue[rowIndex]\n });\n }\n }].forEach(function (_ref) {\n var className = _ref.className,\n event = _ref.event,\n action = _ref.action;\n var elements = row.getElementsByClassName(className);\n Array.prototype.forEach.call(elements, function (element) {\n _this6.addEventListener(element, event, action);\n });\n });\n }\n });\n\n // Add open class to the element if any edit grid row is open\n if (openRowCount) {\n this.addClass(this.refs.component, \"formio-component-\".concat(this.component.type, \"-row-open\"));\n } else {\n this.removeClass(this.refs.component, \"formio-component-\".concat(this.component.type, \"-row-open\"));\n }\n var superAttach = _get(_getPrototypeOf(EditGridComponent.prototype), \"attach\", this).call(this, element);\n this.loadRefs(element, {\n messageContainer: 'single-scope'\n });\n return superAttach;\n }\n }, {\n key: \"flattenRowDataValue\",\n value: function flattenRowDataValue(dataValue) {\n var _this7 = this;\n var flattened = {};\n Object.keys(dataValue).forEach(function (key) {\n if (_lodash[\"default\"].isObject(dataValue[key]) && !_lodash[\"default\"].isNil(dataValue[key])) {\n Object.assign(flattened, _this7.flattenRowDataValue(dataValue[key]));\n } else {\n flattened[key] = dataValue[key];\n }\n });\n return flattened;\n }\n }, {\n key: \"isComponentVisibleInRow\",\n value: function isComponentVisibleInRow(component, flattenedComponents) {\n var instance = flattenedComponents[component.key];\n return instance ? instance.visible : true;\n }\n }, {\n key: \"displayComponentValue\",\n value: function displayComponentValue(component, header) {\n return !!((!component.hasOwnProperty('tableView') || component.tableView) && header ? this.isComponentVisibleInSomeRow(component) : _lodash[\"default\"].includes(this.visibleInHeader, component.key));\n }\n }, {\n key: \"renderRow\",\n value: function renderRow(row, rowIndex) {\n var _this8 = this;\n var dataValue = this.dataValue;\n if (this.isOpen(row)) {\n return this.renderComponents(row.components);\n } else {\n var flattenedComponents = this.flattenComponents(rowIndex);\n var rowTemplate = this.rowTemplate;\n return this.renderString(rowTemplate, {\n row: dataValue[rowIndex] || {},\n data: this.data,\n rowIndex: rowIndex,\n components: this.component.components,\n flattenedComponents: flattenedComponents,\n displayValue: function displayValue(component) {\n return _this8.displayComponentValue(component);\n },\n isVisibleInRow: function isVisibleInRow(component) {\n return _this8.isComponentVisibleInRow(component, flattenedComponents);\n },\n getView: function getView(component, data) {\n var _instance$component, _instance$component2;\n var instance = flattenedComponents[component.key];\n var view = instance ? instance.getView(data || instance.dataValue) : '';\n\n // If there is an html tag in view, don't allow it to be injected in template\n var htmlTagRegExp = new RegExp('<(.*?)>');\n return typeof view === 'string' && view.length && !((_instance$component = instance.component) !== null && _instance$component !== void 0 && _instance$component.template) && htmlTagRegExp.test(view) && ((_instance$component2 = instance.component) === null || _instance$component2 === void 0 ? void 0 : _instance$component2.inputFormat) !== 'html' ? \"\") : view;\n },\n state: this.editRows[rowIndex].state,\n t: this.t.bind(this)\n });\n }\n }\n }, {\n key: \"eachComponent\",\n value: function eachComponent(fn, rowIndex) {\n _lodash[\"default\"].each(this.getComponents(rowIndex), function (component, index) {\n if (fn(component, index) === false) {\n return false;\n }\n });\n }\n }, {\n key: \"restoreComponentsContext\",\n value: function restoreComponentsContext() {\n var _this9 = this;\n this.getComponents().forEach(function (component) {\n var _this9$editRows$compo;\n var rowData = _this9.dataValue[component.rowIndex];\n var editRowData = (_this9$editRows$compo = _this9.editRows[component.rowIndex]) === null || _this9$editRows$compo === void 0 ? void 0 : _this9$editRows$compo.data;\n component.data = rowData || editRowData;\n });\n }\n }, {\n key: \"flattenComponents\",\n value: function flattenComponents(rowIndex) {\n var result = {};\n this.everyComponent(function (component) {\n result[component.component.flattenAs || component.key] = component;\n }, rowIndex);\n return result;\n }\n }, {\n key: \"getComponents\",\n value: function getComponents(rowIndex) {\n // Ensure editrows is set.\n this.editRows = this.editRows || [];\n return this.builderMode ? _get(_getPrototypeOf(EditGridComponent.prototype), \"getComponents\", this).call(this) : _lodash[\"default\"].isNumber(rowIndex) ? this.editRows[rowIndex].components || [] : this.editRows.reduce(function (result, row) {\n return result.concat(row.components || []);\n }, []);\n }\n }, {\n key: \"destroyComponents\",\n value: function destroyComponents(rowIndex) {\n var _this10 = this;\n if (this.builderMode) {\n return _get(_getPrototypeOf(EditGridComponent.prototype), \"destroyComponents\", this).call(this);\n }\n var components = this.getComponents(rowIndex).slice();\n components.forEach(function (comp) {\n return _this10.removeComponent(comp, _this10.components);\n });\n }\n }, {\n key: \"createRow\",\n value: function createRow(dataObj, rowIndex) {\n var editRow = {\n components: this.createRowComponents(dataObj, rowIndex),\n data: dataObj,\n state: EditRowState.New,\n backup: null,\n error: null,\n rowIndex: rowIndex\n };\n this.editRows.push(editRow);\n if (this.inlineEditMode) {\n this.dataValue.push(dataObj);\n }\n return editRow;\n }\n }, {\n key: \"addRow\",\n value: function addRow() {\n if (this.options.readOnly) {\n return;\n }\n var dataObj = {};\n var rowIndex = this.editRows.length;\n var editRow = this.createRow(dataObj, rowIndex);\n if (this.inlineEditMode) {\n this.triggerChange();\n }\n this.emit('editGridAddRow', {\n component: this.component,\n row: editRow\n });\n this.checkRow('checkData', null, {}, editRow.data, editRow.components);\n if (this.component.modal) {\n this.addRowModal(rowIndex);\n } else {\n this.redraw();\n }\n return editRow;\n }\n }, {\n key: \"addRowModal\",\n value: function addRowModal(rowIndex) {\n var _this11 = this;\n var modalContent = this.ce('div');\n var editRow = this.editRows[rowIndex];\n editRow.willBeSaved = false;\n var components = editRow.components;\n modalContent.innerHTML = this.renderComponents(components);\n var dialog = this.component.modal ? this.createModal(modalContent, {}, function () {\n return _this11.showDialog(rowIndex);\n }) : undefined;\n dialog.classList.add(\"editgrid-row-modal-\".concat(this.id));\n editRow.dialog = dialog;\n if (this.alert) {\n this.alert.clear();\n this.alert = null;\n }\n this.alert = new _Alert[\"default\"](dialog.refs.dialogContents, this);\n this.addEventListener(dialog, 'close', function () {\n if (!editRow.willBeSaved) {\n if (_this11.editRows[rowIndex] && _this11.editRows[rowIndex].state !== EditRowState.New) {\n _this11.editRows[rowIndex].components.forEach(function (comp) {\n comp.setPristine(true);\n });\n }\n _this11.cancelRow(rowIndex);\n }\n if (_this11.alert) {\n _this11.alert.clear();\n _this11.alert = null;\n }\n\n // Remove references to dialog elements to prevent possible in some cases memory leaks\n delete editRow.confirmationDialog;\n delete editRow.dialog;\n });\n dialog.refs.dialogContents.appendChild(this.ce('button', {\n \"class\": 'btn btn-primary',\n onClick: function onClick() {\n // After an attempt to save, all the components inside the row should become not pristine\n if (!_this11.component.rowDrafts) {\n editRow.components.forEach(function (comp) {\n return comp.setPristine(false);\n });\n }\n if (_this11.validateRow(editRow, true) || _this11.component.rowDrafts) {\n editRow.willBeSaved = true;\n dialog.close();\n _this11.saveRow(rowIndex, true);\n } else {\n _this11.alert.showErrors(editRow.errors, false);\n editRow.alerts = true;\n }\n }\n }, this.component.saveRow || 'Save'));\n return this.attachComponents(modalContent, components);\n }\n }, {\n key: \"showDialog\",\n value: function showDialog(rowIndex) {\n var editRow = this.editRows[rowIndex];\n if (_lodash[\"default\"].isEqual(editRow.backup, editRow.data)) {\n return _nativePromiseOnly[\"default\"].resolve();\n }\n var wrapper = this.ce('div', {\n ref: 'confirmationDialog'\n });\n var dialogContent = this.component.dialogTemplate || this.defaultDialogTemplate;\n wrapper.innerHTML = dialogContent;\n wrapper.refs = {};\n this.loadRefs.call(wrapper, wrapper, {\n dialogHeader: 'single',\n dialogCancelButton: 'single',\n dialogYesButton: 'single'\n });\n var dialog = this.createModal(wrapper);\n dialog.classList.add(\"editgrid-row-modal-confirmation-\".concat(this.id));\n var close = function close(event) {\n event.preventDefault();\n dialog.close();\n };\n var dialogResult;\n var promise = new _nativePromiseOnly[\"default\"](function (resolve, reject) {\n dialogResult = {\n resolve: resolve,\n reject: reject\n };\n });\n this.addEventListener(wrapper.refs.dialogYesButton, 'click', function (event) {\n close(event);\n dialogResult.resolve();\n });\n this.addEventListener(wrapper.refs.dialogCancelButton, 'click', function (event) {\n close(event);\n dialogResult.reject();\n });\n editRow.confirmationDialog = dialog;\n return promise;\n }\n }, {\n key: \"editRow\",\n value: function editRow(rowIndex) {\n var editRow = this.editRows[rowIndex];\n var isAlreadyEditing = editRow.state === EditRowState.Editing || editRow.state === EditRowState.New;\n if (!editRow || isAlreadyEditing) {\n return _nativePromiseOnly[\"default\"].resolve();\n }\n editRow.prevState = editRow.state;\n editRow.state = this.options.readOnly ? EditRowState.Viewing : EditRowState.Editing;\n if (this.lazyLoad && editRow.components.length === 0) {\n editRow.components = this.createRowComponents(editRow.data, rowIndex);\n }\n var dataSnapshot = (0, _utils.fastCloneDeep)(editRow.data);\n if (this.inlineEditMode) {\n editRow.backup = dataSnapshot;\n } else {\n editRow.backup = (0, _utils.fastCloneDeep)(editRow.data);\n editRow.data = dataSnapshot;\n this.restoreRowContext(editRow);\n }\n if (this.component.modal) {\n return this.addRowModal(rowIndex);\n }\n return this.redraw();\n }\n }, {\n key: \"clearErrors\",\n value: function clearErrors(rowIndex) {\n var editRow = this.editRows[rowIndex];\n if (editRow && Array.isArray(editRow.components)) {\n editRow.components.forEach(function (comp) {\n comp.setPristine(true);\n comp.setCustomValidity('');\n });\n }\n }\n }, {\n key: \"cancelRow\",\n value: function cancelRow(rowIndex) {\n if (this.options.readOnly) {\n return;\n }\n var editRow = this.editRows[rowIndex];\n switch (editRow.state) {\n case EditRowState.New:\n {\n editRow.state = EditRowState.Removed;\n this.clearErrors(rowIndex);\n this.destroyComponents(rowIndex);\n if (this.inlineEditMode) {\n this.splice(rowIndex);\n }\n this.editRows.splice(rowIndex, 1);\n this.openWhenEmpty();\n break;\n }\n case EditRowState.Editing:\n {\n editRow.state = editRow.prevState;\n if (this.inlineEditMode) {\n this.dataValue[rowIndex] = editRow.backup;\n }\n editRow.data = editRow.backup;\n editRow.backup = null;\n this.restoreRowContext(editRow);\n this.clearErrors(rowIndex);\n break;\n }\n }\n this.emit('editGridCancelRow', {\n instance: this,\n component: this.component,\n editRow: editRow\n });\n this.checkValidity(null, true);\n this.redraw();\n if (this.component.rowDrafts) {\n this.checkValidity(this.data, false);\n }\n }\n }, {\n key: \"saveRow\",\n value: function saveRow(rowIndex, modified) {\n var _this12 = this;\n var editRow = this.editRows[rowIndex];\n if (this.options.readOnly) {\n return;\n }\n\n // After an attempt to save, all the components inside the row should become not pristine\n if (!this.component.rowDrafts) {\n editRow.components.forEach(function (comp) {\n return comp.setPristine(false);\n });\n }\n var isRowValid = this.validateRow(editRow, true);\n if (!this.component.rowDrafts) {\n if (!isRowValid) {\n return false;\n }\n }\n if (this.saveEditMode) {\n var _this$root, _this$root$focusedCom;\n var dataValue = this.dataValue;\n if ((_this$root = this.root) !== null && _this$root !== void 0 && (_this$root$focusedCom = _this$root.focusedComponent) !== null && _this$root$focusedCom !== void 0 && _this$root$focusedCom.component.typeChangeEnabled) {\n this.root.focusedComponent = null;\n }\n switch (editRow.state) {\n case EditRowState.New:\n {\n var newIndex = dataValue.length;\n dataValue.push(editRow.data);\n editRow.components.forEach(function (component) {\n return component.rowIndex = newIndex;\n });\n if (rowIndex !== newIndex) {\n this.editRows.splice(rowIndex, 1);\n this.editRows.splice(newIndex, 0, editRow);\n }\n break;\n }\n case EditRowState.Editing:\n {\n dataValue[rowIndex] = editRow.data;\n break;\n }\n }\n }\n editRow.state = this.component.rowDrafts && !isRowValid ? EditRowState.Draft : EditRowState.Saved;\n editRow.backup = null;\n this.updateValue();\n this.emit('editGridSaveRow', {\n component: this.component,\n row: editRow.data,\n instance: this\n });\n this.triggerChange({\n modified: modified,\n noPristineChangeOnModified: modified && this.component.rowDrafts,\n isolateRow: true\n });\n if (this.component.rowDrafts) {\n editRow.components.forEach(function (comp) {\n return comp.setPristine(_this12.pristine);\n });\n }\n this.checkValidity(null, true);\n this.redraw();\n if (editRow.alerts) {\n editRow.alerts = false;\n }\n return true;\n }\n }, {\n key: \"beforeFocus\",\n value: function beforeFocus(component) {\n if ('beforeFocus' in this.parent) {\n this.parent.beforeFocus(this);\n }\n var relativePath = this.getRelativePath(component.path);\n var arrayPath = (0, _utils.getArrayFromComponentPath)(relativePath);\n var rowIndex = arrayPath[0];\n var rowToEditIndex = arrayPath[0];\n this.editRows.forEach(function (row, indexInArray) {\n if (row.rowIndex === rowIndex) {\n rowToEditIndex = indexInArray;\n }\n });\n if (_lodash[\"default\"].isNumber(rowToEditIndex)) {\n this.editRow(rowToEditIndex);\n }\n }\n }, {\n key: \"updateComponentsRowIndex\",\n value: function updateComponentsRowIndex(components, rowIndex) {\n components.forEach(function (component, colIndex) {\n component.rowIndex = rowIndex;\n component.row = \"\".concat(rowIndex, \"-\").concat(colIndex);\n });\n }\n }, {\n key: \"updateRowsComponents\",\n value: function updateRowsComponents(rowIndex) {\n var _this13 = this;\n this.editRows.slice(rowIndex).forEach(function (row, index) {\n _this13.updateComponentsRowIndex(row.components, rowIndex + index);\n });\n }\n }, {\n key: \"baseRemoveRow\",\n value: function baseRemoveRow(rowIndex) {\n var editRow = this.editRows[rowIndex];\n editRow.state = EditRowState.Removed;\n this.destroyComponents(rowIndex);\n return editRow;\n }\n }, {\n key: \"removeRow\",\n value: function removeRow(rowIndex, modified) {\n if (this.options.readOnly) {\n return;\n }\n this.clearErrors(rowIndex);\n this.baseRemoveRow(rowIndex);\n this.splice(rowIndex);\n this.emit('editGridDeleteRow', {\n index: rowIndex\n });\n this.editRows.splice(rowIndex, 1);\n this.openWhenEmpty();\n this.updateRowsComponents(rowIndex);\n this.updateValue();\n this.triggerChange({\n modified: modified,\n noPristineChangeOnModified: modified && this.component.rowDrafts,\n isolateRow: true\n });\n this.checkValidity(null, true);\n this.checkData();\n this.redraw();\n }\n }, {\n key: \"createRowComponents\",\n value: function createRowComponents(row, rowIndex, recreatePartially) {\n var _this14 = this;\n var currentRowComponents = _lodash[\"default\"].get(this.editRows, \"[\".concat(rowIndex, \"].components\"), null);\n return this.component.components.map(function (col, colIndex) {\n if (recreatePartially && currentRowComponents && _this14.variableTypeComponentsIndexes.length) {\n var _currentComp$componen;\n var currentComp = currentRowComponents[colIndex];\n var shouldRecreate = _lodash[\"default\"].includes(_this14.variableTypeComponentsIndexes, colIndex) && (currentComp === null || currentComp === void 0 ? void 0 : currentComp.type) !== (currentComp === null || currentComp === void 0 ? void 0 : (_currentComp$componen = currentComp.component) === null || _currentComp$componen === void 0 ? void 0 : _currentComp$componen.type);\n if (!shouldRecreate) {\n return currentComp;\n }\n col = currentComp.component;\n }\n var column = _lodash[\"default\"].clone(col);\n var options = _lodash[\"default\"].clone(_this14.options);\n options.name += \"[\".concat(rowIndex, \"]\");\n options.row = \"\".concat(rowIndex, \"-\").concat(colIndex);\n options.onChange = function () {\n var _changed$instance$roo, _this14$root;\n var flags = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var changed = arguments.length > 1 ? arguments[1] : undefined;\n var modified = arguments.length > 2 ? arguments[2] : undefined;\n if ((_changed$instance$roo = changed.instance.root) !== null && _changed$instance$roo !== void 0 && _changed$instance$roo.id && ((_this14$root = _this14.root) === null || _this14$root === void 0 ? void 0 : _this14$root.id) !== changed.instance.root.id) {\n changed.instance.root.triggerChange(flags, changed, modified);\n } else if (!_this14.component.modal) {\n _this14.triggerRootChange(flags, changed, modified);\n }\n if (_this14.inlineEditMode) {\n return;\n }\n var editRow = _this14.editRows[rowIndex];\n if (editRow !== null && editRow !== void 0 && editRow.alerts) {\n _this14.checkData(null, _objectSpread(_objectSpread({}, flags), {}, {\n changed: changed,\n rowIndex: rowIndex\n }), _this14.data);\n } else if (editRow) {\n // If drafts allowed, perform validation silently if there was no attempt to submit a form\n var silentCheck = _this14.component.rowDrafts && !_this14.shouldValidateDraft(editRow);\n _this14.checkRow('checkData', null, _objectSpread(_objectSpread({}, flags), {}, {\n changed: changed,\n silentCheck: silentCheck\n }), editRow.data, editRow.components, silentCheck);\n }\n if (_this14.variableTypeComponentsIndexes.length) {\n _this14.checkRowVariableTypeComponents(editRow, rowIndex);\n _this14.redraw();\n }\n };\n var comp = _this14.createComponent(_lodash[\"default\"].assign({}, column, {\n row: options.row\n }), options, row, null, recreatePartially && currentRowComponents ? currentRowComponents[colIndex] : null);\n comp.rowIndex = rowIndex;\n comp.inEditGrid = true;\n return comp;\n });\n }\n }, {\n key: \"hasOpenRows\",\n value: function hasOpenRows() {\n var _this15 = this;\n return this.editRows.some(function (row) {\n return _this15.isOpen(row);\n });\n }\n }, {\n key: \"shouldValidateDraft\",\n value: function shouldValidateDraft(editRow) {\n var _this$root2, _this$root3;\n // Draft rows should be validated only when there was an attempt to submit a form\n return editRow.state === EditRowState.Draft && !this.pristine && !((_this$root2 = this.root) !== null && _this$root2 !== void 0 && _this$root2.pristine) && !this.hasOpenRows() || ((_this$root3 = this.root) === null || _this$root3 === void 0 ? void 0 : _this$root3.submitted);\n }\n }, {\n key: \"shouldValidateRow\",\n value: function shouldValidateRow(editRow, dirty) {\n return this.shouldValidateDraft(editRow) || editRow.state === EditRowState.Editing || editRow.alerts || dirty;\n }\n }, {\n key: \"validateRow\",\n value: function validateRow(editRow, dirty, forceSilentCheck) {\n var _this16 = this,\n _this$root4;\n var valid = true;\n var errorsSnapshot = _toConsumableArray(this.errors);\n if (this.shouldValidateRow(editRow, dirty)) {\n editRow.components.forEach(function (comp) {\n var silentCheck = _this16.component.rowDrafts && !_this16.shouldValidateDraft(editRow) || forceSilentCheck;\n valid &= comp.checkValidity(null, dirty, null, silentCheck);\n });\n }\n if (this.component.validate && this.component.validate.row) {\n valid = this.evaluate(this.component.validate.row, {\n valid: valid,\n row: editRow.data\n }, 'valid', true);\n if (valid.toString() !== 'true') {\n editRow.error = valid;\n valid = false;\n } else {\n editRow.error = null;\n }\n if (valid === null) {\n valid = \"Invalid row validation for \".concat(this.key);\n }\n }\n editRow.errors = !valid ? this.errors.filter(function (err) {\n return !errorsSnapshot.includes(err);\n }) : null;\n if (!this.component.rowDrafts || (_this$root4 = this.root) !== null && _this$root4 !== void 0 && _this$root4.submitted) {\n this.showRowErrorAlerts(editRow, !!valid);\n }\n return !!valid;\n }\n }, {\n key: \"showRowErrorAlerts\",\n value: function showRowErrorAlerts(editRow, valid) {\n if (editRow.alerts) {\n if (this.alert) {\n var _editRow$errors;\n if ((_editRow$errors = editRow.errors) !== null && _editRow$errors !== void 0 && _editRow$errors.length && !valid) {\n this.alert.showErrors(editRow.errors, false);\n editRow.alerts = true;\n } else {\n this.alert.clear();\n }\n }\n }\n }\n }, {\n key: \"checkValidity\",\n value: function checkValidity(data, dirty, row, silentCheck) {\n data = data || this.rootValue;\n row = row || this.data;\n if (!this.checkCondition(row, data)) {\n this.setCustomValidity('');\n return true;\n }\n return this.checkComponentValidity(data, dirty, row, {\n silentCheck: silentCheck\n });\n }\n }, {\n key: \"checkComponentValidity\",\n value: function checkComponentValidity(data, dirty, row) {\n var _this17 = this,\n _this$errors,\n _this$root6;\n var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n var silentCheck = options.silentCheck;\n var errorsLength = this.errors.length;\n var superValid = _get(_getPrototypeOf(EditGridComponent.prototype), \"checkComponentValidity\", this).call(this, data, dirty, row, options);\n\n // If super tells us that component invalid and there is no need to update alerts, just return false\n if (!superValid && !this.alert && !this.hasOpenRows()) {\n return false;\n }\n if (this.shouldSkipValidation(data, dirty, row)) {\n return true;\n }\n var rowsValid = true;\n var rowsEditing = false;\n this.editRows.forEach(function (editRow, index) {\n // Trigger all errors on the row.\n var rowValid = _this17.validateRow(editRow, dirty, silentCheck);\n rowsValid &= rowValid;\n if (_this17.rowRefs) {\n var rowContainer = _this17.rowRefs[index];\n if (rowContainer) {\n var errorContainer = rowContainer.querySelector('.editgrid-row-error');\n if (!rowValid && errorContainer && (!_this17.component.rowDrafts || _this17.shouldValidateDraft(editRow))) {\n _this17.addClass(errorContainer, 'help-block');\n errorContainer.textContent = _this17.t(_this17.errorMessage('invalidRowError'));\n } else if (errorContainer) {\n errorContainer.textContent = '';\n }\n }\n }\n // If this is a dirty check, and any rows are still editing, we need to throw validation error.\n rowsEditing |= dirty && _this17.isOpen(editRow);\n });\n if (!rowsValid) {\n var _this$root5;\n if (!silentCheck && (!this.component.rowDrafts || (_this$root5 = this.root) !== null && _this$root5 !== void 0 && _this$root5.submitted)) {\n this.setCustomValidity(this.t(this.errorMessage('invalidRowsError')), dirty);\n // Delete this class, because otherwise all the components inside EditGrid will has red border even if they are valid\n this.removeClass(this.element, 'has-error');\n }\n return false;\n } else if (rowsEditing && this.saveEditMode) {\n this.setCustomValidity(this.t(this.errorMessage('unsavedRowsError')), dirty);\n return false;\n }\n var message = this.invalid || this.invalidMessage(data, dirty);\n if (((_this$errors = this.errors) === null || _this$errors === void 0 ? void 0 : _this$errors.length) !== errorsLength && (_this$root6 = this.root) !== null && _this$root6 !== void 0 && _this$root6.submitted && !message) {\n this.setCustomValidity(message, dirty);\n this.root.showErrors();\n } else {\n this.setCustomValidity(message, dirty);\n }\n return superValid;\n }\n }, {\n key: \"changeState\",\n value: function changeState(changed, flags) {\n if (changed || flags.resetValue && this.component.modalEdit) {\n this.rebuild();\n } else {\n this.redraw();\n }\n }\n }, {\n key: \"setValue\",\n value: function setValue(value) {\n var _this18 = this;\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n if (!value) {\n value = this.defaultValue;\n }\n if (!Array.isArray(value)) {\n if (_typeof(value) === 'object') {\n value = [value];\n } else {\n return false;\n }\n }\n var changed = this.hasChanged(value, this.dataValue);\n flags.noValidate = !changed;\n if (this.parent) {\n this.parent.checkComponentConditions();\n }\n this.dataValue = value;\n // Refresh editRow data when data changes.\n this.dataValue.forEach(function (row, rowIndex) {\n var editRow = _this18.editRows[rowIndex];\n if (editRow) {\n editRow.data = row;\n _this18.restoreRowContext(editRow, flags);\n editRow.state = EditRowState.Saved;\n editRow.backup = null;\n editRow.error = null;\n } else {\n _this18.editRows[rowIndex] = {\n components: _this18.lazyLoad ? [] : _this18.createRowComponents(row, rowIndex),\n data: row,\n state: EditRowState.Saved,\n backup: null,\n error: null\n };\n }\n });\n var dataLength = this.dataValue.length;\n\n // If the last row is a new row, then do not remove it.\n if (this.editRows[dataLength] && this.editRows[dataLength].state === EditRowState.New) {\n dataLength = dataLength + 1;\n }\n this.editRows.slice(dataLength).forEach(function (editRow, index) {\n return _this18.baseRemoveRow(dataLength + index);\n });\n this.editRows = this.editRows.slice(0, dataLength);\n this.openWhenEmpty();\n this.updateOnChange(flags, changed);\n this.checkData();\n this.changeState(changed, flags);\n return changed;\n }\n }, {\n key: \"openWhenEmpty\",\n value: function openWhenEmpty() {\n var shouldBeOpened = !this.dataValue.length && this.component.openWhenEmpty;\n var hasNoRows = !this.editRows.length;\n if (hasNoRows && shouldBeOpened && !this.builderMode) {\n var dataObj = {};\n this.createRow(dataObj, 0);\n }\n }\n }, {\n key: \"restoreRowContext\",\n value: function restoreRowContext(editRow) {\n var _this19 = this;\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n editRow.components.forEach(function (component) {\n component.data = editRow.data;\n _this19.setNestedValue(component, editRow.data, flags);\n });\n }\n }, {\n key: \"emptyRows\",\n value: function emptyRows() {\n var _this20 = this;\n this.editRows.forEach(function (editRow, index) {\n return _this20.destroyComponents(index);\n });\n this.editRows = [];\n }\n }, {\n key: \"resetValue\",\n value: function resetValue() {\n _get(_getPrototypeOf(EditGridComponent.prototype), \"resetValue\", this).call(this);\n this.emptyRows();\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len2 = arguments.length, extend = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n extend[_key2] = arguments[_key2];\n }\n return _NestedArrayComponent2[\"default\"].schema.apply(_NestedArrayComponent2[\"default\"], [{\n type: 'editgrid',\n label: 'Edit Grid',\n key: 'editGrid',\n clearOnHide: true,\n input: true,\n tree: true,\n removeRow: 'Cancel',\n defaultOpen: false,\n openWhenEmpty: false,\n modal: false,\n components: [],\n inlineEdit: false,\n templates: {\n header: EditGridComponent.defaultHeaderTemplate,\n row: EditGridComponent.defaultRowTemplate,\n tableHeader: EditGridComponent.defaultTableHeaderTemplate,\n tableRow: EditGridComponent.defaultTableRowTemplate,\n footer: ''\n }\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Edit Grid',\n icon: 'tasks',\n group: 'data',\n documentation: '/userguide/form-building/data-components#edit-grid',\n weight: 30,\n schema: EditGridComponent.schema()\n };\n }\n }, {\n key: \"defaultHeaderTemplate\",\n get: function get() {\n return \"
\\n {% util.eachComponent(components, function(component) { %}\\n {% if (displayValue(component)) { %}\\n
{{ t(component.label) }}
\\n {% } %}\\n {% }) %}\\n
\";\n }\n }, {\n key: \"defaultTableHeaderTemplate\",\n get: function get() {\n return \"\\n \\n {% util.eachComponent(components, function(component) { %}\\n {% if (!component.hasOwnProperty('tableView') || component.tableView) { %}\\n {{ component.label }}\\n {% } %}\\n {% }) %}\\n {% if (!instance.options.readOnly && !instance.disabled) { %}\\n Actions\\n {% } %}\\n \\n \";\n }\n }, {\n key: \"defaultRowTemplate\",\n get: function get() {\n return \"
\\n {% util.eachComponent(components, function(component) { %}\\n {% if (displayValue(component)) { %}\\n
\\n {{ isVisibleInRow(component) ? getView(component, row[component.key]) : ''}}\\n
\\n {% } %}\\n {% }) %}\\n {% if (!instance.options.readOnly && !instance.disabled) { %}\\n
\\n
\\n \\n {% if (!instance.hasRemoveButtons || instance.hasRemoveButtons()) { %}\\n \\n {% } %}\\n
\\n
\\n {% } %}\\n
\";\n }\n }, {\n key: \"defaultTableRowTemplate\",\n get: function get() {\n return \"\\n {% util.eachComponent(components, function(component) { %}\\n {% if (!component.hasOwnProperty('tableView') || component.tableView) { %}\\n \\n {{ getView(component, row[component.key]) }}\\n \\n {% } %}\\n {% }) %}\\n {% if (!instance.options.readOnly && !instance.disabled) { %}\\n \\n
\\n \\n {% if (!instance.hasRemoveButtons || instance.hasRemoveButtons()) { %}\\n \\n {% } %}\\n
\\n \\n {% } %}\\n \";\n }\n }]);\n return EditGridComponent;\n}(_NestedArrayComponent2[\"default\"]);\nexports[\"default\"] = EditGridComponent;\nEditGridComponent.prototype.hasChanged = _Component[\"default\"].prototype.hasChanged;\n\n//# sourceURL=webpack://Formio/./lib/components/editgrid/EditGrid.js?"); /***/ }), @@ -1046,10 +1079,10 @@ eval("\n\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_ /*!****************************************************************!*\ !*** ./lib/components/editgrid/editForm/EditGrid.edit.data.js ***! \****************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n type: 'checkbox',\n input: true,\n weight: 105,\n key: 'inlineEdit',\n label: 'Inline Editing',\n tooltip: 'Check this if you would like your changes within \\'edit\\' mode to be committed directly to the submission object as that row is being changed'\n}, {\n key: 'defaultValue',\n ignore: true\n}, {\n key: 'multiple',\n ignore: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/editgrid/editForm/EditGrid.edit.data.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n type: 'checkbox',\n input: true,\n weight: 105,\n key: 'inlineEdit',\n label: 'Inline Editing',\n tooltip: 'Check this if you would like your changes within \\'edit\\' mode to be committed directly to the submission object as that row is being changed'\n}, {\n key: 'defaultValue',\n ignore: true\n}, {\n key: 'multiple',\n ignore: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/editgrid/editForm/EditGrid.edit.data.js?"); /***/ }), @@ -1060,7 +1093,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _Evaluator = _interopRequireDefault(__webpack_require__(/*! ../../../utils/Evaluator */ \"./lib/utils/Evaluator.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = [{\n key: 'placeholder',\n ignore: true\n}, {\n type: 'checkbox',\n label: 'Open First Row when Empty',\n key: 'openWhenEmpty',\n tooltip: 'Check this if you would like to open up the first row when the EditGrid is empty',\n weight: 1000,\n input: true,\n conditional: {\n json: {\n '!==': [{\n var: 'data.modal'\n }, true]\n }\n }\n}, {\n type: 'checkbox',\n label: 'Disable Adding / Removing Rows',\n key: 'disableAddingRemovingRows',\n tooltip: 'Check if you want to hide Add Another button and Remove Row button',\n weight: 1001,\n input: true,\n clearOnHide: false,\n calculateValue: 'value = data.disableAddingRemovingRows;'\n}, {\n type: 'checkbox',\n label: 'Display EditGrid as Table',\n key: 'displayAsTable',\n tooltip: 'use Table Template',\n weight: 1002,\n input: false,\n customConditional: function customConditional() {\n return !_Evaluator.default.noeval;\n }\n}, {\n weight: 1010,\n type: 'textarea',\n input: true,\n key: 'conditionalAddButton',\n label: 'Conditional Add Button',\n placeholder: 'show = ...',\n tooltip: 'Specify condition when Add Button should be displayed.',\n editor: 'ace',\n as: 'javascript',\n wysiwyg: {\n minLines: 3\n }\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/editgrid/editForm/EditGrid.edit.display.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _Evaluator = _interopRequireDefault(__webpack_require__(/*! ../../../utils/Evaluator */ \"./lib/utils/Evaluator.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = [{\n key: 'placeholder',\n ignore: true\n}, {\n type: 'checkbox',\n label: 'Open First Row when Empty',\n key: 'openWhenEmpty',\n tooltip: 'Check this if you would like to open up the first row when the EditGrid is empty',\n weight: 1000,\n input: true,\n conditional: {\n json: {\n '!==': [{\n \"var\": 'data.modal'\n }, true]\n }\n }\n}, {\n type: 'checkbox',\n label: 'Disable Adding / Removing Rows',\n key: 'disableAddingRemovingRows',\n tooltip: 'Check if you want to hide Add Another button and Remove Row button',\n weight: 1001,\n input: true,\n clearOnHide: false,\n calculateValue: 'value = data.disableAddingRemovingRows;'\n}, {\n type: 'checkbox',\n label: 'Display EditGrid as Table',\n key: 'displayAsTable',\n tooltip: 'use Table Template',\n weight: 1002,\n input: false,\n customConditional: function customConditional() {\n return !_Evaluator[\"default\"].noeval;\n }\n}, {\n weight: 1010,\n type: 'textarea',\n input: true,\n key: 'conditionalAddButton',\n label: 'Conditional Add Button',\n placeholder: 'show = ...',\n tooltip: 'Specify condition when Add Button should be displayed.',\n editor: 'ace',\n as: 'javascript',\n wysiwyg: {\n minLines: 3\n }\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/editgrid/editForm/EditGrid.edit.display.js?"); /***/ }), @@ -1071,7 +1104,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _Evaluator = _interopRequireDefault(__webpack_require__(/*! ../../../utils/Evaluator */ \"./lib/utils/Evaluator.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = [{\n type: 'textarea',\n label: 'Header Template',\n key: 'templates.header',\n rows: 5,\n editor: 'ace',\n as: 'handlebars',\n clearOnHide: false,\n input: true,\n placeholder: '/*** Lodash Template Code ***/',\n description: 'Two available variables. \"value\" is the array of row data and \"components\" is the array of components in the grid.',\n tooltip: 'This is the Lodash Template used to render the header of the Edit grid.',\n customConditional: function customConditional(_ref) {\n var data = _ref.data;\n return (!_Evaluator.default.noeval || _Evaluator.default.protectedEval) && !data.displayAsTable;\n }\n}, {\n type: 'textarea',\n label: 'Table Header Template',\n key: 'templates.tableHeader',\n rows: 6,\n editor: 'ace',\n as: 'handlebars',\n clearOnHide: false,\n input: true,\n placeholder: '/*** Lodash Template Code ***/',\n description: 'Two available variables. \"value\" is the array of row data and \"components\" is the array of components in the grid.',\n tooltip: 'This is the Lodash Template used to render the header of the Edit grid.',\n customConditional: function customConditional(_ref2) {\n var data = _ref2.data;\n return (!_Evaluator.default.noeval || _Evaluator.default.protectedEval) && data.displayAsTable;\n }\n}, {\n type: 'textarea',\n label: 'Row Template',\n key: 'templates.row',\n rows: 5,\n editor: 'ace',\n as: 'handlebars',\n clearOnHide: false,\n input: true,\n placeholder: '/*** Lodash Template Code ***/',\n description: 'Three available variables. \"row\" is an object of one row\\'s data, \"components\"' + ' is the array of components in the grid and \"state\" is current row\\'s state (can be \"draft\" or \"saved\").' + ' To add click events, add the classes \"editRow\" and \"removeRow\" to elements.',\n tooltip: 'This is the Lodash Template used to render each row of the Edit grid.',\n customConditional: function customConditional(_ref3) {\n var data = _ref3.data;\n return (!_Evaluator.default.noeval || _Evaluator.default.protectedEval) && !data.displayAsTable;\n }\n}, {\n type: 'textarea',\n label: 'Table Row Template',\n key: 'templates.tableRow',\n rows: 5,\n editor: 'ace',\n as: 'handlebars',\n clearOnHide: false,\n input: true,\n placeholder: '/*** Lodash Template Code ***/',\n description: 'Three available variables. \"row\" is an object of one row\\'s data, \"components\"' + ' is the array of components in the grid and \"state\" is current row\\'s state (can be \"draft\" or \"saved\").' + ' To add click events, add the classes \"editRow\" and \"removeRow\" to elements.',\n tooltip: 'This is the Lodash Template used to render each row of the Edit grid.',\n customConditional: function customConditional(_ref4) {\n var data = _ref4.data;\n return (!_Evaluator.default.noeval || _Evaluator.default.protectedEval) && data.displayAsTable;\n }\n}, {\n type: 'textarea',\n label: 'Footer Template',\n key: 'templates.footer',\n rows: 5,\n editor: 'ace',\n as: 'handlebars',\n input: true,\n placeholder: '/*** Lodash Template Code ***/',\n description: 'Two available variables. \"value\" is the array of row data and \"components\" is the array of components in the grid.',\n tooltip: 'This is the Lodash Template used to render the footer of the Edit grid.',\n customConditional: function customConditional() {\n return !_Evaluator.default.noeval || _Evaluator.default.protectedEval;\n }\n}, {\n type: 'textfield',\n input: true,\n key: 'rowClass',\n label: 'Row CSS Class',\n placeholder: 'Row CSS Class',\n tooltip: 'CSS class to add to the edit row wrapper.'\n}, {\n type: 'textfield',\n input: true,\n key: 'addAnother',\n label: 'Add Another Text',\n placeholder: 'Add Another',\n tooltip: 'Set the text of the Add Another button.'\n}, {\n weight: 70,\n type: 'checkbox',\n label: 'Display as Modal',\n tooltip: 'Display a modal to add or edit entries in the table',\n key: 'modal',\n input: true\n}, {\n type: 'textfield',\n input: true,\n key: 'saveRow',\n label: 'Save Row Text',\n placeholder: 'Save',\n tooltip: 'Set the text of the Save Row button.'\n}, {\n type: 'textfield',\n input: true,\n key: 'removeRow',\n label: 'Remove Row Text',\n placeholder: 'Remove',\n tooltip: 'Set the text of the remove Row button.'\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/editgrid/editForm/EditGrid.edit.templates.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _Evaluator = _interopRequireDefault(__webpack_require__(/*! ../../../utils/Evaluator */ \"./lib/utils/Evaluator.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = [{\n type: 'textarea',\n label: 'Header Template',\n key: 'templates.header',\n rows: 5,\n editor: 'ace',\n as: 'handlebars',\n clearOnHide: false,\n input: true,\n placeholder: '/*** Lodash Template Code ***/',\n description: 'Two available variables. \"value\" is the array of row data and \"components\" is the array of components in the grid.',\n tooltip: 'This is the Lodash Template used to render the header of the Edit grid.',\n customConditional: function customConditional(_ref) {\n var data = _ref.data;\n return (!_Evaluator[\"default\"].noeval || _Evaluator[\"default\"].protectedEval) && !data.displayAsTable;\n }\n}, {\n type: 'textarea',\n label: 'Table Header Template',\n key: 'templates.tableHeader',\n rows: 6,\n editor: 'ace',\n as: 'handlebars',\n clearOnHide: false,\n input: true,\n placeholder: '/*** Lodash Template Code ***/',\n description: 'Two available variables. \"value\" is the array of row data and \"components\" is the array of components in the grid.',\n tooltip: 'This is the Lodash Template used to render the header of the Edit grid.',\n customConditional: function customConditional(_ref2) {\n var data = _ref2.data;\n return (!_Evaluator[\"default\"].noeval || _Evaluator[\"default\"].protectedEval) && data.displayAsTable;\n }\n}, {\n type: 'textarea',\n label: 'Row Template',\n key: 'templates.row',\n rows: 5,\n editor: 'ace',\n as: 'handlebars',\n clearOnHide: false,\n input: true,\n placeholder: '/*** Lodash Template Code ***/',\n description: 'Three available variables. \"row\" is an object of one row\\'s data, \"components\"' + ' is the array of components in the grid and \"state\" is current row\\'s state (can be \"draft\" or \"saved\").' + ' To add click events, add the classes \"editRow\" and \"removeRow\" to elements.',\n tooltip: 'This is the Lodash Template used to render each row of the Edit grid.',\n customConditional: function customConditional(_ref3) {\n var data = _ref3.data;\n return (!_Evaluator[\"default\"].noeval || _Evaluator[\"default\"].protectedEval) && !data.displayAsTable;\n }\n}, {\n type: 'textarea',\n label: 'Table Row Template',\n key: 'templates.tableRow',\n rows: 5,\n editor: 'ace',\n as: 'handlebars',\n clearOnHide: false,\n input: true,\n placeholder: '/*** Lodash Template Code ***/',\n description: 'Three available variables. \"row\" is an object of one row\\'s data, \"components\"' + ' is the array of components in the grid and \"state\" is current row\\'s state (can be \"draft\" or \"saved\").' + ' To add click events, add the classes \"editRow\" and \"removeRow\" to elements.',\n tooltip: 'This is the Lodash Template used to render each row of the Edit grid.',\n customConditional: function customConditional(_ref4) {\n var data = _ref4.data;\n return (!_Evaluator[\"default\"].noeval || _Evaluator[\"default\"].protectedEval) && data.displayAsTable;\n }\n}, {\n type: 'textarea',\n label: 'Footer Template',\n key: 'templates.footer',\n rows: 5,\n editor: 'ace',\n as: 'handlebars',\n input: true,\n placeholder: '/*** Lodash Template Code ***/',\n description: 'Two available variables. \"value\" is the array of row data and \"components\" is the array of components in the grid.',\n tooltip: 'This is the Lodash Template used to render the footer of the Edit grid.',\n customConditional: function customConditional() {\n return !_Evaluator[\"default\"].noeval || _Evaluator[\"default\"].protectedEval;\n }\n}, {\n type: 'textfield',\n input: true,\n key: 'rowClass',\n label: 'Row CSS Class',\n placeholder: 'Row CSS Class',\n tooltip: 'CSS class to add to the edit row wrapper.'\n}, {\n type: 'textfield',\n input: true,\n key: 'addAnother',\n label: 'Add Another Text',\n placeholder: 'Add Another',\n tooltip: 'Set the text of the Add Another button.'\n}, {\n weight: 70,\n type: 'checkbox',\n label: 'Display as Modal',\n tooltip: 'Display a modal to add or edit entries in the table',\n key: 'modal',\n input: true\n}, {\n type: 'textfield',\n input: true,\n key: 'saveRow',\n label: 'Save Row Text',\n placeholder: 'Save',\n tooltip: 'Set the text of the Save Row button.'\n}, {\n type: 'textfield',\n input: true,\n key: 'removeRow',\n label: 'Remove Row Text',\n placeholder: 'Remove',\n tooltip: 'Set the text of the remove Row button.'\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/editgrid/editForm/EditGrid.edit.templates.js?"); /***/ }), @@ -1079,10 +1112,10 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /*!**********************************************************************!*\ !*** ./lib/components/editgrid/editForm/EditGrid.edit.validation.js ***! \**********************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n ignore: true,\n key: 'unique'\n}, {\n weight: 110,\n key: 'validate.minLength',\n label: 'Minimum Length',\n placeholder: 'Minimum Length',\n type: 'number',\n tooltip: 'The minimum length requirement this field must meet.',\n input: true\n}, {\n weight: 120,\n key: 'validate.maxLength',\n label: 'Maximum Length',\n placeholder: 'Maximum Length',\n type: 'number',\n tooltip: 'The maximum length requirement this field must meet.',\n input: true\n}, {\n type: 'checkbox',\n input: true,\n weight: 105,\n key: 'rowDrafts',\n label: 'Enable Row Drafts',\n tooltip: 'Allow save rows even if their data is invalid. Errors will occur when try to submit with invalid rows.'\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/editgrid/editForm/EditGrid.edit.validation.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n ignore: true,\n key: 'unique'\n}, {\n weight: 110,\n key: 'validate.minLength',\n label: 'Minimum Length',\n placeholder: 'Minimum Length',\n type: 'number',\n tooltip: 'The minimum length requirement this field must meet.',\n input: true\n}, {\n weight: 120,\n key: 'validate.maxLength',\n label: 'Maximum Length',\n placeholder: 'Maximum Length',\n type: 'number',\n tooltip: 'The maximum length requirement this field must meet.',\n input: true\n}, {\n type: 'checkbox',\n input: true,\n weight: 105,\n key: 'rowDrafts',\n label: 'Enable Row Drafts',\n tooltip: 'Allow save rows even if their data is invalid. Errors will occur when try to submit with invalid rows.'\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/editgrid/editForm/EditGrid.edit.validation.js?"); /***/ }), @@ -1103,7 +1136,7 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _row = _interopRequireDefault(__webpack_require__(/*! ./row.ejs */ \"./lib/components/editgrid/templates/row.ejs.js\"));\n\nvar _header = _interopRequireDefault(__webpack_require__(/*! ./header.ejs */ \"./lib/components/editgrid/templates/header.ejs.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n row: _row.default,\n header: _header.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/editgrid/templates/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _row = _interopRequireDefault(__webpack_require__(/*! ./row.ejs */ \"./lib/components/editgrid/templates/row.ejs.js\"));\nvar _header = _interopRequireDefault(__webpack_require__(/*! ./header.ejs */ \"./lib/components/editgrid/templates/header.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n row: _row[\"default\"],\n header: _header[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/editgrid/templates/index.js?"); /***/ }), @@ -1124,7 +1157,7 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\nvar _TextField = _interopRequireDefault(__webpack_require__(/*! ../textfield/TextField.form */ \"./lib/components/textfield/TextField.form.js\"));\n\nvar _EmailEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/Email.edit.display */ \"./lib/components/email/editForm/Email.edit.display.js\"));\n\nvar _EmailEdit2 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Email.edit.validation */ \"./lib/components/email/editForm/Email.edit.validation.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _TextField.default.apply(void 0, [[{\n key: 'display',\n components: _EmailEdit.default\n }, {\n key: 'validation',\n components: _EmailEdit2.default\n }, {\n key: 'addons',\n ignore: true\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/email/Email.form.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\nvar _TextField = _interopRequireDefault(__webpack_require__(/*! ../textfield/TextField.form */ \"./lib/components/textfield/TextField.form.js\"));\nvar _EmailEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/Email.edit.display */ \"./lib/components/email/editForm/Email.edit.display.js\"));\nvar _EmailEdit2 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Email.edit.validation */ \"./lib/components/email/editForm/Email.edit.validation.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _TextField[\"default\"].apply(void 0, [[{\n key: 'display',\n components: _EmailEdit[\"default\"]\n }, {\n key: 'validation',\n components: _EmailEdit2[\"default\"]\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/email/Email.form.js?"); /***/ }), @@ -1135,7 +1168,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\nvar _TextField = _interopRequireDefault(__webpack_require__(/*! ../textfield/TextField */ \"./lib/components/textfield/TextField.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar EmailComponent = /*#__PURE__*/function (_TextFieldComponent) {\n _inherits(EmailComponent, _TextFieldComponent);\n\n var _super = _createSuper(EmailComponent);\n\n function EmailComponent() {\n _classCallCheck(this, EmailComponent);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(EmailComponent, [{\n key: \"init\",\n value: function init() {\n _get(_getPrototypeOf(EmailComponent.prototype), \"init\", this).call(this);\n\n this.validators.push('email');\n }\n }, {\n key: \"defaultSchema\",\n get: function get() {\n return EmailComponent.schema();\n }\n }, {\n key: \"inputInfo\",\n get: function get() {\n var info = _get(_getPrototypeOf(EmailComponent.prototype), \"inputInfo\", this);\n\n info.attr.type = this.component.mask ? 'password' : 'email';\n return info;\n }\n }, {\n key: \"normalizeValue\",\n value: function normalizeValue(value) {\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n value = _get(_getPrototypeOf(EmailComponent.prototype), \"normalizeValue\", this).call(this, value, flags);\n\n if (this.options.server && !!value) {\n if (Array.isArray(value)) {\n value = value.map(function (val) {\n return val.toLowerCase();\n });\n } else {\n value = value.toLowerCase();\n }\n }\n\n return value;\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _TextField.default.schema.apply(_TextField.default, [{\n type: 'email',\n label: 'Email',\n key: 'email',\n inputType: 'email',\n kickbox: {\n enabled: false\n }\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Email',\n group: 'advanced',\n icon: 'at',\n documentation: '/userguide/forms/form-components#email',\n weight: 10,\n schema: EmailComponent.schema()\n };\n }\n }]);\n\n return EmailComponent;\n}(_TextField.default);\n\nexports[\"default\"] = EmailComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/email/Email.js?"); +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.array.is-array.js */ \"./node_modules/core-js/modules/es.array.is-array.js\");\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _TextField = _interopRequireDefault(__webpack_require__(/*! ../textfield/TextField */ \"./lib/components/textfield/TextField.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar EmailComponent = /*#__PURE__*/function (_TextFieldComponent) {\n _inherits(EmailComponent, _TextFieldComponent);\n var _super = _createSuper(EmailComponent);\n function EmailComponent() {\n _classCallCheck(this, EmailComponent);\n return _super.apply(this, arguments);\n }\n _createClass(EmailComponent, [{\n key: \"init\",\n value: function init() {\n _get(_getPrototypeOf(EmailComponent.prototype), \"init\", this).call(this);\n this.validators.push('email');\n }\n }, {\n key: \"defaultSchema\",\n get: function get() {\n return EmailComponent.schema();\n }\n }, {\n key: \"inputInfo\",\n get: function get() {\n var info = _get(_getPrototypeOf(EmailComponent.prototype), \"inputInfo\", this);\n info.attr.type = this.component.mask ? 'password' : 'email';\n return info;\n }\n }, {\n key: \"normalizeValue\",\n value: function normalizeValue(value) {\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n value = _get(_getPrototypeOf(EmailComponent.prototype), \"normalizeValue\", this).call(this, value, flags);\n if (this.options.server && !!value) {\n if (Array.isArray(value)) {\n value = value.map(function (val) {\n return val.toLowerCase();\n });\n } else {\n value = value.toLowerCase();\n }\n }\n return value;\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _TextField[\"default\"].schema.apply(_TextField[\"default\"], [{\n type: 'email',\n label: 'Email',\n key: 'email',\n inputType: 'email',\n kickbox: {\n enabled: false\n }\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Email',\n group: 'advanced',\n icon: 'at',\n documentation: '/userguide/form-building/advanced-components#email',\n weight: 10,\n schema: EmailComponent.schema()\n };\n }\n }]);\n return EmailComponent;\n}(_TextField[\"default\"]);\nexports[\"default\"] = EmailComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/email/Email.js?"); /***/ }), @@ -1143,10 +1176,10 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /*!*************************************************************!*\ !*** ./lib/components/email/editForm/Email.edit.display.js ***! \*************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'inputMask',\n ignore: true\n}, {\n key: 'allowMultipleMasks',\n ignore: true\n}, {\n key: 'showWordCount',\n ignore: true\n}, {\n key: 'showCharCount',\n ignore: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/email/editForm/Email.edit.display.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'inputMask',\n ignore: true\n}, {\n key: 'allowMultipleMasks',\n ignore: true\n}, {\n key: 'showWordCount',\n ignore: true\n}, {\n key: 'showCharCount',\n ignore: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/email/editForm/Email.edit.display.js?"); /***/ }), @@ -1154,10 +1187,10 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /*!****************************************************************!*\ !*** ./lib/components/email/editForm/Email.edit.validation.js ***! \****************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'validate.minWords',\n ignore: true\n}, {\n key: 'validate.maxWords',\n ignore: true\n}, {\n type: 'panel',\n label: 'Kickbox',\n title: 'Kickbox',\n weight: 102,\n key: 'kickbox',\n components: [{\n type: 'checkbox',\n label: 'Enable',\n tooltip: 'Enable Kickbox validation for this email field.',\n description: 'Validate this email using the Kickbox email validation service.',\n key: 'kickbox.enabled'\n }]\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/email/editForm/Email.edit.validation.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'validate.minWords',\n ignore: true\n}, {\n key: 'validate.maxWords',\n ignore: true\n}, {\n type: 'panel',\n label: 'Kickbox',\n title: 'Kickbox',\n weight: 102,\n key: 'kickbox',\n components: [{\n type: 'checkbox',\n label: 'Enable',\n tooltip: 'Enable Kickbox validation for this email field.',\n description: 'Validate this email using the Kickbox email validation service.',\n key: 'kickbox.enabled'\n }]\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/email/editForm/Email.edit.validation.js?"); /***/ }), @@ -1168,7 +1201,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\nvar _NestedComponent = _interopRequireDefault(__webpack_require__(/*! ../_classes/nested/NestedComponent.form */ \"./lib/components/_classes/nested/NestedComponent.form.js\"));\n\nvar _FieldsetEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/Fieldset.edit.display */ \"./lib/components/fieldset/editForm/Fieldset.edit.display.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _NestedComponent.default.apply(void 0, [[{\n key: 'display',\n components: _FieldsetEdit.default\n }, {\n key: 'addons',\n ignore: true\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/fieldset/Fieldset.form.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\nvar _NestedComponent = _interopRequireDefault(__webpack_require__(/*! ../_classes/nested/NestedComponent.form */ \"./lib/components/_classes/nested/NestedComponent.form.js\"));\nvar _FieldsetEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/Fieldset.edit.display */ \"./lib/components/fieldset/editForm/Fieldset.edit.display.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _NestedComponent[\"default\"].apply(void 0, [[{\n key: 'display',\n components: _FieldsetEdit[\"default\"]\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/fieldset/Fieldset.form.js?"); /***/ }), @@ -1179,7 +1212,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\nvar _NestedComponent2 = _interopRequireDefault(__webpack_require__(/*! ../_classes/nested/NestedComponent */ \"./lib/components/_classes/nested/NestedComponent.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar FieldsetComponent = /*#__PURE__*/function (_NestedComponent) {\n _inherits(FieldsetComponent, _NestedComponent);\n\n var _super = _createSuper(FieldsetComponent);\n\n function FieldsetComponent() {\n var _this;\n\n _classCallCheck(this, FieldsetComponent);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n _this.noField = true;\n return _this;\n }\n\n _createClass(FieldsetComponent, [{\n key: \"defaultSchema\",\n get: function get() {\n return FieldsetComponent.schema();\n }\n }, {\n key: \"className\",\n get: function get() {\n return \"form-group \".concat(_get(_getPrototypeOf(FieldsetComponent.prototype), \"className\", this));\n }\n }, {\n key: \"templateName\",\n get: function get() {\n return 'fieldset';\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len2 = arguments.length, extend = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n extend[_key2] = arguments[_key2];\n }\n\n return _NestedComponent2.default.schema.apply(_NestedComponent2.default, [{\n label: 'Field Set',\n key: 'fieldSet',\n type: 'fieldset',\n legend: '',\n components: [],\n input: false,\n persistent: false\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Field Set',\n icon: 'th-large',\n group: 'layout',\n documentation: '/userguide/forms/layout-components#field-set',\n weight: 20,\n schema: FieldsetComponent.schema()\n };\n }\n }]);\n\n return FieldsetComponent;\n}(_NestedComponent2.default);\n\nexports[\"default\"] = FieldsetComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/fieldset/Fieldset.js?"); +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _NestedComponent2 = _interopRequireDefault(__webpack_require__(/*! ../_classes/nested/NestedComponent */ \"./lib/components/_classes/nested/NestedComponent.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar FieldsetComponent = /*#__PURE__*/function (_NestedComponent) {\n _inherits(FieldsetComponent, _NestedComponent);\n var _super = _createSuper(FieldsetComponent);\n function FieldsetComponent() {\n var _this;\n _classCallCheck(this, FieldsetComponent);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _this.noField = true;\n return _this;\n }\n _createClass(FieldsetComponent, [{\n key: \"defaultSchema\",\n get: function get() {\n return FieldsetComponent.schema();\n }\n }, {\n key: \"className\",\n get: function get() {\n return \"\".concat(this.transform('class', 'form-group'), \" \").concat(_get(_getPrototypeOf(FieldsetComponent.prototype), \"className\", this));\n }\n }, {\n key: \"templateName\",\n get: function get() {\n return 'fieldset';\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len2 = arguments.length, extend = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n extend[_key2] = arguments[_key2];\n }\n return _NestedComponent2[\"default\"].schema.apply(_NestedComponent2[\"default\"], [{\n label: 'Field Set',\n key: 'fieldSet',\n type: 'fieldset',\n legend: '',\n components: [],\n input: false,\n persistent: false\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Field Set',\n icon: 'th-large',\n group: 'layout',\n documentation: '/userguide/form-building/layout-components#field-set',\n weight: 20,\n schema: FieldsetComponent.schema()\n };\n }\n }]);\n return FieldsetComponent;\n}(_NestedComponent2[\"default\"]);\nexports[\"default\"] = FieldsetComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/fieldset/Fieldset.js?"); /***/ }), @@ -1187,10 +1220,10 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /*!*******************************************************************!*\ !*** ./lib/components/fieldset/editForm/Fieldset.edit.display.js ***! \*******************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'labelPosition',\n ignore: true\n}, {\n key: 'placeholder',\n ignore: true\n}, {\n key: 'description',\n ignore: true\n}, {\n key: 'hideLabel',\n ignore: true\n}, {\n key: 'autofocus',\n ignore: true\n}, {\n key: 'tableView',\n ignore: true\n}, {\n key: 'label',\n hidden: true,\n calculateValue: function calculateValue(context) {\n return context.data.legend;\n }\n}, {\n weight: 1,\n type: 'textfield',\n input: true,\n key: 'legend',\n label: 'Legend',\n placeholder: 'Legend',\n tooltip: 'The legend for this Fieldset.'\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/fieldset/editForm/Fieldset.edit.display.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'labelPosition',\n ignore: true\n}, {\n key: 'placeholder',\n ignore: true\n}, {\n key: 'description',\n ignore: true\n}, {\n key: 'hideLabel',\n ignore: true\n}, {\n key: 'autofocus',\n ignore: true\n}, {\n key: 'tableView',\n ignore: true\n}, {\n key: 'label',\n hidden: true,\n calculateValue: function calculateValue(context) {\n return context.data.legend;\n }\n}, {\n weight: 1,\n type: 'textfield',\n input: true,\n key: 'legend',\n label: 'Legend',\n placeholder: 'Legend',\n tooltip: 'The legend for this Fieldset.'\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/fieldset/editForm/Fieldset.edit.display.js?"); /***/ }), @@ -1201,7 +1234,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\nvar _Components = _interopRequireDefault(__webpack_require__(/*! ../Components */ \"./lib/components/Components.js\"));\n\nvar _FileEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/File.edit.data */ \"./lib/components/file/editForm/File.edit.data.js\"));\n\nvar _FileEdit2 = _interopRequireDefault(__webpack_require__(/*! ./editForm/File.edit.display */ \"./lib/components/file/editForm/File.edit.display.js\"));\n\nvar _FileEdit3 = _interopRequireDefault(__webpack_require__(/*! ./editForm/File.edit.file */ \"./lib/components/file/editForm/File.edit.file.js\"));\n\nvar _FileEdit4 = _interopRequireDefault(__webpack_require__(/*! ./editForm/File.edit.validation */ \"./lib/components/file/editForm/File.edit.validation.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _Components.default.baseEditForm.apply(_Components.default, [[{\n key: 'display',\n components: _FileEdit2.default\n }, {\n key: 'data',\n components: _FileEdit.default\n }, {\n label: 'File',\n key: 'file',\n weight: 5,\n components: _FileEdit3.default\n }, {\n key: 'validation',\n components: _FileEdit4.default\n }, {\n key: 'addons',\n ignore: true\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/file/File.form.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\nvar _Components = _interopRequireDefault(__webpack_require__(/*! ../Components */ \"./lib/components/Components.js\"));\nvar _FileEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/File.edit.data */ \"./lib/components/file/editForm/File.edit.data.js\"));\nvar _FileEdit2 = _interopRequireDefault(__webpack_require__(/*! ./editForm/File.edit.display */ \"./lib/components/file/editForm/File.edit.display.js\"));\nvar _FileEdit3 = _interopRequireDefault(__webpack_require__(/*! ./editForm/File.edit.file */ \"./lib/components/file/editForm/File.edit.file.js\"));\nvar _FileEdit4 = _interopRequireDefault(__webpack_require__(/*! ./editForm/File.edit.validation */ \"./lib/components/file/editForm/File.edit.validation.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _Components[\"default\"].baseEditForm.apply(_Components[\"default\"], [[{\n key: 'display',\n components: _FileEdit2[\"default\"]\n }, {\n key: 'data',\n components: _FileEdit[\"default\"]\n }, {\n label: 'File',\n key: 'file',\n weight: 5,\n components: _FileEdit3[\"default\"]\n }, {\n key: 'validation',\n components: _FileEdit4[\"default\"]\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/file/File.form.js?"); /***/ }), @@ -1212,7 +1245,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptors.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.async-iterator.js */ \"./node_modules/core-js/modules/es.symbol.async-iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.to-string-tag.js */ \"./node_modules/core-js/modules/es.symbol.to-string-tag.js\");\n\n__webpack_require__(/*! core-js/modules/es.json.to-string-tag.js */ \"./node_modules/core-js/modules/es.json.to-string-tag.js\");\n\n__webpack_require__(/*! core-js/modules/es.math.to-string-tag.js */ \"./node_modules/core-js/modules/es.math.to-string-tag.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.split.js */ \"./node_modules/core-js/modules/es.string.split.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.typed-array.uint8-array.js */ \"./node_modules/core-js/modules/es.typed-array.uint8-array.js\");\n\n__webpack_require__(/*! core-js/modules/es.typed-array.copy-within.js */ \"./node_modules/core-js/modules/es.typed-array.copy-within.js\");\n\n__webpack_require__(/*! core-js/modules/es.typed-array.every.js */ \"./node_modules/core-js/modules/es.typed-array.every.js\");\n\n__webpack_require__(/*! core-js/modules/es.typed-array.fill.js */ \"./node_modules/core-js/modules/es.typed-array.fill.js\");\n\n__webpack_require__(/*! core-js/modules/es.typed-array.filter.js */ \"./node_modules/core-js/modules/es.typed-array.filter.js\");\n\n__webpack_require__(/*! core-js/modules/es.typed-array.find.js */ \"./node_modules/core-js/modules/es.typed-array.find.js\");\n\n__webpack_require__(/*! core-js/modules/es.typed-array.find-index.js */ \"./node_modules/core-js/modules/es.typed-array.find-index.js\");\n\n__webpack_require__(/*! core-js/modules/es.typed-array.for-each.js */ \"./node_modules/core-js/modules/es.typed-array.for-each.js\");\n\n__webpack_require__(/*! core-js/modules/es.typed-array.includes.js */ \"./node_modules/core-js/modules/es.typed-array.includes.js\");\n\n__webpack_require__(/*! core-js/modules/es.typed-array.index-of.js */ \"./node_modules/core-js/modules/es.typed-array.index-of.js\");\n\n__webpack_require__(/*! core-js/modules/es.typed-array.iterator.js */ \"./node_modules/core-js/modules/es.typed-array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.typed-array.join.js */ \"./node_modules/core-js/modules/es.typed-array.join.js\");\n\n__webpack_require__(/*! core-js/modules/es.typed-array.last-index-of.js */ \"./node_modules/core-js/modules/es.typed-array.last-index-of.js\");\n\n__webpack_require__(/*! core-js/modules/es.typed-array.map.js */ \"./node_modules/core-js/modules/es.typed-array.map.js\");\n\n__webpack_require__(/*! core-js/modules/es.typed-array.reduce.js */ \"./node_modules/core-js/modules/es.typed-array.reduce.js\");\n\n__webpack_require__(/*! core-js/modules/es.typed-array.reduce-right.js */ \"./node_modules/core-js/modules/es.typed-array.reduce-right.js\");\n\n__webpack_require__(/*! core-js/modules/es.typed-array.reverse.js */ \"./node_modules/core-js/modules/es.typed-array.reverse.js\");\n\n__webpack_require__(/*! core-js/modules/es.typed-array.set.js */ \"./node_modules/core-js/modules/es.typed-array.set.js\");\n\n__webpack_require__(/*! core-js/modules/es.typed-array.slice.js */ \"./node_modules/core-js/modules/es.typed-array.slice.js\");\n\n__webpack_require__(/*! core-js/modules/es.typed-array.some.js */ \"./node_modules/core-js/modules/es.typed-array.some.js\");\n\n__webpack_require__(/*! core-js/modules/es.typed-array.sort.js */ \"./node_modules/core-js/modules/es.typed-array.sort.js\");\n\n__webpack_require__(/*! core-js/modules/es.typed-array.subarray.js */ \"./node_modules/core-js/modules/es.typed-array.subarray.js\");\n\n__webpack_require__(/*! core-js/modules/es.typed-array.to-locale-string.js */ \"./node_modules/core-js/modules/es.typed-array.to-locale-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.typed-array.to-string.js */ \"./node_modules/core-js/modules/es.typed-array.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.join.js */ \"./node_modules/core-js/modules/es.array.join.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.trim.js */ \"./node_modules/core-js/modules/es.string.trim.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.includes.js */ \"./node_modules/core-js/modules/es.array.includes.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.includes.js */ \"./node_modules/core-js/modules/es.string.includes.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.splice.js */ \"./node_modules/core-js/modules/es.array.splice.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.find.js */ \"./node_modules/core-js/modules/es.array.find.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.number.to-fixed.js */ \"./node_modules/core-js/modules/es.number.to-fixed.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.starts-with.js */ \"./node_modules/core-js/modules/es.string.starts-with.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.constructor.js */ \"./node_modules/core-js/modules/es.regexp.constructor.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.search.js */ \"./node_modules/core-js/modules/es.string.search.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.slice.js */ \"./node_modules/core-js/modules/es.array.slice.js\");\n\n__webpack_require__(/*! core-js/modules/es.promise.js */ \"./node_modules/core-js/modules/es.promise.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.find-index.js */ \"./node_modules/core-js/modules/es.array.find-index.js\");\n\nvar _Field2 = _interopRequireDefault(__webpack_require__(/*! ../_classes/field/Field */ \"./lib/components/_classes/field/Field.js\"));\n\nvar _utils = __webpack_require__(/*! ../../utils/utils */ \"./lib/utils/utils.js\");\n\nvar _downloadjs = _interopRequireDefault(__webpack_require__(/*! downloadjs */ \"./node_modules/downloadjs/download.js\"));\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\n\nvar _fileProcessor = _interopRequireDefault(__webpack_require__(/*! ../../providers/processor/fileProcessor */ \"./lib/providers/processor/fileProcessor.js\"));\n\nvar _browserMd5File = _interopRequireDefault(__webpack_require__(/*! browser-md5-file */ \"./node_modules/browser-md5-file/dist/index.umd.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _regeneratorRuntime() { \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = \"function\" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || \"@@iterator\", asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\", toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, \"\"); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return generator._invoke = function (innerFn, self, context) { var state = \"suspendedStart\"; return function (method, arg) { if (\"executing\" === state) throw new Error(\"Generator is already running\"); if (\"completed\" === state) { if (\"throw\" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if (\"next\" === context.method) context.sent = context._sent = context.arg;else if (\"throw\" === context.method) { if (\"suspendedStart\" === state) throw state = \"completed\", context.arg; context.dispatchException(context.arg); } else \"return\" === context.method && context.abrupt(\"return\", context.arg); state = \"executing\"; var record = tryCatch(innerFn, self, context); if (\"normal\" === record.type) { if (state = context.done ? \"completed\" : \"suspendedYield\", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } \"throw\" === record.type && (state = \"completed\", context.method = \"throw\", context.arg = record.arg); } }; }(innerFn, self, context), generator; } function tryCatch(fn, obj, arg) { try { return { type: \"normal\", arg: fn.call(obj, arg) }; } catch (err) { return { type: \"throw\", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { [\"next\", \"throw\", \"return\"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if (\"throw\" !== record.type) { var result = record.arg, value = result.value; return value && \"object\" == _typeof(value) && hasOwn.call(value, \"__await\") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke(\"next\", value, resolve, reject); }, function (err) { invoke(\"throw\", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke(\"throw\", error, resolve, reject); }); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, \"throw\" === context.method) { if (delegate.iterator.return && (context.method = \"return\", context.arg = undefined, maybeInvokeDelegate(delegate, context), \"throw\" === context.method)) return ContinueSentinel; context.method = \"throw\", context.arg = new TypeError(\"The iterator does not provide a 'throw' method\"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if (\"throw\" === record.type) return context.method = \"throw\", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, \"return\" !== context.method && (context.method = \"next\", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = \"throw\", context.arg = new TypeError(\"iterator result is not an object\"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = \"normal\", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: \"root\" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if (\"function\" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, \"constructor\", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, \"constructor\", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, \"GeneratorFunction\"), exports.isGeneratorFunction = function (genFun) { var ctor = \"function\" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || \"GeneratorFunction\" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, \"GeneratorFunction\")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, \"Generator\"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, \"toString\", function () { return \"[object Generator]\"; }), exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { \"t\" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if (\"throw\" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = \"throw\", record.arg = exception, context.next = loc, caught && (context.method = \"next\", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if (\"root\" === entry.tryLoc) return handle(\"end\"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, \"catchLoc\"), hasFinally = hasOwn.call(entry, \"finallyLoc\"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error(\"try statement without catch or finally\"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, \"finallyLoc\") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && (\"break\" === type || \"continue\" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = \"next\", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if (\"throw\" === record.type) throw record.arg; return \"break\" === record.type || \"continue\" === record.type ? this.next = record.arg : \"return\" === record.type ? (this.rval = this.arg = record.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if (\"throw\" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error(\"illegal catch attempt\"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, \"next\" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }\n\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }\n\nfunction _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err); } _next(undefined); }); }; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar Camera;\nvar webViewCamera = navigator.camera || Camera; // canvas.toBlob polyfill.\n\nvar htmlCanvasElement;\n\nif (typeof window !== 'undefined') {\n htmlCanvasElement = window.HTMLCanvasElement;\n} else if (typeof __webpack_require__.g !== 'undefined') {\n htmlCanvasElement = __webpack_require__.g.HTMLCanvasElement;\n}\n\nif (htmlCanvasElement && !htmlCanvasElement.prototype.toBlob) {\n Object.defineProperty(HTMLCanvasElement.prototype, 'toBlob', {\n value: function value(callback, type, quality) {\n var canvas = this;\n setTimeout(function () {\n var binStr = atob(canvas.toDataURL(type, quality).split(',')[1]),\n len = binStr.length,\n arr = new Uint8Array(len);\n\n for (var i = 0; i < len; i++) {\n arr[i] = binStr.charCodeAt(i);\n }\n\n callback(new Blob([arr], {\n type: type || 'image/png'\n }));\n });\n }\n });\n}\n\nvar FileComponent = /*#__PURE__*/function (_Field) {\n _inherits(FileComponent, _Field);\n\n var _super = _createSuper(FileComponent);\n\n function FileComponent() {\n _classCallCheck(this, FileComponent);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(FileComponent, [{\n key: \"init\",\n value: function init() {\n var _this = this;\n\n _get(_getPrototypeOf(FileComponent.prototype), \"init\", this).call(this);\n\n webViewCamera = navigator.camera || Camera;\n var fileReaderSupported = typeof FileReader !== 'undefined';\n var formDataSupported = typeof window !== 'undefined' ? Boolean(window.FormData) : false;\n var progressSupported = typeof window !== 'undefined' && window.XMLHttpRequest ? 'upload' in new XMLHttpRequest() : false;\n this.support = {\n filereader: fileReaderSupported,\n formdata: formDataSupported,\n hasWarning: !fileReaderSupported || !formDataSupported || !progressSupported,\n progress: progressSupported\n }; // Called when our files are ready.\n\n this.filesReady = new _nativePromiseOnly.default(function (resolve, reject) {\n _this.filesReadyResolve = resolve;\n _this.filesReadyReject = reject;\n });\n this.cameraMode = false;\n this.statuses = [];\n this.fileDropHidden = false;\n }\n }, {\n key: \"dataReady\",\n get: function get() {\n return this.filesReady;\n }\n }, {\n key: \"defaultSchema\",\n get: function get() {\n return FileComponent.schema();\n }\n }, {\n key: \"loadImage\",\n value: function loadImage(fileInfo) {\n if (this.component.privateDownload) {\n fileInfo.private = true;\n }\n\n return this.fileService.downloadFile(fileInfo).then(function (result) {\n return result.url;\n });\n }\n }, {\n key: \"emptyValue\",\n get: function get() {\n return [];\n }\n }, {\n key: \"getValueAsString\",\n value: function getValueAsString(value) {\n if (_lodash.default.isArray(value)) {\n return _lodash.default.map(value, 'originalName').join(', ');\n }\n\n return _lodash.default.get(value, 'originalName', '');\n }\n }, {\n key: \"getValue\",\n value: function getValue() {\n return this.dataValue;\n }\n }, {\n key: \"defaultValue\",\n get: function get() {\n var value = _get(_getPrototypeOf(FileComponent.prototype), \"defaultValue\", this);\n\n return Array.isArray(value) ? value : [];\n }\n }, {\n key: \"hasTypes\",\n get: function get() {\n return this.component.fileTypes && Array.isArray(this.component.fileTypes) && this.component.fileTypes.length !== 0 && (this.component.fileTypes[0].label !== '' || this.component.fileTypes[0].value !== '');\n }\n }, {\n key: \"fileDropHidden\",\n get: function get() {\n return this._fileBrowseHidden;\n },\n set: function set(value) {\n if (typeof value !== 'boolean' || this.component.multiple) {\n return;\n }\n\n this._fileBrowseHidden = value;\n }\n }, {\n key: \"render\",\n value: function render() {\n return _get(_getPrototypeOf(FileComponent.prototype), \"render\", this).call(this, this.renderTemplate('file', {\n fileSize: this.fileSize,\n files: this.dataValue || [],\n statuses: this.statuses,\n disabled: this.disabled,\n support: this.support,\n fileDropHidden: this.fileDropHidden\n }));\n }\n }, {\n key: \"getVideoStream\",\n value: function getVideoStream(constraints) {\n return navigator.mediaDevices.getUserMedia({\n video: _objectSpread({\n width: {\n min: 640,\n ideal: 1920\n },\n height: {\n min: 360,\n ideal: 1080\n },\n aspectRatio: {\n ideal: 16 / 9\n }\n }, constraints),\n audio: false\n });\n }\n }, {\n key: \"stopVideoStream\",\n value: function stopVideoStream(videoStream) {\n videoStream.getVideoTracks().forEach(function (track) {\n return track.stop();\n });\n }\n }, {\n key: \"getFrame\",\n value: function getFrame(videoPlayer) {\n return new _nativePromiseOnly.default(function (resolve) {\n var canvas = document.createElement('canvas');\n canvas.height = videoPlayer.videoHeight;\n canvas.width = videoPlayer.videoWidth;\n var context = canvas.getContext('2d');\n context.drawImage(videoPlayer, 0, 0);\n canvas.toBlob(resolve);\n });\n }\n }, {\n key: \"startVideo\",\n value: function startVideo() {\n var _this2 = this;\n\n this.getVideoStream().then(function (stream) {\n _this2.videoStream = stream;\n var videoPlayer = _this2.refs.videoPlayer;\n\n if (!videoPlayer) {\n console.warn('Video player not found in template.');\n _this2.cameraMode = false;\n\n _this2.redraw();\n\n return;\n }\n\n videoPlayer.srcObject = stream;\n var width = parseInt(_this2.component.webcamSize) || 320;\n videoPlayer.setAttribute('width', width);\n videoPlayer.play();\n }).catch(function (err) {\n console.error(err);\n _this2.cameraMode = false;\n\n _this2.redraw();\n });\n }\n }, {\n key: \"stopVideo\",\n value: function stopVideo() {\n if (this.videoStream) {\n this.stopVideoStream(this.videoStream);\n this.videoStream = null;\n }\n }\n }, {\n key: \"takePicture\",\n value: function takePicture() {\n var _this3 = this;\n\n var videoPlayer = this.refs.videoPlayer;\n\n if (!videoPlayer) {\n console.warn('Video player not found in template.');\n this.cameraMode = false;\n this.redraw();\n return;\n }\n\n this.getFrame(videoPlayer).then(function (frame) {\n frame.name = \"photo-\".concat(Date.now(), \".png\");\n\n _this3.upload([frame]);\n\n _this3.cameraMode = false;\n\n _this3.redraw();\n });\n }\n }, {\n key: \"browseFiles\",\n value: function browseFiles() {\n var _this4 = this;\n\n var attrs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n return new _nativePromiseOnly.default(function (resolve) {\n var fileInput = _this4.ce('input', _objectSpread({\n type: 'file',\n style: 'height: 0; width: 0; visibility: hidden;',\n tabindex: '-1'\n }, attrs));\n\n document.body.appendChild(fileInput);\n fileInput.addEventListener('change', function () {\n resolve(fileInput.files);\n document.body.removeChild(fileInput);\n }, true); // There is no direct way to trigger a file dialog. To work around this, create an input of type file and trigger\n // a click event on it.\n\n if (typeof fileInput.trigger === 'function') {\n fileInput.trigger('click');\n } else {\n fileInput.click();\n }\n });\n }\n }, {\n key: \"cameraMode\",\n get: function get() {\n return this._cameraMode;\n },\n set: function set(value) {\n this._cameraMode = value;\n\n if (value) {\n this.startVideo();\n } else {\n this.stopVideo();\n }\n }\n }, {\n key: \"useWebViewCamera\",\n get: function get() {\n return this.imageUpload && webViewCamera;\n }\n }, {\n key: \"imageUpload\",\n get: function get() {\n return Boolean(this.component.image);\n }\n }, {\n key: \"browseOptions\",\n get: function get() {\n var options = {};\n\n if (this.component.multiple) {\n options.multiple = true;\n } //use \"accept\" attribute only for desktop devices because of its limited support by mobile browsers\n\n\n if (!this.isMobile.any) {\n var filePattern = this.component.filePattern.trim() || '';\n var imagesPattern = 'image/*';\n\n if (this.imageUpload && (!filePattern || filePattern === '*')) {\n options.accept = imagesPattern;\n } else if (this.imageUpload && !filePattern.includes(imagesPattern)) {\n options.accept = \"\".concat(imagesPattern, \",\").concat(filePattern);\n } else {\n options.accept = filePattern;\n }\n }\n\n return options;\n }\n }, {\n key: \"deleteFile\",\n value: function deleteFile(fileInfo) {\n var _this$component$optio = this.component.options,\n options = _this$component$optio === void 0 ? {} : _this$component$optio;\n\n if (fileInfo && ['url', 'indexeddb'].includes(this.component.storage)) {\n var fileService = this.fileService;\n\n if (fileService && typeof fileService.deleteFile === 'function') {\n fileService.deleteFile(fileInfo, options);\n } else {\n var formio = this.options.formio || this.root && this.root.formio;\n\n if (formio) {\n formio.makeRequest('', fileInfo.url, 'delete');\n }\n }\n }\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n var _this5 = this;\n\n this.loadRefs(element, {\n fileDrop: 'single',\n fileBrowse: 'single',\n galleryButton: 'single',\n cameraButton: 'single',\n takePictureButton: 'single',\n toggleCameraMode: 'single',\n videoPlayer: 'single',\n fileLink: 'multiple',\n removeLink: 'multiple',\n fileStatusRemove: 'multiple',\n fileImage: 'multiple',\n fileType: 'multiple',\n fileProcessingLoader: 'single'\n }); // Ensure we have an empty input refs. We need this for the setValue method to redraw the control when it is set.\n\n this.refs.input = [];\n\n var superAttach = _get(_getPrototypeOf(FileComponent.prototype), \"attach\", this).call(this, element);\n\n if (this.refs.fileDrop) {\n if (!this.statuses.length) {\n this.refs.fileDrop.removeAttribute('hidden');\n }\n\n var _element = this;\n\n this.addEventListener(this.refs.fileDrop, 'dragover', function (event) {\n this.className = 'fileSelector fileDragOver';\n event.preventDefault();\n });\n this.addEventListener(this.refs.fileDrop, 'dragleave', function (event) {\n this.className = 'fileSelector';\n event.preventDefault();\n });\n this.addEventListener(this.refs.fileDrop, 'drop', function (event) {\n this.className = 'fileSelector';\n event.preventDefault();\n\n _element.upload(event.dataTransfer.files);\n });\n }\n\n if (this.refs.fileBrowse) {\n this.addEventListener(this.refs.fileBrowse, 'click', function (event) {\n event.preventDefault();\n\n _this5.browseFiles(_this5.browseOptions).then(function (files) {\n _this5.upload(files);\n });\n });\n }\n\n this.refs.fileLink.forEach(function (fileLink, index) {\n _this5.addEventListener(fileLink, 'click', function (event) {\n event.preventDefault();\n\n _this5.getFile(_this5.dataValue[index]);\n });\n });\n this.refs.removeLink.forEach(function (removeLink, index) {\n _this5.addEventListener(removeLink, 'click', function (event) {\n var fileInfo = _this5.dataValue[index];\n\n _this5.deleteFile(fileInfo);\n\n event.preventDefault();\n\n _this5.splice(index);\n\n _this5.redraw();\n });\n });\n this.refs.fileStatusRemove.forEach(function (fileStatusRemove, index) {\n _this5.addEventListener(fileStatusRemove, 'click', function (event) {\n event.preventDefault();\n\n if (_this5.abortUpload) {\n _this5.abortUpload();\n }\n\n _this5.statuses.splice(index, 1);\n\n _this5.redraw();\n });\n });\n\n if (this.refs.galleryButton && webViewCamera) {\n this.addEventListener(this.refs.galleryButton, 'click', function (event) {\n event.preventDefault();\n webViewCamera.getPicture(function (success) {\n window.resolveLocalFileSystemURL(success, function (fileEntry) {\n fileEntry.file(function (file) {\n var reader = new FileReader();\n\n reader.onloadend = function (evt) {\n var blob = new Blob([new Uint8Array(evt.target.result)], {\n type: file.type\n });\n blob.name = file.name;\n\n _this5.upload([blob]);\n };\n\n reader.readAsArrayBuffer(file);\n });\n });\n }, function (err) {\n console.error(err);\n }, {\n sourceType: webViewCamera.PictureSourceType.PHOTOLIBRARY\n });\n });\n }\n\n if (this.refs.cameraButton && webViewCamera) {\n this.addEventListener(this.refs.cameraButton, 'click', function (event) {\n event.preventDefault();\n webViewCamera.getPicture(function (success) {\n window.resolveLocalFileSystemURL(success, function (fileEntry) {\n fileEntry.file(function (file) {\n var reader = new FileReader();\n\n reader.onloadend = function (evt) {\n var blob = new Blob([new Uint8Array(evt.target.result)], {\n type: file.type\n });\n blob.name = file.name;\n\n _this5.upload([blob]);\n };\n\n reader.readAsArrayBuffer(file);\n });\n });\n }, function (err) {\n console.error(err);\n }, {\n sourceType: webViewCamera.PictureSourceType.CAMERA,\n encodingType: webViewCamera.EncodingType.PNG,\n mediaType: webViewCamera.MediaType.PICTURE,\n saveToPhotoAlbum: true,\n correctOrientation: false\n });\n });\n }\n\n if (this.refs.takePictureButton) {\n this.addEventListener(this.refs.takePictureButton, 'click', function (event) {\n event.preventDefault();\n\n _this5.takePicture();\n });\n }\n\n if (this.refs.toggleCameraMode) {\n this.addEventListener(this.refs.toggleCameraMode, 'click', function (event) {\n event.preventDefault();\n _this5.cameraMode = !_this5.cameraMode;\n\n _this5.redraw();\n });\n }\n\n this.refs.fileType.forEach(function (fileType, index) {\n _this5.dataValue[index].fileType = _this5.dataValue[index].fileType || _this5.component.fileTypes[0].label;\n\n _this5.addEventListener(fileType, 'change', function (event) {\n event.preventDefault();\n\n var fileType = _this5.component.fileTypes.find(function (typeObj) {\n return typeObj.value === event.target.value;\n });\n\n _this5.dataValue[index].fileType = fileType.label;\n });\n });\n var fileService = this.fileService;\n\n if (fileService) {\n var loadingImages = [];\n this.refs.fileImage.forEach(function (image, index) {\n loadingImages.push(_this5.loadImage(_this5.dataValue[index]).then(function (url) {\n return image.src = url;\n }));\n });\n\n if (loadingImages.length) {\n _nativePromiseOnly.default.all(loadingImages).then(function () {\n _this5.filesReadyResolve();\n }).catch(function () {\n return _this5.filesReadyReject();\n });\n } else {\n this.filesReadyResolve();\n }\n }\n\n return superAttach;\n }\n /* eslint-disable max-len */\n\n }, {\n key: \"fileSize\",\n value: function fileSize(a, b, c, d, e) {\n return \"\".concat((b = Math, c = b.log, d = 1024, e = c(a) / c(d) | 0, a / b.pow(d, e)).toFixed(2), \" \").concat(e ? \"\".concat('kMGTPEZY'[--e], \"B\") : 'Bytes');\n }\n /* eslint-enable max-len */\n\n /* eslint-disable max-depth */\n\n }, {\n key: \"globStringToRegex\",\n value: function globStringToRegex(str) {\n str = str.replace(/\\s/g, '');\n var regexp = '',\n excludes = [];\n\n if (str.length > 2 && str[0] === '/' && str[str.length - 1] === '/') {\n regexp = str.substring(1, str.length - 1);\n } else {\n var split = str.split(',');\n\n if (split.length > 1) {\n for (var i = 0; i < split.length; i++) {\n var r = this.globStringToRegex(split[i]);\n\n if (r.regexp) {\n regexp += \"(\".concat(r.regexp, \")\");\n\n if (i < split.length - 1) {\n regexp += '|';\n }\n } else {\n excludes = excludes.concat(r.excludes);\n }\n }\n } else {\n if (str.startsWith('!')) {\n excludes.push(\"^((?!\".concat(this.globStringToRegex(str.substring(1)).regexp, \").)*$\"));\n } else {\n if (str.startsWith('.')) {\n str = \"*\".concat(str);\n }\n\n regexp = \"^\".concat(str.replace(new RegExp('[.\\\\\\\\+*?\\\\[\\\\^\\\\]$(){}=!<>|:\\\\-]', 'g'), '\\\\$&'), \"$\");\n regexp = regexp.replace(/\\\\\\*/g, '.*').replace(/\\\\\\?/g, '.');\n }\n }\n }\n\n return {\n regexp: regexp,\n excludes: excludes\n };\n }\n /* eslint-enable max-depth */\n\n }, {\n key: \"translateScalars\",\n value: function translateScalars(str) {\n if (typeof str === 'string') {\n if (str.search(/kb/i) === str.length - 2) {\n return parseFloat(str.substring(0, str.length - 2) * 1024);\n }\n\n if (str.search(/mb/i) === str.length - 2) {\n return parseFloat(str.substring(0, str.length - 2) * 1024 * 1024);\n }\n\n if (str.search(/gb/i) === str.length - 2) {\n return parseFloat(str.substring(0, str.length - 2) * 1024 * 1024 * 1024);\n }\n\n if (str.search(/b/i) === str.length - 1) {\n return parseFloat(str.substring(0, str.length - 1));\n }\n\n if (str.search(/s/i) === str.length - 1) {\n return parseFloat(str.substring(0, str.length - 1));\n }\n\n if (str.search(/m/i) === str.length - 1) {\n return parseFloat(str.substring(0, str.length - 1) * 60);\n }\n\n if (str.search(/h/i) === str.length - 1) {\n return parseFloat(str.substring(0, str.length - 1) * 3600);\n }\n }\n\n return str;\n }\n }, {\n key: \"validatePattern\",\n value: function validatePattern(file, val) {\n if (!val) {\n return true;\n }\n\n var pattern = this.globStringToRegex(val);\n var valid = true;\n\n if (pattern.regexp && pattern.regexp.length) {\n var regexp = new RegExp(pattern.regexp, 'i');\n valid = !_lodash.default.isNil(file.type) && regexp.test(file.type) || !_lodash.default.isNil(file.name) && regexp.test(file.name);\n }\n\n valid = pattern.excludes.reduce(function (result, excludePattern) {\n var exclude = new RegExp(excludePattern, 'i');\n return result && (_lodash.default.isNil(file.type) || !exclude.test(file.type)) && (_lodash.default.isNil(file.name) || !exclude.test(file.name));\n }, valid);\n return valid;\n }\n }, {\n key: \"validateMinSize\",\n value: function validateMinSize(file, val) {\n return file.size + 0.1 >= this.translateScalars(val);\n }\n }, {\n key: \"validateMaxSize\",\n value: function validateMaxSize(file, val) {\n return file.size - 0.1 <= this.translateScalars(val);\n }\n }, {\n key: \"upload\",\n value: function upload(files) {\n var _this6 = this;\n\n // Only allow one upload if not multiple.\n if (!this.component.multiple) {\n if (this.statuses.length) {\n this.statuses = [];\n }\n\n files = Array.prototype.slice.call(files, 0, 1);\n }\n\n if (this.component.storage && files && files.length) {\n this.fileDropHidden = true; // files is not really an array and does not have a forEach method, so fake it.\n\n /* eslint-disable max-statements */\n\n Array.prototype.forEach.call(files, /*#__PURE__*/function () {\n var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(file) {\n var bmf, hash, fileName, fileUpload, fileWithSameNameUploaded, fileWithSameNameUploadedWithError, dir, fileService, _this6$component, storage, _this6$component$opti, options, url, groupKey, groupPermissions, fileKey, groupResourceId, processedFile, fileProcessorHandler, filePromise;\n\n return _regeneratorRuntime().wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n bmf = new _browserMd5File.default();\n _context.next = 3;\n return new Promise(function (resolve, reject) {\n bmf.md5(file, function (err, md5) {\n if (err) {\n return reject(err);\n }\n\n return resolve(md5);\n });\n });\n\n case 3:\n hash = _context.sent;\n fileName = (0, _utils.uniqueName)(file.name, _this6.component.fileNameTemplate, _this6.evalContext());\n fileUpload = {\n originalName: file.name,\n name: fileName,\n size: file.size,\n status: 'info',\n message: _this6.t('Processing file. Please wait...'),\n hash: hash\n }; // Check if file with the same name is being uploaded\n\n fileWithSameNameUploaded = _this6.dataValue.some(function (fileStatus) {\n return fileStatus.originalName === file.name;\n });\n fileWithSameNameUploadedWithError = _this6.statuses.findIndex(function (fileStatus) {\n return fileStatus.originalName === file.name && fileStatus.status === 'error';\n });\n\n if (fileWithSameNameUploaded) {\n fileUpload.status = 'error';\n fileUpload.message = _this6.t('File with the same name is already uploaded');\n }\n\n if (fileWithSameNameUploadedWithError !== -1) {\n _this6.statuses.splice(fileWithSameNameUploadedWithError, 1);\n\n _this6.redraw();\n } // Check file pattern\n\n\n if (_this6.component.filePattern && !_this6.validatePattern(file, _this6.component.filePattern)) {\n fileUpload.status = 'error';\n fileUpload.message = _this6.t('File is the wrong type; it must be {{ pattern }}', {\n pattern: _this6.component.filePattern\n });\n } // Check file minimum size\n\n\n if (_this6.component.fileMinSize && !_this6.validateMinSize(file, _this6.component.fileMinSize)) {\n fileUpload.status = 'error';\n fileUpload.message = _this6.t('File is too small; it must be at least {{ size }}', {\n size: _this6.component.fileMinSize\n });\n } // Check file maximum size\n\n\n if (_this6.component.fileMaxSize && !_this6.validateMaxSize(file, _this6.component.fileMaxSize)) {\n fileUpload.status = 'error';\n fileUpload.message = _this6.t('File is too big; it must be at most {{ size }}', {\n size: _this6.component.fileMaxSize\n });\n } // Get a unique name for this file to keep file collisions from occurring.\n\n\n dir = _this6.interpolate(_this6.component.dir || '');\n fileService = _this6.fileService;\n\n if (!fileService) {\n fileUpload.status = 'error';\n fileUpload.message = _this6.t('File Service not provided.');\n }\n\n _this6.statuses.push(fileUpload);\n\n _this6.redraw();\n\n if (!(fileUpload.status !== 'error')) {\n _context.next = 50;\n break;\n }\n\n if (_this6.component.privateDownload) {\n file.private = true;\n }\n\n _this6$component = _this6.component, storage = _this6$component.storage, _this6$component$opti = _this6$component.options, options = _this6$component$opti === void 0 ? {} : _this6$component$opti;\n url = _this6.interpolate(_this6.component.url, {\n file: fileUpload\n });\n groupKey = null;\n groupPermissions = null; //Iterate through form components to find group resource if one exists\n\n _this6.root.everyComponent(function (element) {\n var _element$component, _element$component2;\n\n if ((_element$component = element.component) !== null && _element$component !== void 0 && _element$component.submissionAccess || (_element$component2 = element.component) !== null && _element$component2 !== void 0 && _element$component2.defaultPermission) {\n groupPermissions = !element.component.submissionAccess ? [{\n type: element.component.defaultPermission,\n roles: []\n }] : element.component.submissionAccess;\n groupPermissions.forEach(function (permission) {\n groupKey = ['admin', 'write', 'create'].includes(permission.type) ? element.component.key : null;\n });\n }\n });\n\n fileKey = _this6.component.fileKey || 'file';\n groupResourceId = groupKey ? _this6.currentForm.submission.data[groupKey]._id : null;\n processedFile = null;\n\n if (!_this6.root.options.fileProcessor) {\n _context.next = 47;\n break;\n }\n\n _context.prev = 29;\n\n if (_this6.refs.fileProcessingLoader) {\n _this6.refs.fileProcessingLoader.style.display = 'block';\n }\n\n fileProcessorHandler = (0, _fileProcessor.default)(_this6.fileService, _this6.root.options.fileProcessor);\n _context.next = 34;\n return fileProcessorHandler(file, _this6.component.properties);\n\n case 34:\n processedFile = _context.sent;\n _context.next = 44;\n break;\n\n case 37:\n _context.prev = 37;\n _context.t0 = _context[\"catch\"](29);\n fileUpload.status = 'error';\n fileUpload.message = _this6.t('File processing has been failed.');\n _this6.fileDropHidden = false;\n\n _this6.redraw();\n\n return _context.abrupt(\"return\");\n\n case 44:\n _context.prev = 44;\n\n if (_this6.refs.fileProcessingLoader) {\n _this6.refs.fileProcessingLoader.style.display = 'none';\n }\n\n return _context.finish(44);\n\n case 47:\n fileUpload.message = _this6.t('Starting upload.');\n\n _this6.redraw();\n\n filePromise = fileService.uploadFile(storage, processedFile || file, fileName, dir, // Progress callback\n function (evt) {\n fileUpload.status = 'progress';\n fileUpload.progress = parseInt(100.0 * evt.loaded / evt.total);\n delete fileUpload.message;\n\n _this6.redraw();\n }, url, options, fileKey, groupPermissions, groupResourceId, // Upload start callback\n function () {\n _this6.emit('fileUploadingStart', filePromise);\n }, // Abort upload callback\n function (abort) {\n return _this6.abortUpload = abort;\n }).then(function (fileInfo) {\n var index = _this6.statuses.indexOf(fileUpload);\n\n if (index !== -1) {\n _this6.statuses.splice(index, 1);\n }\n\n fileInfo.originalName = file.name;\n fileInfo.hash = fileUpload.hash;\n\n if (!_this6.hasValue()) {\n _this6.dataValue = [];\n }\n\n _this6.dataValue.push(fileInfo);\n\n _this6.fileDropHidden = false;\n\n _this6.redraw();\n\n _this6.triggerChange();\n\n _this6.emit('fileUploadingEnd', filePromise);\n }).catch(function (response) {\n fileUpload.status = 'error';\n fileUpload.message = typeof response === 'string' ? response : response.toString();\n delete fileUpload.progress;\n _this6.fileDropHidden = false;\n\n _this6.redraw();\n\n _this6.emit('fileUploadingEnd', filePromise);\n });\n\n case 50:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, null, [[29, 37, 44, 47]]);\n }));\n\n return function (_x) {\n return _ref.apply(this, arguments);\n };\n }());\n }\n }\n }, {\n key: \"getFile\",\n value: function getFile(fileInfo) {\n var _this$component$optio2 = this.component.options,\n options = _this$component$optio2 === void 0 ? {} : _this$component$optio2;\n var fileService = this.fileService;\n\n if (!fileService) {\n return alert('File Service not provided');\n }\n\n if (this.component.privateDownload) {\n fileInfo.private = true;\n }\n\n fileService.downloadFile(fileInfo, options).then(function (file) {\n if (file) {\n if (['base64', 'indexeddb'].includes(file.storage)) {\n (0, _downloadjs.default)(file.url, file.originalName || file.name, file.type);\n } else {\n window.open(file.url, '_blank');\n }\n }\n }).catch(function (response) {\n // Is alert the best way to do this?\n // User is expecting an immediate notification due to attempting to download a file.\n alert(response);\n });\n }\n }, {\n key: \"focus\",\n value: function focus() {\n if ('beforeFocus' in this.parent) {\n this.parent.beforeFocus(this);\n }\n\n if (this.refs.fileBrowse) {\n this.refs.fileBrowse.focus();\n }\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.stopVideo();\n\n _get(_getPrototypeOf(FileComponent.prototype), \"destroy\", this).call(this);\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _Field2.default.schema.apply(_Field2.default, [{\n type: 'file',\n label: 'Upload',\n key: 'file',\n image: false,\n privateDownload: false,\n imageSize: '200',\n filePattern: '*',\n fileMinSize: '0KB',\n fileMaxSize: '1GB',\n uploadOnly: false\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'File',\n group: 'premium',\n icon: 'file',\n documentation: '/userguide/forms/premium-components#file',\n weight: 100,\n schema: FileComponent.schema()\n };\n }\n }]);\n\n return FileComponent;\n}(_Field2.default);\n\nexports[\"default\"] = FileComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/file/File.js?"); +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptors.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-properties.js */ \"./node_modules/core-js/modules/es.object.define-properties.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.async-iterator.js */ \"./node_modules/core-js/modules/es.symbol.async-iterator.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-string-tag.js */ \"./node_modules/core-js/modules/es.symbol.to-string-tag.js\");\n__webpack_require__(/*! core-js/modules/es.json.to-string-tag.js */ \"./node_modules/core-js/modules/es.json.to-string-tag.js\");\n__webpack_require__(/*! core-js/modules/es.math.to-string-tag.js */ \"./node_modules/core-js/modules/es.math.to-string-tag.js\");\n__webpack_require__(/*! core-js/modules/es.array.reverse.js */ \"./node_modules/core-js/modules/es.array.reverse.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/web.timers.js */ \"./node_modules/core-js/modules/web.timers.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array-buffer.slice.js */ \"./node_modules/core-js/modules/es.array-buffer.slice.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.typed-array.uint8-array.js */ \"./node_modules/core-js/modules/es.typed-array.uint8-array.js\");\n__webpack_require__(/*! core-js/modules/es.typed-array.copy-within.js */ \"./node_modules/core-js/modules/es.typed-array.copy-within.js\");\n__webpack_require__(/*! core-js/modules/es.typed-array.every.js */ \"./node_modules/core-js/modules/es.typed-array.every.js\");\n__webpack_require__(/*! core-js/modules/es.typed-array.fill.js */ \"./node_modules/core-js/modules/es.typed-array.fill.js\");\n__webpack_require__(/*! core-js/modules/es.typed-array.filter.js */ \"./node_modules/core-js/modules/es.typed-array.filter.js\");\n__webpack_require__(/*! core-js/modules/es.typed-array.find.js */ \"./node_modules/core-js/modules/es.typed-array.find.js\");\n__webpack_require__(/*! core-js/modules/es.typed-array.find-index.js */ \"./node_modules/core-js/modules/es.typed-array.find-index.js\");\n__webpack_require__(/*! core-js/modules/es.typed-array.for-each.js */ \"./node_modules/core-js/modules/es.typed-array.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.typed-array.includes.js */ \"./node_modules/core-js/modules/es.typed-array.includes.js\");\n__webpack_require__(/*! core-js/modules/es.typed-array.index-of.js */ \"./node_modules/core-js/modules/es.typed-array.index-of.js\");\n__webpack_require__(/*! core-js/modules/es.typed-array.iterator.js */ \"./node_modules/core-js/modules/es.typed-array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.typed-array.join.js */ \"./node_modules/core-js/modules/es.typed-array.join.js\");\n__webpack_require__(/*! core-js/modules/es.typed-array.last-index-of.js */ \"./node_modules/core-js/modules/es.typed-array.last-index-of.js\");\n__webpack_require__(/*! core-js/modules/es.typed-array.map.js */ \"./node_modules/core-js/modules/es.typed-array.map.js\");\n__webpack_require__(/*! core-js/modules/es.typed-array.reduce.js */ \"./node_modules/core-js/modules/es.typed-array.reduce.js\");\n__webpack_require__(/*! core-js/modules/es.typed-array.reduce-right.js */ \"./node_modules/core-js/modules/es.typed-array.reduce-right.js\");\n__webpack_require__(/*! core-js/modules/es.typed-array.reverse.js */ \"./node_modules/core-js/modules/es.typed-array.reverse.js\");\n__webpack_require__(/*! core-js/modules/es.typed-array.set.js */ \"./node_modules/core-js/modules/es.typed-array.set.js\");\n__webpack_require__(/*! core-js/modules/es.typed-array.slice.js */ \"./node_modules/core-js/modules/es.typed-array.slice.js\");\n__webpack_require__(/*! core-js/modules/es.typed-array.some.js */ \"./node_modules/core-js/modules/es.typed-array.some.js\");\n__webpack_require__(/*! core-js/modules/es.typed-array.sort.js */ \"./node_modules/core-js/modules/es.typed-array.sort.js\");\n__webpack_require__(/*! core-js/modules/es.typed-array.subarray.js */ \"./node_modules/core-js/modules/es.typed-array.subarray.js\");\n__webpack_require__(/*! core-js/modules/es.typed-array.to-locale-string.js */ \"./node_modules/core-js/modules/es.typed-array.to-locale-string.js\");\n__webpack_require__(/*! core-js/modules/es.typed-array.to-string.js */ \"./node_modules/core-js/modules/es.typed-array.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.array.join.js */ \"./node_modules/core-js/modules/es.array.join.js\");\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n__webpack_require__(/*! core-js/modules/es.array.is-array.js */ \"./node_modules/core-js/modules/es.array.is-array.js\");\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.parse-int.js */ \"./node_modules/core-js/modules/es.parse-int.js\");\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n__webpack_require__(/*! core-js/modules/es.date.now.js */ \"./node_modules/core-js/modules/es.date.now.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-string.js */ \"./node_modules/core-js/modules/es.date.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.string.trim.js */ \"./node_modules/core-js/modules/es.string.trim.js\");\n__webpack_require__(/*! core-js/modules/es.array.includes.js */ \"./node_modules/core-js/modules/es.array.includes.js\");\n__webpack_require__(/*! core-js/modules/es.string.includes.js */ \"./node_modules/core-js/modules/es.string.includes.js\");\n__webpack_require__(/*! core-js/modules/es.array.splice.js */ \"./node_modules/core-js/modules/es.array.splice.js\");\n__webpack_require__(/*! core-js/modules/es.array.find.js */ \"./node_modules/core-js/modules/es.array.find.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.number.to-fixed.js */ \"./node_modules/core-js/modules/es.number.to-fixed.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n__webpack_require__(/*! core-js/modules/es.string.starts-with.js */ \"./node_modules/core-js/modules/es.string.starts-with.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.constructor.js */ \"./node_modules/core-js/modules/es.regexp.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.string.search.js */ \"./node_modules/core-js/modules/es.string.search.js\");\n__webpack_require__(/*! core-js/modules/es.parse-float.js */ \"./node_modules/core-js/modules/es.parse-float.js\");\n__webpack_require__(/*! core-js/modules/es.array.reduce.js */ \"./node_modules/core-js/modules/es.array.reduce.js\");\n__webpack_require__(/*! core-js/modules/es.array.slice.js */ \"./node_modules/core-js/modules/es.array.slice.js\");\n__webpack_require__(/*! core-js/modules/esnext.string.replace-all.js */ \"./node_modules/core-js/modules/esnext.string.replace-all.js\");\n__webpack_require__(/*! core-js/modules/es.promise.js */ \"./node_modules/core-js/modules/es.promise.js\");\n__webpack_require__(/*! core-js/modules/es.array.some.js */ \"./node_modules/core-js/modules/es.array.some.js\");\n__webpack_require__(/*! core-js/modules/es.array.find-index.js */ \"./node_modules/core-js/modules/es.array.find-index.js\");\n__webpack_require__(/*! core-js/modules/es.array.index-of.js */ \"./node_modules/core-js/modules/es.array.index-of.js\");\nvar _Field2 = _interopRequireDefault(__webpack_require__(/*! ../_classes/field/Field */ \"./lib/components/_classes/field/Field.js\"));\nvar _utils = __webpack_require__(/*! ../../utils/utils */ \"./lib/utils/utils.js\");\nvar _downloadjs = _interopRequireDefault(__webpack_require__(/*! downloadjs */ \"./node_modules/downloadjs/download.js\"));\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\nvar _fileProcessor = _interopRequireDefault(__webpack_require__(/*! ../../providers/processor/fileProcessor */ \"./lib/providers/processor/fileProcessor.js\"));\nvar _browserMd5File = _interopRequireDefault(__webpack_require__(/*! browser-md5-file */ \"./node_modules/browser-md5-file/dist/index.umd.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _regeneratorRuntime() { \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = \"function\" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || \"@@iterator\", asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\", toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, \"\"); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, \"_invoke\", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: \"normal\", arg: fn.call(obj, arg) }; } catch (err) { return { type: \"throw\", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { [\"next\", \"throw\", \"return\"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if (\"throw\" !== record.type) { var result = record.arg, value = result.value; return value && \"object\" == _typeof(value) && hasOwn.call(value, \"__await\") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke(\"next\", value, resolve, reject); }, function (err) { invoke(\"throw\", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke(\"throw\", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, \"_invoke\", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = \"suspendedStart\"; return function (method, arg) { if (\"executing\" === state) throw new Error(\"Generator is already running\"); if (\"completed\" === state) { if (\"throw\" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if (\"next\" === context.method) context.sent = context._sent = context.arg;else if (\"throw\" === context.method) { if (\"suspendedStart\" === state) throw state = \"completed\", context.arg; context.dispatchException(context.arg); } else \"return\" === context.method && context.abrupt(\"return\", context.arg); state = \"executing\"; var record = tryCatch(innerFn, self, context); if (\"normal\" === record.type) { if (state = context.done ? \"completed\" : \"suspendedYield\", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } \"throw\" === record.type && (state = \"completed\", context.method = \"throw\", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, \"throw\" === methodName && delegate.iterator[\"return\"] && (context.method = \"return\", context.arg = undefined, maybeInvokeDelegate(delegate, context), \"throw\" === context.method) || \"return\" !== methodName && (context.method = \"throw\", context.arg = new TypeError(\"The iterator does not provide a '\" + methodName + \"' method\")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if (\"throw\" === record.type) return context.method = \"throw\", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, \"return\" !== context.method && (context.method = \"next\", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = \"throw\", context.arg = new TypeError(\"iterator result is not an object\"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = \"normal\", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: \"root\" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if (\"function\" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, \"constructor\", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, \"constructor\", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, \"GeneratorFunction\"), exports.isGeneratorFunction = function (genFun) { var ctor = \"function\" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || \"GeneratorFunction\" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, \"GeneratorFunction\")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, \"Generator\"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, \"toString\", function () { return \"[object Generator]\"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { \"t\" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if (\"throw\" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = \"throw\", record.arg = exception, context.next = loc, caught && (context.method = \"next\", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if (\"root\" === entry.tryLoc) return handle(\"end\"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, \"catchLoc\"), hasFinally = hasOwn.call(entry, \"finallyLoc\"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error(\"try statement without catch or finally\"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, \"finallyLoc\") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && (\"break\" === type || \"continue\" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = \"next\", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if (\"throw\" === record.type) throw record.arg; return \"break\" === record.type || \"continue\" === record.type ? this.next = record.arg : \"return\" === record.type ? (this.rval = this.arg = record.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, \"catch\": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if (\"throw\" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error(\"illegal catch attempt\"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, \"next\" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }\nfunction _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err); } _next(undefined); }); }; }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar Camera;\nvar webViewCamera = navigator.camera || Camera;\n\n// canvas.toBlob polyfill.\n\nvar htmlCanvasElement;\nif (typeof window !== 'undefined') {\n htmlCanvasElement = window.HTMLCanvasElement;\n} else if (typeof __webpack_require__.g !== 'undefined') {\n htmlCanvasElement = __webpack_require__.g.HTMLCanvasElement;\n}\nif (htmlCanvasElement && !htmlCanvasElement.prototype.toBlob) {\n Object.defineProperty(HTMLCanvasElement.prototype, 'toBlob', {\n value: function value(callback, type, quality) {\n var canvas = this;\n setTimeout(function () {\n var binStr = atob(canvas.toDataURL(type, quality).split(',')[1]),\n len = binStr.length,\n arr = new Uint8Array(len);\n for (var i = 0; i < len; i++) {\n arr[i] = binStr.charCodeAt(i);\n }\n callback(new Blob([arr], {\n type: type || 'image/png'\n }));\n });\n }\n });\n}\nvar FileComponent = /*#__PURE__*/function (_Field) {\n _inherits(FileComponent, _Field);\n var _super = _createSuper(FileComponent);\n function FileComponent() {\n _classCallCheck(this, FileComponent);\n return _super.apply(this, arguments);\n }\n _createClass(FileComponent, [{\n key: \"init\",\n value: function init() {\n _get(_getPrototypeOf(FileComponent.prototype), \"init\", this).call(this);\n webViewCamera = navigator.camera || Camera;\n var fileReaderSupported = typeof FileReader !== 'undefined';\n var formDataSupported = typeof window !== 'undefined' ? Boolean(window.FormData) : false;\n var progressSupported = typeof window !== 'undefined' && window.XMLHttpRequest ? 'upload' in new XMLHttpRequest() : false;\n this.support = {\n filereader: fileReaderSupported,\n formdata: formDataSupported,\n hasWarning: !fileReaderSupported || !formDataSupported || !progressSupported,\n progress: progressSupported\n };\n this.cameraMode = false;\n this.statuses = [];\n this.fileDropHidden = false;\n }\n }, {\n key: \"dataReady\",\n get: function get() {\n return this.filesReady || _nativePromiseOnly[\"default\"].resolve();\n }\n }, {\n key: \"defaultSchema\",\n get: function get() {\n return FileComponent.schema();\n }\n }, {\n key: \"loadImage\",\n value: function loadImage(fileInfo) {\n if (this.component.privateDownload) {\n fileInfo[\"private\"] = true;\n }\n return this.fileService.downloadFile(fileInfo).then(function (result) {\n return result.url;\n });\n }\n }, {\n key: \"emptyValue\",\n get: function get() {\n return [];\n }\n }, {\n key: \"getValueAsString\",\n value: function getValueAsString(value) {\n if (_lodash[\"default\"].isArray(value)) {\n return _lodash[\"default\"].map(value, 'originalName').join(', ');\n }\n return _lodash[\"default\"].get(value, 'originalName', '');\n }\n }, {\n key: \"getValue\",\n value: function getValue() {\n return this.dataValue;\n }\n }, {\n key: \"defaultValue\",\n get: function get() {\n var value = _get(_getPrototypeOf(FileComponent.prototype), \"defaultValue\", this);\n return Array.isArray(value) ? value : [];\n }\n }, {\n key: \"hasTypes\",\n get: function get() {\n return this.component.fileTypes && Array.isArray(this.component.fileTypes) && this.component.fileTypes.length !== 0 && (this.component.fileTypes[0].label !== '' || this.component.fileTypes[0].value !== '');\n }\n }, {\n key: \"fileDropHidden\",\n get: function get() {\n return this._fileBrowseHidden;\n },\n set: function set(value) {\n if (typeof value !== 'boolean' || this.component.multiple) {\n return;\n }\n this._fileBrowseHidden = value;\n }\n }, {\n key: \"render\",\n value: function render() {\n return _get(_getPrototypeOf(FileComponent.prototype), \"render\", this).call(this, this.renderTemplate('file', {\n fileSize: this.fileSize,\n files: this.dataValue || [],\n statuses: this.statuses,\n disabled: this.disabled,\n support: this.support,\n fileDropHidden: this.fileDropHidden\n }));\n }\n }, {\n key: \"getVideoStream\",\n value: function getVideoStream(constraints) {\n return navigator.mediaDevices.getUserMedia({\n video: _objectSpread({\n width: {\n min: 640,\n ideal: 1920\n },\n height: {\n min: 360,\n ideal: 1080\n },\n aspectRatio: {\n ideal: 16 / 9\n }\n }, constraints),\n audio: false\n });\n }\n }, {\n key: \"stopVideoStream\",\n value: function stopVideoStream(videoStream) {\n videoStream.getVideoTracks().forEach(function (track) {\n return track.stop();\n });\n }\n }, {\n key: \"getFrame\",\n value: function getFrame(videoPlayer) {\n return new _nativePromiseOnly[\"default\"](function (resolve) {\n var canvas = document.createElement('canvas');\n canvas.height = videoPlayer.videoHeight;\n canvas.width = videoPlayer.videoWidth;\n var context = canvas.getContext('2d');\n context.drawImage(videoPlayer, 0, 0);\n canvas.toBlob(resolve);\n });\n }\n }, {\n key: \"startVideo\",\n value: function startVideo() {\n var _this = this;\n this.getVideoStream().then(function (stream) {\n _this.videoStream = stream;\n var videoPlayer = _this.refs.videoPlayer;\n if (!videoPlayer) {\n console.warn('Video player not found in template.');\n _this.cameraMode = false;\n _this.redraw();\n return;\n }\n videoPlayer.srcObject = stream;\n var width = parseInt(_this.component.webcamSize) || 320;\n videoPlayer.setAttribute('width', width);\n videoPlayer.play();\n })[\"catch\"](function (err) {\n console.error(err);\n _this.cameraMode = false;\n _this.redraw();\n });\n }\n }, {\n key: \"stopVideo\",\n value: function stopVideo() {\n if (this.videoStream) {\n this.stopVideoStream(this.videoStream);\n this.videoStream = null;\n }\n }\n }, {\n key: \"takePicture\",\n value: function takePicture() {\n var _this2 = this;\n var videoPlayer = this.refs.videoPlayer;\n if (!videoPlayer) {\n console.warn('Video player not found in template.');\n this.cameraMode = false;\n this.redraw();\n return;\n }\n this.getFrame(videoPlayer).then(function (frame) {\n frame.name = \"photo-\".concat(Date.now(), \".png\");\n _this2.upload([frame]);\n _this2.cameraMode = false;\n _this2.redraw();\n });\n }\n }, {\n key: \"browseFiles\",\n value: function browseFiles() {\n var _this3 = this;\n var attrs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n return new _nativePromiseOnly[\"default\"](function (resolve) {\n var fileInput = _this3.ce('input', _objectSpread({\n type: 'file',\n style: 'height: 0; width: 0; visibility: hidden;',\n tabindex: '-1'\n }, attrs));\n document.body.appendChild(fileInput);\n fileInput.addEventListener('change', function () {\n resolve(fileInput.files);\n document.body.removeChild(fileInput);\n }, true);\n\n // There is no direct way to trigger a file dialog. To work around this, create an input of type file and trigger\n // a click event on it.\n if (typeof fileInput.trigger === 'function') {\n fileInput.trigger('click');\n } else {\n fileInput.click();\n }\n });\n }\n }, {\n key: \"cameraMode\",\n get: function get() {\n return this._cameraMode;\n },\n set: function set(value) {\n this._cameraMode = value;\n if (value) {\n this.startVideo();\n } else {\n this.stopVideo();\n }\n }\n }, {\n key: \"useWebViewCamera\",\n get: function get() {\n return this.imageUpload && webViewCamera;\n }\n }, {\n key: \"imageUpload\",\n get: function get() {\n return Boolean(this.component.image);\n }\n }, {\n key: \"browseOptions\",\n get: function get() {\n var options = {};\n if (this.component.multiple) {\n options.multiple = true;\n }\n //use \"accept\" attribute only for desktop devices because of its limited support by mobile browsers\n if (!this.isMobile.any) {\n var filePattern = this.component.filePattern.trim() || '';\n var imagesPattern = 'image/*';\n if (this.imageUpload && (!filePattern || filePattern === '*')) {\n options.accept = imagesPattern;\n } else if (this.imageUpload && !filePattern.includes(imagesPattern)) {\n options.accept = \"\".concat(imagesPattern, \",\").concat(filePattern);\n } else {\n options.accept = filePattern;\n }\n }\n return options;\n }\n }, {\n key: \"deleteFile\",\n value: function deleteFile(fileInfo) {\n var _this$component$optio = this.component.options,\n options = _this$component$optio === void 0 ? {} : _this$component$optio;\n if (fileInfo && ['url', 'indexeddb'].includes(this.component.storage)) {\n var fileService = this.fileService;\n if (fileService && typeof fileService.deleteFile === 'function') {\n fileService.deleteFile(fileInfo, options);\n } else {\n var formio = this.options.formio || this.root && this.root.formio;\n if (formio) {\n formio.makeRequest('', fileInfo.url, 'delete');\n }\n }\n }\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n var _this4 = this;\n this.loadRefs(element, {\n fileDrop: 'single',\n fileBrowse: 'single',\n galleryButton: 'single',\n cameraButton: 'single',\n takePictureButton: 'single',\n toggleCameraMode: 'single',\n videoPlayer: 'single',\n fileLink: 'multiple',\n removeLink: 'multiple',\n fileStatusRemove: 'multiple',\n fileImage: 'multiple',\n fileType: 'multiple',\n fileProcessingLoader: 'single'\n });\n // Ensure we have an empty input refs. We need this for the setValue method to redraw the control when it is set.\n this.refs.input = [];\n var superAttach = _get(_getPrototypeOf(FileComponent.prototype), \"attach\", this).call(this, element);\n if (this.refs.fileDrop) {\n if (!this.statuses.length) {\n this.refs.fileDrop.removeAttribute('hidden');\n }\n var _element = this;\n this.addEventListener(this.refs.fileDrop, 'dragover', function (event) {\n this.className = 'fileSelector fileDragOver';\n event.preventDefault();\n });\n this.addEventListener(this.refs.fileDrop, 'dragleave', function (event) {\n this.className = 'fileSelector';\n event.preventDefault();\n });\n this.addEventListener(this.refs.fileDrop, 'drop', function (event) {\n this.className = 'fileSelector';\n event.preventDefault();\n _element.upload(event.dataTransfer.files);\n });\n }\n if (this.refs.fileBrowse) {\n this.addEventListener(this.refs.fileBrowse, 'click', function (event) {\n event.preventDefault();\n _this4.browseFiles(_this4.browseOptions).then(function (files) {\n _this4.upload(files);\n });\n });\n }\n this.refs.fileLink.forEach(function (fileLink, index) {\n _this4.addEventListener(fileLink, 'click', function (event) {\n event.preventDefault();\n _this4.getFile(_this4.dataValue[index]);\n });\n });\n this.refs.removeLink.forEach(function (removeLink, index) {\n _this4.addEventListener(removeLink, 'click', function (event) {\n var fileInfo = _this4.dataValue[index];\n _this4.deleteFile(fileInfo);\n event.preventDefault();\n _this4.splice(index);\n _this4.redraw();\n });\n });\n this.refs.fileStatusRemove.forEach(function (fileStatusRemove, index) {\n _this4.addEventListener(fileStatusRemove, 'click', function (event) {\n event.preventDefault();\n if (_this4.abortUpload) {\n _this4.abortUpload();\n }\n _this4.statuses.splice(index, 1);\n _this4.redraw();\n });\n });\n if (this.refs.galleryButton && webViewCamera) {\n this.addEventListener(this.refs.galleryButton, 'click', function (event) {\n event.preventDefault();\n webViewCamera.getPicture(function (success) {\n window.resolveLocalFileSystemURL(success, function (fileEntry) {\n fileEntry.file(function (file) {\n var reader = new FileReader();\n reader.onloadend = function (evt) {\n var blob = new Blob([new Uint8Array(evt.target.result)], {\n type: file.type\n });\n blob.name = file.name;\n _this4.upload([blob]);\n };\n reader.readAsArrayBuffer(file);\n });\n });\n }, function (err) {\n console.error(err);\n }, {\n sourceType: webViewCamera.PictureSourceType.PHOTOLIBRARY\n });\n });\n }\n if (this.refs.cameraButton && webViewCamera) {\n this.addEventListener(this.refs.cameraButton, 'click', function (event) {\n event.preventDefault();\n webViewCamera.getPicture(function (success) {\n window.resolveLocalFileSystemURL(success, function (fileEntry) {\n fileEntry.file(function (file) {\n var reader = new FileReader();\n reader.onloadend = function (evt) {\n var blob = new Blob([new Uint8Array(evt.target.result)], {\n type: file.type\n });\n blob.name = file.name;\n _this4.upload([blob]);\n };\n reader.readAsArrayBuffer(file);\n });\n });\n }, function (err) {\n console.error(err);\n }, {\n sourceType: webViewCamera.PictureSourceType.CAMERA,\n encodingType: webViewCamera.EncodingType.PNG,\n mediaType: webViewCamera.MediaType.PICTURE,\n saveToPhotoAlbum: true,\n correctOrientation: false\n });\n });\n }\n if (this.refs.takePictureButton) {\n this.addEventListener(this.refs.takePictureButton, 'click', function (event) {\n event.preventDefault();\n _this4.takePicture();\n });\n }\n if (this.refs.toggleCameraMode) {\n this.addEventListener(this.refs.toggleCameraMode, 'click', function (event) {\n event.preventDefault();\n _this4.cameraMode = !_this4.cameraMode;\n _this4.redraw();\n });\n }\n this.refs.fileType.forEach(function (fileType, index) {\n _this4.dataValue[index].fileType = _this4.dataValue[index].fileType || _this4.component.fileTypes[0].label;\n _this4.addEventListener(fileType, 'change', function (event) {\n event.preventDefault();\n var fileType = _this4.component.fileTypes.find(function (typeObj) {\n return typeObj.value === event.target.value;\n });\n _this4.dataValue[index].fileType = fileType.label;\n });\n });\n var fileService = this.fileService;\n if (fileService) {\n var loadingImages = [];\n this.filesReady = new _nativePromiseOnly[\"default\"](function (resolve, reject) {\n _this4.filesReadyResolve = resolve;\n _this4.filesReadyReject = reject;\n });\n this.refs.fileImage.forEach(function (image, index) {\n loadingImages.push(_this4.loadImage(_this4.dataValue[index]).then(function (url) {\n return image.src = url;\n }));\n });\n if (loadingImages.length) {\n _nativePromiseOnly[\"default\"].all(loadingImages).then(function () {\n _this4.filesReadyResolve();\n })[\"catch\"](function () {\n return _this4.filesReadyReject();\n });\n } else {\n this.filesReadyResolve();\n }\n }\n return superAttach;\n }\n\n /* eslint-disable max-len */\n }, {\n key: \"fileSize\",\n value: function fileSize(a, b, c, d, e) {\n return \"\".concat((b = Math, c = b.log, d = 1024, e = c(a) / c(d) | 0, a / b.pow(d, e)).toFixed(2), \" \").concat(e ? \"\".concat('kMGTPEZY'[--e], \"B\") : 'Bytes');\n }\n\n /* eslint-enable max-len */\n\n /* eslint-disable max-depth */\n }, {\n key: \"globStringToRegex\",\n value: function globStringToRegex(str) {\n str = str.replace(/\\s/g, '');\n var regexp = '',\n excludes = [];\n if (str.length > 2 && str[0] === '/' && str[str.length - 1] === '/') {\n regexp = str.substring(1, str.length - 1);\n } else {\n var split = str.split(',');\n if (split.length > 1) {\n for (var i = 0; i < split.length; i++) {\n var r = this.globStringToRegex(split[i]);\n if (r.regexp) {\n regexp += \"(\".concat(r.regexp, \")\");\n if (i < split.length - 1) {\n regexp += '|';\n }\n } else {\n excludes = excludes.concat(r.excludes);\n }\n }\n } else {\n if (str.startsWith('!')) {\n excludes.push(\"^((?!\".concat(this.globStringToRegex(str.substring(1)).regexp, \").)*$\"));\n } else {\n if (str.startsWith('.')) {\n str = \"*\".concat(str);\n }\n regexp = \"^\".concat(str.replace(new RegExp('[.\\\\\\\\+*?\\\\[\\\\^\\\\]$(){}=!<>|:\\\\-]', 'g'), '\\\\$&'), \"$\");\n regexp = regexp.replace(/\\\\\\*/g, '.*').replace(/\\\\\\?/g, '.');\n }\n }\n }\n return {\n regexp: regexp,\n excludes: excludes\n };\n }\n\n /* eslint-enable max-depth */\n }, {\n key: \"translateScalars\",\n value: function translateScalars(str) {\n if (typeof str === 'string') {\n if (str.search(/kb/i) === str.length - 2) {\n return parseFloat(str.substring(0, str.length - 2) * 1024);\n }\n if (str.search(/mb/i) === str.length - 2) {\n return parseFloat(str.substring(0, str.length - 2) * 1024 * 1024);\n }\n if (str.search(/gb/i) === str.length - 2) {\n return parseFloat(str.substring(0, str.length - 2) * 1024 * 1024 * 1024);\n }\n if (str.search(/b/i) === str.length - 1) {\n return parseFloat(str.substring(0, str.length - 1));\n }\n if (str.search(/s/i) === str.length - 1) {\n return parseFloat(str.substring(0, str.length - 1));\n }\n if (str.search(/m/i) === str.length - 1) {\n return parseFloat(str.substring(0, str.length - 1) * 60);\n }\n if (str.search(/h/i) === str.length - 1) {\n return parseFloat(str.substring(0, str.length - 1) * 3600);\n }\n }\n return str;\n }\n }, {\n key: \"validatePattern\",\n value: function validatePattern(file, val) {\n if (!val) {\n return true;\n }\n var pattern = this.globStringToRegex(val);\n var valid = true;\n if (pattern.regexp && pattern.regexp.length) {\n var regexp = new RegExp(pattern.regexp, 'i');\n valid = !_lodash[\"default\"].isNil(file.type) && regexp.test(file.type) || !_lodash[\"default\"].isNil(file.name) && regexp.test(file.name);\n }\n valid = pattern.excludes.reduce(function (result, excludePattern) {\n var exclude = new RegExp(excludePattern, 'i');\n return result && (_lodash[\"default\"].isNil(file.type) || !exclude.test(file.type)) && (_lodash[\"default\"].isNil(file.name) || !exclude.test(file.name));\n }, valid);\n return valid;\n }\n }, {\n key: \"validateMinSize\",\n value: function validateMinSize(file, val) {\n return file.size + 0.1 >= this.translateScalars(val);\n }\n }, {\n key: \"validateMaxSize\",\n value: function validateMaxSize(file, val) {\n return file.size - 0.1 <= this.translateScalars(val);\n }\n }, {\n key: \"upload\",\n value: function upload(files) {\n var _this5 = this;\n // Only allow one upload if not multiple.\n if (!this.component.multiple) {\n if (this.statuses.length) {\n this.statuses = [];\n }\n files = Array.prototype.slice.call(files, 0, 1);\n }\n if (this.component.storage && files && files.length) {\n this.fileDropHidden = true;\n\n // files is not really an array and does not have a forEach method, so fake it.\n /* eslint-disable max-statements */\n Array.prototype.forEach.call(files, /*#__PURE__*/function () {\n var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(file) {\n var fileName, escapedFileName, fileUpload, bmf, hash, fileWithSameNameUploading, fileWithSameNameUploaded, fileWithSameNameUploadedWithError, dir, fileService, _this5$component, storage, _this5$component$opti, options, url, groupKey, groupPermissions, fileKey, groupResourceId, processedFile, fileProcessorHandler, filePromise;\n return _regeneratorRuntime().wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n fileName = (0, _utils.uniqueName)(file.name, _this5.component.fileNameTemplate, _this5.evalContext());\n escapedFileName = file.name ? file.name.replaceAll('<', '<').replaceAll('>', '>') : file.name;\n fileUpload = {\n originalName: escapedFileName,\n name: fileName,\n size: file.size,\n status: 'info',\n message: _this5.t('Processing file. Please wait...'),\n hash: ''\n };\n if (!(_this5.root.form.submissionRevisions === 'true')) {\n _context.next = 12;\n break;\n }\n _this5.statuses.push(fileUpload);\n _this5.redraw();\n bmf = new _browserMd5File[\"default\"]();\n _context.next = 9;\n return new Promise(function (resolve, reject) {\n _this5.emit('fileUploadingStart');\n bmf.md5(file, function (err, md5) {\n if (err) {\n return reject(err);\n }\n return resolve(md5);\n });\n });\n case 9:\n hash = _context.sent;\n _this5.emit('fileUploadingEnd');\n fileUpload.hash = hash;\n case 12:\n // Check if file with the same name is being uploaded\n if (!_this5.filesUploading) {\n _this5.filesUploading = [];\n }\n fileWithSameNameUploading = _this5.filesUploading.some(function (fileUploading) {\n return fileUploading === file.name;\n });\n _this5.filesUploading.push(file.name);\n fileWithSameNameUploaded = _this5.dataValue.some(function (fileStatus) {\n return fileStatus.originalName === file.name;\n });\n fileWithSameNameUploadedWithError = _this5.statuses.findIndex(function (fileStatus) {\n return fileStatus.originalName === file.name && fileStatus.status === 'error';\n });\n if (fileWithSameNameUploaded || fileWithSameNameUploading) {\n fileUpload.status = 'error';\n fileUpload.message = _this5.t(\"File with the same name is already \".concat(fileWithSameNameUploading ? 'being ' : '', \"uploaded\"));\n }\n if (fileWithSameNameUploadedWithError !== -1) {\n _this5.statuses.splice(fileWithSameNameUploadedWithError, 1);\n _this5.redraw();\n }\n\n // Check file pattern\n if (_this5.component.filePattern && !_this5.validatePattern(file, _this5.component.filePattern)) {\n fileUpload.status = 'error';\n fileUpload.message = _this5.t('File is the wrong type; it must be {{ pattern }}', {\n pattern: _this5.component.filePattern\n });\n }\n\n // Check file minimum size\n if (_this5.component.fileMinSize && !_this5.validateMinSize(file, _this5.component.fileMinSize)) {\n fileUpload.status = 'error';\n fileUpload.message = _this5.t('File is too small; it must be at least {{ size }}', {\n size: _this5.component.fileMinSize\n });\n }\n\n // Check file maximum size\n if (_this5.component.fileMaxSize && !_this5.validateMaxSize(file, _this5.component.fileMaxSize)) {\n fileUpload.status = 'error';\n fileUpload.message = _this5.t('File is too big; it must be at most {{ size }}', {\n size: _this5.component.fileMaxSize\n });\n }\n\n // Get a unique name for this file to keep file collisions from occurring.\n dir = _this5.interpolate(_this5.component.dir || '');\n fileService = _this5.fileService;\n if (!fileService) {\n fileUpload.status = 'error';\n fileUpload.message = _this5.t('File Service not provided.');\n }\n if (_this5.root.form.submissionRevisions !== 'true') {\n _this5.statuses.push(fileUpload);\n _this5.redraw();\n }\n if (!(fileUpload.status !== 'error')) {\n _context.next = 60;\n break;\n }\n if (_this5.component.privateDownload) {\n file[\"private\"] = true;\n }\n _this5$component = _this5.component, storage = _this5$component.storage, _this5$component$opti = _this5$component.options, options = _this5$component$opti === void 0 ? {} : _this5$component$opti;\n url = _this5.interpolate(_this5.component.url, {\n file: fileUpload\n });\n groupKey = null;\n groupPermissions = null; //Iterate through form components to find group resource if one exists\n _this5.root.everyComponent(function (element) {\n var _element$component, _element$component2;\n if ((_element$component = element.component) !== null && _element$component !== void 0 && _element$component.submissionAccess || (_element$component2 = element.component) !== null && _element$component2 !== void 0 && _element$component2.defaultPermission) {\n groupPermissions = !element.component.submissionAccess ? [{\n type: element.component.defaultPermission,\n roles: []\n }] : element.component.submissionAccess;\n groupPermissions.forEach(function (permission) {\n groupKey = ['admin', 'write', 'create'].includes(permission.type) ? element.component.key : null;\n });\n }\n });\n fileKey = _this5.component.fileKey || 'file';\n groupResourceId = groupKey ? _this5.currentForm.submission.data[groupKey]._id : null;\n processedFile = null;\n if (!_this5.root.options.fileProcessor) {\n _context.next = 55;\n break;\n }\n _context.prev = 37;\n if (_this5.refs.fileProcessingLoader) {\n _this5.refs.fileProcessingLoader.style.display = 'block';\n }\n fileProcessorHandler = (0, _fileProcessor[\"default\"])(_this5.fileService, _this5.root.options.fileProcessor);\n _context.next = 42;\n return fileProcessorHandler(file, _this5.component.properties);\n case 42:\n processedFile = _context.sent;\n _context.next = 52;\n break;\n case 45:\n _context.prev = 45;\n _context.t0 = _context[\"catch\"](37);\n fileUpload.status = 'error';\n fileUpload.message = _this5.t('File processing has been failed.');\n _this5.fileDropHidden = false;\n _this5.redraw();\n return _context.abrupt(\"return\");\n case 52:\n _context.prev = 52;\n if (_this5.refs.fileProcessingLoader) {\n _this5.refs.fileProcessingLoader.style.display = 'none';\n }\n return _context.finish(52);\n case 55:\n fileUpload.message = _this5.t('Starting upload.');\n _this5.redraw();\n filePromise = fileService.uploadFile(storage, processedFile || file, fileName, dir,\n // Progress callback\n function (evt) {\n fileUpload.status = 'progress';\n fileUpload.progress = parseInt(100.0 * evt.loaded / evt.total);\n delete fileUpload.message;\n _this5.redraw();\n }, url, options, fileKey, groupPermissions, groupResourceId,\n // Upload start callback\n function () {\n _this5.emit('fileUploadingStart', filePromise);\n },\n // Abort upload callback\n function (abort) {\n return _this5.abortUpload = abort;\n }).then(function (fileInfo) {\n var index = _this5.statuses.indexOf(fileUpload);\n if (index !== -1) {\n _this5.statuses.splice(index, 1);\n }\n fileInfo.originalName = escapedFileName;\n fileInfo.hash = fileUpload.hash;\n if (!_this5.hasValue()) {\n _this5.dataValue = [];\n }\n _this5.dataValue.push(fileInfo);\n _lodash[\"default\"].pull(_this5.filesUploading, fileInfo.originalName);\n _this5.fileDropHidden = false;\n _this5.redraw();\n _this5.triggerChange();\n _this5.emit('fileUploadingEnd', filePromise);\n })[\"catch\"](function (response) {\n fileUpload.status = 'error';\n fileUpload.message = typeof response === 'string' ? response : response.toString();\n delete fileUpload.progress;\n _this5.fileDropHidden = false;\n _lodash[\"default\"].pull(_this5.filesUploading, file.name);\n _this5.redraw();\n _this5.emit('fileUploadingEnd', filePromise);\n });\n _context.next = 61;\n break;\n case 60:\n _this5.filesUploading.splice(_this5.filesUploading.indexOf(file.name), 1);\n case 61:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, null, [[37, 45, 52, 55]]);\n }));\n return function (_x) {\n return _ref.apply(this, arguments);\n };\n }());\n }\n }\n }, {\n key: \"getFile\",\n value: function getFile(fileInfo) {\n var _this$component$optio2 = this.component.options,\n options = _this$component$optio2 === void 0 ? {} : _this$component$optio2;\n var fileService = this.fileService;\n if (!fileService) {\n return alert('File Service not provided');\n }\n if (this.component.privateDownload) {\n fileInfo[\"private\"] = true;\n }\n fileService.downloadFile(fileInfo, options).then(function (file) {\n if (file) {\n if (['base64', 'indexeddb'].includes(file.storage)) {\n (0, _downloadjs[\"default\"])(file.url, file.originalName || file.name, file.type);\n } else {\n window.open(file.url, '_blank');\n }\n }\n })[\"catch\"](function (response) {\n // Is alert the best way to do this?\n // User is expecting an immediate notification due to attempting to download a file.\n alert(response);\n });\n }\n }, {\n key: \"focus\",\n value: function focus() {\n if ('beforeFocus' in this.parent) {\n this.parent.beforeFocus(this);\n }\n if (this.refs.fileBrowse) {\n this.refs.fileBrowse.focus();\n }\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n this.stopVideo();\n _get(_getPrototypeOf(FileComponent.prototype), \"destroy\", this).call(this);\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _Field2[\"default\"].schema.apply(_Field2[\"default\"], [{\n type: 'file',\n label: 'Upload',\n key: 'file',\n image: false,\n privateDownload: false,\n imageSize: '200',\n filePattern: '*',\n fileMinSize: '0KB',\n fileMaxSize: '1GB',\n uploadOnly: false\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'File',\n group: 'premium',\n icon: 'file',\n documentation: '/userguide/form-building/premium-components#file',\n weight: 100,\n schema: FileComponent.schema()\n };\n }\n }]);\n return FileComponent;\n}(_Field2[\"default\"]);\nexports[\"default\"] = FileComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/file/File.js?"); /***/ }), @@ -1220,10 +1253,10 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /*!********************************************************!*\ !*** ./lib/components/file/editForm/File.edit.data.js ***! \********************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'defaultValue',\n ignore: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/file/editForm/File.edit.data.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'defaultValue',\n ignore: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/file/editForm/File.edit.data.js?"); /***/ }), @@ -1231,10 +1264,10 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /*!***********************************************************!*\ !*** ./lib/components/file/editForm/File.edit.display.js ***! \***********************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'placeholder',\n ignore: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/file/editForm/File.edit.display.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'placeholder',\n ignore: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/file/editForm/File.edit.display.js?"); /***/ }), @@ -1245,7 +1278,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n\nvar _Formio = __webpack_require__(/*! ../../../Formio */ \"./lib/Formio.js\");\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = [{\n type: 'select',\n input: true,\n key: 'storage',\n label: 'Storage',\n placeholder: 'Select your file storage provider',\n weight: 0,\n tooltip: 'Which storage to save the files in.',\n valueProperty: 'value',\n dataSrc: 'custom',\n data: {\n custom: function custom() {\n return _lodash.default.map(_Formio.GlobalFormio.Providers.getProviders('storage'), function (storage, key) {\n return {\n label: storage.title,\n value: key\n };\n });\n }\n }\n}, {\n type: 'textfield',\n input: true,\n key: 'url',\n label: 'Url',\n weight: 10,\n placeholder: 'Enter the url to post the files to.',\n tooltip: \"See https://github.com/danialfarid/ng-file-upload#server-side for how to set up the server.\",\n conditional: {\n json: {\n '===': [{\n var: 'data.storage'\n }, 'url']\n }\n }\n}, {\n type: 'textfield',\n input: true,\n key: 'options.indexeddb',\n label: 'Database',\n weight: 10,\n placeholder: 'Enter the indexeddb database name',\n conditional: {\n json: {\n in: [{\n var: 'data.storage'\n }, ['indexeddb']]\n }\n }\n}, {\n type: 'textfield',\n input: true,\n label: 'Table',\n key: 'options.indexeddbTable',\n weight: 10,\n placeholder: 'Enter the name for indexeddb table',\n conditional: {\n json: {\n in: [{\n var: 'data.storage'\n }, ['indexeddb']]\n }\n }\n}, {\n type: 'textarea',\n key: 'options',\n label: 'Custom request options',\n tooltip: 'Pass your custom xhr options(optional)',\n rows: 5,\n editor: 'ace',\n input: true,\n weight: 15,\n placeholder: \"{\\n \\\"withCredentials\\\": true\\n}\",\n conditional: {\n json: {\n '===': [{\n var: 'data.storage'\n }, 'url']\n }\n }\n}, {\n type: 'textfield',\n input: true,\n key: 'fileKey',\n label: 'File form-data key',\n weight: 17,\n placeholder: 'Enter the key name of a file for form data.',\n tooltip: 'Key name that you would like to modify for the file while calling API request.',\n conditional: {\n json: {\n '===': [{\n var: 'data.storage'\n }, 'url']\n }\n }\n}, {\n type: 'textfield',\n input: true,\n key: 'dir',\n label: 'Directory',\n placeholder: '(optional) Enter a directory for the files',\n tooltip: 'This will place all the files uploaded in this field in the directory',\n weight: 20,\n conditional: {\n json: {\n '!==': [{\n var: 'data.storage'\n }, 'googledrive']\n }\n }\n}, {\n type: 'textfield',\n input: true,\n key: 'dir',\n label: 'Folder ID',\n placeholder: '(optional) Enter an ID of the folder for the files',\n tooltip: 'This will place all the files uploaded in this field in the folder',\n weight: 20,\n conditional: {\n json: {\n '===': [{\n var: 'data.storage'\n }, 'googledrive']\n }\n }\n}, {\n type: 'textfield',\n input: true,\n key: 'fileNameTemplate',\n label: 'File Name Template',\n placeholder: '(optional) { {name} }-{ {guid} }\"',\n tooltip: 'Specify template for name of uploaded file(s). Regular template variables are available (`data`, `component`, `user`, `value`, `moment` etc.), also `fileName`, `guid` variables are available. `guid` part must be present, if not found in template, will be added at the end.',\n weight: 25\n}, {\n type: 'checkbox',\n input: true,\n key: 'image',\n label: 'Display as image(s)',\n tooltip: 'Instead of a list of linked files, images will be rendered in the view.',\n weight: 30\n}, {\n type: 'checkbox',\n input: true,\n key: 'uploadOnly',\n label: 'Upload Only',\n tooltip: 'When this is checked, will only allow you to upload file(s) and consequently the download, in this component, will be unavailable.',\n weight: 33\n}, {\n type: 'checkbox',\n input: true,\n key: 'privateDownload',\n label: 'Private Download',\n tooltip: 'When this is checked, the file download will send a POST request to the download URL with the x-jwt-token header. This will allow your endpoint to create a Private download system.',\n weight: 31,\n conditional: {\n json: {\n '===': [{\n var: 'data.storage'\n }, 'url']\n }\n }\n}, {\n type: 'textfield',\n input: true,\n key: 'imageSize',\n label: 'Image Size',\n placeholder: '100',\n tooltip: 'The image size for previewing images.',\n weight: 40,\n conditional: {\n json: {\n '==': [{\n var: 'data.image'\n }, true]\n }\n }\n}, {\n type: 'checkbox',\n input: true,\n key: 'webcam',\n label: 'Enable web camera',\n tooltip: 'This will allow using an attached camera to directly take a picture instead of uploading an existing file.',\n weight: 32\n}, {\n type: 'textfield',\n input: true,\n key: 'webcamSize',\n label: 'Webcam Width',\n placeholder: '320',\n tooltip: 'The webcam size for taking pictures.',\n weight: 38,\n conditional: {\n json: {\n '==': [{\n var: 'data.webcam'\n }, true]\n }\n }\n}, {\n type: 'datagrid',\n input: true,\n label: 'File Types',\n key: 'fileTypes',\n tooltip: 'Specify file types to classify the uploads. This is useful if you allow multiple types of uploads but want to allow the user to specify which type of file each is.',\n weight: 11,\n components: [{\n label: 'Label',\n key: 'label',\n input: true,\n type: 'textfield'\n }, {\n label: 'Value',\n key: 'value',\n input: true,\n type: 'textfield'\n }]\n}, {\n type: 'textfield',\n input: true,\n key: 'filePattern',\n label: 'File Pattern',\n placeholder: '.jpg,video/*,application/pdf',\n tooltip: 'See https://github.com/danialfarid/ng-file-upload#full-reference for how to specify file patterns.',\n weight: 50\n}, {\n type: 'textfield',\n input: true,\n key: 'fileMinSize',\n label: 'File Minimum Size',\n placeholder: '1MB',\n tooltip: 'See https://github.com/danialfarid/ng-file-upload#full-reference for how to specify file sizes.',\n weight: 60\n}, {\n type: 'textfield',\n input: true,\n key: 'fileMaxSize',\n label: 'File Maximum Size',\n placeholder: '10MB',\n tooltip: 'See https://github.com/danialfarid/ng-file-upload#full-reference for how to specify file sizes.',\n weight: 70\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/file/editForm/File.edit.file.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\nvar _Formio = __webpack_require__(/*! ../../../Formio */ \"./lib/Formio.js\");\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = [{\n type: 'select',\n input: true,\n key: 'storage',\n label: 'Storage',\n placeholder: 'Select your file storage provider',\n weight: 0,\n tooltip: 'Which storage to save the files in.',\n valueProperty: 'value',\n dataSrc: 'custom',\n data: {\n custom: function custom() {\n return _lodash[\"default\"].map(_Formio.GlobalFormio.Providers.getProviders('storage'), function (storage, key) {\n return {\n label: storage.title,\n value: key\n };\n });\n }\n }\n}, {\n type: 'textfield',\n input: true,\n key: 'url',\n label: 'Url',\n weight: 10,\n placeholder: 'Enter the url to post the files to.',\n tooltip: \"See https://github.com/danialfarid/ng-file-upload#server-side for how to set up the server.\",\n conditional: {\n json: {\n '===': [{\n \"var\": 'data.storage'\n }, 'url']\n }\n }\n}, {\n type: 'textfield',\n input: true,\n key: 'options.indexeddb',\n label: 'Database',\n weight: 10,\n placeholder: 'Enter the indexeddb database name',\n conditional: {\n json: {\n \"in\": [{\n \"var\": 'data.storage'\n }, ['indexeddb']]\n }\n }\n}, {\n type: 'textfield',\n input: true,\n label: 'Table',\n key: 'options.indexeddbTable',\n weight: 10,\n placeholder: 'Enter the name for indexeddb table',\n conditional: {\n json: {\n \"in\": [{\n \"var\": 'data.storage'\n }, ['indexeddb']]\n }\n }\n}, {\n type: 'textarea',\n key: 'options',\n label: 'Custom request options',\n tooltip: 'Pass your custom xhr options(optional)',\n rows: 5,\n editor: 'ace',\n input: true,\n weight: 15,\n placeholder: \"{\\n \\\"withCredentials\\\": true,\\n \\\"headers\\\": {\\n \\\"Authorization\\\": \\\"Basic \\\"\\n }\\n }\",\n conditional: {\n json: {\n '===': [{\n \"var\": 'data.storage'\n }, 'url']\n }\n }\n}, {\n type: 'textfield',\n input: true,\n key: 'fileKey',\n label: 'File form-data key',\n weight: 17,\n placeholder: 'Enter the key name of a file for form data.',\n tooltip: 'Key name that you would like to modify for the file while calling API request.',\n conditional: {\n json: {\n '===': [{\n \"var\": 'data.storage'\n }, 'url']\n }\n }\n}, {\n type: 'textfield',\n input: true,\n key: 'dir',\n label: 'Directory',\n placeholder: '(optional) Enter a directory for the files',\n tooltip: 'This will place all the files uploaded in this field in the directory',\n weight: 20,\n conditional: {\n json: {\n '!==': [{\n \"var\": 'data.storage'\n }, 'googledrive']\n }\n }\n}, {\n type: 'textfield',\n input: true,\n key: 'dir',\n label: 'Folder ID',\n placeholder: '(optional) Enter an ID of the folder for the files',\n tooltip: 'This will place all the files uploaded in this field in the folder',\n weight: 20,\n conditional: {\n json: {\n '===': [{\n \"var\": 'data.storage'\n }, 'googledrive']\n }\n }\n}, {\n type: 'textfield',\n input: true,\n key: 'fileNameTemplate',\n label: 'File Name Template',\n placeholder: '(optional) { {name} }-{ {guid} }\"',\n tooltip: 'Specify template for name of uploaded file(s). Regular template variables are available (`data`, `component`, `user`, `value`, `moment` etc.), also `fileName`, `guid` variables are available. `guid` part must be present, if not found in template, will be added at the end.',\n weight: 25\n}, {\n type: 'checkbox',\n input: true,\n key: 'image',\n label: 'Display as image(s)',\n tooltip: 'Instead of a list of linked files, images will be rendered in the view.',\n weight: 30\n}, {\n type: 'checkbox',\n input: true,\n key: 'uploadOnly',\n label: 'Upload Only',\n tooltip: 'When this is checked, will only allow you to upload file(s) and consequently the download, in this component, will be unavailable.',\n weight: 33\n}, {\n type: 'checkbox',\n input: true,\n key: 'privateDownload',\n label: 'Private Download',\n tooltip: 'When this is checked, the file download will send a POST request to the download URL with the x-jwt-token header. This will allow your endpoint to create a Private download system.',\n weight: 31,\n conditional: {\n json: {\n '===': [{\n \"var\": 'data.storage'\n }, 'url']\n }\n }\n}, {\n type: 'textfield',\n input: true,\n key: 'imageSize',\n label: 'Image Size',\n placeholder: '100',\n tooltip: 'The image size for previewing images.',\n weight: 40,\n conditional: {\n json: {\n '==': [{\n \"var\": 'data.image'\n }, true]\n }\n }\n}, {\n type: 'checkbox',\n input: true,\n key: 'webcam',\n label: 'Enable web camera',\n tooltip: 'This will allow using an attached camera to directly take a picture instead of uploading an existing file.',\n weight: 32\n}, {\n type: 'textfield',\n input: true,\n key: 'webcamSize',\n label: 'Webcam Width',\n placeholder: '320',\n tooltip: 'The webcam size for taking pictures.',\n weight: 38,\n conditional: {\n json: {\n '==': [{\n \"var\": 'data.webcam'\n }, true]\n }\n }\n}, {\n type: 'datagrid',\n input: true,\n label: 'File Types',\n key: 'fileTypes',\n tooltip: 'Specify file types to classify the uploads. This is useful if you allow multiple types of uploads but want to allow the user to specify which type of file each is.',\n weight: 11,\n components: [{\n label: 'Label',\n key: 'label',\n input: true,\n type: 'textfield'\n }, {\n label: 'Value',\n key: 'value',\n input: true,\n type: 'textfield'\n }]\n}, {\n type: 'textfield',\n input: true,\n key: 'filePattern',\n label: 'File Pattern',\n placeholder: '.jpg,video/*,application/pdf',\n tooltip: 'See https://github.com/danialfarid/ng-file-upload#full-reference for how to specify file patterns.',\n weight: 50\n}, {\n type: 'textfield',\n input: true,\n key: 'fileMinSize',\n label: 'File Minimum Size',\n placeholder: '1MB',\n tooltip: 'See https://github.com/danialfarid/ng-file-upload#full-reference for how to specify file sizes.',\n weight: 60\n}, {\n type: 'textfield',\n input: true,\n key: 'fileMaxSize',\n label: 'File Maximum Size',\n placeholder: '10MB',\n tooltip: 'See https://github.com/danialfarid/ng-file-upload#full-reference for how to specify file sizes.',\n weight: 70\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/file/editForm/File.edit.file.js?"); /***/ }), @@ -1253,10 +1286,10 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /*!**************************************************************!*\ !*** ./lib/components/file/editForm/File.edit.validation.js ***! \**************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'unique',\n ignore: true\n}, {\n key: 'validateOn',\n ignore: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/file/editForm/File.edit.validation.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'unique',\n ignore: true\n}, {\n key: 'validateOn',\n ignore: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/file/editForm/File.edit.validation.js?"); /***/ }), @@ -1267,7 +1300,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\nvar _NestedComponent = _interopRequireDefault(__webpack_require__(/*! ../_classes/nested/NestedComponent.form */ \"./lib/components/_classes/nested/NestedComponent.form.js\"));\n\nvar _FormEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/Form.edit.display */ \"./lib/components/form/editForm/Form.edit.display.js\"));\n\nvar _FormEdit2 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Form.edit.form */ \"./lib/components/form/editForm/Form.edit.form.js\"));\n\nvar _FormEdit3 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Form.edit.data */ \"./lib/components/form/editForm/Form.edit.data.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _NestedComponent.default.apply(void 0, [[{\n key: 'display',\n components: _FormEdit.default\n }, {\n label: 'Form',\n key: 'form',\n weight: 10,\n components: _FormEdit2.default\n }, {\n label: 'Data',\n key: 'data',\n weight: 10,\n components: _FormEdit3.default\n }, {\n key: 'addons',\n ignore: true\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/form/Form.form.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\nvar _NestedComponent = _interopRequireDefault(__webpack_require__(/*! ../_classes/nested/NestedComponent.form */ \"./lib/components/_classes/nested/NestedComponent.form.js\"));\nvar _FormEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/Form.edit.display */ \"./lib/components/form/editForm/Form.edit.display.js\"));\nvar _FormEdit2 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Form.edit.form */ \"./lib/components/form/editForm/Form.edit.form.js\"));\nvar _FormEdit3 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Form.edit.data */ \"./lib/components/form/editForm/Form.edit.data.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _NestedComponent[\"default\"].apply(void 0, [[{\n key: 'display',\n components: _FormEdit[\"default\"]\n }, {\n label: 'Form',\n key: 'form',\n weight: 10,\n components: _FormEdit2[\"default\"]\n }, {\n label: 'Data',\n key: 'data',\n weight: 10,\n components: _FormEdit3[\"default\"]\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/form/Form.form.js?"); /***/ }), @@ -1278,7 +1311,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n\n__webpack_require__(/*! core-js/modules/es.number.parse-int.js */ \"./node_modules/core-js/modules/es.number.parse-int.js\");\n\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.find-index.js */ \"./node_modules/core-js/modules/es.array.find-index.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nvar _Component2 = _interopRequireDefault(__webpack_require__(/*! ../_classes/component/Component */ \"./lib/components/_classes/component/Component.js\"));\n\nvar _ComponentModal = _interopRequireDefault(__webpack_require__(/*! ../_classes/componentModal/ComponentModal */ \"./lib/components/_classes/componentModal/ComponentModal.js\"));\n\nvar _eventemitter = _interopRequireDefault(__webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\"));\n\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\n\nvar _utils = __webpack_require__(/*! ../../utils/utils */ \"./lib/utils/utils.js\");\n\nvar _Formio = __webpack_require__(/*! ../../Formio */ \"./lib/Formio.js\");\n\nvar _Form = _interopRequireDefault(__webpack_require__(/*! ../../Form */ \"./lib/Form.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar FormComponent = /*#__PURE__*/function (_Component) {\n _inherits(FormComponent, _Component);\n\n var _super = _createSuper(FormComponent);\n\n function FormComponent() {\n _classCallCheck(this, FormComponent);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(FormComponent, [{\n key: \"init\",\n value: function init() {\n _get(_getPrototypeOf(FormComponent.prototype), \"init\", this).call(this);\n\n this.formObj = {\n display: this.component.display,\n settings: this.component.settings,\n components: this.component.components\n };\n this.valueChanged = false;\n this.subForm = null;\n this.formSrc = '';\n\n if (this.component.src) {\n this.formSrc = this.component.src;\n }\n\n if (!this.component.src && !this.options.formio && (this.component.form || this.component.path)) {\n if (this.component.project) {\n this.formSrc = _Formio.GlobalFormio.getBaseUrl(); // Check to see if it is a MongoID.\n\n if ((0, _utils.isMongoId)(this.component.project)) {\n this.formSrc += '/project';\n }\n\n this.formSrc += \"/\".concat(this.component.project);\n this.options.project = this.formSrc;\n } else {\n this.formSrc = _Formio.GlobalFormio.getProjectUrl();\n this.options.project = this.formSrc;\n }\n\n if (this.component.form) {\n if ((0, _utils.isMongoId)(this.component.form)) {\n this.formSrc += \"/form/\".concat(this.component.form);\n } else {\n this.formSrc += \"/\".concat(this.component.form);\n }\n } else if (this.component.path) {\n this.formSrc += \"/\".concat(this.component.path);\n }\n } // Build the source based on the root src path.\n\n\n if (!this.formSrc && this.options.formio) {\n var rootSrc = this.options.formio.formsUrl;\n\n if (this.component.form && (0, _utils.isMongoId)(this.component.form)) {\n this.formSrc = \"\".concat(rootSrc, \"/\").concat(this.component.form);\n } else {\n var formPath = this.component.path || this.component.form;\n this.formSrc = \"\".concat(rootSrc.replace(/\\/form$/, ''), \"/\").concat(formPath);\n }\n }\n\n if (this.builderMode && this.component.hasOwnProperty('formRevision')) {\n this.component.revision = this.component.formRevision;\n delete this.component.formRevision;\n } // Add revision version if set.\n\n\n if (this.component.revision || this.component.revision === 0 || this.component.formRevision || this.component.formRevision === 0 || this.component.revisionId) {\n this.setFormRevision(this.component.revisionId || this.component.revision || this.component.formRevision);\n }\n\n return this.createSubForm();\n }\n }, {\n key: \"dataReady\",\n get: function get() {\n return this.subFormReady || _nativePromiseOnly.default.resolve();\n }\n }, {\n key: \"defaultValue\",\n get: function get() {\n // Not not provide a default value unless the subform is ready so that it will initialize correctly.\n return this.subForm ? _get(_getPrototypeOf(FormComponent.prototype), \"defaultValue\", this) : null;\n }\n }, {\n key: \"defaultSchema\",\n get: function get() {\n return FormComponent.schema();\n }\n }, {\n key: \"emptyValue\",\n get: function get() {\n return {\n data: {}\n };\n }\n }, {\n key: \"ready\",\n get: function get() {\n return this.subFormReady || _nativePromiseOnly.default.resolve();\n }\n }, {\n key: \"useOriginalRevision\",\n get: function get() {\n var _this$component, _this$formObj;\n\n return ((_this$component = this.component) === null || _this$component === void 0 ? void 0 : _this$component.useOriginalRevision) && !!((_this$formObj = this.formObj) !== null && _this$formObj !== void 0 && _this$formObj.revisions);\n }\n }, {\n key: \"setFormRevision\",\n value: function setFormRevision(rev) {\n // Remove current revisions from src if it is\n this.formSrc = this.formSrc.replace(/\\/v\\/[0-9a-z]+/, '');\n var revNumber = Number.parseInt(rev);\n\n if (!isNaN(revNumber)) {\n this.subFormRevision = rev;\n this.formSrc += \"/v/\".concat(rev);\n } else {\n this.subFormRevision = undefined;\n }\n }\n }, {\n key: \"getComponent\",\n value: function getComponent(path, fn) {\n path = (0, _utils.getArrayFromComponentPath)(path);\n\n if (path[0] === 'data') {\n path.shift();\n }\n\n var originalPathStr = \"\".concat(this.path, \".data.\").concat((0, _utils.getStringFromComponentPath)(path));\n\n if (this.subForm) {\n return this.subForm.getComponent(path, fn, originalPathStr);\n }\n }\n }, {\n key: \"getSubOptions\",\n value: function getSubOptions() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n options.parentPath = \"\".concat(this.path, \".data.\");\n options.events = this.createEmitter(); // Make sure to not show the submit button in wizards in the nested forms.\n\n _lodash.default.set(options, 'buttonSettings.showSubmit', false);\n\n if (!this.options) {\n return options;\n }\n\n if (this.options.base) {\n options.base = this.options.base;\n }\n\n if (this.options.project) {\n options.project = this.options.project;\n }\n\n if (this.options.readOnly || this.component.disabled) {\n options.readOnly = this.options.readOnly || this.component.disabled;\n }\n\n if (this.options.breadcrumbSettings) {\n options.breadcrumbSettings = this.options.breadcrumbSettings;\n }\n\n if (this.options.buttonSettings) {\n options.buttonSettings = _lodash.default.clone(this.options.buttonSettings);\n }\n\n if (this.options.viewAsHtml) {\n options.viewAsHtml = this.options.viewAsHtml;\n }\n\n if (this.options.language) {\n options.language = this.options.language;\n }\n\n if (this.options.template) {\n options.template = this.options.template;\n }\n\n if (this.options.templates) {\n options.templates = this.options.templates;\n }\n\n if (this.options.renderMode) {\n options.renderMode = this.options.renderMode;\n }\n\n if (this.options.attachMode) {\n options.attachMode = this.options.attachMode;\n }\n\n if (this.options.iconset) {\n options.iconset = this.options.iconset;\n }\n\n if (this.options.fileService) {\n options.fileService = this.options.fileService;\n }\n\n if (this.options.onChange) {\n options.onChange = this.options.onChange;\n }\n\n return options;\n }\n }, {\n key: \"render\",\n value: function render() {\n if (this.builderMode) {\n return _get(_getPrototypeOf(FormComponent.prototype), \"render\", this).call(this, this.component.label || 'Nested form');\n }\n\n var subform = this.subForm ? this.subForm.render() : this.renderTemplate('loading');\n return _get(_getPrototypeOf(FormComponent.prototype), \"render\", this).call(this, subform);\n }\n }, {\n key: \"asString\",\n value: function asString(value) {\n return this.getValueAsString(value);\n }\n /**\n * Prints out the value of form components as a datagrid value.\n */\n\n }, {\n key: \"getValueAsString\",\n value: function getValueAsString(value) {\n if (!value) {\n return 'No data provided';\n }\n\n if (!value.data && value._id) {\n return value._id;\n }\n\n if (!value.data || !Object.keys(value.data).length) {\n return 'No data provided';\n }\n\n return '[Complex Data]';\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n var _this = this;\n\n // Don't attach in builder.\n if (this.builderMode) {\n return _get(_getPrototypeOf(FormComponent.prototype), \"attach\", this).call(this, element);\n }\n\n return _get(_getPrototypeOf(FormComponent.prototype), \"attach\", this).call(this, element).then(function () {\n if (_this.isSubFormLazyLoad() && !_this.hasLoadedForm && !_this.subFormLoading) {\n _this.createSubForm(true);\n }\n\n return _this.subFormReady.then(function () {\n _this.empty(element);\n\n if (_this.options.builder) {\n _this.setContent(element, _this.ce('div', {\n class: 'text-muted text-center p-2'\n }, _this.text(_this.formObj.title)));\n\n return;\n }\n\n _this.setContent(element, _this.render());\n\n if (_this.subForm) {\n if (_this.isNestedWizard) {\n element = _this.root.element;\n }\n\n _this.subForm.attach(element);\n\n _this.valueChanged = _this.hasSetValue;\n\n if (!_this.valueChanged && _this.dataValue.state !== 'submitted') {\n _this.setDefaultValue();\n } else {\n _this.restoreValue();\n }\n }\n\n if (!_this.builderMode && _this.component.modalEdit) {\n var modalShouldBeOpened = _this.componentModal ? _this.componentModal.isOpened : false;\n var currentValue = modalShouldBeOpened ? _this.componentModal.currentValue : _this.dataValue;\n _this.componentModal = new _ComponentModal.default(_this, element, modalShouldBeOpened, currentValue);\n\n _this.setOpenModalElement();\n }\n\n _this.calculateValue();\n });\n });\n }\n }, {\n key: \"detach\",\n value: function detach() {\n if (this.subForm) {\n this.subForm.detach();\n }\n\n _get(_getPrototypeOf(FormComponent.prototype), \"detach\", this).call(this);\n }\n }, {\n key: \"currentForm\",\n get: function get() {\n return this._currentForm;\n },\n set: function set(instance) {\n var _this2 = this;\n\n this._currentForm = instance;\n\n if (!this.subForm) {\n return;\n }\n\n this.subForm.getComponents().forEach(function (component) {\n component.currentForm = _this2;\n });\n }\n }, {\n key: \"hasLoadedForm\",\n get: function get() {\n return this.formObj && this.formObj.components && Array.isArray(this.formObj.components) && this.formObj.components.length;\n }\n }, {\n key: \"isRevisionChanged\",\n get: function get() {\n return _lodash.default.isNumber(this.subFormRevision) && _lodash.default.isNumber(this.formObj._vid) && this.formObj._vid !== this.subFormRevision;\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n if (this.subForm) {\n this.subForm.destroy();\n this.subForm = null;\n this.subFormReady = null;\n }\n\n _get(_getPrototypeOf(FormComponent.prototype), \"destroy\", this).call(this);\n }\n }, {\n key: \"redraw\",\n value: function redraw() {\n if (this.subForm) {\n this.subForm.form = this.formObj;\n this.setSubFormDisabled(this.subForm);\n }\n\n return _get(_getPrototypeOf(FormComponent.prototype), \"redraw\", this).call(this);\n }\n /**\n * Pass everyComponent to subform.\n * @param args\n * @returns {*|void}\n */\n\n }, {\n key: \"everyComponent\",\n value: function everyComponent() {\n if (this.subForm) {\n var _this$subForm;\n\n (_this$subForm = this.subForm).everyComponent.apply(_this$subForm, arguments);\n }\n }\n }, {\n key: \"setSubFormDisabled\",\n value: function setSubFormDisabled(subForm) {\n subForm.disabled = this.disabled; // When the Nested Form is disabled make the subForm disabled\n }\n }, {\n key: \"updateSubWizards\",\n value: function updateSubWizards(subForm) {\n var _this$root,\n _subForm$_form,\n _this3 = this;\n\n if (this.isNestedWizard && (_this$root = this.root) !== null && _this$root !== void 0 && _this$root.subWizards && (subForm === null || subForm === void 0 ? void 0 : (_subForm$_form = subForm._form) === null || _subForm$_form === void 0 ? void 0 : _subForm$_form.display) === 'wizard') {\n var existedForm = this.root.subWizards.findIndex(function (form) {\n return form.component.form === _this3.component.form;\n });\n\n if (existedForm !== -1) {\n this.root.subWizards[existedForm] = this;\n } else {\n this.root.subWizards.push(this);\n }\n\n this.emit('subWizardsUpdated', subForm);\n }\n }\n /**\n * Create a subform instance.\n *\n * @return {*}\n */\n\n }, {\n key: \"createSubForm\",\n value: function createSubForm(fromAttach) {\n var _this4 = this;\n\n this.subFormReady = this.loadSubForm(fromAttach).then(function (form) {\n if (!form) {\n return;\n } // Iterate through every component and hide the submit button.\n\n\n (0, _utils.eachComponent)(form.components, function (component) {\n _this4.hideSubmitButton(component);\n }); // If the subform is already created then destroy the old one.\n\n if (_this4.subForm) {\n _this4.subForm.destroy();\n } // Render the form.\n\n\n return new _Form.default(form, _this4.getSubOptions()).ready.then(function (instance) {\n _this4.subForm = instance;\n _this4.subForm.currentForm = _this4;\n _this4.subForm.parent = _this4;\n _this4.subForm.parentVisible = _this4.visible;\n\n _this4.subForm.on('change', function () {\n if (_this4.subForm) {\n _this4.dataValue = _this4.subForm.getValue();\n\n _this4.triggerChange({\n noEmit: true\n });\n }\n });\n\n _this4.subForm.url = _this4.formSrc;\n _this4.subForm.nosubmit = true;\n _this4.subForm.root = _this4.root;\n _this4.subForm.localRoot = _this4.isNestedWizard ? _this4.localRoot : _this4.subForm;\n\n _this4.restoreValue();\n\n _this4.valueChanged = _this4.hasSetValue;\n\n _this4.onChange();\n\n return _this4.subForm;\n });\n }).then(function (subForm) {\n _this4.updateSubWizards(subForm);\n\n return subForm;\n });\n return this.subFormReady;\n }\n }, {\n key: \"hideSubmitButton\",\n value: function hideSubmitButton(component) {\n var isSubmitButton = component.type === 'button' && (component.action === 'submit' || !component.action);\n\n if (isSubmitButton) {\n component.hidden = true;\n }\n }\n /**\n * Load the subform.\n */\n\n }, {\n key: \"loadSubForm\",\n value: function loadSubForm(fromAttach) {\n var _this5 = this;\n\n if (this.builderMode || this.isHidden() || this.isSubFormLazyLoad() && !fromAttach) {\n return _nativePromiseOnly.default.resolve();\n }\n\n if (this.hasLoadedForm && !this.isRevisionChanged) {\n // Pass config down to sub forms.\n if (this.root && this.root.form && this.root.form.config && !this.formObj.config) {\n this.formObj.config = this.root.form.config;\n }\n\n return _nativePromiseOnly.default.resolve(this.formObj);\n } else if (this.formSrc) {\n this.subFormLoading = true;\n return new _Formio.GlobalFormio(this.formSrc).loadForm({\n params: {\n live: 1\n }\n }).then(function (formObj) {\n _this5.formObj = formObj;\n _this5.subFormLoading = false;\n return formObj;\n }).catch(function (err) {\n console.log(err);\n return null;\n });\n }\n\n return _nativePromiseOnly.default.resolve();\n }\n }, {\n key: \"subFormData\",\n get: function get() {\n var _this$dataValue;\n\n return ((_this$dataValue = this.dataValue) === null || _this$dataValue === void 0 ? void 0 : _this$dataValue.data) || {};\n }\n }, {\n key: \"checkComponentValidity\",\n value: function checkComponentValidity(data, dirty, row, options) {\n options = options || {};\n var silentCheck = options.silentCheck || false;\n\n if (this.subForm) {\n return this.subForm.checkValidity(this.subFormData, dirty, null, silentCheck);\n }\n\n return _get(_getPrototypeOf(FormComponent.prototype), \"checkComponentValidity\", this).call(this, data, dirty, row, options);\n }\n }, {\n key: \"checkComponentConditions\",\n value: function checkComponentConditions(data, flags, row) {\n var _this6 = this;\n\n var visible = _get(_getPrototypeOf(FormComponent.prototype), \"checkComponentConditions\", this).call(this, data, flags, row); // Return if already hidden\n\n\n if (!visible) {\n return visible;\n }\n\n if (this.subForm) {\n return this.subForm.checkConditions(this.subFormData);\n } // There are few cases when subForm is not loaded when a change is triggered,\n // so we need to perform checkConditions after it is ready, or some conditional fields might be hidden in View mode\n else if (this.subFormReady) {\n this.subFormReady.then(function () {\n if (_this6.subForm) {\n return _this6.subForm.checkConditions(_this6.subFormData);\n }\n });\n }\n\n return visible;\n }\n }, {\n key: \"calculateValue\",\n value: function calculateValue(data, flags, row) {\n if (this.subForm) {\n return this.subForm.calculateValue(this.subFormData, flags);\n }\n\n return _get(_getPrototypeOf(FormComponent.prototype), \"calculateValue\", this).call(this, data, flags, row);\n }\n }, {\n key: \"setPristine\",\n value: function setPristine(pristine) {\n _get(_getPrototypeOf(FormComponent.prototype), \"setPristine\", this).call(this, pristine);\n\n if (this.subForm) {\n this.subForm.setPristine(pristine);\n }\n }\n /**\n * Determine if the subform should be submitted.\n * @return {*|boolean}\n */\n\n }, {\n key: \"shouldSubmit\",\n get: function get() {\n return this.subFormReady && (!this.component.hasOwnProperty('reference') || this.component.reference) && !this.isHidden();\n }\n /**\n * Returns the data for the subform.\n *\n * @return {*}\n */\n\n }, {\n key: \"getSubFormData\",\n value: function getSubFormData() {\n if (_lodash.default.get(this.subForm, 'form.display') === 'pdf') {\n return this.subForm.getSubmission();\n } else {\n return _nativePromiseOnly.default.resolve(this.dataValue);\n }\n }\n /**\n * Submit the subform if configured to do so.\n *\n * @return {*}\n */\n\n }, {\n key: \"submitSubForm\",\n value: function submitSubForm(rejectOnError) {\n var _this7 = this;\n\n // If we wish to submit the form on next page, then do that here.\n if (this.shouldSubmit) {\n return this.subFormReady.then(function () {\n if (!_this7.subForm) {\n return _this7.dataValue;\n }\n\n _this7.subForm.nosubmit = false;\n return _this7.subForm.submitForm().then(function (result) {\n _this7.subForm.loading = false;\n _this7.subForm.showAllErrors = false;\n _this7.dataValue = result.submission;\n return _this7.dataValue;\n }).catch(function (err) {\n _this7.subForm.showAllErrors = true;\n\n if (rejectOnError) {\n _this7.subForm.onSubmissionError(err);\n\n return _nativePromiseOnly.default.reject(err);\n } else {\n return {};\n }\n });\n });\n }\n\n return this.getSubFormData();\n }\n /**\n * Submit the form before the next page is triggered.\n */\n\n }, {\n key: \"beforePage\",\n value: function beforePage(next) {\n var _this8 = this;\n\n // Should not submit child forms if we are going to the previous page\n if (!next) {\n return _get(_getPrototypeOf(FormComponent.prototype), \"beforePage\", this).call(this, next);\n }\n\n return this.submitSubForm(true).then(function () {\n return _get(_getPrototypeOf(FormComponent.prototype), \"beforePage\", _this8).call(_this8, next);\n });\n }\n /**\n * Submit the form before the whole form is triggered.\n */\n\n }, {\n key: \"beforeSubmit\",\n value: function beforeSubmit() {\n var _this$subForm2,\n _this9 = this;\n\n var submission = this.dataValue;\n var isAlreadySubmitted = submission && submission._id && submission.form; // This submission has already been submitted, so just return the reference data.\n\n if (isAlreadySubmitted && !((_this$subForm2 = this.subForm) !== null && _this$subForm2 !== void 0 && _this$subForm2.wizard)) {\n this.dataValue = submission;\n return _nativePromiseOnly.default.resolve(this.dataValue);\n }\n\n return this.submitSubForm(false).then(function () {\n return _this9.dataValue;\n }).then(function () {\n return _get(_getPrototypeOf(FormComponent.prototype), \"beforeSubmit\", _this9).call(_this9);\n });\n }\n }, {\n key: \"isSubFormLazyLoad\",\n value: function isSubFormLazyLoad() {\n var _this$root2, _this$root2$_form;\n\n return ((_this$root2 = this.root) === null || _this$root2 === void 0 ? void 0 : (_this$root2$_form = _this$root2._form) === null || _this$root2$_form === void 0 ? void 0 : _this$root2$_form.display) === 'wizard' && this.component.lazyLoad;\n }\n }, {\n key: \"isHidden\",\n value: function isHidden() {\n if (!this.visible) {\n return true;\n }\n\n return !_get(_getPrototypeOf(FormComponent.prototype), \"checkConditions\", this).call(this, this.rootValue);\n }\n }, {\n key: \"setValue\",\n value: function setValue(submission) {\n var _this10 = this;\n\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n var changed = _get(_getPrototypeOf(FormComponent.prototype), \"setValue\", this).call(this, submission, flags);\n\n this.valueChanged = true;\n\n if (this.subForm) {\n var _this$subForm$form;\n\n var revisionPath = submission._frid ? '_frid' : '_vid';\n var shouldLoadOriginalRevision = this.useOriginalRevision && _lodash.default.isNumber(submission[revisionPath]) && _lodash.default.isNumber((_this$subForm$form = this.subForm.form) === null || _this$subForm$form === void 0 ? void 0 : _this$subForm$form[revisionPath]) && submission._fvid !== this.subForm.form[revisionPath];\n\n if (shouldLoadOriginalRevision) {\n this.setFormRevision(submission._frid || submission._fvid);\n this.createSubForm().then(function () {\n _this10.attach(_this10.element);\n });\n } else {\n this.setSubFormValue(submission, flags);\n }\n }\n\n return changed;\n }\n }, {\n key: \"setSubFormValue\",\n value: function setSubFormValue(submission, flags) {\n var shouldLoadSubmissionById = submission && submission._id && this.subForm.formio && _lodash.default.isEmpty(submission.data);\n\n if (shouldLoadSubmissionById) {\n var formId = submission.form || this.formObj.form || this.component.form;\n var submissionUrl = \"\".concat(this.subForm.formio.formsUrl, \"/\").concat(formId, \"/submission/\").concat(submission._id);\n this.subForm.setUrl(submissionUrl, this.options);\n this.subForm.loadSubmission();\n } else {\n this.subForm.setValue(submission, flags);\n }\n }\n }, {\n key: \"isEmpty\",\n value: function isEmpty() {\n var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.dataValue;\n return value === null || _lodash.default.isEqual(value, this.emptyValue) || this.areAllComponentsEmpty(value.data) && !value._id;\n }\n }, {\n key: \"areAllComponentsEmpty\",\n value: function areAllComponentsEmpty(data) {\n var res = true;\n\n if (this.subForm) {\n this.subForm.everyComponent(function (comp) {\n var componentValue = _lodash.default.get(data, comp.key);\n\n res &= comp.isEmpty(componentValue);\n });\n } else {\n res = false;\n }\n\n return res;\n }\n }, {\n key: \"getValue\",\n value: function getValue() {\n if (this.subForm) {\n return this.subForm.getValue();\n }\n\n return this.dataValue;\n }\n }, {\n key: \"errors\",\n get: function get() {\n var errors = _get(_getPrototypeOf(FormComponent.prototype), \"errors\", this);\n\n if (this.subForm) {\n errors = errors.concat(this.subForm.errors);\n }\n\n return errors;\n }\n }, {\n key: \"updateSubFormVisibility\",\n value: function updateSubFormVisibility() {\n if (this.subForm) {\n this.subForm.parentVisible = this.visible;\n }\n }\n /**\n * Determines if this form is a Nested Wizard\n * which means it should be a Wizard itself and should be a direct child of a Wizard's page\n * @returns {boolean}\n */\n\n }, {\n key: \"isNestedWizard\",\n get: function get() {\n var _this$subForm3, _this$subForm3$_form, _this$parent, _this$parent$parent, _this$parent$parent$_;\n\n return ((_this$subForm3 = this.subForm) === null || _this$subForm3 === void 0 ? void 0 : (_this$subForm3$_form = _this$subForm3._form) === null || _this$subForm3$_form === void 0 ? void 0 : _this$subForm3$_form.display) === 'wizard' && ((_this$parent = this.parent) === null || _this$parent === void 0 ? void 0 : (_this$parent$parent = _this$parent.parent) === null || _this$parent$parent === void 0 ? void 0 : (_this$parent$parent$_ = _this$parent$parent._form) === null || _this$parent$parent$_ === void 0 ? void 0 : _this$parent$parent$_.display) === 'wizard';\n }\n }, {\n key: \"visible\",\n get: function get() {\n return _get(_getPrototypeOf(FormComponent.prototype), \"visible\", this);\n },\n set: function set(value) {\n var _this11 = this;\n\n var isNestedWizard = this.isNestedWizard;\n\n if (this._visible !== value) {\n this._visible = value; // Form doesn't load if hidden. If it becomes visible, create the form.\n\n if (!this.subForm && value) {\n this.createSubForm();\n this.subFormReady.then(function () {\n _this11.updateSubFormVisibility();\n\n _this11.clearOnHide();\n });\n this.redraw();\n return;\n }\n\n this.updateSubFormVisibility();\n this.clearOnHide();\n isNestedWizard ? this.rebuild() : this.redraw();\n }\n\n if (!value && isNestedWizard) {\n this.root.redraw();\n }\n }\n }, {\n key: \"parentVisible\",\n get: function get() {\n return _get(_getPrototypeOf(FormComponent.prototype), \"parentVisible\", this);\n },\n set: function set(value) {\n var _this12 = this;\n\n if (this._parentVisible !== value) {\n this._parentVisible = value;\n this.clearOnHide(); // Form doesn't load if hidden. If it becomes visible, create the form.\n\n if (!this.subForm && value) {\n this.createSubForm();\n this.subFormReady.then(function () {\n _this12.updateSubFormVisibility();\n });\n this.redraw();\n return;\n }\n\n this.updateSubFormVisibility();\n this.redraw();\n }\n }\n }, {\n key: \"isInternalEvent\",\n value: function isInternalEvent(event) {\n switch (event) {\n case 'focus':\n case 'blur':\n case 'componentChange':\n case 'componentError':\n case 'error':\n case 'formLoad':\n case 'languageChanged':\n case 'render':\n case 'checkValidity':\n case 'initialized':\n case 'submit':\n case 'submitButton':\n case 'nosubmit':\n case 'updateComponent':\n case 'submitDone':\n case 'submissionDeleted':\n case 'requestDone':\n case 'nextPage':\n case 'prevPage':\n case 'wizardNavigationClicked':\n case 'updateWizardNav':\n case 'restoreDraft':\n case 'saveDraft':\n case 'saveComponent':\n case 'pdfUploaded':\n return true;\n\n default:\n return false;\n }\n }\n }, {\n key: \"createEmitter\",\n value: function createEmitter() {\n var emitter = new _eventemitter.default();\n var nativeEmit = emitter.emit;\n var that = this;\n\n emitter.emit = function (event) {\n var eventType = event.replace(\"\".concat(that.options.namespace, \".\"), '');\n\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\n nativeEmit.call.apply(nativeEmit, [this, event].concat(args));\n\n if (!that.isInternalEvent(eventType)) {\n that.emit.apply(that, [eventType].concat(args));\n }\n };\n\n return emitter;\n }\n }, {\n key: \"deleteValue\",\n value: function deleteValue() {\n _get(_getPrototypeOf(FormComponent.prototype), \"setValue\", this).call(this, null, {\n noUpdateEvent: true,\n noDefault: true\n });\n\n this.unset();\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len2 = arguments.length, extend = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n extend[_key2] = arguments[_key2];\n }\n\n return _Component2.default.schema.apply(_Component2.default, [{\n label: 'Form',\n type: 'form',\n key: 'form',\n src: '',\n reference: true,\n form: '',\n path: '',\n tableView: true\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Nested Form',\n icon: 'wpforms',\n group: 'premium',\n documentation: '/userguide/forms/premium-components#nested-form',\n weight: 110,\n schema: FormComponent.schema()\n };\n }\n }]);\n\n return FormComponent;\n}(_Component2.default);\n\nexports[\"default\"] = FormComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/form/Form.js?"); +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n__webpack_require__(/*! core-js/modules/es.number.parse-int.js */ \"./node_modules/core-js/modules/es.number.parse-int.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.array.is-array.js */ \"./node_modules/core-js/modules/es.array.is-array.js\");\n__webpack_require__(/*! core-js/modules/es.array.find-index.js */ \"./node_modules/core-js/modules/es.array.find-index.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nvar _Component2 = _interopRequireDefault(__webpack_require__(/*! ../_classes/component/Component */ \"./lib/components/_classes/component/Component.js\"));\nvar _ComponentModal = _interopRequireDefault(__webpack_require__(/*! ../_classes/componentModal/ComponentModal */ \"./lib/components/_classes/componentModal/ComponentModal.js\"));\nvar _eventemitter = _interopRequireDefault(__webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\"));\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\nvar _utils = __webpack_require__(/*! ../../utils/utils */ \"./lib/utils/utils.js\");\nvar _Formio = __webpack_require__(/*! ../../Formio */ \"./lib/Formio.js\");\nvar _Form = _interopRequireDefault(__webpack_require__(/*! ../../Form */ \"./lib/Form.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar FormComponent = /*#__PURE__*/function (_Component) {\n _inherits(FormComponent, _Component);\n var _super = _createSuper(FormComponent);\n function FormComponent() {\n _classCallCheck(this, FormComponent);\n return _super.apply(this, arguments);\n }\n _createClass(FormComponent, [{\n key: \"init\",\n value: function init() {\n _get(_getPrototypeOf(FormComponent.prototype), \"init\", this).call(this);\n this.formObj = {\n display: this.component.display,\n settings: this.component.settings,\n components: this.component.components\n };\n this.valueChanged = false;\n this.subForm = null;\n this.formSrc = '';\n if (this.component.src) {\n this.formSrc = this.component.src;\n }\n if (!this.component.src && !this.options.formio && (this.component.form || this.component.path)) {\n if (this.component.project) {\n this.formSrc = _Formio.GlobalFormio.getBaseUrl();\n // Check to see if it is a MongoID.\n if ((0, _utils.isMongoId)(this.component.project)) {\n this.formSrc += '/project';\n }\n this.formSrc += \"/\".concat(this.component.project);\n this.options.project = this.formSrc;\n } else {\n this.formSrc = _Formio.GlobalFormio.getProjectUrl();\n this.options.project = this.formSrc;\n }\n if (this.component.form) {\n if ((0, _utils.isMongoId)(this.component.form)) {\n this.formSrc += \"/form/\".concat(this.component.form);\n } else {\n this.formSrc += \"/\".concat(this.component.form);\n }\n } else if (this.component.path) {\n this.formSrc += \"/\".concat(this.component.path);\n }\n }\n\n // Build the source based on the root src path.\n if (!this.formSrc && this.options.formio) {\n var rootSrc = this.options.formio.formsUrl;\n if (this.component.form && (0, _utils.isMongoId)(this.component.form)) {\n this.formSrc = \"\".concat(rootSrc, \"/\").concat(this.component.form);\n } else {\n var formPath = this.component.path || this.component.form;\n this.formSrc = \"\".concat(rootSrc.replace(/\\/form$/, ''), \"/\").concat(formPath);\n }\n }\n if (this.builderMode && this.component.hasOwnProperty('formRevision')) {\n this.component.revision = this.component.formRevision;\n delete this.component.formRevision;\n }\n\n // Add revision version if set.\n if (this.component.revision || this.component.revision === 0 || this.component.formRevision || this.component.formRevision === 0 || this.component.revisionId) {\n this.setFormRevision(this.component.revisionId || this.component.revision || this.component.formRevision);\n }\n return this.createSubForm();\n }\n }, {\n key: \"dataReady\",\n get: function get() {\n return this.subFormReady || _nativePromiseOnly[\"default\"].resolve();\n }\n }, {\n key: \"defaultValue\",\n get: function get() {\n // Not not provide a default value unless the subform is ready so that it will initialize correctly.\n return this.subForm ? _get(_getPrototypeOf(FormComponent.prototype), \"defaultValue\", this) : null;\n }\n }, {\n key: \"defaultSchema\",\n get: function get() {\n return FormComponent.schema();\n }\n }, {\n key: \"emptyValue\",\n get: function get() {\n return {\n data: {}\n };\n }\n }, {\n key: \"ready\",\n get: function get() {\n return this.subFormReady || _nativePromiseOnly[\"default\"].resolve();\n }\n }, {\n key: \"useOriginalRevision\",\n get: function get() {\n var _this$component, _this$formObj;\n return ((_this$component = this.component) === null || _this$component === void 0 ? void 0 : _this$component.useOriginalRevision) && !!((_this$formObj = this.formObj) !== null && _this$formObj !== void 0 && _this$formObj.revisions);\n }\n }, {\n key: \"setFormRevision\",\n value: function setFormRevision(rev) {\n // Remove current revisions from src if it is\n this.formSrc = this.formSrc.replace(/\\/v\\/[0-9a-z]+/, '');\n var revNumber = Number.parseInt(rev);\n if (!isNaN(revNumber)) {\n this.subFormRevision = rev;\n this.formSrc += \"/v/\".concat(rev);\n } else {\n this.subFormRevision = undefined;\n }\n }\n }, {\n key: \"getComponent\",\n value: function getComponent(path, fn) {\n path = (0, _utils.getArrayFromComponentPath)(path);\n if (path[0] === 'data') {\n path.shift();\n }\n var originalPathStr = \"\".concat(this.path, \".data.\").concat((0, _utils.getStringFromComponentPath)(path));\n if (this.subForm) {\n return this.subForm.getComponent(path, fn, originalPathStr);\n }\n }\n }, {\n key: \"getSubOptions\",\n value: function getSubOptions() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n options.parentPath = \"\".concat(this.path, \".data.\");\n options.events = this.createEmitter();\n\n // Make sure to not show the submit button in wizards in the nested forms.\n _lodash[\"default\"].set(options, 'buttonSettings.showSubmit', false);\n if (!this.options) {\n return options;\n }\n if (this.options.base) {\n options.base = this.options.base;\n }\n if (this.options.project) {\n options.project = this.options.project;\n }\n if (this.options.readOnly || this.component.disabled) {\n options.readOnly = this.options.readOnly || this.component.disabled;\n }\n if (this.options.breadcrumbSettings) {\n options.breadcrumbSettings = this.options.breadcrumbSettings;\n }\n if (this.options.buttonSettings) {\n options.buttonSettings = _lodash[\"default\"].clone(this.options.buttonSettings);\n }\n if (this.options.viewAsHtml) {\n options.viewAsHtml = this.options.viewAsHtml;\n }\n if (this.options.language) {\n options.language = this.options.language;\n }\n if (this.options.template) {\n options.template = this.options.template;\n }\n if (this.options.templates) {\n options.templates = this.options.templates;\n }\n if (this.options.renderMode) {\n options.renderMode = this.options.renderMode;\n }\n if (this.options.attachMode) {\n options.attachMode = this.options.attachMode;\n }\n if (this.options.iconset) {\n options.iconset = this.options.iconset;\n }\n if (this.options.fileService) {\n options.fileService = this.options.fileService;\n }\n if (this.options.onChange) {\n options.onChange = this.options.onChange;\n }\n return options;\n }\n }, {\n key: \"render\",\n value: function render() {\n if (this.builderMode) {\n return _get(_getPrototypeOf(FormComponent.prototype), \"render\", this).call(this, this.component.label || 'Nested form');\n }\n var subform = this.subForm ? this.subForm.render() : this.renderTemplate('loading');\n return _get(_getPrototypeOf(FormComponent.prototype), \"render\", this).call(this, subform);\n }\n }, {\n key: \"asString\",\n value: function asString(value) {\n return this.getValueAsString(value);\n }\n\n /**\n * Prints out the value of form components as a datagrid value.\n */\n }, {\n key: \"getValueAsString\",\n value: function getValueAsString(value) {\n if (!value) {\n return 'No data provided';\n }\n if (!value.data && value._id) {\n return value._id;\n }\n if (!value.data || !Object.keys(value.data).length) {\n return 'No data provided';\n }\n return '[Complex Data]';\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n var _this = this;\n // Don't attach in builder.\n if (this.builderMode) {\n return _get(_getPrototypeOf(FormComponent.prototype), \"attach\", this).call(this, element);\n }\n return _get(_getPrototypeOf(FormComponent.prototype), \"attach\", this).call(this, element).then(function () {\n if (_this.isSubFormLazyLoad() && !_this.hasLoadedForm && !_this.subFormLoading) {\n _this.createSubForm(true);\n }\n return _this.subFormReady.then(function () {\n _this.empty(element);\n if (_this.options.builder) {\n _this.setContent(element, _this.ce('div', {\n \"class\": 'text-muted text-center p-2'\n }, _this.text(_this.formObj.title)));\n return;\n }\n _this.setContent(element, _this.render());\n if (_this.subForm) {\n if (_this.isNestedWizard) {\n element = _this.root.element;\n }\n _this.subForm.attach(element);\n _this.valueChanged = _this.hasSetValue;\n if (!_this.valueChanged && _this.dataValue.state !== 'submitted') {\n _this.setDefaultValue();\n } else {\n _this.restoreValue();\n }\n }\n if (!_this.builderMode && _this.component.modalEdit) {\n var modalShouldBeOpened = _this.componentModal ? _this.componentModal.isOpened : false;\n var currentValue = modalShouldBeOpened ? _this.componentModal.currentValue : _this.dataValue;\n _this.componentModal = new _ComponentModal[\"default\"](_this, element, modalShouldBeOpened, currentValue);\n _this.setOpenModalElement();\n }\n _this.calculateValue();\n });\n });\n }\n }, {\n key: \"detach\",\n value: function detach() {\n if (this.subForm) {\n this.subForm.detach();\n }\n _get(_getPrototypeOf(FormComponent.prototype), \"detach\", this).call(this);\n }\n }, {\n key: \"currentForm\",\n get: function get() {\n return this._currentForm;\n },\n set: function set(instance) {\n var _this2 = this;\n this._currentForm = instance;\n if (!this.subForm) {\n return;\n }\n this.subForm.getComponents().forEach(function (component) {\n component.currentForm = _this2;\n });\n }\n }, {\n key: \"hasLoadedForm\",\n get: function get() {\n return this.formObj && this.formObj.components && Array.isArray(this.formObj.components) && this.formObj.components.length;\n }\n }, {\n key: \"isRevisionChanged\",\n get: function get() {\n return _lodash[\"default\"].isNumber(this.subFormRevision) && _lodash[\"default\"].isNumber(this.formObj._vid) && this.formObj._vid !== this.subFormRevision;\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n if (this.subForm) {\n this.subForm.destroy();\n this.subForm = null;\n this.subFormReady = null;\n }\n _get(_getPrototypeOf(FormComponent.prototype), \"destroy\", this).call(this);\n }\n }, {\n key: \"redraw\",\n value: function redraw() {\n if (this.subForm) {\n this.subForm.form = this.formObj;\n this.setSubFormDisabled(this.subForm);\n }\n return _get(_getPrototypeOf(FormComponent.prototype), \"redraw\", this).call(this);\n }\n\n /**\n * Pass everyComponent to subform.\n * @param args\n * @returns {*|void}\n */\n }, {\n key: \"everyComponent\",\n value: function everyComponent() {\n if (this.subForm) {\n var _this$subForm;\n (_this$subForm = this.subForm).everyComponent.apply(_this$subForm, arguments);\n }\n }\n }, {\n key: \"setSubFormDisabled\",\n value: function setSubFormDisabled(subForm) {\n subForm.disabled = this.disabled; // When the Nested Form is disabled make the subForm disabled\n }\n }, {\n key: \"updateSubWizards\",\n value: function updateSubWizards(subForm) {\n var _this$root,\n _subForm$_form,\n _this3 = this;\n if (this.isNestedWizard && (_this$root = this.root) !== null && _this$root !== void 0 && _this$root.subWizards && (subForm === null || subForm === void 0 ? void 0 : (_subForm$_form = subForm._form) === null || _subForm$_form === void 0 ? void 0 : _subForm$_form.display) === 'wizard') {\n var existedForm = this.root.subWizards.findIndex(function (form) {\n return form.component.form === _this3.component.form;\n });\n if (existedForm !== -1) {\n this.root.subWizards[existedForm] = this;\n } else {\n this.root.subWizards.push(this);\n }\n this.emit('subWizardsUpdated', subForm);\n }\n }\n\n /**\n * Create a subform instance.\n *\n * @return {*}\n */\n }, {\n key: \"createSubForm\",\n value: function createSubForm(fromAttach) {\n var _this4 = this;\n this.subFormReady = this.loadSubForm(fromAttach).then(function (form) {\n if (!form) {\n return;\n }\n\n // Iterate through every component and hide the submit button.\n (0, _utils.eachComponent)(form.components, function (component) {\n _this4.hideSubmitButton(component);\n });\n\n // If the subform is already created then destroy the old one.\n if (_this4.subForm) {\n _this4.subForm.destroy();\n }\n\n // Render the form.\n return new _Form[\"default\"](form, _this4.getSubOptions()).ready.then(function (instance) {\n _this4.subForm = instance;\n _this4.subForm.currentForm = _this4;\n _this4.subForm.parent = _this4;\n _this4.subForm.parentVisible = _this4.visible;\n _this4.subForm.on('change', function () {\n if (_this4.subForm) {\n _this4.dataValue = _this4.subForm.getValue();\n _this4.triggerChange({\n noEmit: true\n });\n }\n });\n _this4.subForm.url = _this4.formSrc;\n _this4.subForm.nosubmit = true;\n _this4.subForm.root = _this4.root;\n _this4.subForm.localRoot = _this4.isNestedWizard ? _this4.localRoot : _this4.subForm;\n _this4.restoreValue();\n _this4.valueChanged = _this4.hasSetValue;\n _this4.onChange();\n return _this4.subForm;\n });\n }).then(function (subForm) {\n _this4.updateSubWizards(subForm);\n return subForm;\n });\n return this.subFormReady;\n }\n }, {\n key: \"hideSubmitButton\",\n value: function hideSubmitButton(component) {\n var isSubmitButton = component.type === 'button' && (component.action === 'submit' || !component.action);\n if (isSubmitButton) {\n component.hidden = true;\n }\n }\n\n /**\n * Load the subform.\n */\n }, {\n key: \"loadSubForm\",\n value: function loadSubForm(fromAttach) {\n var _this5 = this;\n if (this.builderMode || this.isHidden() || this.isSubFormLazyLoad() && !fromAttach) {\n return _nativePromiseOnly[\"default\"].resolve();\n }\n if (this.hasLoadedForm && !this.isRevisionChanged) {\n // Pass config down to sub forms.\n if (this.root && this.root.form && this.root.form.config && !this.formObj.config) {\n this.formObj.config = this.root.form.config;\n }\n return _nativePromiseOnly[\"default\"].resolve(this.formObj);\n } else if (this.formSrc) {\n this.subFormLoading = true;\n return new _Formio.GlobalFormio(this.formSrc).loadForm({\n params: {\n live: 1\n }\n }).then(function (formObj) {\n _this5.formObj = formObj;\n _this5.subFormLoading = false;\n return formObj;\n })[\"catch\"](function (err) {\n console.log(err);\n return null;\n });\n }\n return _nativePromiseOnly[\"default\"].resolve();\n }\n }, {\n key: \"subFormData\",\n get: function get() {\n var _this$dataValue;\n return ((_this$dataValue = this.dataValue) === null || _this$dataValue === void 0 ? void 0 : _this$dataValue.data) || {};\n }\n }, {\n key: \"checkComponentValidity\",\n value: function checkComponentValidity(data, dirty, row, options) {\n options = options || {};\n var silentCheck = options.silentCheck || false;\n if (this.subForm) {\n return this.subForm.checkValidity(this.subFormData, dirty, null, silentCheck);\n }\n return _get(_getPrototypeOf(FormComponent.prototype), \"checkComponentValidity\", this).call(this, data, dirty, row, options);\n }\n }, {\n key: \"checkComponentConditions\",\n value: function checkComponentConditions(data, flags, row) {\n var _this6 = this;\n var visible = _get(_getPrototypeOf(FormComponent.prototype), \"checkComponentConditions\", this).call(this, data, flags, row);\n\n // Return if already hidden\n if (!visible) {\n return visible;\n }\n if (this.subForm) {\n return this.subForm.checkConditions(this.subFormData);\n }\n // There are few cases when subForm is not loaded when a change is triggered,\n // so we need to perform checkConditions after it is ready, or some conditional fields might be hidden in View mode\n else if (this.subFormReady) {\n this.subFormReady.then(function () {\n if (_this6.subForm) {\n return _this6.subForm.checkConditions(_this6.subFormData);\n }\n });\n }\n return visible;\n }\n }, {\n key: \"calculateValue\",\n value: function calculateValue(data, flags, row) {\n if (this.subForm) {\n return this.subForm.calculateValue(this.subFormData, flags);\n }\n return _get(_getPrototypeOf(FormComponent.prototype), \"calculateValue\", this).call(this, data, flags, row);\n }\n }, {\n key: \"setPristine\",\n value: function setPristine(pristine) {\n _get(_getPrototypeOf(FormComponent.prototype), \"setPristine\", this).call(this, pristine);\n if (this.subForm) {\n this.subForm.setPristine(pristine);\n }\n }\n\n /**\n * Determine if the subform should be submitted.\n * @return {*|boolean}\n */\n }, {\n key: \"shouldSubmit\",\n get: function get() {\n return this.subFormReady && (!this.component.hasOwnProperty('reference') || this.component.reference) && !this.isHidden();\n }\n\n /**\n * Returns the data for the subform.\n *\n * @return {*}\n */\n }, {\n key: \"getSubFormData\",\n value: function getSubFormData() {\n if (_lodash[\"default\"].get(this.subForm, 'form.display') === 'pdf') {\n return this.subForm.getSubmission();\n } else {\n return _nativePromiseOnly[\"default\"].resolve(this.dataValue);\n }\n }\n\n /**\n * Submit the subform if configured to do so.\n *\n * @return {*}\n */\n }, {\n key: \"submitSubForm\",\n value: function submitSubForm(rejectOnError) {\n var _this7 = this;\n // If we wish to submit the form on next page, then do that here.\n if (this.shouldSubmit) {\n return this.subFormReady.then(function () {\n if (!_this7.subForm) {\n return _this7.dataValue;\n }\n _this7.subForm.nosubmit = false;\n return _this7.subForm.submitForm().then(function (result) {\n _this7.subForm.loading = false;\n _this7.subForm.showAllErrors = false;\n _this7.dataValue = result.submission;\n return _this7.dataValue;\n })[\"catch\"](function (err) {\n _this7.subForm.showAllErrors = true;\n if (rejectOnError) {\n _this7.subForm.onSubmissionError(err);\n return _nativePromiseOnly[\"default\"].reject(err);\n } else {\n return {};\n }\n });\n });\n }\n return this.getSubFormData();\n }\n\n /**\n * Submit the form before the next page is triggered.\n */\n }, {\n key: \"beforePage\",\n value: function beforePage(next) {\n var _this8 = this;\n // Should not submit child forms if we are going to the previous page\n if (!next) {\n return _get(_getPrototypeOf(FormComponent.prototype), \"beforePage\", this).call(this, next);\n }\n return this.submitSubForm(true).then(function () {\n return _get(_getPrototypeOf(FormComponent.prototype), \"beforePage\", _this8).call(_this8, next);\n });\n }\n\n /**\n * Submit the form before the whole form is triggered.\n */\n }, {\n key: \"beforeSubmit\",\n value: function beforeSubmit() {\n var _this$subForm2,\n _this9 = this;\n var submission = this.dataValue;\n var isAlreadySubmitted = submission && submission._id && submission.form;\n\n // This submission has already been submitted, so just return the reference data.\n if (isAlreadySubmitted && !((_this$subForm2 = this.subForm) !== null && _this$subForm2 !== void 0 && _this$subForm2.wizard)) {\n this.dataValue = submission;\n return _nativePromiseOnly[\"default\"].resolve(this.dataValue);\n }\n return this.submitSubForm(false).then(function () {\n return _this9.dataValue;\n }).then(function () {\n return _get(_getPrototypeOf(FormComponent.prototype), \"beforeSubmit\", _this9).call(_this9);\n });\n }\n }, {\n key: \"isSubFormLazyLoad\",\n value: function isSubFormLazyLoad() {\n var _this$root2, _this$root2$_form;\n return ((_this$root2 = this.root) === null || _this$root2 === void 0 ? void 0 : (_this$root2$_form = _this$root2._form) === null || _this$root2$_form === void 0 ? void 0 : _this$root2$_form.display) === 'wizard' && this.component.lazyLoad;\n }\n }, {\n key: \"isHidden\",\n value: function isHidden() {\n if (!this.visible) {\n return true;\n }\n return !_get(_getPrototypeOf(FormComponent.prototype), \"checkConditions\", this).call(this, this.rootValue);\n }\n }, {\n key: \"setValue\",\n value: function setValue(submission) {\n var _this10 = this;\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var changed = _get(_getPrototypeOf(FormComponent.prototype), \"setValue\", this).call(this, submission, flags);\n this.valueChanged = true;\n if (this.subForm) {\n var _this$subForm$form;\n var revisionPath = submission._frid ? '_frid' : '_vid';\n var shouldLoadOriginalRevision = this.useOriginalRevision && (_lodash[\"default\"].isNumber(submission[revisionPath]) || _lodash[\"default\"].isNumber(submission._fvid)) && _lodash[\"default\"].isNumber((_this$subForm$form = this.subForm.form) === null || _this$subForm$form === void 0 ? void 0 : _this$subForm$form[revisionPath]) && submission._fvid !== this.subForm.form[revisionPath];\n if (shouldLoadOriginalRevision) {\n this.setFormRevision(submission._frid || submission._fvid);\n this.createSubForm().then(function () {\n _this10.attach(_this10.element);\n });\n } else {\n this.setSubFormValue(submission, flags);\n }\n }\n return changed;\n }\n }, {\n key: \"setSubFormValue\",\n value: function setSubFormValue(submission, flags) {\n var shouldLoadSubmissionById = submission && submission._id && this.subForm.formio && _lodash[\"default\"].isEmpty(submission.data);\n if (shouldLoadSubmissionById) {\n var formId = submission.form || this.formObj.form || this.component.form;\n var submissionUrl = \"\".concat(this.subForm.formio.formsUrl, \"/\").concat(formId, \"/submission/\").concat(submission._id);\n this.subForm.setUrl(submissionUrl, this.options);\n this.subForm.loadSubmission();\n } else {\n this.subForm.setValue(submission, flags);\n }\n }\n }, {\n key: \"isEmpty\",\n value: function isEmpty() {\n var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.dataValue;\n return value === null || _lodash[\"default\"].isEqual(value, this.emptyValue) || this.areAllComponentsEmpty(value.data) && !value._id;\n }\n }, {\n key: \"areAllComponentsEmpty\",\n value: function areAllComponentsEmpty(data) {\n var res = true;\n if (this.subForm) {\n this.subForm.everyComponent(function (comp) {\n var componentValue = _lodash[\"default\"].get(data, comp.key);\n res &= comp.isEmpty(componentValue);\n });\n } else {\n res = false;\n }\n return res;\n }\n }, {\n key: \"getValue\",\n value: function getValue() {\n if (this.subForm) {\n return this.subForm.getValue();\n }\n return this.dataValue;\n }\n }, {\n key: \"errors\",\n get: function get() {\n var errors = _get(_getPrototypeOf(FormComponent.prototype), \"errors\", this);\n if (this.subForm) {\n errors = errors.concat(this.subForm.errors);\n }\n return errors;\n }\n }, {\n key: \"updateSubFormVisibility\",\n value: function updateSubFormVisibility() {\n if (this.subForm) {\n this.subForm.parentVisible = this.visible;\n }\n }\n\n /**\n * Determines if this form is a Nested Wizard\n * which means it should be a Wizard itself and should be a direct child of a Wizard's page\n * @returns {boolean}\n */\n }, {\n key: \"isNestedWizard\",\n get: function get() {\n var _this$subForm3, _this$subForm3$_form, _this$parent, _this$parent$parent, _this$parent$parent$_;\n return ((_this$subForm3 = this.subForm) === null || _this$subForm3 === void 0 ? void 0 : (_this$subForm3$_form = _this$subForm3._form) === null || _this$subForm3$_form === void 0 ? void 0 : _this$subForm3$_form.display) === 'wizard' && ((_this$parent = this.parent) === null || _this$parent === void 0 ? void 0 : (_this$parent$parent = _this$parent.parent) === null || _this$parent$parent === void 0 ? void 0 : (_this$parent$parent$_ = _this$parent$parent._form) === null || _this$parent$parent$_ === void 0 ? void 0 : _this$parent$parent$_.display) === 'wizard';\n }\n }, {\n key: \"visible\",\n get: function get() {\n return _get(_getPrototypeOf(FormComponent.prototype), \"visible\", this);\n },\n set: function set(value) {\n var _this11 = this;\n var isNestedWizard = this.isNestedWizard;\n if (this._visible !== value) {\n this._visible = value;\n // Form doesn't load if hidden. If it becomes visible, create the form.\n if (!this.subForm && value) {\n this.createSubForm();\n this.subFormReady.then(function () {\n _this11.updateSubFormVisibility();\n _this11.clearOnHide();\n });\n this.redraw();\n return;\n }\n this.updateSubFormVisibility();\n this.clearOnHide();\n isNestedWizard ? this.rebuild() : this.redraw();\n }\n if (!value && isNestedWizard) {\n this.root.redraw();\n }\n }\n }, {\n key: \"parentVisible\",\n get: function get() {\n return _get(_getPrototypeOf(FormComponent.prototype), \"parentVisible\", this);\n },\n set: function set(value) {\n var _this12 = this;\n if (this._parentVisible !== value) {\n this._parentVisible = value;\n this.clearOnHide();\n // Form doesn't load if hidden. If it becomes visible, create the form.\n if (!this.subForm && value) {\n this.createSubForm();\n this.subFormReady.then(function () {\n _this12.updateSubFormVisibility();\n });\n this.redraw();\n return;\n }\n this.updateSubFormVisibility();\n this.redraw();\n }\n }\n }, {\n key: \"isInternalEvent\",\n value: function isInternalEvent(event) {\n switch (event) {\n case 'focus':\n case 'blur':\n case 'componentChange':\n case 'componentError':\n case 'error':\n case 'formLoad':\n case 'languageChanged':\n case 'render':\n case 'checkValidity':\n case 'initialized':\n case 'submit':\n case 'submitButton':\n case 'nosubmit':\n case 'updateComponent':\n case 'submitDone':\n case 'submissionDeleted':\n case 'requestDone':\n case 'nextPage':\n case 'prevPage':\n case 'wizardNavigationClicked':\n case 'updateWizardNav':\n case 'restoreDraft':\n case 'saveDraft':\n case 'saveComponent':\n case 'pdfUploaded':\n return true;\n default:\n return false;\n }\n }\n }, {\n key: \"createEmitter\",\n value: function createEmitter() {\n var emitter = new _eventemitter[\"default\"]();\n var nativeEmit = emitter.emit;\n var that = this;\n emitter.emit = function (event) {\n var eventType = event.replace(\"\".concat(that.options.namespace, \".\"), '');\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 nativeEmit.call.apply(nativeEmit, [this, event].concat(args));\n if (!that.isInternalEvent(eventType)) {\n that.emit.apply(that, [eventType].concat(args));\n }\n };\n return emitter;\n }\n }, {\n key: \"deleteValue\",\n value: function deleteValue() {\n _get(_getPrototypeOf(FormComponent.prototype), \"setValue\", this).call(this, null, {\n noUpdateEvent: true,\n noDefault: true\n });\n this.unset();\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len2 = arguments.length, extend = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n extend[_key2] = arguments[_key2];\n }\n return _Component2[\"default\"].schema.apply(_Component2[\"default\"], [{\n label: 'Form',\n type: 'form',\n key: 'form',\n src: '',\n reference: true,\n form: '',\n path: '',\n tableView: true\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Nested Form',\n icon: 'wpforms',\n group: 'premium',\n documentation: '/userguide/form-building/premium-components#nested-form',\n weight: 110,\n schema: FormComponent.schema()\n };\n }\n }]);\n return FormComponent;\n}(_Component2[\"default\"]);\nexports[\"default\"] = FormComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/form/Form.js?"); /***/ }), @@ -1289,7 +1322,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _utils = _interopRequireDefault(__webpack_require__(/*! ../../_classes/component/editForm/utils */ \"./lib/components/_classes/component/editForm/utils.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/* eslint-disable max-len */\nvar _default = [_utils.default.javaScriptValue('Custom Default Value', 'customDefaultValue', 'customDefaultValue', 120, '

Example:

value = data.firstName + \" \" + data.lastName;

', '

Example:

{\"cat\": [{\"var\": \"data.firstName\"}, \" \", {\"var\": \"data.lastName\"}]}
'), _utils.default.javaScriptValue('Calculated Value', 'calculateValue', 'calculateValue', 130, '

Example:

value = data.a + data.b + data.c;

', '

Example:

{\"+\": [{\"var\": \"data.a\"}, {\"var\": \"data.b\"}, {\"var\": \"data.c\"}]}

Click here for an example

'), {\n weight: 140,\n type: 'checkbox',\n label: 'Clear Value When Hidden',\n key: 'clearOnHide',\n defaultValue: true,\n tooltip: 'When a field is hidden, clear the value.',\n input: true,\n clearOnHide: false,\n calculateValue: 'value = data.hidden ? false : value',\n conditional: {\n json: {\n '!': [{\n var: 'data.hidden'\n }]\n }\n }\n}];\n/* eslint-enable max-len */\n\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/form/editForm/Form.edit.data.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _utils = _interopRequireDefault(__webpack_require__(/*! ../../_classes/component/editForm/utils */ \"./lib/components/_classes/component/editForm/utils.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n/* eslint-disable max-len */\nvar _default = [_utils[\"default\"].javaScriptValue('Custom Default Value', 'customDefaultValue', 'customDefaultValue', 120, '

Example:

value = data.firstName + \" \" + data.lastName;

', '

Example:

{\"cat\": [{\"var\": \"data.firstName\"}, \" \", {\"var\": \"data.lastName\"}]}
'), _utils[\"default\"].javaScriptValue('Calculated Value', 'calculateValue', 'calculateValue', 130, '

Example:

value = data.a + data.b + data.c;

', '

Example:

{\"+\": [{\"var\": \"data.a\"}, {\"var\": \"data.b\"}, {\"var\": \"data.c\"}]}

Click here for an example

'), {\n weight: 140,\n type: 'checkbox',\n label: 'Clear Value When Hidden',\n key: 'clearOnHide',\n defaultValue: true,\n tooltip: 'When a field is hidden, clear the value.',\n input: true\n}];\n/* eslint-enable max-len */\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/form/editForm/Form.edit.data.js?"); /***/ }), @@ -1297,10 +1330,10 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /*!***********************************************************!*\ !*** ./lib/components/form/editForm/Form.edit.display.js ***! \***********************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'labelPosition',\n ignore: true\n}, {\n key: 'placeholder',\n ignore: true\n}, {\n key: 'description',\n ignore: true\n}, {\n key: 'tooltip',\n ignore: true\n}, {\n key: 'tabIndex',\n ignore: true\n}, {\n key: 'autofocus',\n ignore: true\n}];\n/* eslint-enable max-len */\n\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/form/editForm/Form.edit.display.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'labelPosition',\n ignore: true\n}, {\n key: 'placeholder',\n ignore: true\n}, {\n key: 'description',\n ignore: true\n}, {\n key: 'tooltip',\n ignore: true\n}, {\n key: 'tabIndex',\n ignore: true\n}, {\n key: 'autofocus',\n ignore: true\n}];\n/* eslint-enable max-len */\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/form/editForm/Form.edit.display.js?"); /***/ }), @@ -1311,7 +1344,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.array.find.js */ \"./node_modules/core-js/modules/es.array.find.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\nvar _default = [{\n type: 'select',\n input: true,\n dataSrc: 'url',\n data: {\n url: '/form?limit=1000000&select=_id,title,display'\n },\n searchField: 'title__regex',\n template: '{{ item.title }}',\n valueProperty: '_id',\n authenticate: true,\n label: 'Form',\n key: 'form',\n weight: 10,\n lazyLoad: false,\n tooltip: 'The form to load within this form component.',\n validate: {\n required: true\n }\n}, {\n label: 'Lazy Load',\n inputType: 'checkbox',\n defaultValue: true,\n clearOnHide: true,\n errorLabel: '',\n key: 'lazyLoad',\n type: 'checkbox',\n tooltip: 'if it is checked, the subform is loaded after navigation to the page with this component within the wizard.',\n input: true,\n customConditional: function customConditional(_ref) {\n var _instance$root, _instance$root$getCom, _instance$options, _instance$options$edi;\n\n var instance = _ref.instance,\n data = _ref.data;\n var formInfo = (_instance$root = instance.root) === null || _instance$root === void 0 ? void 0 : (_instance$root$getCom = _instance$root.getComponent('form')) === null || _instance$root$getCom === void 0 ? void 0 : _instance$root$getCom.defaultDownloadedResources.find(function (res) {\n return res._id === data.form;\n });\n var displayMode = 'wizard';\n return ((_instance$options = instance.options) === null || _instance$options === void 0 ? void 0 : (_instance$options$edi = _instance$options.editForm) === null || _instance$options$edi === void 0 ? void 0 : _instance$options$edi.display) === displayMode && formInfo && formInfo.display !== displayMode;\n }\n}, {\n type: 'select',\n input: true,\n dataSrc: 'url',\n data: {\n url: '/form/{{ data.form }}/v'\n },\n searchField: 'title__regex',\n template: '{{ item._vid }}',\n valueProperty: '_id',\n authenticate: true,\n label: 'Form Revision',\n key: 'revision',\n weight: 10,\n lazyLoad: true,\n tooltip: 'You can lock the nested form to a specific revision by choosing the revision number here.',\n customConditional: 'show = !!data.form'\n}, {\n type: 'checkbox',\n input: true,\n weight: 19,\n key: 'useOriginalRevision',\n label: 'Use Original Revision while Submissions Viewing',\n tooltip: 'Using this option will make form load the original revision (the one which was used to make a submission) when viewing a submission.'\n}, {\n type: 'checkbox',\n input: true,\n weight: 20,\n key: 'reference',\n label: 'Save as reference',\n tooltip: 'Using this option will save this field as a reference and link its value to the value of the origin record.'\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/form/editForm/Form.edit.form.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.array.find.js */ \"./node_modules/core-js/modules/es.array.find.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\nvar _default = [{\n type: 'select',\n input: true,\n dataSrc: 'url',\n data: {\n url: '/form?limit=1000000&select=_id,title,display'\n },\n searchField: 'title__regex',\n template: '{{ item.title }}',\n valueProperty: '_id',\n authenticate: true,\n label: 'Form',\n key: 'form',\n weight: 10,\n lazyLoad: false,\n tooltip: 'The form to load within this form component.',\n validate: {\n required: true\n }\n}, {\n label: 'Lazy Load',\n inputType: 'checkbox',\n defaultValue: true,\n clearOnHide: true,\n errorLabel: '',\n key: 'lazyLoad',\n type: 'checkbox',\n tooltip: 'if it is checked, the subform is loaded after navigation to the page with this component within the wizard.',\n input: true,\n customConditional: function customConditional(_ref) {\n var _instance$root, _instance$root$getCom, _instance$options, _instance$options$edi;\n var instance = _ref.instance,\n data = _ref.data;\n var formInfo = (_instance$root = instance.root) === null || _instance$root === void 0 ? void 0 : (_instance$root$getCom = _instance$root.getComponent('form')) === null || _instance$root$getCom === void 0 ? void 0 : _instance$root$getCom.defaultDownloadedResources.find(function (res) {\n return res._id === data.form;\n });\n var displayMode = 'wizard';\n return ((_instance$options = instance.options) === null || _instance$options === void 0 ? void 0 : (_instance$options$edi = _instance$options.editForm) === null || _instance$options$edi === void 0 ? void 0 : _instance$options$edi.display) === displayMode && formInfo && formInfo.display !== displayMode;\n }\n}, {\n type: 'select',\n input: true,\n dataSrc: 'url',\n data: {\n url: '/form/{{ data.form }}/v'\n },\n searchField: 'title__regex',\n template: '{{ item._vid }}',\n valueProperty: '_id',\n authenticate: true,\n label: 'Form Revision',\n key: 'revision',\n weight: 10,\n lazyLoad: true,\n tooltip: 'You can lock the nested form to a specific revision by choosing the revision number here.',\n customConditional: 'show = !!data.form'\n}, {\n type: 'checkbox',\n input: true,\n weight: 19,\n key: 'useOriginalRevision',\n label: 'Use Original Revision while Submissions Viewing',\n tooltip: 'Using this option will make form load the original revision (the one which was used to make a submission) when viewing a submission.'\n}, {\n type: 'checkbox',\n input: true,\n weight: 20,\n key: 'reference',\n label: 'Save as reference',\n tooltip: 'Using this option will save this field as a reference and link its value to the value of the origin record.'\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/form/editForm/Form.edit.form.js?"); /***/ }), @@ -1322,7 +1355,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\nvar _Components = _interopRequireDefault(__webpack_require__(/*! ../Components */ \"./lib/components/Components.js\"));\n\nvar _HiddenEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/Hidden.edit.display */ \"./lib/components/hidden/editForm/Hidden.edit.display.js\"));\n\nvar _HiddenEdit2 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Hidden.edit.data */ \"./lib/components/hidden/editForm/Hidden.edit.data.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _Components.default.baseEditForm.apply(_Components.default, [[{\n key: 'display',\n components: _HiddenEdit.default\n }, {\n key: 'data',\n components: _HiddenEdit2.default\n }, {\n key: 'validation',\n ignore: true\n }, {\n key: 'conditional',\n ignore: true\n }, {\n key: 'addons',\n ignore: true\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/hidden/Hidden.form.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\nvar _Components = _interopRequireDefault(__webpack_require__(/*! ../Components */ \"./lib/components/Components.js\"));\nvar _HiddenEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/Hidden.edit.display */ \"./lib/components/hidden/editForm/Hidden.edit.display.js\"));\nvar _HiddenEdit2 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Hidden.edit.data */ \"./lib/components/hidden/editForm/Hidden.edit.data.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _Components[\"default\"].baseEditForm.apply(_Components[\"default\"], [[{\n key: 'display',\n components: _HiddenEdit[\"default\"]\n }, {\n key: 'data',\n components: _HiddenEdit2[\"default\"]\n }, {\n key: 'validation',\n ignore: true\n }, {\n key: 'conditional',\n ignore: true\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/hidden/Hidden.form.js?"); /***/ }), @@ -1333,7 +1366,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\nvar _Input2 = _interopRequireDefault(__webpack_require__(/*! ../_classes/input/Input */ \"./lib/components/_classes/input/Input.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar HiddenComponent = /*#__PURE__*/function (_Input) {\n _inherits(HiddenComponent, _Input);\n\n var _super = _createSuper(HiddenComponent);\n\n function HiddenComponent() {\n _classCallCheck(this, HiddenComponent);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(HiddenComponent, [{\n key: \"defaultSchema\",\n get: function get() {\n return HiddenComponent.schema();\n }\n }, {\n key: \"inputInfo\",\n get: function get() {\n var info = _get(_getPrototypeOf(HiddenComponent.prototype), \"elementInfo\", this).call(this);\n\n info.type = 'input';\n info.attr.type = 'hidden';\n info.changeEvent = 'change';\n return info;\n }\n }, {\n key: \"skipInEmail\",\n get: function get() {\n return true;\n }\n /**\n * Check if a component is eligible for multiple validation\n *\n * @return {boolean}\n */\n\n }, {\n key: \"validateMultiple\",\n value: function validateMultiple() {\n // Since \"arrays\" are able to be stored in hidden components, we need to turn off multiple validation.\n return false;\n }\n }, {\n key: \"labelIsHidden\",\n value: function labelIsHidden() {\n return true;\n }\n }, {\n key: \"emptyValue\",\n get: function get() {\n return '';\n }\n }, {\n key: \"setValue\",\n value: function setValue(value) {\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return this.updateValue(value, flags);\n }\n }, {\n key: \"getValue\",\n value: function getValue() {\n return this.dataValue;\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _Input2.default.schema.apply(_Input2.default, [{\n type: 'hidden',\n tableView: false,\n inputType: 'hidden'\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Hidden',\n group: 'data',\n icon: 'user-secret',\n weight: 0,\n documentation: '/userguide/forms/form-components#hidden',\n schema: HiddenComponent.schema()\n };\n }\n }]);\n\n return HiddenComponent;\n}(_Input2.default);\n\nexports[\"default\"] = HiddenComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/hidden/Hidden.js?"); +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _Input2 = _interopRequireDefault(__webpack_require__(/*! ../_classes/input/Input */ \"./lib/components/_classes/input/Input.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar HiddenComponent = /*#__PURE__*/function (_Input) {\n _inherits(HiddenComponent, _Input);\n var _super = _createSuper(HiddenComponent);\n function HiddenComponent() {\n _classCallCheck(this, HiddenComponent);\n return _super.apply(this, arguments);\n }\n _createClass(HiddenComponent, [{\n key: \"defaultSchema\",\n get: function get() {\n return HiddenComponent.schema();\n }\n }, {\n key: \"inputInfo\",\n get: function get() {\n var info = _get(_getPrototypeOf(HiddenComponent.prototype), \"elementInfo\", this).call(this);\n info.type = 'input';\n info.attr.type = 'hidden';\n info.changeEvent = 'change';\n return info;\n }\n }, {\n key: \"skipInEmail\",\n get: function get() {\n return true;\n }\n\n /**\n * Check if a component is eligible for multiple validation\n *\n * @return {boolean}\n */\n }, {\n key: \"validateMultiple\",\n value: function validateMultiple() {\n // Since \"arrays\" are able to be stored in hidden components, we need to turn off multiple validation.\n return false;\n }\n }, {\n key: \"labelIsHidden\",\n value: function labelIsHidden() {\n return true;\n }\n }, {\n key: \"emptyValue\",\n get: function get() {\n return '';\n }\n }, {\n key: \"setValue\",\n value: function setValue(value) {\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return this.updateValue(value, flags);\n }\n }, {\n key: \"getValue\",\n value: function getValue() {\n return this.dataValue;\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _Input2[\"default\"].schema.apply(_Input2[\"default\"], [{\n type: 'hidden',\n tableView: false,\n inputType: 'hidden'\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Hidden',\n group: 'data',\n icon: 'user-secret',\n weight: 0,\n documentation: '/userguide/form-building/data-components#hidden',\n schema: HiddenComponent.schema()\n };\n }\n }]);\n return HiddenComponent;\n}(_Input2[\"default\"]);\nexports[\"default\"] = HiddenComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/hidden/Hidden.js?"); /***/ }), @@ -1341,10 +1374,10 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /*!************************************************************!*\ !*** ./lib/components/hidden/editForm/Hidden.edit.data.js ***! \************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'multiple',\n ignore: true\n}, {\n key: 'clearOnHide',\n ignore: true\n}, {\n key: 'allowCalculateOverride',\n ignore: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/hidden/editForm/Hidden.edit.data.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'multiple',\n ignore: true\n}, {\n key: 'clearOnHide',\n ignore: true\n}, {\n key: 'allowCalculateOverride',\n ignore: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/hidden/editForm/Hidden.edit.data.js?"); /***/ }), @@ -1352,10 +1385,10 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /*!***************************************************************!*\ !*** ./lib/components/hidden/editForm/Hidden.edit.display.js ***! \***************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'labelPosition',\n ignore: true\n}, {\n key: 'placeholder',\n ignore: true\n}, {\n key: 'description',\n ignore: true\n}, {\n key: 'tooltip',\n ignore: true\n}, {\n key: 'hideLabel',\n ignore: true\n}, {\n key: 'autofocus',\n ignore: true\n}, {\n key: 'tabindex',\n ignore: true\n}, {\n key: 'hidden',\n ignore: true\n}, {\n key: 'tableView',\n ignore: true\n}, {\n key: 'disabled',\n ignore: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/hidden/editForm/Hidden.edit.display.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'labelPosition',\n ignore: true\n}, {\n key: 'placeholder',\n ignore: true\n}, {\n key: 'description',\n ignore: true\n}, {\n key: 'tooltip',\n ignore: true\n}, {\n key: 'hideLabel',\n ignore: true\n}, {\n key: 'autofocus',\n ignore: true\n}, {\n key: 'tabindex',\n ignore: true\n}, {\n key: 'hidden',\n ignore: true\n}, {\n key: 'tableView',\n ignore: true\n}, {\n key: 'disabled',\n ignore: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/hidden/editForm/Hidden.edit.display.js?"); /***/ }), @@ -1366,7 +1399,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\nvar _Components = _interopRequireDefault(__webpack_require__(/*! ../Components */ \"./lib/components/Components.js\"));\n\nvar _HTMLEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/HTML.edit.display */ \"./lib/components/html/editForm/HTML.edit.display.js\"));\n\nvar _HTMLEdit2 = _interopRequireDefault(__webpack_require__(/*! ./editForm/HTML.edit.logic */ \"./lib/components/html/editForm/HTML.edit.logic.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _Components.default.baseEditForm.apply(_Components.default, [[{\n key: 'display',\n components: _HTMLEdit.default\n }, {\n key: 'data',\n ignore: true\n }, {\n key: 'validation',\n ignore: true\n }, {\n key: 'logic',\n components: _HTMLEdit2.default\n }, {\n key: 'addons',\n ignore: true\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/html/HTML.form.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\nvar _Components = _interopRequireDefault(__webpack_require__(/*! ../Components */ \"./lib/components/Components.js\"));\nvar _HTMLEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/HTML.edit.display */ \"./lib/components/html/editForm/HTML.edit.display.js\"));\nvar _HTMLEdit2 = _interopRequireDefault(__webpack_require__(/*! ./editForm/HTML.edit.logic */ \"./lib/components/html/editForm/HTML.edit.logic.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _Components[\"default\"].baseEditForm.apply(_Components[\"default\"], [[{\n key: 'display',\n components: _HTMLEdit[\"default\"]\n }, {\n key: 'data',\n ignore: true\n }, {\n key: 'validation',\n ignore: true\n }, {\n key: 'logic',\n components: _HTMLEdit2[\"default\"]\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/html/HTML.form.js?"); /***/ }), @@ -1377,7 +1410,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.string.trim.js */ \"./node_modules/core-js/modules/es.string.trim.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\nvar _Component2 = _interopRequireDefault(__webpack_require__(/*! ../_classes/component/Component */ \"./lib/components/_classes/component/Component.js\"));\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar HTMLComponent = /*#__PURE__*/function (_Component) {\n _inherits(HTMLComponent, _Component);\n\n var _super = _createSuper(HTMLComponent);\n\n function HTMLComponent() {\n _classCallCheck(this, HTMLComponent);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(HTMLComponent, [{\n key: \"defaultSchema\",\n get: function get() {\n return HTMLComponent.schema();\n }\n }, {\n key: \"content\",\n get: function get() {\n if (this.builderMode) {\n return this.component.content;\n } // i18n returns error exactly with word 'select', spaces will be trimmed\n\n\n if (this.component.content.replace(/(<(\\/?[^>]+)>)/g, '').trim() === 'select') {\n return \" \".concat(this.component.content, \" \");\n }\n\n var submission = _lodash.default.get(this.root, 'submission', {});\n\n var content = this.component.content ? this.interpolate(this.component.content, {\n metadata: submission.metadata || {},\n submission: submission,\n data: this.rootValue,\n row: this.data\n }) : '';\n return this.sanitize(content, this.shouldSanitizeValue);\n }\n }, {\n key: \"singleTags\",\n get: function get() {\n return ['br', 'img', 'hr'];\n }\n }, {\n key: \"checkRefreshOn\",\n value: function checkRefreshOn(changed) {\n _get(_getPrototypeOf(HTMLComponent.prototype), \"checkRefreshOn\", this).call(this, changed);\n\n if (!this.builderMode && this.component.refreshOnChange && this.element && !_lodash.default.isUndefined(changed) && (_lodash.default.isBoolean(changed) && changed || !_lodash.default.isEmpty(changed)) && this.conditionallyVisible(this.data, this.row)) {\n this.setContent(this.element, this.renderContent());\n }\n }\n }, {\n key: \"renderContent\",\n value: function renderContent() {\n var _this = this;\n\n var submission = _lodash.default.get(this.root, 'submission', {});\n\n return this.renderTemplate('html', {\n component: this.component,\n tag: this.component.tag,\n attrs: (this.component.attrs || []).map(function (attr) {\n return {\n attr: attr.attr,\n value: _this.interpolate(attr.value, {\n metadata: submission.metadata || {},\n submission: submission,\n data: _this.rootValue,\n row: _this.data\n })\n };\n }),\n content: this.content,\n singleTags: this.singleTags\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n return _get(_getPrototypeOf(HTMLComponent.prototype), \"render\", this).call(this, this.renderContent());\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n this.loadRefs(element, {\n html: 'single'\n });\n return _get(_getPrototypeOf(HTMLComponent.prototype), \"attach\", this).call(this, element);\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _Component2.default.schema.apply(_Component2.default, [{\n label: 'HTML',\n type: 'htmlelement',\n tag: 'p',\n attrs: [],\n content: '',\n input: false,\n persistent: false\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'HTML Element',\n group: 'layout',\n icon: 'code',\n weight: 0,\n documentation: '/userguide/forms/layout-components#html-element',\n schema: HTMLComponent.schema()\n };\n }\n }]);\n\n return HTMLComponent;\n}(_Component2.default);\n\nexports[\"default\"] = HTMLComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/html/HTML.js?"); +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.string.trim.js */ \"./node_modules/core-js/modules/es.string.trim.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _Component2 = _interopRequireDefault(__webpack_require__(/*! ../_classes/component/Component */ \"./lib/components/_classes/component/Component.js\"));\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar HTMLComponent = /*#__PURE__*/function (_Component) {\n _inherits(HTMLComponent, _Component);\n var _super = _createSuper(HTMLComponent);\n function HTMLComponent() {\n _classCallCheck(this, HTMLComponent);\n return _super.apply(this, arguments);\n }\n _createClass(HTMLComponent, [{\n key: \"defaultSchema\",\n get: function get() {\n return HTMLComponent.schema();\n }\n }, {\n key: \"content\",\n get: function get() {\n if (this.builderMode) {\n return this.component.content;\n }\n\n // i18n returns error exactly with word 'select', spaces will be trimmed\n if (this.component.content.replace(/(<(\\/?[^>]+)>)/g, '').trim() === 'select') {\n return \" \".concat(this.component.content, \" \");\n }\n var submission = _lodash[\"default\"].get(this.root, 'submission', {});\n var content = this.component.content ? this.interpolate(this.component.content, {\n metadata: submission.metadata || {},\n submission: submission,\n data: this.rootValue,\n row: this.data\n }) : '';\n return this.sanitize(content, this.shouldSanitizeValue);\n }\n }, {\n key: \"singleTags\",\n get: function get() {\n return ['br', 'img', 'hr'];\n }\n }, {\n key: \"checkRefreshOn\",\n value: function checkRefreshOn(changed) {\n _get(_getPrototypeOf(HTMLComponent.prototype), \"checkRefreshOn\", this).call(this, changed);\n if (!this.builderMode && this.component.refreshOnChange && this.element && !_lodash[\"default\"].isUndefined(changed) && (_lodash[\"default\"].isBoolean(changed) && changed || !_lodash[\"default\"].isEmpty(changed)) && this.conditionallyVisible(this.data, this.row)) {\n this.setContent(this.element, this.renderContent());\n }\n }\n }, {\n key: \"renderContent\",\n value: function renderContent() {\n var _this = this;\n var submission = _lodash[\"default\"].get(this.root, 'submission', {});\n return this.renderTemplate('html', {\n component: this.component,\n tag: this.component.tag,\n attrs: (this.component.attrs || []).map(function (attr) {\n return {\n attr: attr.attr,\n value: _this.interpolate(attr.value, {\n metadata: submission.metadata || {},\n submission: submission,\n data: _this.rootValue,\n row: _this.data\n })\n };\n }),\n content: this.content,\n singleTags: this.singleTags\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n return _get(_getPrototypeOf(HTMLComponent.prototype), \"render\", this).call(this, this.renderContent());\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n this.loadRefs(element, {\n html: 'single'\n });\n return _get(_getPrototypeOf(HTMLComponent.prototype), \"attach\", this).call(this, element);\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _Component2[\"default\"].schema.apply(_Component2[\"default\"], [{\n label: 'HTML',\n type: 'htmlelement',\n tag: 'p',\n attrs: [],\n content: '',\n input: false,\n persistent: false\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'HTML Element',\n group: 'layout',\n icon: 'code',\n weight: 0,\n documentation: '/userguide/form-building/layout-components#html-element',\n schema: HTMLComponent.schema()\n };\n }\n }]);\n return HTMLComponent;\n}(_Component2[\"default\"]);\nexports[\"default\"] = HTMLComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/html/HTML.js?"); /***/ }), @@ -1385,10 +1418,10 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /*!***********************************************************!*\ !*** ./lib/components/html/editForm/HTML.edit.display.js ***! \***********************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'labelPosition',\n ignore: true\n}, {\n key: 'placeholder',\n ignore: true\n}, {\n key: 'description',\n ignore: true\n}, {\n key: 'tooltip',\n ignore: true\n}, {\n key: 'hideLabel',\n ignore: true\n}, {\n key: 'autofocus',\n ignore: true\n}, {\n key: 'disabled',\n ignore: true\n}, {\n key: 'tabindex',\n ignore: true\n}, {\n key: 'tableView',\n ignore: true\n}, {\n type: 'textfield',\n input: true,\n key: 'tag',\n weight: 50,\n label: 'HTML Tag',\n placeholder: 'HTML Element Tag',\n tooltip: 'The tag of this HTML element.'\n}, {\n type: 'textfield',\n input: true,\n key: 'className',\n weight: 60,\n label: 'CSS Class',\n placeholder: 'CSS Class',\n tooltip: 'The CSS class for this HTML element.'\n}, {\n type: 'datagrid',\n input: true,\n label: 'Attributes',\n key: 'attrs',\n tooltip: 'The attributes for this HTML element. Only safe attributes are allowed, such as src, href, and title.',\n weight: 70,\n components: [{\n label: 'Attribute',\n key: 'attr',\n input: true,\n type: 'textfield'\n }, {\n label: 'Value',\n key: 'value',\n input: true,\n type: 'textfield'\n }]\n}, {\n type: 'textarea',\n input: true,\n editor: 'ace',\n rows: 10,\n as: 'html',\n label: 'Content',\n tooltip: 'The content of this HTML element.',\n defaultValue: '
Content
',\n key: 'content',\n weight: 80\n}, {\n weight: 85,\n type: 'checkbox',\n label: 'Refresh On Change',\n tooltip: 'Rerender the field whenever a value on the form changes.',\n key: 'refreshOnChange',\n input: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/html/editForm/HTML.edit.display.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'labelPosition',\n ignore: true\n}, {\n key: 'placeholder',\n ignore: true\n}, {\n key: 'description',\n ignore: true\n}, {\n key: 'tooltip',\n ignore: true\n}, {\n key: 'hideLabel',\n ignore: true\n}, {\n key: 'autofocus',\n ignore: true\n}, {\n key: 'disabled',\n ignore: true\n}, {\n key: 'tabindex',\n ignore: true\n}, {\n key: 'tableView',\n ignore: true\n}, {\n type: 'textfield',\n input: true,\n key: 'tag',\n weight: 50,\n label: 'HTML Tag',\n placeholder: 'HTML Element Tag',\n tooltip: 'The tag of this HTML element.'\n}, {\n type: 'textfield',\n input: true,\n key: 'className',\n weight: 60,\n label: 'CSS Class',\n placeholder: 'CSS Class',\n tooltip: 'The CSS class for this HTML element.'\n}, {\n type: 'datagrid',\n input: true,\n label: 'Attributes',\n key: 'attrs',\n tooltip: 'The attributes for this HTML element. Only safe attributes are allowed, such as src, href, and title.',\n weight: 70,\n components: [{\n label: 'Attribute',\n key: 'attr',\n input: true,\n type: 'textfield'\n }, {\n label: 'Value',\n key: 'value',\n input: true,\n type: 'textfield'\n }]\n}, {\n type: 'textarea',\n input: true,\n editor: 'ace',\n rows: 10,\n as: 'html',\n label: 'Content',\n tooltip: 'The content of this HTML element.',\n defaultValue: '
Content
',\n key: 'content',\n weight: 80\n}, {\n weight: 85,\n type: 'checkbox',\n label: 'Refresh On Change',\n tooltip: 'Rerender the field whenever a value on the form changes.',\n key: 'refreshOnChange',\n input: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/html/editForm/HTML.edit.display.js?"); /***/ }), @@ -1396,10 +1429,10 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /*!*********************************************************!*\ !*** ./lib/components/html/editForm/HTML.edit.logic.js ***! \*********************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'logic',\n components: [{\n key: 'actions',\n components: [{\n key: 'actionPanel',\n components: [{\n data: {\n json: [{\n label: 'Hidden',\n value: 'hidden',\n type: 'boolean'\n }, {\n label: 'Required',\n value: 'validate.required',\n type: 'boolean'\n }, {\n label: 'Disabled',\n value: 'disabled',\n type: 'boolean'\n }, {\n label: 'Label',\n value: 'label',\n type: 'string'\n }, {\n label: 'Title',\n value: 'title',\n type: 'string'\n }, {\n label: 'Tooltip',\n value: 'tooltip',\n type: 'string'\n }, {\n label: 'Description',\n value: 'description',\n type: 'string'\n }, {\n label: 'Placeholder',\n value: 'placeholder',\n type: 'string'\n }, {\n label: 'CSS Class',\n value: 'className',\n type: 'string'\n }, {\n label: 'Container Custom Class',\n value: 'customClass',\n type: 'string'\n }, {\n label: 'Content',\n value: 'content',\n type: 'string',\n component: 'content'\n }]\n },\n key: 'property'\n }, {\n type: 'textarea',\n editor: 'ace',\n rows: 10,\n as: 'html',\n label: 'Content',\n tooltip: 'The content of this HTML element.',\n defaultValue: '
Content
',\n key: 'content',\n weight: 30,\n input: true,\n customConditional: function customConditional(context) {\n return context.row.type === 'property' && context.row.hasOwnProperty('property') && context.row.property.type === 'string' && context.row.property.component === 'content';\n }\n }]\n }]\n }]\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/html/editForm/HTML.edit.logic.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'logic',\n components: [{\n key: 'actions',\n components: [{\n key: 'actionPanel',\n components: [{\n data: {\n json: [{\n label: 'Hidden',\n value: 'hidden',\n type: 'boolean'\n }, {\n label: 'Required',\n value: 'validate.required',\n type: 'boolean'\n }, {\n label: 'Disabled',\n value: 'disabled',\n type: 'boolean'\n }, {\n label: 'Label',\n value: 'label',\n type: 'string'\n }, {\n label: 'Title',\n value: 'title',\n type: 'string'\n }, {\n label: 'Tooltip',\n value: 'tooltip',\n type: 'string'\n }, {\n label: 'Description',\n value: 'description',\n type: 'string'\n }, {\n label: 'Placeholder',\n value: 'placeholder',\n type: 'string'\n }, {\n label: 'CSS Class',\n value: 'className',\n type: 'string'\n }, {\n label: 'Container Custom Class',\n value: 'customClass',\n type: 'string'\n }, {\n label: 'Content',\n value: 'content',\n type: 'string',\n component: 'content'\n }]\n },\n key: 'property'\n }, {\n type: 'textarea',\n editor: 'ace',\n rows: 10,\n as: 'html',\n label: 'Content',\n tooltip: 'The content of this HTML element.',\n defaultValue: '
Content
',\n key: 'content',\n weight: 30,\n input: true,\n customConditional: function customConditional(context) {\n return context.row.type === 'property' && context.row.hasOwnProperty('property') && context.row.property.type === 'string' && context.row.property.component === 'content';\n }\n }]\n }]\n }]\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/html/editForm/HTML.edit.logic.js?"); /***/ }), @@ -1410,7 +1443,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _Address = _interopRequireDefault(__webpack_require__(/*! ./address/Address */ \"./lib/components/address/Address.js\"));\n\nvar _Button = _interopRequireDefault(__webpack_require__(/*! ./button/Button */ \"./lib/components/button/Button.js\"));\n\nvar _Checkbox = _interopRequireDefault(__webpack_require__(/*! ./checkbox/Checkbox */ \"./lib/components/checkbox/Checkbox.js\"));\n\nvar _Columns = _interopRequireDefault(__webpack_require__(/*! ./columns/Columns */ \"./lib/components/columns/Columns.js\"));\n\nvar _Component = _interopRequireDefault(__webpack_require__(/*! ./_classes/component/Component */ \"./lib/components/_classes/component/Component.js\"));\n\nvar _ComponentModal = _interopRequireDefault(__webpack_require__(/*! ./_classes/componentModal/ComponentModal */ \"./lib/components/_classes/componentModal/ComponentModal.js\"));\n\nvar _Container = _interopRequireDefault(__webpack_require__(/*! ./container/Container */ \"./lib/components/container/Container.js\"));\n\nvar _Content = _interopRequireDefault(__webpack_require__(/*! ./content/Content */ \"./lib/components/content/Content.js\"));\n\nvar _Currency = _interopRequireDefault(__webpack_require__(/*! ./currency/Currency */ \"./lib/components/currency/Currency.js\"));\n\nvar _DataGrid = _interopRequireDefault(__webpack_require__(/*! ./datagrid/DataGrid */ \"./lib/components/datagrid/DataGrid.js\"));\n\nvar _DataMap = _interopRequireDefault(__webpack_require__(/*! ./datamap/DataMap */ \"./lib/components/datamap/DataMap.js\"));\n\nvar _DateTime = _interopRequireDefault(__webpack_require__(/*! ./datetime/DateTime */ \"./lib/components/datetime/DateTime.js\"));\n\nvar _Day = _interopRequireDefault(__webpack_require__(/*! ./day/Day */ \"./lib/components/day/Day.js\"));\n\nvar _EditGrid = _interopRequireDefault(__webpack_require__(/*! ./editgrid/EditGrid */ \"./lib/components/editgrid/EditGrid.js\"));\n\nvar _Email = _interopRequireDefault(__webpack_require__(/*! ./email/Email */ \"./lib/components/email/Email.js\"));\n\nvar _Fieldset = _interopRequireDefault(__webpack_require__(/*! ./fieldset/Fieldset */ \"./lib/components/fieldset/Fieldset.js\"));\n\nvar _File = _interopRequireDefault(__webpack_require__(/*! ./file/File */ \"./lib/components/file/File.js\"));\n\nvar _Form = _interopRequireDefault(__webpack_require__(/*! ./form/Form */ \"./lib/components/form/Form.js\"));\n\nvar _Hidden = _interopRequireDefault(__webpack_require__(/*! ./hidden/Hidden */ \"./lib/components/hidden/Hidden.js\"));\n\nvar _Input = _interopRequireDefault(__webpack_require__(/*! ./_classes/input/Input */ \"./lib/components/_classes/input/Input.js\"));\n\nvar _Multivalue = _interopRequireDefault(__webpack_require__(/*! ./_classes/multivalue/Multivalue */ \"./lib/components/_classes/multivalue/Multivalue.js\"));\n\nvar _Field = _interopRequireDefault(__webpack_require__(/*! ./_classes/field/Field */ \"./lib/components/_classes/field/Field.js\"));\n\nvar _HTML = _interopRequireDefault(__webpack_require__(/*! ./html/HTML */ \"./lib/components/html/HTML.js\"));\n\nvar _NestedComponent = _interopRequireDefault(__webpack_require__(/*! ./_classes/nested/NestedComponent */ \"./lib/components/_classes/nested/NestedComponent.js\"));\n\nvar _NestedDataComponent = _interopRequireDefault(__webpack_require__(/*! ./_classes/nesteddata/NestedDataComponent */ \"./lib/components/_classes/nesteddata/NestedDataComponent.js\"));\n\nvar _NestedArrayComponent = _interopRequireDefault(__webpack_require__(/*! ./_classes/nestedarray/NestedArrayComponent */ \"./lib/components/_classes/nestedarray/NestedArrayComponent.js\"));\n\nvar _Number = _interopRequireDefault(__webpack_require__(/*! ./number/Number */ \"./lib/components/number/Number.js\"));\n\nvar _Panel = _interopRequireDefault(__webpack_require__(/*! ./panel/Panel */ \"./lib/components/panel/Panel.js\"));\n\nvar _Password = _interopRequireDefault(__webpack_require__(/*! ./password/Password */ \"./lib/components/password/Password.js\"));\n\nvar _PhoneNumber = _interopRequireDefault(__webpack_require__(/*! ./phonenumber/PhoneNumber */ \"./lib/components/phonenumber/PhoneNumber.js\"));\n\nvar _Radio = _interopRequireDefault(__webpack_require__(/*! ./radio/Radio */ \"./lib/components/radio/Radio.js\"));\n\nvar _ReCaptcha = _interopRequireDefault(__webpack_require__(/*! ./recaptcha/ReCaptcha */ \"./lib/components/recaptcha/ReCaptcha.js\"));\n\nvar _Resource = _interopRequireDefault(__webpack_require__(/*! ./resource/Resource */ \"./lib/components/resource/Resource.js\"));\n\nvar _SelectBoxes = _interopRequireDefault(__webpack_require__(/*! ./selectboxes/SelectBoxes */ \"./lib/components/selectboxes/SelectBoxes.js\"));\n\nvar _Select = _interopRequireDefault(__webpack_require__(/*! ./select/Select */ \"./lib/components/select/Select.js\"));\n\nvar _Signature = _interopRequireDefault(__webpack_require__(/*! ./signature/Signature */ \"./lib/components/signature/Signature.js\"));\n\nvar _Survey = _interopRequireDefault(__webpack_require__(/*! ./survey/Survey */ \"./lib/components/survey/Survey.js\"));\n\nvar _Table = _interopRequireDefault(__webpack_require__(/*! ./table/Table */ \"./lib/components/table/Table.js\"));\n\nvar _Tabs = _interopRequireDefault(__webpack_require__(/*! ./tabs/Tabs */ \"./lib/components/tabs/Tabs.js\"));\n\nvar _Tags = _interopRequireDefault(__webpack_require__(/*! ./tags/Tags */ \"./lib/components/tags/Tags.js\"));\n\nvar _TextArea = _interopRequireDefault(__webpack_require__(/*! ./textarea/TextArea */ \"./lib/components/textarea/TextArea.js\"));\n\nvar _TextField = _interopRequireDefault(__webpack_require__(/*! ./textfield/TextField */ \"./lib/components/textfield/TextField.js\"));\n\nvar _Time = _interopRequireDefault(__webpack_require__(/*! ./time/Time */ \"./lib/components/time/Time.js\"));\n\nvar _Tree = _interopRequireDefault(__webpack_require__(/*! ./tree/Tree */ \"./lib/components/tree/Tree.js\"));\n\nvar _Unknown = _interopRequireDefault(__webpack_require__(/*! ./unknown/Unknown */ \"./lib/components/unknown/Unknown.js\"));\n\nvar _Url = _interopRequireDefault(__webpack_require__(/*! ./url/Url */ \"./lib/components/url/Url.js\"));\n\nvar _Well = _interopRequireDefault(__webpack_require__(/*! ./well/Well */ \"./lib/components/well/Well.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n address: _Address.default,\n base: _Component.default,\n component: _Component.default,\n componentmodal: _ComponentModal.default,\n button: _Button.default,\n checkbox: _Checkbox.default,\n columns: _Columns.default,\n container: _Container.default,\n content: _Content.default,\n currency: _Currency.default,\n datagrid: _DataGrid.default,\n datamap: _DataMap.default,\n datetime: _DateTime.default,\n day: _Day.default,\n editgrid: _EditGrid.default,\n email: _Email.default,\n input: _Input.default,\n field: _Field.default,\n multivalue: _Multivalue.default,\n fieldset: _Fieldset.default,\n file: _File.default,\n form: _Form.default,\n hidden: _Hidden.default,\n htmlelement: _HTML.default,\n nested: _NestedComponent.default,\n nesteddata: _NestedDataComponent.default,\n nestedarray: _NestedArrayComponent.default,\n number: _Number.default,\n panel: _Panel.default,\n password: _Password.default,\n phoneNumber: _PhoneNumber.default,\n radio: _Radio.default,\n recaptcha: _ReCaptcha.default,\n resource: _Resource.default,\n select: _Select.default,\n selectboxes: _SelectBoxes.default,\n signature: _Signature.default,\n survey: _Survey.default,\n table: _Table.default,\n tabs: _Tabs.default,\n tags: _Tags.default,\n textarea: _TextArea.default,\n textfield: _TextField.default,\n time: _Time.default,\n tree: _Tree.default,\n unknown: _Unknown.default,\n url: _Url.default,\n well: _Well.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _Address = _interopRequireDefault(__webpack_require__(/*! ./address/Address */ \"./lib/components/address/Address.js\"));\nvar _Button = _interopRequireDefault(__webpack_require__(/*! ./button/Button */ \"./lib/components/button/Button.js\"));\nvar _Checkbox = _interopRequireDefault(__webpack_require__(/*! ./checkbox/Checkbox */ \"./lib/components/checkbox/Checkbox.js\"));\nvar _Columns = _interopRequireDefault(__webpack_require__(/*! ./columns/Columns */ \"./lib/components/columns/Columns.js\"));\nvar _Component = _interopRequireDefault(__webpack_require__(/*! ./_classes/component/Component */ \"./lib/components/_classes/component/Component.js\"));\nvar _ComponentModal = _interopRequireDefault(__webpack_require__(/*! ./_classes/componentModal/ComponentModal */ \"./lib/components/_classes/componentModal/ComponentModal.js\"));\nvar _Container = _interopRequireDefault(__webpack_require__(/*! ./container/Container */ \"./lib/components/container/Container.js\"));\nvar _Content = _interopRequireDefault(__webpack_require__(/*! ./content/Content */ \"./lib/components/content/Content.js\"));\nvar _Currency = _interopRequireDefault(__webpack_require__(/*! ./currency/Currency */ \"./lib/components/currency/Currency.js\"));\nvar _DataGrid = _interopRequireDefault(__webpack_require__(/*! ./datagrid/DataGrid */ \"./lib/components/datagrid/DataGrid.js\"));\nvar _DataMap = _interopRequireDefault(__webpack_require__(/*! ./datamap/DataMap */ \"./lib/components/datamap/DataMap.js\"));\nvar _DateTime = _interopRequireDefault(__webpack_require__(/*! ./datetime/DateTime */ \"./lib/components/datetime/DateTime.js\"));\nvar _Day = _interopRequireDefault(__webpack_require__(/*! ./day/Day */ \"./lib/components/day/Day.js\"));\nvar _EditGrid = _interopRequireDefault(__webpack_require__(/*! ./editgrid/EditGrid */ \"./lib/components/editgrid/EditGrid.js\"));\nvar _Email = _interopRequireDefault(__webpack_require__(/*! ./email/Email */ \"./lib/components/email/Email.js\"));\nvar _Fieldset = _interopRequireDefault(__webpack_require__(/*! ./fieldset/Fieldset */ \"./lib/components/fieldset/Fieldset.js\"));\nvar _File = _interopRequireDefault(__webpack_require__(/*! ./file/File */ \"./lib/components/file/File.js\"));\nvar _Form = _interopRequireDefault(__webpack_require__(/*! ./form/Form */ \"./lib/components/form/Form.js\"));\nvar _Hidden = _interopRequireDefault(__webpack_require__(/*! ./hidden/Hidden */ \"./lib/components/hidden/Hidden.js\"));\nvar _Input = _interopRequireDefault(__webpack_require__(/*! ./_classes/input/Input */ \"./lib/components/_classes/input/Input.js\"));\nvar _Multivalue = _interopRequireDefault(__webpack_require__(/*! ./_classes/multivalue/Multivalue */ \"./lib/components/_classes/multivalue/Multivalue.js\"));\nvar _Field = _interopRequireDefault(__webpack_require__(/*! ./_classes/field/Field */ \"./lib/components/_classes/field/Field.js\"));\nvar _ListComponent = _interopRequireDefault(__webpack_require__(/*! ./_classes/list/ListComponent */ \"./lib/components/_classes/list/ListComponent.js\"));\nvar _HTML = _interopRequireDefault(__webpack_require__(/*! ./html/HTML */ \"./lib/components/html/HTML.js\"));\nvar _NestedComponent = _interopRequireDefault(__webpack_require__(/*! ./_classes/nested/NestedComponent */ \"./lib/components/_classes/nested/NestedComponent.js\"));\nvar _NestedDataComponent = _interopRequireDefault(__webpack_require__(/*! ./_classes/nesteddata/NestedDataComponent */ \"./lib/components/_classes/nesteddata/NestedDataComponent.js\"));\nvar _NestedArrayComponent = _interopRequireDefault(__webpack_require__(/*! ./_classes/nestedarray/NestedArrayComponent */ \"./lib/components/_classes/nestedarray/NestedArrayComponent.js\"));\nvar _Number = _interopRequireDefault(__webpack_require__(/*! ./number/Number */ \"./lib/components/number/Number.js\"));\nvar _Panel = _interopRequireDefault(__webpack_require__(/*! ./panel/Panel */ \"./lib/components/panel/Panel.js\"));\nvar _Password = _interopRequireDefault(__webpack_require__(/*! ./password/Password */ \"./lib/components/password/Password.js\"));\nvar _PhoneNumber = _interopRequireDefault(__webpack_require__(/*! ./phonenumber/PhoneNumber */ \"./lib/components/phonenumber/PhoneNumber.js\"));\nvar _Radio = _interopRequireDefault(__webpack_require__(/*! ./radio/Radio */ \"./lib/components/radio/Radio.js\"));\nvar _ReCaptcha = _interopRequireDefault(__webpack_require__(/*! ./recaptcha/ReCaptcha */ \"./lib/components/recaptcha/ReCaptcha.js\"));\nvar _Resource = _interopRequireDefault(__webpack_require__(/*! ./resource/Resource */ \"./lib/components/resource/Resource.js\"));\nvar _SelectBoxes = _interopRequireDefault(__webpack_require__(/*! ./selectboxes/SelectBoxes */ \"./lib/components/selectboxes/SelectBoxes.js\"));\nvar _Select = _interopRequireDefault(__webpack_require__(/*! ./select/Select */ \"./lib/components/select/Select.js\"));\nvar _Signature = _interopRequireDefault(__webpack_require__(/*! ./signature/Signature */ \"./lib/components/signature/Signature.js\"));\nvar _Survey = _interopRequireDefault(__webpack_require__(/*! ./survey/Survey */ \"./lib/components/survey/Survey.js\"));\nvar _Table = _interopRequireDefault(__webpack_require__(/*! ./table/Table */ \"./lib/components/table/Table.js\"));\nvar _Tabs = _interopRequireDefault(__webpack_require__(/*! ./tabs/Tabs */ \"./lib/components/tabs/Tabs.js\"));\nvar _Tags = _interopRequireDefault(__webpack_require__(/*! ./tags/Tags */ \"./lib/components/tags/Tags.js\"));\nvar _TextArea = _interopRequireDefault(__webpack_require__(/*! ./textarea/TextArea */ \"./lib/components/textarea/TextArea.js\"));\nvar _TextField = _interopRequireDefault(__webpack_require__(/*! ./textfield/TextField */ \"./lib/components/textfield/TextField.js\"));\nvar _Time = _interopRequireDefault(__webpack_require__(/*! ./time/Time */ \"./lib/components/time/Time.js\"));\nvar _Tree = _interopRequireDefault(__webpack_require__(/*! ./tree/Tree */ \"./lib/components/tree/Tree.js\"));\nvar _Unknown = _interopRequireDefault(__webpack_require__(/*! ./unknown/Unknown */ \"./lib/components/unknown/Unknown.js\"));\nvar _Url = _interopRequireDefault(__webpack_require__(/*! ./url/Url */ \"./lib/components/url/Url.js\"));\nvar _Well = _interopRequireDefault(__webpack_require__(/*! ./well/Well */ \"./lib/components/well/Well.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n address: _Address[\"default\"],\n base: _Component[\"default\"],\n component: _Component[\"default\"],\n componentmodal: _ComponentModal[\"default\"],\n button: _Button[\"default\"],\n checkbox: _Checkbox[\"default\"],\n columns: _Columns[\"default\"],\n container: _Container[\"default\"],\n content: _Content[\"default\"],\n currency: _Currency[\"default\"],\n datagrid: _DataGrid[\"default\"],\n datamap: _DataMap[\"default\"],\n datetime: _DateTime[\"default\"],\n day: _Day[\"default\"],\n editgrid: _EditGrid[\"default\"],\n email: _Email[\"default\"],\n input: _Input[\"default\"],\n field: _Field[\"default\"],\n multivalue: _Multivalue[\"default\"],\n list: _ListComponent[\"default\"],\n fieldset: _Fieldset[\"default\"],\n file: _File[\"default\"],\n form: _Form[\"default\"],\n hidden: _Hidden[\"default\"],\n htmlelement: _HTML[\"default\"],\n nested: _NestedComponent[\"default\"],\n nesteddata: _NestedDataComponent[\"default\"],\n nestedarray: _NestedArrayComponent[\"default\"],\n number: _Number[\"default\"],\n panel: _Panel[\"default\"],\n password: _Password[\"default\"],\n phoneNumber: _PhoneNumber[\"default\"],\n radio: _Radio[\"default\"],\n recaptcha: _ReCaptcha[\"default\"],\n resource: _Resource[\"default\"],\n select: _Select[\"default\"],\n selectboxes: _SelectBoxes[\"default\"],\n signature: _Signature[\"default\"],\n survey: _Survey[\"default\"],\n table: _Table[\"default\"],\n tabs: _Tabs[\"default\"],\n tags: _Tags[\"default\"],\n textarea: _TextArea[\"default\"],\n textfield: _TextField[\"default\"],\n time: _Time[\"default\"],\n tree: _Tree[\"default\"],\n unknown: _Unknown[\"default\"],\n url: _Url[\"default\"],\n well: _Well[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/index.js?"); /***/ }), @@ -1421,7 +1454,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\nvar _TextField = _interopRequireDefault(__webpack_require__(/*! ../textfield/TextField.form */ \"./lib/components/textfield/TextField.form.js\"));\n\nvar _NumberEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/Number.edit.display */ \"./lib/components/number/editForm/Number.edit.display.js\"));\n\nvar _NumberEdit2 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Number.edit.data */ \"./lib/components/number/editForm/Number.edit.data.js\"));\n\nvar _NumberEdit3 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Number.edit.validation */ \"./lib/components/number/editForm/Number.edit.validation.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _TextField.default.apply(void 0, [[{\n key: 'display',\n components: _NumberEdit.default\n }, {\n key: 'data',\n components: _NumberEdit2.default\n }, {\n key: 'validation',\n components: _NumberEdit3.default\n }, {\n key: 'addons',\n ignore: true\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/number/Number.form.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\nvar _TextField = _interopRequireDefault(__webpack_require__(/*! ../textfield/TextField.form */ \"./lib/components/textfield/TextField.form.js\"));\nvar _NumberEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/Number.edit.display */ \"./lib/components/number/editForm/Number.edit.display.js\"));\nvar _NumberEdit2 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Number.edit.data */ \"./lib/components/number/editForm/Number.edit.data.js\"));\nvar _NumberEdit3 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Number.edit.validation */ \"./lib/components/number/editForm/Number.edit.validation.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _TextField[\"default\"].apply(void 0, [[{\n key: 'display',\n components: _NumberEdit[\"default\"]\n }, {\n key: 'data',\n components: _NumberEdit2[\"default\"]\n }, {\n key: 'validation',\n components: _NumberEdit3[\"default\"]\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/number/Number.form.js?"); /***/ }), @@ -1432,7 +1465,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.join.js */ \"./node_modules/core-js/modules/es.array.join.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.split.js */ \"./node_modules/core-js/modules/es.string.split.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.includes.js */ \"./node_modules/core-js/modules/es.array.includes.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.includes.js */ \"./node_modules/core-js/modules/es.string.includes.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.repeat.js */ \"./node_modules/core-js/modules/es.string.repeat.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\nvar _vanillaTextMask = __webpack_require__(/*! @formio/vanilla-text-mask */ \"./node_modules/@formio/vanilla-text-mask/dist/vanillaTextMask.js\");\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nvar _textMaskAddons = __webpack_require__(/*! @formio/text-mask-addons */ \"./node_modules/@formio/text-mask-addons/dist/textMaskAddons.js\");\n\nvar _Input2 = _interopRequireDefault(__webpack_require__(/*! ../_classes/input/Input */ \"./lib/components/_classes/input/Input.js\"));\n\nvar _utils = __webpack_require__(/*! ../../utils/utils */ \"./lib/utils/utils.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar NumberComponent = /*#__PURE__*/function (_Input) {\n _inherits(NumberComponent, _Input);\n\n var _super = _createSuper(NumberComponent);\n\n function NumberComponent() {\n var _this$options$propert;\n\n var _this;\n\n _classCallCheck(this, NumberComponent);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n _this.validators = _this.validators.concat(['min', 'max']);\n var separators = (0, _utils.getNumberSeparators)(_this.options.language || navigator.language);\n _this.decimalSeparator = _this.options.decimalSeparator = _this.options.decimalSeparator || ((_this$options$propert = _this.options.properties) === null || _this$options$propert === void 0 ? void 0 : _this$options$propert.decimalSeparator) || separators.decimalSeparator;\n\n if (_this.component.delimiter) {\n var _this$options$propert2;\n\n if (_this.options.hasOwnProperty('thousandsSeparator')) {\n console.warn(\"Property 'thousandsSeparator' is deprecated. Please use i18n to specify delimiter.\");\n }\n\n _this.delimiter = ((_this$options$propert2 = _this.options.properties) === null || _this$options$propert2 === void 0 ? void 0 : _this$options$propert2.thousandsSeparator) || _this.options.thousandsSeparator || separators.delimiter;\n } else {\n _this.delimiter = '';\n }\n\n var requireDecimal = _lodash.default.get(_this.component, 'requireDecimal', false);\n\n _this.decimalLimit = (0, _utils.getNumberDecimalLimit)(_this.component, requireDecimal ? 2 : 20); // Currencies to override BrowserLanguage Config. Object key {}\n\n if (_lodash.default.has(_this.options, \"languageOverride.\".concat(_this.options.language))) {\n var override = _lodash.default.get(_this.options, \"languageOverride.\".concat(_this.options.language));\n\n _this.decimalSeparator = override.decimalSeparator;\n _this.delimiter = override.delimiter;\n }\n\n _this.numberMask = _this.createNumberMask();\n return _this;\n }\n /**\n * Creates the number mask for normal numbers.\n *\n * @return {*}\n */\n\n\n _createClass(NumberComponent, [{\n key: \"createNumberMask\",\n value: function createNumberMask() {\n return (0, _textMaskAddons.createNumberMask)({\n prefix: '',\n suffix: '',\n requireDecimal: _lodash.default.get(this.component, 'requireDecimal', false),\n thousandsSeparatorSymbol: _lodash.default.get(this.component, 'thousandsSeparator', this.delimiter),\n decimalSymbol: _lodash.default.get(this.component, 'decimalSymbol', this.decimalSeparator),\n decimalLimit: _lodash.default.get(this.component, 'decimalLimit', this.decimalLimit),\n allowNegative: _lodash.default.get(this.component, 'allowNegative', true),\n allowDecimal: this.isDecimalAllowed()\n });\n }\n }, {\n key: \"defaultSchema\",\n get: function get() {\n return NumberComponent.schema();\n }\n }, {\n key: \"defaultValue\",\n get: function get() {\n var defaultValue = _get(_getPrototypeOf(NumberComponent.prototype), \"defaultValue\", this);\n\n if (!defaultValue && this.component.defaultValue === 0) {\n defaultValue = this.component.defaultValue;\n }\n\n if (!this.component.multiple && _lodash.default.isArray(defaultValue)) {\n defaultValue = !defaultValue[0] && defaultValue[0] !== 0 ? null : defaultValue[0];\n }\n\n return defaultValue;\n }\n }, {\n key: \"isDecimalAllowed\",\n value: function isDecimalAllowed() {\n return _lodash.default.get(this.component, 'allowDecimal', !(this.component.validate && this.component.validate.integer));\n }\n }, {\n key: \"parseNumber\",\n value: function parseNumber(value) {\n // Remove delimiters and convert decimal separator to dot.\n value = value.split(this.delimiter).join('').replace(this.decimalSeparator, '.');\n\n if (this.component.validate && this.component.validate.integer) {\n return parseInt(value, 10);\n } else {\n return parseFloat(value);\n }\n }\n }, {\n key: \"setInputMask\",\n value: function setInputMask(input) {\n var numberPattern = '[0-9';\n numberPattern += this.decimalSeparator || '';\n numberPattern += this.delimiter || '';\n numberPattern += ']*';\n input.setAttribute('pattern', numberPattern);\n input.mask = (0, _vanillaTextMask.maskInput)({\n inputElement: input,\n mask: this.numberMask,\n shadowRoot: this.root ? this.root.shadowRoot : null\n });\n }\n }, {\n key: \"inputInfo\",\n get: function get() {\n var info = _get(_getPrototypeOf(NumberComponent.prototype), \"inputInfo\", this);\n\n if (this.component.mask) {\n info.attr.type = 'password';\n } else {\n info.attr.type = 'text';\n }\n\n info.attr.inputmode = this.isDecimalAllowed() ? 'decimal' : 'numeric';\n info.changeEvent = 'input';\n return info;\n }\n }, {\n key: \"getValueAt\",\n value: function getValueAt(index) {\n if (!this.refs.input.length || !this.refs.input[index]) {\n return null;\n }\n\n var val = this.refs.input[index].value;\n return val && val !== '-_' ? this.parseNumber(val) : null;\n }\n }, {\n key: \"setValueAt\",\n value: function setValueAt(index, value) {\n var flags = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n return _get(_getPrototypeOf(NumberComponent.prototype), \"setValueAt\", this).call(this, index, this.formatValue(this.parseValue(value)), flags);\n }\n }, {\n key: \"parseValue\",\n value: function parseValue(input) {\n if (typeof input === 'string') {\n input = input.split(this.delimiter).join('').replace(this.decimalSeparator, '.');\n }\n\n var value = parseFloat(input);\n\n if (!_lodash.default.isNaN(value)) {\n value = String(value).replace('.', this.decimalSeparator);\n } else {\n value = null;\n }\n\n return value;\n }\n }, {\n key: \"formatValue\",\n value: function formatValue(value) {\n if (this.component.requireDecimal && value && !value.includes(this.decimalSeparator)) {\n return \"\".concat(value).concat(this.decimalSeparator).concat(_lodash.default.repeat('0', this.decimalLimit));\n } else if (this.component.requireDecimal && value && value.includes(this.decimalSeparator)) {\n return \"\".concat(value).concat(_lodash.default.repeat('0', this.decimalLimit - value.split(this.decimalSeparator)[1].length));\n }\n\n return value;\n }\n }, {\n key: \"focus\",\n value: function focus() {\n var input = this.refs.input[0];\n\n if (input) {\n _get(_getPrototypeOf(NumberComponent.prototype), \"focus\", this).call(this);\n\n input.setSelectionRange(0, input.value.length);\n }\n }\n }, {\n key: \"getMaskedValue\",\n value: function getMaskedValue(value) {\n value = value === null ? '0' : value.toString();\n\n if (value.includes('.') && '.' !== this.decimalSeparator) {\n value = value.replace('.', this.decimalSeparator);\n }\n\n return (0, _vanillaTextMask.conformToMask)(this.formatValue(value), this.numberMask).conformedValue;\n }\n }, {\n key: \"getValueAsString\",\n value: function getValueAsString(value, options) {\n if (!value && value !== 0) {\n return '';\n }\n\n value = this.getWidgetValueAsString(value, options);\n\n if (Array.isArray(value)) {\n return value.map(this.getMaskedValue).join(', ');\n }\n\n return this.getMaskedValue(value);\n }\n }, {\n key: \"addFocusBlurEvents\",\n value: function addFocusBlurEvents(element) {\n var _this2 = this;\n\n _get(_getPrototypeOf(NumberComponent.prototype), \"addFocusBlurEvents\", this).call(this, element);\n\n this.addEventListener(element, 'blur', function () {\n element.value = _this2.getValueAsString(_this2.formatValue(_this2.parseValue(element.value)));\n });\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len2 = arguments.length, extend = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n extend[_key2] = arguments[_key2];\n }\n\n return _Input2.default.schema.apply(_Input2.default, [{\n type: 'number',\n label: 'Number',\n key: 'number',\n validate: {\n min: '',\n max: '',\n step: 'any',\n integer: ''\n }\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Number',\n icon: 'hashtag',\n group: 'basic',\n documentation: '/userguide/forms/form-components#number',\n weight: 30,\n schema: NumberComponent.schema()\n };\n }\n }]);\n\n return NumberComponent;\n}(_Input2.default);\n\nexports[\"default\"] = NumberComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/number/Number.js?"); +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n__webpack_require__(/*! core-js/modules/es.array.join.js */ \"./node_modules/core-js/modules/es.array.join.js\");\n__webpack_require__(/*! core-js/modules/es.string.split.js */ \"./node_modules/core-js/modules/es.string.split.js\");\n__webpack_require__(/*! core-js/modules/es.parse-int.js */ \"./node_modules/core-js/modules/es.parse-int.js\");\n__webpack_require__(/*! core-js/modules/es.parse-float.js */ \"./node_modules/core-js/modules/es.parse-float.js\");\n__webpack_require__(/*! core-js/modules/es.array.includes.js */ \"./node_modules/core-js/modules/es.array.includes.js\");\n__webpack_require__(/*! core-js/modules/es.string.includes.js */ \"./node_modules/core-js/modules/es.string.includes.js\");\n__webpack_require__(/*! core-js/modules/es.string.repeat.js */ \"./node_modules/core-js/modules/es.string.repeat.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-string.js */ \"./node_modules/core-js/modules/es.date.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.array.is-array.js */ \"./node_modules/core-js/modules/es.array.is-array.js\");\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _vanillaTextMask = __webpack_require__(/*! @formio/vanilla-text-mask */ \"./node_modules/@formio/vanilla-text-mask/dist/vanillaTextMask.js\");\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nvar _textMaskAddons = __webpack_require__(/*! @formio/text-mask-addons */ \"./node_modules/@formio/text-mask-addons/dist/textMaskAddons.js\");\nvar _Input2 = _interopRequireDefault(__webpack_require__(/*! ../_classes/input/Input */ \"./lib/components/_classes/input/Input.js\"));\nvar _utils = __webpack_require__(/*! ../../utils/utils */ \"./lib/utils/utils.js\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar NumberComponent = /*#__PURE__*/function (_Input) {\n _inherits(NumberComponent, _Input);\n var _super = _createSuper(NumberComponent);\n function NumberComponent() {\n var _this$options$propert;\n var _this;\n _classCallCheck(this, NumberComponent);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _this.validators = _this.validators.concat(['min', 'max']);\n var separators = (0, _utils.getNumberSeparators)(_this.options.language || navigator.language);\n _this.decimalSeparator = _this.options.decimalSeparator = _this.options.decimalSeparator || ((_this$options$propert = _this.options.properties) === null || _this$options$propert === void 0 ? void 0 : _this$options$propert.decimalSeparator) || separators.decimalSeparator;\n if (_this.component.delimiter) {\n var _this$options$propert2;\n if (_this.options.hasOwnProperty('thousandsSeparator')) {\n console.warn(\"Property 'thousandsSeparator' is deprecated. Please use i18n to specify delimiter.\");\n }\n _this.delimiter = ((_this$options$propert2 = _this.options.properties) === null || _this$options$propert2 === void 0 ? void 0 : _this$options$propert2.thousandsSeparator) || _this.options.thousandsSeparator || separators.delimiter;\n } else {\n _this.delimiter = '';\n }\n var requireDecimal = _lodash[\"default\"].get(_this.component, 'requireDecimal', false);\n _this.decimalLimit = (0, _utils.getNumberDecimalLimit)(_this.component, requireDecimal ? 2 : 20);\n\n // Currencies to override BrowserLanguage Config. Object key {}\n if (_lodash[\"default\"].has(_this.options, \"languageOverride.\".concat(_this.options.language))) {\n var override = _lodash[\"default\"].get(_this.options, \"languageOverride.\".concat(_this.options.language));\n _this.decimalSeparator = override.decimalSeparator;\n _this.delimiter = override.delimiter;\n }\n _this.numberMask = _this.createNumberMask();\n return _this;\n }\n\n /**\n * Creates the number mask for normal numbers.\n *\n * @return {*}\n */\n _createClass(NumberComponent, [{\n key: \"createNumberMask\",\n value: function createNumberMask() {\n return (0, _textMaskAddons.createNumberMask)({\n prefix: '',\n suffix: '',\n requireDecimal: _lodash[\"default\"].get(this.component, 'requireDecimal', false),\n thousandsSeparatorSymbol: _lodash[\"default\"].get(this.component, 'thousandsSeparator', this.delimiter),\n decimalSymbol: _lodash[\"default\"].get(this.component, 'decimalSymbol', this.decimalSeparator),\n decimalLimit: _lodash[\"default\"].get(this.component, 'decimalLimit', this.decimalLimit),\n allowNegative: _lodash[\"default\"].get(this.component, 'allowNegative', true),\n allowDecimal: this.isDecimalAllowed()\n });\n }\n }, {\n key: \"defaultSchema\",\n get: function get() {\n return NumberComponent.schema();\n }\n }, {\n key: \"defaultValue\",\n get: function get() {\n var defaultValue = _get(_getPrototypeOf(NumberComponent.prototype), \"defaultValue\", this);\n if (!defaultValue && this.component.defaultValue === 0) {\n defaultValue = this.component.defaultValue;\n }\n if (!this.component.multiple && _lodash[\"default\"].isArray(defaultValue)) {\n defaultValue = !defaultValue[0] && defaultValue[0] !== 0 ? null : defaultValue[0];\n }\n return defaultValue;\n }\n }, {\n key: \"isDecimalAllowed\",\n value: function isDecimalAllowed() {\n return _lodash[\"default\"].get(this.component, 'allowDecimal', !(this.component.validate && this.component.validate.integer));\n }\n }, {\n key: \"parseNumber\",\n value: function parseNumber(value) {\n // Remove delimiters and convert decimal separator to dot.\n value = value.split(this.delimiter).join('').replace(this.decimalSeparator, '.');\n if (this.component.validate && this.component.validate.integer) {\n return parseInt(value, 10);\n } else {\n return parseFloat(value);\n }\n }\n }, {\n key: \"setInputMask\",\n value: function setInputMask(input) {\n var numberPattern = '[0-9';\n numberPattern += this.decimalSeparator || '';\n numberPattern += this.delimiter || '';\n numberPattern += ']*';\n input.setAttribute('pattern', numberPattern);\n input.mask = (0, _vanillaTextMask.maskInput)({\n inputElement: input,\n mask: this.numberMask,\n shadowRoot: this.root ? this.root.shadowRoot : null\n });\n }\n }, {\n key: \"inputInfo\",\n get: function get() {\n var info = _get(_getPrototypeOf(NumberComponent.prototype), \"inputInfo\", this);\n if (this.component.mask) {\n info.attr.type = 'password';\n } else {\n info.attr.type = 'text';\n }\n info.attr.inputmode = this.isDecimalAllowed() ? 'decimal' : 'numeric';\n info.changeEvent = 'input';\n return info;\n }\n }, {\n key: \"getValueAt\",\n value: function getValueAt(index) {\n if (!this.refs.input.length || !this.refs.input[index]) {\n return null;\n }\n var val = this.refs.input[index].value;\n return val && val !== '-_' ? this.parseNumber(val) : null;\n }\n }, {\n key: \"setValueAt\",\n value: function setValueAt(index, value) {\n var flags = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n return _get(_getPrototypeOf(NumberComponent.prototype), \"setValueAt\", this).call(this, index, this.formatValue(this.parseValue(value)), flags);\n }\n }, {\n key: \"parseValue\",\n value: function parseValue(input) {\n if (typeof input === 'string') {\n input = input.split(this.delimiter).join('').replace(this.decimalSeparator, '.');\n }\n var value = parseFloat(input);\n if (!_lodash[\"default\"].isNaN(value)) {\n value = String(value).replace('.', this.decimalSeparator);\n } else {\n value = null;\n }\n return value;\n }\n }, {\n key: \"formatValue\",\n value: function formatValue(value) {\n if (this.component.requireDecimal && value && !value.includes(this.decimalSeparator)) {\n return \"\".concat(value).concat(this.decimalSeparator).concat(_lodash[\"default\"].repeat('0', this.decimalLimit));\n } else if (this.component.requireDecimal && value && value.includes(this.decimalSeparator)) {\n return \"\".concat(value).concat(_lodash[\"default\"].repeat('0', this.decimalLimit - value.split(this.decimalSeparator)[1].length));\n }\n return value;\n }\n }, {\n key: \"focus\",\n value: function focus() {\n var input = this.refs.input[0];\n if (input) {\n _get(_getPrototypeOf(NumberComponent.prototype), \"focus\", this).call(this);\n input.setSelectionRange(0, input.value.length);\n }\n }\n }, {\n key: \"getMaskedValue\",\n value: function getMaskedValue(value) {\n value = value === null ? '0' : value.toString();\n if (value.includes('.') && '.' !== this.decimalSeparator) {\n value = value.replace('.', this.decimalSeparator);\n }\n return (0, _vanillaTextMask.conformToMask)(this.formatValue(value), this.numberMask).conformedValue;\n }\n }, {\n key: \"getValueAsString\",\n value: function getValueAsString(value, options) {\n var _this2 = this;\n if (!value && value !== 0) {\n return '';\n }\n value = this.getWidgetValueAsString(value, options);\n if (Array.isArray(value)) {\n return value.map(function (val) {\n return _this2.getMaskedValue(val);\n }).join(', ');\n }\n return this.getMaskedValue(value);\n }\n }, {\n key: \"addFocusBlurEvents\",\n value: function addFocusBlurEvents(element) {\n var _this3 = this;\n _get(_getPrototypeOf(NumberComponent.prototype), \"addFocusBlurEvents\", this).call(this, element);\n this.addEventListener(element, 'blur', function () {\n element.value = _this3.getValueAsString(_this3.formatValue(_this3.parseValue(element.value)));\n });\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len2 = arguments.length, extend = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n extend[_key2] = arguments[_key2];\n }\n return _Input2[\"default\"].schema.apply(_Input2[\"default\"], [{\n type: 'number',\n label: 'Number',\n key: 'number',\n validate: {\n min: '',\n max: '',\n step: 'any',\n integer: ''\n }\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Number',\n icon: 'hashtag',\n group: 'basic',\n documentation: '/userguide/form-building/form-components#number',\n weight: 30,\n schema: NumberComponent.schema()\n };\n }\n }]);\n return NumberComponent;\n}(_Input2[\"default\"]);\nexports[\"default\"] = NumberComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/number/Number.js?"); /***/ }), @@ -1440,10 +1473,10 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /*!************************************************************!*\ !*** ./lib/components/number/editForm/Number.edit.data.js ***! \************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n type: 'checkbox',\n input: true,\n weight: 70,\n key: 'delimiter',\n label: 'Use Thousands Separator',\n tooltip: 'Separate thousands by local delimiter.'\n}, {\n type: 'number',\n input: true,\n weight: 80,\n key: 'decimalLimit',\n label: 'Decimal Places',\n tooltip: 'The maximum number of decimal places.'\n}, {\n type: 'checkbox',\n input: true,\n weight: 90,\n key: 'requireDecimal',\n label: 'Require Decimal',\n tooltip: 'Always show decimals, even if trailing zeros.'\n}, {\n key: 'case',\n ignore: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/number/editForm/Number.edit.data.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n type: 'checkbox',\n input: true,\n weight: 70,\n key: 'delimiter',\n label: 'Use Thousands Separator',\n tooltip: 'Separate thousands by local delimiter.'\n}, {\n type: 'number',\n input: true,\n weight: 80,\n key: 'decimalLimit',\n label: 'Decimal Places',\n tooltip: 'The maximum number of decimal places.'\n}, {\n type: 'checkbox',\n input: true,\n weight: 90,\n key: 'requireDecimal',\n label: 'Require Decimal',\n tooltip: 'Always show decimals, even if trailing zeros.'\n}, {\n key: 'case',\n ignore: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/number/editForm/Number.edit.data.js?"); /***/ }), @@ -1451,10 +1484,10 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /*!***************************************************************!*\ !*** ./lib/components/number/editForm/Number.edit.display.js ***! \***************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'spellcheck',\n ignore: true\n}, {\n key: 'inputMask',\n ignore: true\n}, {\n key: 'allowMultipleMasks',\n ignore: true\n}, {\n key: 'showWordCount',\n ignore: true\n}, {\n key: 'showCharCount',\n ignore: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/number/editForm/Number.edit.display.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'spellcheck',\n ignore: true\n}, {\n key: 'inputMask',\n ignore: true\n}, {\n key: 'allowMultipleMasks',\n ignore: true\n}, {\n key: 'showWordCount',\n ignore: true\n}, {\n key: 'showCharCount',\n ignore: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/number/editForm/Number.edit.display.js?"); /***/ }), @@ -1462,10 +1495,10 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /*!******************************************************************!*\ !*** ./lib/components/number/editForm/Number.edit.validation.js ***! \******************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'unique',\n ignore: true\n}, {\n key: 'validate.minLength',\n ignore: true\n}, {\n key: 'validate.maxLength',\n ignore: true\n}, {\n key: 'validate.minWords',\n ignore: true\n}, {\n key: 'validate.maxWords',\n ignore: true\n}, {\n key: 'validate.pattern',\n ignore: true\n}, {\n type: 'number',\n label: 'Minimum Value',\n key: 'validate.min',\n input: true,\n placeholder: 'Minimum Value',\n tooltip: 'The minimum value this field must have before the form can be submitted.',\n weight: 150\n}, {\n type: 'number',\n label: 'Maximum Value',\n key: 'validate.max',\n input: true,\n placeholder: 'Maximum Value',\n tooltip: 'The maximum value this field can have before the form can be submitted.',\n weight: 160\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/number/editForm/Number.edit.validation.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'unique',\n ignore: true\n}, {\n key: 'validate.minLength',\n ignore: true\n}, {\n key: 'validate.maxLength',\n ignore: true\n}, {\n key: 'validate.minWords',\n ignore: true\n}, {\n key: 'validate.maxWords',\n ignore: true\n}, {\n key: 'validate.pattern',\n ignore: true\n}, {\n type: 'number',\n label: 'Minimum Value',\n key: 'validate.min',\n input: true,\n placeholder: 'Minimum Value',\n tooltip: 'The minimum value this field must have before the form can be submitted.',\n weight: 150\n}, {\n type: 'number',\n label: 'Maximum Value',\n key: 'validate.max',\n input: true,\n placeholder: 'Maximum Value',\n tooltip: 'The maximum value this field can have before the form can be submitted.',\n weight: 160\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/number/editForm/Number.edit.validation.js?"); /***/ }), @@ -1476,7 +1509,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\nvar _NestedComponent = _interopRequireDefault(__webpack_require__(/*! ../_classes/nested/NestedComponent.form */ \"./lib/components/_classes/nested/NestedComponent.form.js\"));\n\nvar _PanelEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/Panel.edit.display */ \"./lib/components/panel/editForm/Panel.edit.display.js\"));\n\nvar _PanelEdit2 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Panel.edit.conditional */ \"./lib/components/panel/editForm/Panel.edit.conditional.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _NestedComponent.default.apply(void 0, [[{\n key: 'display',\n components: _PanelEdit.default\n }, {\n key: 'conditional',\n components: _PanelEdit2.default\n }, {\n key: 'addons',\n ignore: true\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/panel/Panel.form.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\nvar _NestedComponent = _interopRequireDefault(__webpack_require__(/*! ../_classes/nested/NestedComponent.form */ \"./lib/components/_classes/nested/NestedComponent.form.js\"));\nvar _PanelEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/Panel.edit.display */ \"./lib/components/panel/editForm/Panel.edit.display.js\"));\nvar _PanelEdit2 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Panel.edit.conditional */ \"./lib/components/panel/editForm/Panel.edit.conditional.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _NestedComponent[\"default\"].apply(void 0, [[{\n key: 'display',\n components: _PanelEdit[\"default\"]\n }, {\n key: 'conditional',\n components: _PanelEdit2[\"default\"]\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/panel/Panel.form.js?"); /***/ }), @@ -1487,7 +1520,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\nvar _NestedComponent2 = _interopRequireDefault(__webpack_require__(/*! ../_classes/nested/NestedComponent */ \"./lib/components/_classes/nested/NestedComponent.js\"));\n\nvar _utils = __webpack_require__(/*! ../../utils/utils */ \"./lib/utils/utils.js\");\n\nvar _Form = _interopRequireDefault(__webpack_require__(/*! ../form/Form */ \"./lib/components/form/Form.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar PanelComponent = /*#__PURE__*/function (_NestedComponent) {\n _inherits(PanelComponent, _NestedComponent);\n\n var _super = _createSuper(PanelComponent);\n\n function PanelComponent() {\n var _this;\n\n _classCallCheck(this, PanelComponent);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n _this.noField = true;\n\n _this.on('componentError', function () {\n //change collapsed value only when the panel is collapsed to avoid additional redrawing that prevents validation messages\n if ((0, _utils.hasInvalidComponent)(_assertThisInitialized(_this)) && _this.collapsed) {\n _this.collapsed = false;\n }\n });\n\n return _this;\n }\n\n _createClass(PanelComponent, [{\n key: \"defaultSchema\",\n get: function get() {\n return PanelComponent.schema();\n }\n }, {\n key: \"templateName\",\n get: function get() {\n return 'panel';\n }\n }, {\n key: \"getComponent\",\n value: function getComponent(path, fn, originalPath) {\n var _this$root;\n\n if (((_this$root = this.root) === null || _this$root === void 0 ? void 0 : _this$root.parent) instanceof _Form.default) {\n path = path.replace(this._parentPath, '');\n }\n\n return _get(_getPrototypeOf(PanelComponent.prototype), \"getComponent\", this).call(this, path, fn, originalPath);\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len2 = arguments.length, extend = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n extend[_key2] = arguments[_key2];\n }\n\n return _NestedComponent2.default.schema.apply(_NestedComponent2.default, [{\n label: 'Panel',\n type: 'panel',\n key: 'panel',\n title: 'Panel',\n theme: 'default',\n breadcrumb: 'default',\n components: [],\n clearOnHide: false,\n input: false,\n tableView: false,\n persistent: false\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Panel',\n icon: 'list-alt',\n group: 'layout',\n documentation: '/userguide/forms/layout-components#panel',\n weight: 30,\n schema: PanelComponent.schema()\n };\n }\n }]);\n\n return PanelComponent;\n}(_NestedComponent2.default);\n\nexports[\"default\"] = PanelComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/panel/Panel.js?"); +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _NestedComponent2 = _interopRequireDefault(__webpack_require__(/*! ../_classes/nested/NestedComponent */ \"./lib/components/_classes/nested/NestedComponent.js\"));\nvar _utils = __webpack_require__(/*! ../../utils/utils */ \"./lib/utils/utils.js\");\nvar _Form = _interopRequireDefault(__webpack_require__(/*! ../form/Form */ \"./lib/components/form/Form.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar PanelComponent = /*#__PURE__*/function (_NestedComponent) {\n _inherits(PanelComponent, _NestedComponent);\n var _super = _createSuper(PanelComponent);\n function PanelComponent() {\n var _this;\n _classCallCheck(this, PanelComponent);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _this.noField = true;\n _this.on('componentError', function () {\n //change collapsed value only when the panel is collapsed to avoid additional redrawing that prevents validation messages\n if ((0, _utils.hasInvalidComponent)(_assertThisInitialized(_this)) && _this.collapsed) {\n _this.collapsed = false;\n }\n });\n return _this;\n }\n _createClass(PanelComponent, [{\n key: \"defaultSchema\",\n get: function get() {\n return PanelComponent.schema();\n }\n }, {\n key: \"templateName\",\n get: function get() {\n return 'panel';\n }\n }, {\n key: \"getComponent\",\n value: function getComponent(path, fn, originalPath) {\n var _this$root;\n if (((_this$root = this.root) === null || _this$root === void 0 ? void 0 : _this$root.parent) instanceof _Form[\"default\"]) {\n path = path.replace(this._parentPath, '');\n }\n return _get(_getPrototypeOf(PanelComponent.prototype), \"getComponent\", this).call(this, path, fn, originalPath);\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len2 = arguments.length, extend = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n extend[_key2] = arguments[_key2];\n }\n return _NestedComponent2[\"default\"].schema.apply(_NestedComponent2[\"default\"], [{\n label: 'Panel',\n type: 'panel',\n key: 'panel',\n title: 'Panel',\n theme: 'default',\n breadcrumb: 'default',\n components: [],\n clearOnHide: false,\n input: false,\n tableView: false,\n persistent: false\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Panel',\n icon: 'list-alt',\n group: 'layout',\n documentation: '/userguide/form-building/layout-components#panel',\n weight: 30,\n schema: PanelComponent.schema()\n };\n }\n }]);\n return PanelComponent;\n}(_NestedComponent2[\"default\"]);\nexports[\"default\"] = PanelComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/panel/Panel.js?"); /***/ }), @@ -1498,7 +1531,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptors.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\nvar _utils = _interopRequireDefault(__webpack_require__(/*! ../../_classes/component/editForm/utils */ \"./lib/components/_classes/component/editForm/utils.js\"));\n\nvar _isEqual2 = _interopRequireDefault(__webpack_require__(/*! lodash/isEqual */ \"./node_modules/lodash/isEqual.js\"));\n\nvar _omit2 = _interopRequireDefault(__webpack_require__(/*! lodash/omit */ \"./node_modules/lodash/omit.js\"));\n\nvar _difference2 = _interopRequireDefault(__webpack_require__(/*! lodash/difference */ \"./node_modules/lodash/difference.js\"));\n\nvar _keys2 = _interopRequireDefault(__webpack_require__(/*! lodash/keys */ \"./node_modules/lodash/keys.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/* eslint-disable quotes, max-len */\nvar title = 'Advanced Next Page';\nvar jsonProp = 'nextPage';\nvar jsProp = 'nextPage';\nvar jsDocHTML = \"\\n

You must assign the next variable with the API key of the next page.

\\n

The global variable data is provided, and allows you to access the data of any form component, by using its API key.

\\n

Also moment library is available, and allows you to manipulate dates in a convenient way.

\\n
Example
next = data.addComment ? 'page3' : 'page4';
\\n\";\nvar jsonDocHTML = \"\\n

Submission data is available as JsonLogic variables, with the same api key as your components.

\\n\";\n\nvar settingComponent = _utils.default.javaScriptValue(title, jsProp, jsonProp, 110, jsDocHTML, jsonDocHTML);\n\nvar _default = [_objectSpread(_objectSpread({}, settingComponent), {}, {\n customConditional: function customConditional(context) {\n var isWizardPanel = false;\n\n if (context.instance.options.editForm.display === 'wizard') {\n var components = context.instance.options.editForm.components;\n var component = context.instance.options.editComponent;\n\n if (components && component) {\n isWizardPanel = components.some(function (comp) {\n var diff = (0, _difference2.default)((0, _keys2.default)(comp), (0, _keys2.default)(component)) || [];\n diff.push('components');\n return (0, _isEqual2.default)((0, _omit2.default)(comp, diff), (0, _omit2.default)(component, diff));\n });\n }\n }\n\n return isWizardPanel;\n }\n})];\n/* eslint-enable quotes, max-len */\n\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/panel/editForm/Panel.edit.conditional.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptors.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-properties.js */ \"./node_modules/core-js/modules/es.object.define-properties.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.array.some.js */ \"./node_modules/core-js/modules/es.array.some.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\nvar _utils = _interopRequireDefault(__webpack_require__(/*! ../../_classes/component/editForm/utils */ \"./lib/components/_classes/component/editForm/utils.js\"));\nvar _isEqual2 = _interopRequireDefault(__webpack_require__(/*! lodash/isEqual */ \"./node_modules/lodash/isEqual.js\"));\nvar _omit2 = _interopRequireDefault(__webpack_require__(/*! lodash/omit */ \"./node_modules/lodash/omit.js\"));\nvar _difference2 = _interopRequireDefault(__webpack_require__(/*! lodash/difference */ \"./node_modules/lodash/difference.js\"));\nvar _keys2 = _interopRequireDefault(__webpack_require__(/*! lodash/keys */ \"./node_modules/lodash/keys.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\n/* eslint-disable quotes, max-len */\nvar title = 'Advanced Next Page';\nvar jsonProp = 'nextPage';\nvar jsProp = 'nextPage';\nvar jsDocHTML = \"\\n

You must assign the next variable with the API key of the next page.

\\n

The global variable data is provided, and allows you to access the data of any form component, by using its API key.

\\n

Also moment library is available, and allows you to manipulate dates in a convenient way.

\\n
Example
next = data.addComment ? 'page3' : 'page4';
\\n\";\nvar jsonDocHTML = \"\\n

Submission data is available as JsonLogic variables, with the same api key as your components.

\\n\";\nvar settingComponent = _utils[\"default\"].javaScriptValue(title, jsProp, jsonProp, 110, jsDocHTML, jsonDocHTML);\nvar _default = [_objectSpread(_objectSpread({}, settingComponent), {}, {\n customConditional: function customConditional(context) {\n var isWizardPanel = false;\n if (context.instance.options.editForm.display === 'wizard') {\n var components = context.instance.options.editForm.components;\n var component = context.instance.options.editComponent;\n if (components && component) {\n isWizardPanel = components.some(function (comp) {\n var diff = (0, _difference2[\"default\"])((0, _keys2[\"default\"])(comp), (0, _keys2[\"default\"])(component)) || [];\n diff.push('components');\n return (0, _isEqual2[\"default\"])((0, _omit2[\"default\"])(comp, diff), (0, _omit2[\"default\"])(component, diff));\n });\n }\n }\n return isWizardPanel;\n }\n})];\n/* eslint-enable quotes, max-len */\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/panel/editForm/Panel.edit.conditional.js?"); /***/ }), @@ -1509,7 +1542,7 @@ eval("\n\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\nvar _isEqual2 = _interopRequireDefault(__webpack_require__(/*! lodash/isEqual */ \"./node_modules/lodash/isEqual.js\"));\n\nvar _omit2 = _interopRequireDefault(__webpack_require__(/*! lodash/omit */ \"./node_modules/lodash/omit.js\"));\n\nvar _difference2 = _interopRequireDefault(__webpack_require__(/*! lodash/difference */ \"./node_modules/lodash/difference.js\"));\n\nvar _keys2 = _interopRequireDefault(__webpack_require__(/*! lodash/keys */ \"./node_modules/lodash/keys.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = [{\n key: 'labelPosition',\n ignore: true\n}, {\n key: 'placeholder',\n ignore: true\n}, {\n key: 'description',\n ignore: true\n}, {\n key: 'autofocus',\n ignore: true\n}, {\n key: 'tableView',\n ignore: true\n}, {\n key: 'label',\n hidden: true,\n calculateValue: function calculateValue(context) {\n return context.data.title;\n }\n}, {\n key: 'tabindex',\n hidden: true\n}, {\n weight: 1,\n type: 'textfield',\n input: true,\n placeholder: 'Panel Title',\n label: 'Title',\n key: 'title',\n tooltip: 'The title text that appears in the header of this panel.'\n}, {\n weight: 20,\n type: 'textarea',\n input: true,\n key: 'tooltip',\n label: 'Tooltip',\n placeholder: 'To add a tooltip to this field, enter text here.',\n tooltip: 'Adds a tooltip to the side of this field.'\n}, {\n weight: 30,\n type: 'select',\n input: true,\n label: 'Theme',\n key: 'theme',\n dataSrc: 'values',\n data: {\n values: [{\n label: 'Default',\n value: 'default'\n }, {\n label: 'Primary',\n value: 'primary'\n }, {\n label: 'Info',\n value: 'info'\n }, {\n label: 'Success',\n value: 'success'\n }, {\n label: 'Danger',\n value: 'danger'\n }, {\n label: 'Warning',\n value: 'warning'\n }]\n }\n}, {\n weight: 40,\n type: 'fieldset',\n input: false,\n components: [{\n type: 'select',\n input: true,\n label: 'Breadcrumb Type',\n key: 'breadcrumb',\n dataSrc: 'values',\n data: {\n values: [{\n label: 'Default',\n value: 'default'\n }, {\n label: 'Condensed',\n value: 'condensed'\n }, {\n label: 'Hidden',\n value: 'none'\n }]\n }\n }, {\n input: true,\n type: 'checkbox',\n label: 'Allow click on Breadcrumb',\n key: 'breadcrumbClickable',\n defaultValue: true,\n conditional: {\n json: {\n '!==': [{\n var: 'data.breadcrumb'\n }, 'none']\n }\n }\n }, {\n input: true,\n type: 'checkbox',\n label: 'Allow Previous',\n key: 'allowPrevious',\n defaultValue: false,\n tooltip: 'Determines if the breadcrumb bar is clickable or not for visited tabs.',\n conditional: {\n json: {\n '===': [{\n var: 'data.breadcrumbClickable'\n }, false]\n }\n }\n }, {\n weight: 50,\n label: 'Panel Navigation Buttons',\n optionsLabelPosition: 'right',\n values: [{\n label: 'Previous',\n value: 'previous'\n }, {\n label: 'Cancel',\n value: 'cancel'\n }, {\n label: 'Next',\n value: 'next'\n }],\n inline: true,\n type: 'selectboxes',\n key: 'buttonSettings',\n input: true,\n inputType: 'checkbox',\n defaultValue: {\n previous: true,\n cancel: true,\n next: true\n }\n }, {\n weight: 55,\n label: 'Navigate Wizard on Enter',\n type: 'checkbox',\n key: 'navigateOnEnter',\n input: true,\n inputType: 'checkbox',\n defaultValue: false,\n tooltip: 'Use the Enter key to go forward through pages.'\n }, {\n weight: 56,\n label: 'Save on Enter',\n type: 'checkbox',\n key: 'saveOnEnter',\n input: true,\n inputType: 'checkbox',\n defaultValue: false,\n tooltip: 'Use the Enter key to submit form on last page.'\n }, {\n weight: 60,\n label: 'Scroll up on page opening',\n type: 'checkbox',\n key: 'scrollToTop',\n input: true,\n inputType: 'checkbox',\n defaultValue: false,\n tooltip: 'Scroll to the top of the wizard page when user navigates to it'\n }],\n customConditional: function customConditional(context) {\n var isWizardPanel = false;\n\n if (context.instance.options.editForm.display === 'wizard') {\n var components = context.instance.options.editForm.components;\n var component = context.instance.options.editComponent;\n\n if (components && component) {\n isWizardPanel = components.some(function (comp) {\n var diff = (0, _difference2.default)((0, _keys2.default)(comp), (0, _keys2.default)(component)) || [];\n diff.push('components');\n return (0, _isEqual2.default)((0, _omit2.default)(comp, diff), (0, _omit2.default)(component, diff));\n });\n }\n }\n\n return isWizardPanel;\n }\n}, {\n weight: 650,\n type: 'checkbox',\n label: 'Collapsible',\n tooltip: 'If checked, this will turn this Panel into a collapsible panel.',\n key: 'collapsible',\n input: true\n}, {\n weight: 651,\n type: 'checkbox',\n label: 'Initially Collapsed',\n tooltip: 'Determines the initial collapsed state of this Panel.',\n key: 'collapsed',\n input: true,\n conditional: {\n json: {\n '===': [{\n var: 'data.collapsible'\n }, true]\n }\n }\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/panel/editForm/Panel.edit.display.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.array.some.js */ \"./node_modules/core-js/modules/es.array.some.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\nvar _isEqual2 = _interopRequireDefault(__webpack_require__(/*! lodash/isEqual */ \"./node_modules/lodash/isEqual.js\"));\nvar _omit2 = _interopRequireDefault(__webpack_require__(/*! lodash/omit */ \"./node_modules/lodash/omit.js\"));\nvar _difference2 = _interopRequireDefault(__webpack_require__(/*! lodash/difference */ \"./node_modules/lodash/difference.js\"));\nvar _keys2 = _interopRequireDefault(__webpack_require__(/*! lodash/keys */ \"./node_modules/lodash/keys.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = [{\n key: 'labelPosition',\n ignore: true\n}, {\n key: 'placeholder',\n ignore: true\n}, {\n key: 'description',\n ignore: true\n}, {\n key: 'autofocus',\n ignore: true\n}, {\n key: 'tableView',\n ignore: true\n}, {\n key: 'label',\n hidden: true,\n calculateValue: function calculateValue(context) {\n return context.data.title;\n }\n}, {\n key: 'tabindex',\n hidden: true\n}, {\n weight: 1,\n type: 'textfield',\n input: true,\n placeholder: 'Panel Title',\n label: 'Title',\n key: 'title',\n tooltip: 'The title text that appears in the header of this panel.'\n}, {\n weight: 20,\n type: 'textarea',\n input: true,\n key: 'tooltip',\n label: 'Tooltip',\n placeholder: 'To add a tooltip to this field, enter text here.',\n tooltip: 'Adds a tooltip to the side of this field.'\n}, {\n weight: 30,\n type: 'select',\n input: true,\n label: 'Theme',\n key: 'theme',\n dataSrc: 'values',\n data: {\n values: [{\n label: 'Default',\n value: 'default'\n }, {\n label: 'Primary',\n value: 'primary'\n }, {\n label: 'Info',\n value: 'info'\n }, {\n label: 'Success',\n value: 'success'\n }, {\n label: 'Danger',\n value: 'danger'\n }, {\n label: 'Warning',\n value: 'warning'\n }]\n }\n}, {\n weight: 40,\n type: 'fieldset',\n input: false,\n components: [{\n type: 'select',\n input: true,\n label: 'Breadcrumb Type',\n key: 'breadcrumb',\n dataSrc: 'values',\n data: {\n values: [{\n label: 'Default',\n value: 'default'\n }, {\n label: 'Condensed',\n value: 'condensed'\n }, {\n label: 'Hidden',\n value: 'none'\n }]\n }\n }, {\n input: true,\n type: 'checkbox',\n label: 'Allow click on Breadcrumb',\n key: 'breadcrumbClickable',\n defaultValue: true,\n conditional: {\n json: {\n '!==': [{\n \"var\": 'data.breadcrumb'\n }, 'none']\n }\n }\n }, {\n input: true,\n type: 'checkbox',\n label: 'Allow Previous',\n key: 'allowPrevious',\n defaultValue: false,\n tooltip: 'Determines if the breadcrumb bar is clickable or not for visited tabs.',\n conditional: {\n json: {\n '===': [{\n \"var\": 'data.breadcrumbClickable'\n }, false]\n }\n }\n }, {\n weight: 50,\n label: 'Panel Navigation Buttons',\n optionsLabelPosition: 'right',\n values: [{\n label: 'Previous',\n value: 'previous'\n }, {\n label: 'Cancel',\n value: 'cancel'\n }, {\n label: 'Next',\n value: 'next'\n }],\n inline: true,\n type: 'selectboxes',\n key: 'buttonSettings',\n input: true,\n inputType: 'checkbox',\n defaultValue: {\n previous: true,\n cancel: true,\n next: true\n }\n }, {\n weight: 55,\n label: 'Navigate Wizard on Enter',\n type: 'checkbox',\n key: 'navigateOnEnter',\n input: true,\n inputType: 'checkbox',\n defaultValue: false,\n tooltip: 'Use the Enter key to go forward through pages.'\n }, {\n weight: 56,\n label: 'Save on Enter',\n type: 'checkbox',\n key: 'saveOnEnter',\n input: true,\n inputType: 'checkbox',\n defaultValue: false,\n tooltip: 'Use the Enter key to submit form on last page.'\n }, {\n weight: 60,\n label: 'Scroll up on page opening',\n type: 'checkbox',\n key: 'scrollToTop',\n input: true,\n inputType: 'checkbox',\n defaultValue: false,\n tooltip: 'Scroll to the top of the wizard page when user navigates to it'\n }],\n customConditional: function customConditional(context) {\n var isWizardPanel = false;\n if (context.instance.options.editForm.display === 'wizard') {\n var components = context.instance.options.editForm.components;\n var component = context.instance.options.editComponent;\n if (components && component) {\n isWizardPanel = components.some(function (comp) {\n var diff = (0, _difference2[\"default\"])((0, _keys2[\"default\"])(comp), (0, _keys2[\"default\"])(component)) || [];\n diff.push('components');\n return (0, _isEqual2[\"default\"])((0, _omit2[\"default\"])(comp, diff), (0, _omit2[\"default\"])(component, diff));\n });\n }\n }\n return isWizardPanel;\n }\n}, {\n weight: 650,\n type: 'checkbox',\n label: 'Collapsible',\n tooltip: 'If checked, this will turn this Panel into a collapsible panel.',\n key: 'collapsible',\n input: true\n}, {\n weight: 651,\n type: 'checkbox',\n label: 'Initially Collapsed',\n tooltip: 'Determines the initial collapsed state of this Panel.',\n key: 'collapsed',\n input: true,\n conditional: {\n json: {\n '===': [{\n \"var\": 'data.collapsible'\n }, true]\n }\n }\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/panel/editForm/Panel.edit.display.js?"); /***/ }), @@ -1520,7 +1553,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\nvar _ComponentEdit = _interopRequireDefault(__webpack_require__(/*! ../_classes/component/editForm/Component.edit.addons */ \"./lib/components/_classes/component/editForm/Component.edit.addons.js\"));\n\nvar _TextField = _interopRequireDefault(__webpack_require__(/*! ../textfield/TextField.form */ \"./lib/components/textfield/TextField.form.js\"));\n\nvar _PasswordEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/Password.edit.display */ \"./lib/components/password/editForm/Password.edit.display.js\"));\n\nvar _PasswordEdit2 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Password.edit.data */ \"./lib/components/password/editForm/Password.edit.data.js\"));\n\nvar _PasswordEdit3 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Password.edit.validation */ \"./lib/components/password/editForm/Password.edit.validation.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _TextField.default.apply(void 0, [[{\n key: 'data',\n components: _PasswordEdit2.default\n }, {\n key: 'display',\n components: _PasswordEdit.default\n }, {\n key: 'validation',\n components: _PasswordEdit3.default\n }, {\n label: 'Addons',\n key: 'addons',\n weight: 70,\n components: _ComponentEdit.default\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/password/Password.form.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\nvar _TextField = _interopRequireDefault(__webpack_require__(/*! ../textfield/TextField.form */ \"./lib/components/textfield/TextField.form.js\"));\nvar _PasswordEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/Password.edit.display */ \"./lib/components/password/editForm/Password.edit.display.js\"));\nvar _PasswordEdit2 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Password.edit.data */ \"./lib/components/password/editForm/Password.edit.data.js\"));\nvar _PasswordEdit3 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Password.edit.validation */ \"./lib/components/password/editForm/Password.edit.validation.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _TextField[\"default\"].apply(void 0, [[{\n key: 'data',\n components: _PasswordEdit2[\"default\"]\n }, {\n key: 'display',\n components: _PasswordEdit[\"default\"]\n }, {\n key: 'validation',\n components: _PasswordEdit3[\"default\"]\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/password/Password.form.js?"); /***/ }), @@ -1531,7 +1564,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\nvar _TextField = _interopRequireDefault(__webpack_require__(/*! ../textfield/TextField */ \"./lib/components/textfield/TextField.js\"));\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar PasswordComponent = /*#__PURE__*/function (_TextFieldComponent) {\n _inherits(PasswordComponent, _TextFieldComponent);\n\n var _super = _createSuper(PasswordComponent);\n\n function PasswordComponent() {\n _classCallCheck(this, PasswordComponent);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(PasswordComponent, [{\n key: \"defaultSchema\",\n get: function get() {\n return _lodash.default.omit(PasswordComponent.schema(), ['protected', 'tableView']);\n }\n }, {\n key: \"inputInfo\",\n get: function get() {\n var info = _get(_getPrototypeOf(PasswordComponent.prototype), \"inputInfo\", this);\n\n info.attr.type = 'password';\n return info;\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _TextField.default.schema.apply(_TextField.default, [{\n type: 'password',\n label: 'Password',\n key: 'password',\n protected: true,\n tableView: false\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Password',\n icon: 'asterisk',\n group: 'basic',\n documentation: '/userguide/forms/form-components#password',\n weight: 40,\n schema: PasswordComponent.schema()\n };\n }\n }]);\n\n return PasswordComponent;\n}(_TextField.default);\n\nexports[\"default\"] = PasswordComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/password/Password.js?"); +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _TextField = _interopRequireDefault(__webpack_require__(/*! ../textfield/TextField */ \"./lib/components/textfield/TextField.js\"));\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar PasswordComponent = /*#__PURE__*/function (_TextFieldComponent) {\n _inherits(PasswordComponent, _TextFieldComponent);\n var _super = _createSuper(PasswordComponent);\n function PasswordComponent() {\n _classCallCheck(this, PasswordComponent);\n return _super.apply(this, arguments);\n }\n _createClass(PasswordComponent, [{\n key: \"defaultSchema\",\n get: function get() {\n return _lodash[\"default\"].omit(PasswordComponent.schema(), ['protected', 'tableView']);\n }\n }, {\n key: \"inputInfo\",\n get: function get() {\n var info = _get(_getPrototypeOf(PasswordComponent.prototype), \"inputInfo\", this);\n info.attr.type = 'password';\n return info;\n }\n }, {\n key: \"autocompleteDisableAttrName\",\n get: function get() {\n return 'new-password';\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _TextField[\"default\"].schema.apply(_TextField[\"default\"], [{\n type: 'password',\n label: 'Password',\n key: 'password',\n \"protected\": true,\n tableView: false\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Password',\n icon: 'asterisk',\n group: 'basic',\n documentation: '/userguide/form-building/form-components#password',\n weight: 40,\n schema: PasswordComponent.schema()\n };\n }\n }]);\n return PasswordComponent;\n}(_TextField[\"default\"]);\nexports[\"default\"] = PasswordComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/password/Password.js?"); /***/ }), @@ -1539,10 +1572,10 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /*!****************************************************************!*\ !*** ./lib/components/password/editForm/Password.edit.data.js ***! \****************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'inputFormat',\n ignore: true\n}, {\n key: 'persistent',\n ignore: true\n}, {\n key: 'protected',\n ignore: true\n}, {\n key: 'dbIndex',\n ignore: true\n}, {\n key: 'encrypted',\n ignore: true\n}, {\n key: 'multiple',\n ignore: true\n}, {\n key: 'defaultValue',\n ignore: true\n}, {\n key: 'customDefaultValuePanel',\n ignore: true\n}, {\n key: 'calculateValuePanel',\n ignore: true\n}, {\n key: 'passwordInfo',\n weight: 0,\n type: 'htmlelement',\n tag: 'div',\n className: 'alert alert-info',\n content: 'Password fields are automatically encrypted using 1-way salted bcrypt hashes. These hashes are also protected and not returned in the API.'\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/password/editForm/Password.edit.data.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'inputFormat',\n ignore: true\n}, {\n key: 'persistent',\n ignore: true\n}, {\n key: 'protected',\n ignore: true\n}, {\n key: 'dbIndex',\n ignore: true\n}, {\n key: 'encrypted',\n ignore: true\n}, {\n key: 'multiple',\n ignore: true\n}, {\n key: 'defaultValue',\n ignore: true\n}, {\n key: 'customDefaultValuePanel',\n ignore: true\n}, {\n key: 'calculateValuePanel',\n ignore: true\n}, {\n key: 'passwordInfo',\n weight: 0,\n type: 'htmlelement',\n tag: 'div',\n className: 'alert alert-info',\n content: 'Password fields are automatically encrypted using 1-way salted bcrypt hashes. These hashes are also protected and not returned in the API.'\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/password/editForm/Password.edit.data.js?"); /***/ }), @@ -1550,10 +1583,10 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /*!*******************************************************************!*\ !*** ./lib/components/password/editForm/Password.edit.display.js ***! \*******************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n ignore: true,\n key: 'mask'\n}, {\n key: 'inputMask',\n ignore: true\n}, {\n key: 'allowMultipleMasks',\n ignore: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/password/editForm/Password.edit.display.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n ignore: true,\n key: 'mask'\n}, {\n key: 'inputMask',\n ignore: true\n}, {\n key: 'allowMultipleMasks',\n ignore: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/password/editForm/Password.edit.display.js?"); /***/ }), @@ -1561,10 +1594,10 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /*!**********************************************************************!*\ !*** ./lib/components/password/editForm/Password.edit.validation.js ***! \**********************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'unique',\n ignore: true\n}, {\n key: 'validate.minWords',\n ignore: true\n}, {\n key: 'validate.maxWords',\n ignore: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/password/editForm/Password.edit.validation.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'unique',\n ignore: true\n}, {\n key: 'validate.minWords',\n ignore: true\n}, {\n key: 'validate.maxWords',\n ignore: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/password/editForm/Password.edit.validation.js?"); /***/ }), @@ -1575,7 +1608,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\nvar _TextField = _interopRequireDefault(__webpack_require__(/*! ../textfield/TextField.form */ \"./lib/components/textfield/TextField.form.js\"));\n\nvar _PhoneNumberEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/PhoneNumber.edit.validation */ \"./lib/components/phonenumber/editForm/PhoneNumber.edit.validation.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _TextField.default.apply(void 0, [[{\n key: 'display',\n components: [{\n key: 'showWordCount',\n ignore: true\n }, {\n key: 'showCharCount',\n ignore: true\n }]\n }, {\n key: 'validation',\n components: _PhoneNumberEdit.default\n }, {\n key: 'addons',\n ignore: true\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/phonenumber/PhoneNumber.form.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\nvar _TextField = _interopRequireDefault(__webpack_require__(/*! ../textfield/TextField.form */ \"./lib/components/textfield/TextField.form.js\"));\nvar _PhoneNumberEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/PhoneNumber.edit.validation */ \"./lib/components/phonenumber/editForm/PhoneNumber.edit.validation.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _TextField[\"default\"].apply(void 0, [[{\n key: 'display',\n components: [{\n key: 'showWordCount',\n ignore: true\n }, {\n key: 'showCharCount',\n ignore: true\n }]\n }, {\n key: 'validation',\n components: _PhoneNumberEdit[\"default\"]\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/phonenumber/PhoneNumber.form.js?"); /***/ }), @@ -1586,7 +1619,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\nvar _TextField = _interopRequireDefault(__webpack_require__(/*! ../textfield/TextField */ \"./lib/components/textfield/TextField.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar PhoneNumberComponent = /*#__PURE__*/function (_TextFieldComponent) {\n _inherits(PhoneNumberComponent, _TextFieldComponent);\n\n var _super = _createSuper(PhoneNumberComponent);\n\n function PhoneNumberComponent() {\n _classCallCheck(this, PhoneNumberComponent);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(PhoneNumberComponent, [{\n key: \"defaultSchema\",\n get: function get() {\n return PhoneNumberComponent.schema();\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _TextField.default.schema.apply(_TextField.default, [{\n type: 'phoneNumber',\n label: 'Phone Number',\n key: 'phoneNumber',\n inputType: 'tel',\n inputMask: '(999) 999-9999',\n inputMode: 'decimal',\n displayMask: ''\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Phone Number',\n group: 'advanced',\n icon: 'phone-square',\n weight: 30,\n documentation: '/userguide/forms/form-components#phone-number',\n schema: PhoneNumberComponent.schema()\n };\n }\n }]);\n\n return PhoneNumberComponent;\n}(_TextField.default);\n\nexports[\"default\"] = PhoneNumberComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/phonenumber/PhoneNumber.js?"); +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _TextField = _interopRequireDefault(__webpack_require__(/*! ../textfield/TextField */ \"./lib/components/textfield/TextField.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar PhoneNumberComponent = /*#__PURE__*/function (_TextFieldComponent) {\n _inherits(PhoneNumberComponent, _TextFieldComponent);\n var _super = _createSuper(PhoneNumberComponent);\n function PhoneNumberComponent() {\n _classCallCheck(this, PhoneNumberComponent);\n return _super.apply(this, arguments);\n }\n _createClass(PhoneNumberComponent, [{\n key: \"defaultSchema\",\n get: function get() {\n return PhoneNumberComponent.schema();\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _TextField[\"default\"].schema.apply(_TextField[\"default\"], [{\n type: 'phoneNumber',\n label: 'Phone Number',\n key: 'phoneNumber',\n inputType: 'tel',\n inputMask: '(999) 999-9999',\n inputMode: 'decimal',\n displayMask: ''\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Phone Number',\n group: 'advanced',\n icon: 'phone-square',\n weight: 30,\n documentation: '/userguide/form-building/advanced-components#phone-number',\n schema: PhoneNumberComponent.schema()\n };\n }\n }]);\n return PhoneNumberComponent;\n}(_TextField[\"default\"]);\nexports[\"default\"] = PhoneNumberComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/phonenumber/PhoneNumber.js?"); /***/ }), @@ -1594,10 +1627,10 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /*!****************************************************************************!*\ !*** ./lib/components/phonenumber/editForm/PhoneNumber.edit.validation.js ***! \****************************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'validate.minLength',\n ignore: true\n}, {\n key: 'validate.maxLength',\n ignore: true\n}, {\n key: 'validate.pattern',\n ignore: true\n}, {\n key: 'validate.minWords',\n ignore: true\n}, {\n key: 'validate.maxWords',\n ignore: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/phonenumber/editForm/PhoneNumber.edit.validation.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'validate.minLength',\n ignore: true\n}, {\n key: 'validate.maxLength',\n ignore: true\n}, {\n key: 'validate.pattern',\n ignore: true\n}, {\n key: 'validate.minWords',\n ignore: true\n}, {\n key: 'validate.maxWords',\n ignore: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/phonenumber/editForm/PhoneNumber.edit.validation.js?"); /***/ }), @@ -1608,7 +1641,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\nvar _Components = _interopRequireDefault(__webpack_require__(/*! ../Components */ \"./lib/components/Components.js\"));\n\nvar _RadioEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/Radio.edit.data */ \"./lib/components/radio/editForm/Radio.edit.data.js\"));\n\nvar _RadioEdit2 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Radio.edit.display */ \"./lib/components/radio/editForm/Radio.edit.display.js\"));\n\nvar _RadioEdit3 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Radio.edit.validation */ \"./lib/components/radio/editForm/Radio.edit.validation.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _Components.default.baseEditForm.apply(_Components.default, [[{\n key: 'display',\n components: _RadioEdit2.default\n }, {\n key: 'data',\n components: _RadioEdit.default\n }, {\n key: 'validation',\n components: _RadioEdit3.default\n }, {\n key: 'addons',\n ignore: true\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/radio/Radio.form.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\nvar _ListComponent = _interopRequireDefault(__webpack_require__(/*! ../_classes/list/ListComponent.form */ \"./lib/components/_classes/list/ListComponent.form.js\"));\nvar _RadioEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/Radio.edit.data */ \"./lib/components/radio/editForm/Radio.edit.data.js\"));\nvar _RadioEdit2 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Radio.edit.display */ \"./lib/components/radio/editForm/Radio.edit.display.js\"));\nvar _RadioEdit3 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Radio.edit.validation */ \"./lib/components/radio/editForm/Radio.edit.validation.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _ListComponent[\"default\"].apply(void 0, [[{\n key: 'display',\n components: _RadioEdit2[\"default\"]\n }, {\n key: 'data',\n components: _RadioEdit[\"default\"]\n }, {\n key: 'validation',\n components: _RadioEdit3[\"default\"]\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/radio/Radio.form.js?"); /***/ }), @@ -1619,7 +1652,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.find-index.js */ \"./node_modules/core-js/modules/es.array.find-index.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.find.js */ \"./node_modules/core-js/modules/es.array.find.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nvar _Field2 = _interopRequireDefault(__webpack_require__(/*! ../_classes/field/Field */ \"./lib/components/_classes/field/Field.js\"));\n\nvar _utils = __webpack_require__(/*! ../../utils/utils */ \"./lib/utils/utils.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar RadioComponent = /*#__PURE__*/function (_Field) {\n _inherits(RadioComponent, _Field);\n\n var _super = _createSuper(RadioComponent);\n\n function RadioComponent(component, options, data) {\n var _this;\n\n _classCallCheck(this, RadioComponent);\n\n _this = _super.call(this, component, options, data);\n _this.previousValue = _this.dataValue || null;\n return _this;\n }\n\n _createClass(RadioComponent, [{\n key: \"defaultSchema\",\n get: function get() {\n return RadioComponent.schema();\n }\n }, {\n key: \"defaultValue\",\n get: function get() {\n var defaultValue = _get(_getPrototypeOf(RadioComponent.prototype), \"defaultValue\", this);\n\n if (!defaultValue && this.component.defaultValue === false) {\n defaultValue = this.component.defaultValue;\n }\n\n return defaultValue;\n }\n }, {\n key: \"inputInfo\",\n get: function get() {\n var _this$root;\n\n var info = _get(_getPrototypeOf(RadioComponent.prototype), \"elementInfo\", this).call(this);\n\n info.type = 'input';\n info.changeEvent = 'click';\n info.attr.class = 'form-check-input';\n info.attr.name = info.attr.name += \"[\".concat((_this$root = this.root) === null || _this$root === void 0 ? void 0 : _this$root.id, \"-\").concat(this.id, \"]\");\n return info;\n }\n }, {\n key: \"emptyValue\",\n get: function get() {\n return '';\n }\n }, {\n key: \"isRadio\",\n get: function get() {\n return this.component.inputType === 'radio';\n }\n }, {\n key: \"optionSelectedClass\",\n get: function get() {\n return 'radio-selected';\n }\n }, {\n key: \"init\",\n value: function init() {\n _get(_getPrototypeOf(RadioComponent.prototype), \"init\", this).call(this);\n\n this.validators = this.validators.concat(['select', 'onlyAvailableItems']);\n }\n }, {\n key: \"render\",\n value: function render() {\n return _get(_getPrototypeOf(RadioComponent.prototype), \"render\", this).call(this, this.renderTemplate('radio', {\n input: this.inputInfo,\n inline: this.component.inline,\n values: this.component.values,\n value: this.dataValue,\n row: this.row\n }));\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n var _this2 = this;\n\n this.loadRefs(element, {\n input: 'multiple',\n wrapper: 'multiple'\n });\n this.refs.input.forEach(function (input, index) {\n _this2.addEventListener(input, _this2.inputInfo.changeEvent, function () {\n _this2.updateValue(null, {\n modified: true\n });\n });\n\n _this2.addShortcut(input, _this2.component.values[index].shortcut);\n\n if (_this2.isRadio) {\n var dataValue = _this2.dataValue;\n\n if (!_lodash.default.isString(_this2.dataValue)) {\n dataValue = _lodash.default.toString(_this2.dataValue);\n }\n\n input.checked = dataValue === input.value;\n\n _this2.addEventListener(input, 'keyup', function (event) {\n if (event.key === ' ' && dataValue === input.value) {\n event.preventDefault();\n\n _this2.updateValue(null, {\n modified: true\n });\n }\n });\n }\n });\n this.setSelectedClasses();\n return _get(_getPrototypeOf(RadioComponent.prototype), \"attach\", this).call(this, element);\n }\n }, {\n key: \"detach\",\n value: function detach(element) {\n var _this3 = this;\n\n if (element && this.refs.input) {\n this.refs.input.forEach(function (input, index) {\n _this3.removeShortcut(input, _this3.component.values[index].shortcut);\n });\n }\n\n _get(_getPrototypeOf(RadioComponent.prototype), \"detach\", this).call(this);\n }\n }, {\n key: \"getValue\",\n value: function getValue() {\n if (this.viewOnly || !this.refs.input || !this.refs.input.length) {\n return this.dataValue;\n }\n\n var value = this.dataValue;\n this.refs.input.forEach(function (input) {\n if (input.checked) {\n value = input.value;\n }\n });\n return value;\n }\n }, {\n key: \"validateValueAvailability\",\n value: function validateValueAvailability(setting, value) {\n var _this4 = this;\n\n if (!(0, _utils.boolValue)(setting) || !value) {\n return true;\n }\n\n var values = this.component.values;\n\n if (values) {\n return values.findIndex(function (_ref) {\n var optionValue = _ref.value;\n return _this4.normalizeValue(optionValue) === value;\n }) !== -1;\n }\n\n return false;\n }\n }, {\n key: \"getValueAsString\",\n value: function getValueAsString(value) {\n if (!_lodash.default.isString(value)) {\n value = _lodash.default.toString(value);\n }\n\n var option = _lodash.default.find(this.component.values, function (v) {\n return v.value === value;\n });\n\n if (!value) {\n return _lodash.default.get(option, 'label', '');\n }\n\n return _lodash.default.get(option, 'label', '');\n }\n }, {\n key: \"setValueAt\",\n value: function setValueAt(index, value) {\n if (this.refs.input && this.refs.input[index] && value !== null && value !== undefined) {\n var inputValue = this.refs.input[index].value;\n this.refs.input[index].checked = inputValue === value.toString();\n }\n }\n }, {\n key: \"setSelectedClasses\",\n value: function setSelectedClasses() {\n var _this5 = this;\n\n if (this.refs.wrapper) {\n //add/remove selected option class\n var value = this.dataValue;\n this.refs.wrapper.forEach(function (wrapper, index) {\n var input = _this5.refs.input[index];\n var checked = input.type === 'checkbox' ? value[input.value] : input.value.toString() === value.toString();\n\n if (checked) {\n //add class to container when selected\n _this5.addClass(wrapper, _this5.optionSelectedClass); //change \"checked\" attribute\n\n\n input.setAttribute('checked', 'true');\n } else {\n _this5.removeClass(wrapper, _this5.optionSelectedClass);\n\n input.removeAttribute('checked');\n }\n });\n }\n }\n }, {\n key: \"updateValue\",\n value: function updateValue(value, flags) {\n var changed = _get(_getPrototypeOf(RadioComponent.prototype), \"updateValue\", this).call(this, value, flags);\n\n if (changed) {\n this.setSelectedClasses();\n }\n\n if (!flags || !flags.modified || !this.isRadio) {\n return changed;\n } // If they clicked on the radio that is currently selected, it needs to reset the value.\n\n\n this.currentValue = this.dataValue;\n var shouldResetValue = !(flags && flags.noUpdateEvent) && this.previousValue === this.currentValue;\n\n if (shouldResetValue) {\n this.resetValue();\n this.triggerChange(flags);\n }\n\n this.previousValue = this.dataValue;\n return changed;\n }\n /**\n * Normalize values coming into updateValue.\n *\n * @param value\n * @return {*}\n */\n\n }, {\n key: \"normalizeValue\",\n value: function normalizeValue(value) {\n var dataType = this.component.dataType || 'auto';\n\n if (value === this.emptyValue) {\n return value;\n }\n\n switch (dataType) {\n case 'auto':\n if (!isNaN(parseFloat(value)) && isFinite(value)) {\n value = +value;\n }\n\n if (value === 'true') {\n value = true;\n }\n\n if (value === 'false') {\n value = false;\n }\n\n break;\n\n case 'number':\n value = +value;\n break;\n\n case 'string':\n if (_typeof(value) === 'object') {\n value = JSON.stringify(value);\n } else {\n value = String(value);\n }\n\n break;\n\n case 'boolean':\n value = !(!value || value.toString() === 'false');\n break;\n }\n\n return _get(_getPrototypeOf(RadioComponent.prototype), \"normalizeValue\", this).call(this, value);\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _Field2.default.schema.apply(_Field2.default, [{\n type: 'radio',\n inputType: 'radio',\n label: 'Radio',\n key: 'radio',\n values: [{\n label: '',\n value: ''\n }],\n validate: {\n onlyAvailableItems: false\n },\n fieldSet: false\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Radio',\n group: 'basic',\n icon: 'dot-circle-o',\n weight: 80,\n documentation: '/userguide/forms/form-components#radio',\n schema: RadioComponent.schema()\n };\n }\n }]);\n\n return RadioComponent;\n}(_Field2.default);\n\nexports[\"default\"] = RadioComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/radio/Radio.js?"); +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.array.is-array.js */ \"./node_modules/core-js/modules/es.array.is-array.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.from.js */ \"./node_modules/core-js/modules/es.array.from.js\");\n__webpack_require__(/*! core-js/modules/es.array.slice.js */ \"./node_modules/core-js/modules/es.array.slice.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-string.js */ \"./node_modules/core-js/modules/es.date.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.array.some.js */ \"./node_modules/core-js/modules/es.array.some.js\");\n__webpack_require__(/*! core-js/modules/es.array.find-index.js */ \"./node_modules/core-js/modules/es.array.find-index.js\");\n__webpack_require__(/*! core-js/modules/es.array.find.js */ \"./node_modules/core-js/modules/es.array.find.js\");\n__webpack_require__(/*! core-js/modules/es.parse-float.js */ \"./node_modules/core-js/modules/es.parse-float.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nvar _ListComponent2 = _interopRequireDefault(__webpack_require__(/*! ../_classes/list/ListComponent */ \"./lib/components/_classes/list/ListComponent.js\"));\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\nvar _Formio = __webpack_require__(/*! ../../Formio */ \"./lib/Formio.js\");\nvar _utils = __webpack_require__(/*! ../../utils/utils */ \"./lib/utils/utils.js\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar RadioComponent = /*#__PURE__*/function (_ListComponent) {\n _inherits(RadioComponent, _ListComponent);\n var _super = _createSuper(RadioComponent);\n function RadioComponent(component, options, data) {\n var _this;\n _classCallCheck(this, RadioComponent);\n _this = _super.call(this, component, options, data);\n _this.previousValue = _this.dataValue || null;\n return _this;\n }\n _createClass(RadioComponent, [{\n key: \"defaultSchema\",\n get: function get() {\n return RadioComponent.schema();\n }\n }, {\n key: \"defaultValue\",\n get: function get() {\n var defaultValue = _get(_getPrototypeOf(RadioComponent.prototype), \"defaultValue\", this);\n if (!defaultValue && this.component.defaultValue === false) {\n defaultValue = this.component.defaultValue;\n }\n return defaultValue;\n }\n }, {\n key: \"inputInfo\",\n get: function get() {\n var _this$root;\n var info = _get(_getPrototypeOf(RadioComponent.prototype), \"elementInfo\", this).call(this);\n info.type = 'input';\n info.changeEvent = 'click';\n info.attr[\"class\"] = 'form-check-input';\n info.attr.name = info.attr.name += \"[\".concat((_this$root = this.root) === null || _this$root === void 0 ? void 0 : _this$root.id, \"-\").concat(this.id, \"]\");\n return info;\n }\n }, {\n key: \"emptyValue\",\n get: function get() {\n return '';\n }\n }, {\n key: \"isRadio\",\n get: function get() {\n return this.component.inputType === 'radio';\n }\n }, {\n key: \"optionSelectedClass\",\n get: function get() {\n return 'radio-selected';\n }\n }, {\n key: \"init\",\n value: function init() {\n var _this2 = this;\n _get(_getPrototypeOf(RadioComponent.prototype), \"init\", this).call(this);\n this.templateData = {};\n this.validators = this.validators.concat(['select', 'onlyAvailableItems', 'availableValueProperty']);\n\n // Trigger an update.\n var updateArgs = [];\n var triggerUpdate = _lodash[\"default\"].debounce(function () {\n updateArgs = [];\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n return _this2.updateItems.apply(_this2, args);\n }, 100);\n this.triggerUpdate = function () {\n // Make sure we always resolve the previous promise before reassign it\n if (typeof _this2.itemsLoadedResolve === 'function') {\n _this2.itemsLoadedResolve();\n }\n _this2.itemsLoaded = new _nativePromiseOnly[\"default\"](function (resolve) {\n _this2.itemsLoadedResolve = resolve;\n });\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n if (args.length) {\n updateArgs = args;\n }\n return triggerUpdate.apply(void 0, _toConsumableArray(updateArgs));\n };\n this.itemsLoaded = new _nativePromiseOnly[\"default\"](function (resolve) {\n _this2.itemsLoadedResolve = resolve;\n });\n this.shouldLoad = true;\n this.loadedOptions = [];\n }\n }, {\n key: \"render\",\n value: function render() {\n return _get(_getPrototypeOf(RadioComponent.prototype), \"render\", this).call(this, this.renderTemplate('radio', {\n input: this.inputInfo,\n inline: this.component.inline,\n values: this.component.dataSrc === 'values' ? this.component.values : this.loadedOptions,\n value: this.dataValue,\n row: this.row\n }));\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n var _this3 = this;\n this.loadRefs(element, {\n input: 'multiple',\n wrapper: 'multiple'\n });\n this.refs.input.forEach(function (input, index) {\n _this3.addEventListener(input, _this3.inputInfo.changeEvent, function () {\n _this3.updateValue(null, {\n modified: true\n });\n });\n if (_this3.component.values[index]) {\n _this3.addShortcut(input, _this3.component.values[index].shortcut);\n }\n if (_this3.isRadio) {\n var dataValue = _this3.dataValue;\n if (!_lodash[\"default\"].isString(_this3.dataValue)) {\n dataValue = _lodash[\"default\"].toString(_this3.dataValue);\n }\n input.checked = dataValue === input.value && (input.value || _this3.component.dataSrc !== 'url');\n _this3.addEventListener(input, 'keyup', function (event) {\n if (event.key === ' ' && dataValue === input.value) {\n event.preventDefault();\n _this3.updateValue(null, {\n modified: true\n });\n }\n });\n }\n });\n this.triggerUpdate();\n this.setSelectedClasses();\n return _get(_getPrototypeOf(RadioComponent.prototype), \"attach\", this).call(this, element);\n }\n }, {\n key: \"detach\",\n value: function detach(element) {\n var _this4 = this;\n if (element && this.refs.input) {\n this.refs.input.forEach(function (input, index) {\n if (_this4.component.values[index]) {\n _this4.removeShortcut(input, _this4.component.values[index].shortcut);\n }\n });\n }\n _get(_getPrototypeOf(RadioComponent.prototype), \"detach\", this).call(this);\n }\n }, {\n key: \"getValue\",\n value: function getValue() {\n if (this.viewOnly || !this.refs.input || !this.refs.input.length) {\n return this.dataValue;\n }\n var value = this.dataValue;\n this.refs.input.forEach(function (input) {\n if (input.checked) {\n value = input.value;\n }\n });\n return value;\n }\n }, {\n key: \"validateValueProperty\",\n value: function validateValueProperty() {\n var _this5 = this;\n if (this.component.dataSrc === 'values') {\n return true;\n }\n return !_lodash[\"default\"].some(this.refs.wrapper, function (wrapper, index) {\n return _this5.refs.input[index].checked && _this5.loadedOptions[index].invalid;\n });\n }\n }, {\n key: \"validateValueAvailability\",\n value: function validateValueAvailability(setting, value) {\n var _this6 = this;\n if (!(0, _utils.boolValue)(setting) || !value) {\n return true;\n }\n var values = this.component.values;\n if (values) {\n return values.findIndex(function (_ref) {\n var optionValue = _ref.value;\n return _this6.normalizeValue(optionValue) === value;\n }) !== -1;\n }\n return false;\n }\n }, {\n key: \"getValueAsString\",\n value: function getValueAsString(value) {\n if (!_lodash[\"default\"].isString(value)) {\n value = _lodash[\"default\"].toString(value);\n }\n if (this.component.dataSrc !== 'values') {\n return value;\n }\n var option = _lodash[\"default\"].find(this.component.values, function (v) {\n return v.value === value;\n });\n if (!value) {\n return _lodash[\"default\"].get(option, 'label', '');\n }\n return _lodash[\"default\"].get(option, 'label', '');\n }\n }, {\n key: \"setValueAt\",\n value: function setValueAt(index, value) {\n if (this.refs.input && this.refs.input[index] && value !== null && value !== undefined) {\n var inputValue = this.refs.input[index].value;\n this.refs.input[index].checked = inputValue === value.toString();\n }\n }\n }, {\n key: \"loadItems\",\n value: function loadItems(url, search, headers, options, method, body) {\n var _this7 = this;\n // Ensure we have a method and remove any body if method is get\n method = method || 'GET';\n if (method.toUpperCase() === 'GET') {\n body = null;\n }\n\n // Set ignoreCache if it is\n options.ignoreCache = this.component.ignoreCache;\n // Make the request.\n options.header = headers;\n if (this.shouldLoad) {\n this.loading = true;\n _Formio.GlobalFormio.makeRequest(this.options.formio, 'select', url, method, body, options).then(function (response) {\n _this7.loading = false;\n _this7.error = null;\n _this7.setItems(response);\n _this7.shouldLoad = false;\n _this7.redraw();\n })[\"catch\"](function (err) {\n _this7.handleLoadingError(err);\n });\n }\n }\n }, {\n key: \"setItems\",\n value: function setItems(items) {\n var _this8 = this;\n items === null || items === void 0 ? void 0 : items.forEach(function (item, i) {\n _this8.loadedOptions[i] = {\n value: item[_this8.component.valueProperty],\n label: _this8.itemTemplate(item, item[_this8.component.valueProperty])\n };\n if (_lodash[\"default\"].isUndefined(item[_this8.component.valueProperty]) || _lodash[\"default\"].isObject(item[_this8.component.valueProperty]) || !_this8.isRadio && _lodash[\"default\"].isBoolean(item[_this8.component.valueProperty])) {\n _this8.loadedOptions[i].invalid = true;\n }\n });\n }\n }, {\n key: \"setSelectedClasses\",\n value: function setSelectedClasses() {\n var _this9 = this;\n if (this.refs.wrapper) {\n //add/remove selected option class\n var value = this.dataValue;\n this.refs.wrapper.forEach(function (wrapper, index) {\n var input = _this9.refs.input[index];\n var checked = input.type === 'checkbox' ? value[input.value] : input.value.toString() === value.toString();\n if (checked) {\n //add class to container when selected\n _this9.addClass(wrapper, _this9.optionSelectedClass);\n //change \"checked\" attribute\n input.setAttribute('checked', 'true');\n } else {\n _this9.removeClass(wrapper, _this9.optionSelectedClass);\n input.removeAttribute('checked');\n }\n });\n }\n }\n }, {\n key: \"updateValue\",\n value: function updateValue(value, flags) {\n var changed = _get(_getPrototypeOf(RadioComponent.prototype), \"updateValue\", this).call(this, value, flags);\n if (changed) {\n this.setSelectedClasses();\n }\n if (!flags || !flags.modified || !this.isRadio) {\n if (changed) {\n this.previousValue = this.dataValue;\n }\n return changed;\n }\n\n // If they clicked on the radio that is currently selected, it needs to reset the value.\n this.currentValue = this.dataValue;\n var shouldResetValue = flags && flags.modified && !flags.noUpdateEvent && this.previousValue === this.currentValue;\n if (shouldResetValue) {\n this.resetValue();\n this.triggerChange(flags);\n this.setSelectedClasses();\n }\n this.previousValue = this.dataValue;\n return changed;\n }\n\n /**\n * Normalize values coming into updateValue.\n *\n * @param value\n * @return {*}\n */\n }, {\n key: \"normalizeValue\",\n value: function normalizeValue(value) {\n if (value === this.emptyValue) {\n return value;\n }\n if (!isNaN(parseFloat(value)) && isFinite(value)) {\n value = +value;\n }\n if (value === 'true') {\n value = true;\n }\n if (value === 'false') {\n value = false;\n }\n return _get(_getPrototypeOf(RadioComponent.prototype), \"normalizeValue\", this).call(this, value);\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len3 = arguments.length, extend = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n extend[_key3] = arguments[_key3];\n }\n return _ListComponent2[\"default\"].schema.apply(_ListComponent2[\"default\"], [{\n type: 'radio',\n inputType: 'radio',\n label: 'Radio',\n key: 'radio',\n values: [{\n label: '',\n value: ''\n }],\n data: {\n url: ''\n },\n fieldSet: false\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Radio',\n group: 'basic',\n icon: 'dot-circle-o',\n weight: 80,\n documentation: '/userguide/form-building/form-components#radio',\n schema: RadioComponent.schema()\n };\n }\n }]);\n return RadioComponent;\n}(_ListComponent2[\"default\"]);\nexports[\"default\"] = RadioComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/radio/Radio.js?"); /***/ }), @@ -1630,7 +1663,7 @@ eval("\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \". /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _builder = _interopRequireDefault(__webpack_require__(/*! ../../../utils/builder */ \"./lib/utils/builder.js\"));\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = [{\n key: 'multiple',\n ignore: true\n}, {\n type: 'datagrid',\n input: true,\n label: 'Values',\n key: 'values',\n tooltip: 'The radio button values that can be picked for this field. Values are text submitted with the form data. Labels are text that appears next to the radio buttons on the form.',\n weight: 10,\n reorder: true,\n defaultValue: [{\n label: '',\n value: ''\n }],\n components: [{\n label: 'Label',\n key: 'label',\n input: true,\n type: 'textfield'\n }, {\n label: 'Value',\n key: 'value',\n input: true,\n type: 'textfield',\n allowCalculateOverride: true,\n calculateValue: 'value = _.camelCase(row.label);',\n validate: {\n required: true\n }\n }, {\n type: 'select',\n input: true,\n weight: 180,\n label: 'Shortcut',\n key: 'shortcut',\n tooltip: 'The shortcut key for this option.',\n dataSrc: 'custom',\n valueProperty: 'value',\n customDefaultValue: function customDefaultValue() {\n return '';\n },\n template: '{{ item.label }}',\n data: {\n custom: function custom(context) {\n return _builder.default.getAvailableShortcuts(_lodash.default.get(context, 'instance.options.editForm', {}), _lodash.default.get(context, 'instance.options.editComponent', {}));\n }\n }\n }]\n}, {\n type: 'select',\n input: true,\n label: 'Storage Type',\n key: 'dataType',\n clearOnHide: true,\n tooltip: 'The type to store the data. If you select something other than autotype, it will force it to that type.',\n weight: 12,\n template: '{{ item.label }}',\n dataSrc: 'values',\n data: {\n values: [{\n label: 'Autotype',\n value: 'auto'\n }, {\n label: 'String',\n value: 'string'\n }, {\n label: 'Number',\n value: 'number'\n }, {\n label: 'Boolean',\n value: 'boolean'\n }, {\n label: 'Object',\n value: 'object'\n }]\n }\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/radio/editForm/Radio.edit.data.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.regexp.flags.js */ \"./node_modules/core-js/modules/es.regexp.flags.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nvar _builder = _interopRequireDefault(__webpack_require__(/*! ../../../utils/builder */ \"./lib/utils/builder.js\"));\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = [{\n key: 'multiple',\n ignore: true\n}, {\n key: 'dataSrc',\n data: {\n values: [{\n label: 'Values',\n value: 'values'\n }, {\n label: 'URL',\n value: 'url'\n }]\n },\n 'validate': {\n 'required': true\n },\n onChange: function onChange(context) {\n if (context && context.flags && context.flags && context.flags.modified) {\n context.data.values = [{\n label: '',\n value: ''\n }];\n }\n }\n}, {\n type: 'datagrid',\n input: true,\n label: 'Values',\n key: 'values',\n tooltip: 'The radio button values that can be picked for this field. Values are text submitted with the form data. Labels are text that appears next to the radio buttons on the form.',\n weight: 10,\n reorder: true,\n defaultValue: [{\n label: '',\n value: ''\n }],\n components: [{\n label: 'Label',\n key: 'label',\n input: true,\n type: 'textfield'\n }, {\n label: 'Value',\n key: 'value',\n input: true,\n type: 'textfield',\n allowCalculateOverride: true,\n calculateValue: 'value = _.camelCase(row.label);',\n validate: {\n required: true\n }\n }, {\n type: 'select',\n input: true,\n weight: 180,\n label: 'Shortcut',\n key: 'shortcut',\n tooltip: 'The shortcut key for this option.',\n dataSrc: 'custom',\n valueProperty: 'value',\n customDefaultValue: function customDefaultValue() {\n return '';\n },\n template: '{{ item.label }}',\n data: {\n custom: function custom(context) {\n return _builder[\"default\"].getAvailableShortcuts(_lodash[\"default\"].get(context, 'instance.options.editForm', {}), _lodash[\"default\"].get(context, 'instance.options.editComponent', {}));\n }\n }\n }],\n conditional: {\n json: {\n '===': [{\n \"var\": 'data.dataSrc'\n }, 'values']\n }\n }\n}, {\n key: 'template',\n conditional: {\n json: {\n '===': [{\n \"var\": 'data.dataSrc'\n }, 'url']\n }\n }\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/radio/editForm/Radio.edit.data.js?"); /***/ }), @@ -1638,10 +1671,10 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /*!*************************************************************!*\ !*** ./lib/components/radio/editForm/Radio.edit.display.js ***! \*************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'placeholder',\n ignore: true\n}, {\n type: 'select',\n input: true,\n label: 'Options Label Position',\n key: 'optionsLabelPosition',\n tooltip: 'Position for the label for options for this field.',\n dataSrc: 'values',\n weight: 32,\n defaultValue: 'right',\n data: {\n values: [{\n label: 'Top',\n value: 'top'\n }, {\n label: 'Left',\n value: 'left'\n }, {\n label: 'Right',\n value: 'right'\n }, {\n label: 'Bottom',\n value: 'bottom'\n }]\n }\n}, {\n type: 'checkbox',\n input: true,\n key: 'inline',\n label: 'Inline Layout',\n tooltip: 'Displays the checkboxes/radios horizontally.',\n weight: 650\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/radio/editForm/Radio.edit.display.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'placeholder',\n ignore: true\n}, {\n type: 'select',\n input: true,\n label: 'Options Label Position',\n key: 'optionsLabelPosition',\n tooltip: 'Position for the label for options for this field.',\n dataSrc: 'values',\n weight: 32,\n defaultValue: 'right',\n data: {\n values: [{\n label: 'Top',\n value: 'top'\n }, {\n label: 'Left',\n value: 'left'\n }, {\n label: 'Right',\n value: 'right'\n }, {\n label: 'Bottom',\n value: 'bottom'\n }]\n }\n}, {\n type: 'checkbox',\n input: true,\n key: 'inline',\n label: 'Inline Layout',\n tooltip: 'Displays the checkboxes/radios horizontally.',\n weight: 650\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/radio/editForm/Radio.edit.display.js?"); /***/ }), @@ -1649,10 +1682,10 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /*!****************************************************************!*\ !*** ./lib/components/radio/editForm/Radio.edit.validation.js ***! \****************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'validateOn',\n ignore: true\n}, {\n key: 'unique',\n ignore: true\n}, {\n weight: 52,\n type: 'checkbox',\n label: 'Allow only available values',\n tooltip: 'Check this if you would like to perform a validation check to ensure the selected value is an available option.',\n key: 'validate.onlyAvailableItems',\n input: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/radio/editForm/Radio.edit.validation.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'validateOn',\n ignore: true\n}, {\n key: 'unique',\n ignore: true\n}, {\n weight: 52,\n type: 'checkbox',\n label: 'Allow only available values',\n tooltip: 'Check this if you would like to perform a validation check to ensure the selected value is an available option.',\n key: 'validate.onlyAvailableItems',\n input: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/radio/editForm/Radio.edit.validation.js?"); /***/ }), @@ -1663,7 +1696,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n\nvar _Components = _interopRequireDefault(__webpack_require__(/*! ../Components */ \"./lib/components/Components.js\"));\n\nvar _ReCaptchaEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/ReCaptcha.edit.display */ \"./lib/components/recaptcha/editForm/ReCaptcha.edit.display.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _default() {\n return _Components.default.baseEditForm([{\n key: 'display',\n components: _ReCaptchaEdit.default\n }, {\n key: 'data',\n ignore: true\n }, {\n key: 'validation',\n ignore: true\n }, {\n key: 'conditional',\n ignore: true\n }, {\n key: 'logic',\n ignore: true\n }, {\n key: 'addons',\n ignore: true\n }]);\n}\n\n//# sourceURL=webpack://Formio/./lib/components/recaptcha/ReCaptcha.form.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\nvar _Components = _interopRequireDefault(__webpack_require__(/*! ../Components */ \"./lib/components/Components.js\"));\nvar _ReCaptchaEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/ReCaptcha.edit.display */ \"./lib/components/recaptcha/editForm/ReCaptcha.edit.display.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _default() {\n return _Components[\"default\"].baseEditForm([{\n key: 'display',\n components: _ReCaptchaEdit[\"default\"]\n }, {\n key: 'data',\n ignore: true\n }, {\n key: 'validation',\n ignore: true\n }, {\n key: 'conditional',\n ignore: true\n }, {\n key: 'logic',\n ignore: true\n }]);\n}\n\n//# sourceURL=webpack://Formio/./lib/components/recaptcha/ReCaptcha.form.js?"); /***/ }), @@ -1674,7 +1707,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptors.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\nvar _Component2 = _interopRequireDefault(__webpack_require__(/*! ../_classes/component/Component */ \"./lib/components/_classes/component/Component.js\"));\n\nvar _Formio = __webpack_require__(/*! ../../Formio */ \"./lib/Formio.js\");\n\nvar _get3 = _interopRequireDefault(__webpack_require__(/*! lodash/get */ \"./node_modules/lodash/get.js\"));\n\nvar _debounce2 = _interopRequireDefault(__webpack_require__(/*! lodash/debounce */ \"./node_modules/lodash/debounce.js\"));\n\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _get2() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get2 = Reflect.get.bind(); } else { _get2 = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get2.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar ReCaptchaComponent = /*#__PURE__*/function (_Component) {\n _inherits(ReCaptchaComponent, _Component);\n\n var _super = _createSuper(ReCaptchaComponent);\n\n function ReCaptchaComponent() {\n _classCallCheck(this, ReCaptchaComponent);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(ReCaptchaComponent, [{\n key: \"render\",\n value: function render() {\n this.recaptchaResult = null;\n\n if (this.builderMode) {\n return _get2(_getPrototypeOf(ReCaptchaComponent.prototype), \"render\", this).call(this, 'reCAPTCHA');\n } else {\n return _get2(_getPrototypeOf(ReCaptchaComponent.prototype), \"render\", this).call(this, '', true);\n }\n }\n }, {\n key: \"createInput\",\n value: function createInput() {\n if (this.builderMode) {\n // We need to see it in builder mode.\n this.append(this.text(this.name));\n } else {\n var siteKey = (0, _get3.default)(this.root.form, 'settings.recaptcha.siteKey');\n\n if (siteKey) {\n var recaptchaApiScriptUrl = \"https://www.google.com/recaptcha/api.js?render=\".concat(siteKey);\n this.recaptchaApiReady = _Formio.GlobalFormio.requireLibrary('googleRecaptcha', 'grecaptcha', recaptchaApiScriptUrl, true);\n } else {\n console.warn('There is no Site Key specified in settings in form JSON');\n }\n }\n }\n }, {\n key: \"createLabel\",\n value: function createLabel() {\n return;\n }\n }, {\n key: \"verify\",\n value: function verify(actionName) {\n var _this = this;\n\n var siteKey = (0, _get3.default)(this.root.form, 'settings.recaptcha.siteKey');\n\n if (!siteKey) {\n console.warn('There is no Site Key specified in settings in form JSON');\n return;\n }\n\n if (!this.recaptchaApiReady) {\n var recaptchaApiScriptUrl = \"https://www.google.com/recaptcha/api.js?render=\".concat((0, _get3.default)(this.root.form, 'settings.recaptcha.siteKey'));\n this.recaptchaApiReady = _Formio.GlobalFormio.requireLibrary('googleRecaptcha', 'grecaptcha', recaptchaApiScriptUrl, true);\n }\n\n if (this.recaptchaApiReady) {\n this.recaptchaVerifiedPromise = new _nativePromiseOnly.default(function (resolve, reject) {\n _this.recaptchaApiReady.then(function () {\n if (!_this.isLoading) {\n _this.isLoading = true;\n grecaptcha.ready((0, _debounce2.default)(function () {\n grecaptcha.execute(siteKey, {\n action: actionName\n }).then(function (token) {\n return _this.sendVerificationRequest(token).then(function (_ref) {\n var verificationResult = _ref.verificationResult,\n token = _ref.token;\n _this.recaptchaResult = _objectSpread(_objectSpread({}, verificationResult), {}, {\n token: token\n });\n\n _this.updateValue(_this.recaptchaResult);\n\n return resolve(verificationResult);\n });\n }).catch(function () {\n _this.isLoading = false;\n });\n }, 1000));\n }\n }).catch(function () {\n return reject();\n });\n }).then(function () {\n _this.isLoading = false;\n });\n }\n }\n }, {\n key: \"beforeSubmit\",\n value: function beforeSubmit() {\n var _this2 = this;\n\n if (this.recaptchaVerifiedPromise) {\n return this.recaptchaVerifiedPromise.then(function () {\n return _get2(_getPrototypeOf(ReCaptchaComponent.prototype), \"beforeSubmit\", _this2).call(_this2);\n });\n }\n\n return _get2(_getPrototypeOf(ReCaptchaComponent.prototype), \"beforeSubmit\", this).call(this);\n }\n }, {\n key: \"sendVerificationRequest\",\n value: function sendVerificationRequest(token) {\n return _Formio.GlobalFormio.makeStaticRequest(\"\".concat(_Formio.GlobalFormio.projectUrl, \"/recaptcha?recaptchaToken=\").concat(token)).then(function (verificationResult) {\n return {\n verificationResult: verificationResult,\n token: token\n };\n });\n }\n }, {\n key: \"checkComponentValidity\",\n value: function checkComponentValidity(data, dirty, row) {\n var _this3 = this;\n\n var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n data = data || this.rootValue;\n row = row || this.data;\n var _options$async = options.async,\n async = _options$async === void 0 ? false : _options$async; // Verification could be async only\n\n if (!async) {\n return _get2(_getPrototypeOf(ReCaptchaComponent.prototype), \"checkComponentValidity\", this).call(this, data, dirty, row, options);\n }\n\n var componentData = row[this.component.key];\n\n if (!componentData || !componentData.token) {\n this.setCustomValidity('ReCAPTCHA: Token is not specified in submission');\n return _nativePromiseOnly.default.resolve(false);\n }\n\n if (!componentData.success) {\n this.setCustomValidity('ReCAPTCHA: Token validation error');\n return _nativePromiseOnly.default.resolve(false);\n }\n\n return this.hook('validateReCaptcha', componentData.token, function () {\n return _nativePromiseOnly.default.resolve(true);\n }).then(function (success) {\n return success;\n }).catch(function (err) {\n _this3.setCustomValidity(err.message || err);\n\n return false;\n });\n }\n }, {\n key: \"normalizeValue\",\n value: function normalizeValue(newValue) {\n // If a recaptcha result has already been established, then do not allow it to be reset.\n return this.recaptchaResult ? this.recaptchaResult : newValue;\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _Component2.default.schema.apply(_Component2.default, [{\n type: 'recaptcha',\n key: 'recaptcha',\n label: 'reCAPTCHA'\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'reCAPTCHA',\n group: 'premium',\n icon: 'refresh',\n documentation: '/userguide/forms/premium-components#recaptcha',\n weight: 40,\n schema: ReCaptchaComponent.schema()\n };\n }\n }]);\n\n return ReCaptchaComponent;\n}(_Component2.default);\n\nexports[\"default\"] = ReCaptchaComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/recaptcha/ReCaptcha.js?"); +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptors.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-properties.js */ \"./node_modules/core-js/modules/es.object.define-properties.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _Component2 = _interopRequireDefault(__webpack_require__(/*! ../_classes/component/Component */ \"./lib/components/_classes/component/Component.js\"));\nvar _Formio = __webpack_require__(/*! ../../Formio */ \"./lib/Formio.js\");\nvar _get3 = _interopRequireDefault(__webpack_require__(/*! lodash/get */ \"./node_modules/lodash/get.js\"));\nvar _debounce2 = _interopRequireDefault(__webpack_require__(/*! lodash/debounce */ \"./node_modules/lodash/debounce.js\"));\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _get2() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get2 = Reflect.get.bind(); } else { _get2 = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get2.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar ReCaptchaComponent = /*#__PURE__*/function (_Component) {\n _inherits(ReCaptchaComponent, _Component);\n var _super = _createSuper(ReCaptchaComponent);\n function ReCaptchaComponent() {\n _classCallCheck(this, ReCaptchaComponent);\n return _super.apply(this, arguments);\n }\n _createClass(ReCaptchaComponent, [{\n key: \"render\",\n value: function render() {\n this.recaptchaResult = null;\n if (this.builderMode) {\n return _get2(_getPrototypeOf(ReCaptchaComponent.prototype), \"render\", this).call(this, 'reCAPTCHA');\n } else {\n return _get2(_getPrototypeOf(ReCaptchaComponent.prototype), \"render\", this).call(this, '', true);\n }\n }\n }, {\n key: \"createInput\",\n value: function createInput() {\n if (this.builderMode) {\n // We need to see it in builder mode.\n this.append(this.text(this.name));\n } else {\n var siteKey = (0, _get3[\"default\"])(this.root.form, 'settings.recaptcha.siteKey');\n if (siteKey) {\n var recaptchaApiScriptUrl = \"https://www.google.com/recaptcha/api.js?render=\".concat(siteKey);\n this.recaptchaApiReady = _Formio.GlobalFormio.requireLibrary('googleRecaptcha', 'grecaptcha', recaptchaApiScriptUrl, true);\n } else {\n console.warn('There is no Site Key specified in settings in form JSON');\n }\n }\n }\n }, {\n key: \"createLabel\",\n value: function createLabel() {\n return;\n }\n }, {\n key: \"verify\",\n value: function verify(actionName) {\n var _this = this;\n var siteKey = (0, _get3[\"default\"])(this.root.form, 'settings.recaptcha.siteKey');\n if (!siteKey) {\n console.warn('There is no Site Key specified in settings in form JSON');\n return;\n }\n if (!this.recaptchaApiReady) {\n var recaptchaApiScriptUrl = \"https://www.google.com/recaptcha/api.js?render=\".concat((0, _get3[\"default\"])(this.root.form, 'settings.recaptcha.siteKey'));\n this.recaptchaApiReady = _Formio.GlobalFormio.requireLibrary('googleRecaptcha', 'grecaptcha', recaptchaApiScriptUrl, true);\n }\n if (this.recaptchaApiReady) {\n this.recaptchaVerifiedPromise = new _nativePromiseOnly[\"default\"](function (resolve, reject) {\n _this.recaptchaApiReady.then(function () {\n if (!_this.isLoading) {\n _this.isLoading = true;\n grecaptcha.ready((0, _debounce2[\"default\"])(function () {\n grecaptcha.execute(siteKey, {\n action: actionName\n }).then(function (token) {\n return _this.sendVerificationRequest(token).then(function (_ref) {\n var verificationResult = _ref.verificationResult,\n token = _ref.token;\n _this.recaptchaResult = _objectSpread(_objectSpread({}, verificationResult), {}, {\n token: token\n });\n _this.updateValue(_this.recaptchaResult);\n return resolve(verificationResult);\n });\n })[\"catch\"](function () {\n _this.isLoading = false;\n });\n }, 1000));\n }\n })[\"catch\"](function () {\n return reject();\n });\n }).then(function () {\n _this.isLoading = false;\n });\n }\n }\n }, {\n key: \"beforeSubmit\",\n value: function beforeSubmit() {\n var _this2 = this;\n if (this.recaptchaVerifiedPromise) {\n return this.recaptchaVerifiedPromise.then(function () {\n return _get2(_getPrototypeOf(ReCaptchaComponent.prototype), \"beforeSubmit\", _this2).call(_this2);\n });\n }\n return _get2(_getPrototypeOf(ReCaptchaComponent.prototype), \"beforeSubmit\", this).call(this);\n }\n }, {\n key: \"sendVerificationRequest\",\n value: function sendVerificationRequest(token) {\n return _Formio.GlobalFormio.makeStaticRequest(\"\".concat(_Formio.GlobalFormio.projectUrl, \"/recaptcha?recaptchaToken=\").concat(token)).then(function (verificationResult) {\n return {\n verificationResult: verificationResult,\n token: token\n };\n });\n }\n }, {\n key: \"checkComponentValidity\",\n value: function checkComponentValidity(data, dirty, row) {\n var _this3 = this;\n var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n data = data || this.rootValue;\n row = row || this.data;\n var _options$async = options.async,\n async = _options$async === void 0 ? false : _options$async;\n\n // Verification could be async only\n if (!async) {\n return _get2(_getPrototypeOf(ReCaptchaComponent.prototype), \"checkComponentValidity\", this).call(this, data, dirty, row, options);\n }\n var componentData = row[this.component.key];\n if (!componentData || !componentData.token) {\n this.setCustomValidity('ReCAPTCHA: Token is not specified in submission');\n return _nativePromiseOnly[\"default\"].resolve(false);\n }\n if (!componentData.success) {\n this.setCustomValidity('ReCAPTCHA: Token validation error');\n return _nativePromiseOnly[\"default\"].resolve(false);\n }\n return this.hook('validateReCaptcha', componentData.token, function () {\n return _nativePromiseOnly[\"default\"].resolve(true);\n }).then(function (success) {\n return success;\n })[\"catch\"](function (err) {\n _this3.setCustomValidity(err.message || err);\n return false;\n });\n }\n }, {\n key: \"normalizeValue\",\n value: function normalizeValue(newValue) {\n // If a recaptcha result has already been established, then do not allow it to be reset.\n return this.recaptchaResult ? this.recaptchaResult : newValue;\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _Component2[\"default\"].schema.apply(_Component2[\"default\"], [{\n type: 'recaptcha',\n key: 'recaptcha',\n label: 'reCAPTCHA'\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'reCAPTCHA',\n group: 'premium',\n icon: 'refresh',\n documentation: '/userguide/form-building/premium-components#recaptcha',\n weight: 40,\n schema: ReCaptchaComponent.schema()\n };\n }\n }]);\n return ReCaptchaComponent;\n}(_Component2[\"default\"]);\nexports[\"default\"] = ReCaptchaComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/recaptcha/ReCaptcha.js?"); /***/ }), @@ -1685,7 +1718,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _utils = __webpack_require__(/*! ../../../utils/utils */ \"./lib/utils/utils.js\");\n\nvar _default = [{\n key: 'eventType',\n label: 'Type of event',\n tooltip: 'Specify type of event that this reCAPTCHA would react to',\n type: 'radio',\n values: [{\n label: 'Form Load',\n value: 'formLoad'\n }, {\n label: 'Button Click',\n value: 'buttonClick'\n }],\n weight: 650\n}, {\n type: 'select',\n input: true,\n label: 'Button Key',\n key: 'buttonKey',\n dataSrc: 'custom',\n valueProperty: 'value',\n tooltip: 'Specify key of button on this form that this reCAPTCHA should react to',\n weight: 660,\n customConditional: function customConditional(context) {\n return context.data.eventType === 'buttonClick';\n },\n data: {\n custom: function custom(context) {\n return (0, _utils.getContextButtons)(context);\n }\n }\n}, {\n key: 'label',\n ignore: true\n}, {\n key: 'hideLabel',\n ignore: true\n}, {\n key: 'labelPosition',\n ignore: true\n}, {\n key: 'placeholder',\n ignore: true\n}, {\n key: 'description',\n ignore: true\n}, {\n key: 'tooltip',\n ignore: true\n}, {\n key: 'errorLabel',\n ignore: true\n}, {\n key: 'customClass',\n ignore: true\n}, {\n key: 'tabindex',\n ignore: true\n}, {\n key: 'multiple',\n ignore: true\n}, {\n key: 'clearOnHide',\n ignore: true\n}, {\n key: 'hidden',\n ignore: true\n}, {\n key: 'mask',\n ignore: true\n}, {\n key: 'dataGridLabel',\n ignore: true\n}, {\n key: 'disabled',\n ignore: true\n}, {\n key: 'autofocus',\n ignore: true\n}, {\n key: 'tableView',\n ignore: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/recaptcha/editForm/ReCaptcha.edit.display.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _utils = __webpack_require__(/*! ../../../utils/utils */ \"./lib/utils/utils.js\");\nvar _default = [{\n key: 'eventType',\n label: 'Type of event',\n tooltip: 'Specify type of event that this reCAPTCHA would react to',\n type: 'radio',\n values: [{\n label: 'Form Load',\n value: 'formLoad'\n }, {\n label: 'Button Click',\n value: 'buttonClick'\n }],\n weight: 650\n}, {\n type: 'select',\n input: true,\n label: 'Button Key',\n key: 'buttonKey',\n dataSrc: 'custom',\n valueProperty: 'value',\n tooltip: 'Specify key of button on this form that this reCAPTCHA should react to',\n weight: 660,\n customConditional: function customConditional(context) {\n return context.data.eventType === 'buttonClick';\n },\n data: {\n custom: function custom(context) {\n return (0, _utils.getContextButtons)(context);\n }\n }\n}, {\n key: 'label',\n ignore: true\n}, {\n key: 'hideLabel',\n ignore: true\n}, {\n key: 'labelPosition',\n ignore: true\n}, {\n key: 'placeholder',\n ignore: true\n}, {\n key: 'description',\n ignore: true\n}, {\n key: 'tooltip',\n ignore: true\n}, {\n key: 'errorLabel',\n ignore: true\n}, {\n key: 'customClass',\n ignore: true\n}, {\n key: 'tabindex',\n ignore: true\n}, {\n key: 'multiple',\n ignore: true\n}, {\n key: 'clearOnHide',\n ignore: true\n}, {\n key: 'hidden',\n ignore: true\n}, {\n key: 'mask',\n ignore: true\n}, {\n key: 'dataGridLabel',\n ignore: true\n}, {\n key: 'disabled',\n ignore: true\n}, {\n key: 'autofocus',\n ignore: true\n}, {\n key: 'tableView',\n ignore: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/recaptcha/editForm/ReCaptcha.edit.display.js?"); /***/ }), @@ -1696,7 +1729,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\nvar _Components = _interopRequireDefault(__webpack_require__(/*! ../Components */ \"./lib/components/Components.js\"));\n\nvar _ResourceEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/Resource.edit.display */ \"./lib/components/resource/editForm/Resource.edit.display.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _Components.default.baseEditForm.apply(_Components.default, [[{\n key: 'display',\n components: _ResourceEdit.default\n }, {\n key: 'addons',\n ignore: true\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/resource/Resource.form.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\nvar _Components = _interopRequireDefault(__webpack_require__(/*! ../Components */ \"./lib/components/Components.js\"));\nvar _ResourceEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/Resource.edit.display */ \"./lib/components/resource/editForm/Resource.edit.display.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _Components[\"default\"].baseEditForm.apply(_Components[\"default\"], [[{\n key: 'display',\n components: _ResourceEdit[\"default\"]\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/resource/Resource.form.js?"); /***/ }), @@ -1707,7 +1740,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\nvar _Select = _interopRequireDefault(__webpack_require__(/*! ../select/Select */ \"./lib/components/select/Select.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar ResourceComponent = /*#__PURE__*/function (_SelectComponent) {\n _inherits(ResourceComponent, _SelectComponent);\n\n var _super = _createSuper(ResourceComponent);\n\n function ResourceComponent() {\n _classCallCheck(this, ResourceComponent);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(ResourceComponent, [{\n key: \"init\",\n value: function init() {\n _get(_getPrototypeOf(ResourceComponent.prototype), \"init\", this).call(this);\n\n this.component.dataSrc = 'resource';\n this.component.data = {\n resource: this.component.resource\n };\n }\n }, {\n key: \"defaultSchema\",\n get: function get() {\n return ResourceComponent.schema();\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _Select.default.schema.apply(_Select.default, [{\n type: 'resource',\n label: 'Resource',\n key: 'resource',\n dataSrc: 'resource',\n resource: '',\n project: '',\n template: '{{ item.data }}'\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Resource',\n group: 'premium',\n icon: 'files-o',\n weight: 90,\n documentation: '/userguide/forms/premium-components#resource',\n schema: ResourceComponent.schema()\n };\n }\n }]);\n\n return ResourceComponent;\n}(_Select.default);\n\nexports[\"default\"] = ResourceComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/resource/Resource.js?"); +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _Select = _interopRequireDefault(__webpack_require__(/*! ../select/Select */ \"./lib/components/select/Select.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar ResourceComponent = /*#__PURE__*/function (_SelectComponent) {\n _inherits(ResourceComponent, _SelectComponent);\n var _super = _createSuper(ResourceComponent);\n function ResourceComponent() {\n _classCallCheck(this, ResourceComponent);\n return _super.apply(this, arguments);\n }\n _createClass(ResourceComponent, [{\n key: \"init\",\n value: function init() {\n _get(_getPrototypeOf(ResourceComponent.prototype), \"init\", this).call(this);\n this.component.dataSrc = 'resource';\n this.component.data = {\n resource: this.component.resource\n };\n }\n }, {\n key: \"defaultSchema\",\n get: function get() {\n return ResourceComponent.schema();\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _Select[\"default\"].schema.apply(_Select[\"default\"], [{\n type: 'resource',\n label: 'Resource',\n key: 'resource',\n dataSrc: 'resource',\n resource: '',\n project: '',\n template: '{{ item.data }}'\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Resource',\n group: 'premium',\n icon: 'files-o',\n weight: 90,\n documentation: '/userguide/form-building/form-components#resource',\n schema: ResourceComponent.schema()\n };\n }\n }]);\n return ResourceComponent;\n}(_Select[\"default\"]);\nexports[\"default\"] = ResourceComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/resource/Resource.js?"); /***/ }), @@ -1715,10 +1748,10 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /*!*******************************************************************!*\ !*** ./lib/components/resource/editForm/Resource.edit.display.js ***! \*******************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'resourceInfo',\n weight: -10,\n type: 'htmlelement',\n tag: 'div',\n className: 'alert alert-danger',\n content: 'The Resource component is deprecated. Use the Select component with data source of \"Resource\" instead.'\n}, {\n type: 'select',\n input: true,\n dataSrc: 'url',\n data: {\n url: '/form?type=resource&limit=1000000&select=_id,title'\n },\n authenticate: true,\n template: '{{ item.title }}',\n valueProperty: '_id',\n label: 'Resource',\n key: 'resource',\n weight: 50,\n tooltip: 'The resource to be used with this field.'\n}, {\n type: 'tags',\n input: true,\n key: 'selectFields',\n label: 'Select Fields',\n tooltip: 'The properties on the resource to return as part of the options. If left blank, all properties will be returned.',\n placeholder: 'Enter the fields to select.',\n weight: 51\n}, {\n type: 'tags',\n input: true,\n key: 'searchFields',\n label: 'Search Fields',\n tooltip: 'A list of search filters based on the fields of the resource. See the Resource.js documentation for the format of these filters.',\n placeholder: 'The fields to query on the server',\n weight: 52\n}, {\n type: 'textfield',\n input: true,\n key: 'filter',\n label: 'Filter Query',\n weight: 53,\n description: 'The filter query for results.',\n tooltip: 'Use this to provide additional filtering using query parameters.'\n}, {\n type: 'textfield',\n input: true,\n key: 'sort',\n label: 'Sort Query',\n weight: 53,\n description: 'The sort query for results',\n tooltip: 'Use this to provide additional sorting using query parameters'\n}, {\n type: 'textarea',\n input: true,\n key: 'template',\n label: 'Item Template',\n editor: 'ace',\n as: 'html',\n rows: 3,\n weight: 53,\n tooltip: 'The HTML template for the result data items.'\n}, {\n type: 'checkbox',\n input: true,\n weight: 54,\n key: 'addResource',\n label: 'Add Resource',\n tooltip: 'Allows to create a new resource while entering a submission.',\n conditional: {\n json: {\n '===': [{\n var: 'data.dataSrc'\n }, 'resource']\n }\n }\n}, {\n type: 'textfield',\n label: 'Add Resource Label',\n key: 'addResourceLabel',\n tooltip: 'Set the text of the Add Resource button.',\n placeholder: 'Add Resource',\n weight: 55,\n input: true,\n conditional: {\n json: {\n and: [{\n '===': [{\n var: 'data.dataSrc'\n }, 'resource']\n }, {\n '!!': {\n var: 'data.addResource'\n }\n }]\n }\n }\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/resource/editForm/Resource.edit.display.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'resourceInfo',\n weight: -10,\n type: 'htmlelement',\n tag: 'div',\n className: 'alert alert-danger',\n content: 'The Resource component is deprecated. Use the Select component with data source of \"Resource\" instead.'\n}, {\n type: 'select',\n input: true,\n dataSrc: 'url',\n data: {\n url: '/form?type=resource&limit=1000000&select=_id,title'\n },\n authenticate: true,\n template: '{{ item.title }}',\n valueProperty: '_id',\n label: 'Resource',\n key: 'resource',\n weight: 50,\n tooltip: 'The resource to be used with this field.'\n}, {\n type: 'tags',\n input: true,\n key: 'selectFields',\n label: 'Select Fields',\n tooltip: 'The properties on the resource to return as part of the options. If left blank, all properties will be returned.',\n placeholder: 'Enter the fields to select.',\n weight: 51\n}, {\n type: 'tags',\n input: true,\n key: 'searchFields',\n label: 'Search Fields',\n tooltip: 'A list of search filters based on the fields of the resource. See the Resource.js documentation for the format of these filters.',\n placeholder: 'The fields to query on the server',\n weight: 52\n}, {\n type: 'textfield',\n input: true,\n key: 'filter',\n label: 'Filter Query',\n weight: 53,\n description: 'The filter query for results.',\n tooltip: 'Use this to provide additional filtering using query parameters.'\n}, {\n type: 'textfield',\n input: true,\n key: 'sort',\n label: 'Sort Query',\n weight: 53,\n description: 'The sort query for results',\n tooltip: 'Use this to provide additional sorting using query parameters'\n}, {\n type: 'textarea',\n input: true,\n key: 'template',\n label: 'Item Template',\n editor: 'ace',\n as: 'html',\n rows: 3,\n weight: 53,\n tooltip: 'The HTML template for the result data items.'\n}, {\n type: 'checkbox',\n input: true,\n weight: 54,\n key: 'addResource',\n label: 'Add Resource',\n tooltip: 'Allows to create a new resource while entering a submission.',\n conditional: {\n json: {\n '===': [{\n \"var\": 'data.dataSrc'\n }, 'resource']\n }\n }\n}, {\n type: 'textfield',\n label: 'Add Resource Label',\n key: 'addResourceLabel',\n tooltip: 'Set the text of the Add Resource button.',\n placeholder: 'Add Resource',\n weight: 55,\n input: true,\n conditional: {\n json: {\n and: [{\n '===': [{\n \"var\": 'data.dataSrc'\n }, 'resource']\n }, {\n '!!': {\n \"var\": 'data.addResource'\n }\n }]\n }\n }\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/resource/editForm/Resource.edit.display.js?"); /***/ }), @@ -1729,7 +1762,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\nvar _Components = _interopRequireDefault(__webpack_require__(/*! ../Components */ \"./lib/components/Components.js\"));\n\nvar _SelectEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/Select.edit.data */ \"./lib/components/select/editForm/Select.edit.data.js\"));\n\nvar _SelectEdit2 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Select.edit.display */ \"./lib/components/select/editForm/Select.edit.display.js\"));\n\nvar _SelectEdit3 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Select.edit.validation */ \"./lib/components/select/editForm/Select.edit.validation.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _Components.default.baseEditForm.apply(_Components.default, [[{\n key: 'display',\n components: _SelectEdit2.default\n }, {\n key: 'data',\n components: _SelectEdit.default\n }, {\n key: 'validation',\n components: _SelectEdit3.default\n }, {\n key: 'addons',\n ignore: true\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/select/Select.form.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\nvar _ListComponent = _interopRequireDefault(__webpack_require__(/*! ../_classes/list/ListComponent.form */ \"./lib/components/_classes/list/ListComponent.form.js\"));\nvar _SelectEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/Select.edit.data */ \"./lib/components/select/editForm/Select.edit.data.js\"));\nvar _SelectEdit2 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Select.edit.display */ \"./lib/components/select/editForm/Select.edit.display.js\"));\nvar _SelectEdit3 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Select.edit.validation */ \"./lib/components/select/editForm/Select.edit.validation.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _ListComponent[\"default\"].apply(void 0, [[{\n key: 'display',\n components: _SelectEdit2[\"default\"]\n }, {\n key: 'data',\n components: _SelectEdit[\"default\"]\n }, {\n key: 'validation',\n components: _SelectEdit3[\"default\"]\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/select/Select.form.js?"); /***/ }), @@ -1740,7 +1773,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.set.js */ \"./node_modules/core-js/modules/es.reflect.set.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.from.js */ \"./node_modules/core-js/modules/es.array.from.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.slice.js */ \"./node_modules/core-js/modules/es.array.slice.js\");\n\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptors.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.split.js */ \"./node_modules/core-js/modules/es.string.split.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.find.js */ \"./node_modules/core-js/modules/es.array.find.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.trim.js */ \"./node_modules/core-js/modules/es.string.trim.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.join.js */ \"./node_modules/core-js/modules/es.array.join.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.match.js */ \"./node_modules/core-js/modules/es.string.match.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.sort.js */ \"./node_modules/core-js/modules/es.array.sort.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.includes.js */ \"./node_modules/core-js/modules/es.array.includes.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.includes.js */ \"./node_modules/core-js/modules/es.string.includes.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.starts-with.js */ \"./node_modules/core-js/modules/es.string.starts-with.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.assign.js */ \"./node_modules/core-js/modules/es.object.assign.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n\n__webpack_require__(/*! core-js/modules/es.number.is-nan.js */ \"./node_modules/core-js/modules/es.number.is-nan.js\");\n\n__webpack_require__(/*! core-js/modules/es.number.is-finite.js */ \"./node_modules/core-js/modules/es.number.is-finite.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.find-index.js */ \"./node_modules/core-js/modules/es.array.find-index.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nvar _Formio = __webpack_require__(/*! ../../Formio */ \"./lib/Formio.js\");\n\nvar _Field2 = _interopRequireDefault(__webpack_require__(/*! ../_classes/field/Field */ \"./lib/components/_classes/field/Field.js\"));\n\nvar _Form = _interopRequireDefault(__webpack_require__(/*! ../../Form */ \"./lib/Form.js\"));\n\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\n\nvar _utils = __webpack_require__(/*! ../../utils/utils */ \"./lib/utils/utils.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction set(target, property, value, receiver) { if (typeof Reflect !== \"undefined\" && Reflect.set) { set = Reflect.set; } else { set = function set(target, property, value, receiver) { var base = _superPropBase(target, property); var desc; if (base) { desc = Object.getOwnPropertyDescriptor(base, property); if (desc.set) { desc.set.call(receiver, value); return true; } else if (!desc.writable) { return false; } } desc = Object.getOwnPropertyDescriptor(receiver, property); if (desc) { if (!desc.writable) { return false; } desc.value = value; Object.defineProperty(receiver, property, desc); } else { _defineProperty(receiver, property, value); } return true; }; } return set(target, property, value, receiver); }\n\nfunction _set(target, property, value, receiver, isStrict) { var s = set(target, property, value, receiver || target); if (!s && isStrict) { throw new Error('failed to set property'); } return value; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar Choices;\n\nif (typeof window !== 'undefined') {\n Choices = (__webpack_require__(/*! ../../utils/ChoicesWrapper */ \"./lib/utils/ChoicesWrapper.js\")[\"default\"]);\n}\n\nvar SelectComponent = /*#__PURE__*/function (_Field) {\n _inherits(SelectComponent, _Field);\n\n var _super = _createSuper(SelectComponent);\n\n function SelectComponent() {\n _classCallCheck(this, SelectComponent);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(SelectComponent, [{\n key: \"init\",\n value: function init() {\n var _this = this;\n\n _get(_getPrototypeOf(SelectComponent.prototype), \"init\", this).call(this);\n\n this.templateData = {};\n this.validators = this.validators.concat(['select', 'onlyAvailableItems']); // Trigger an update.\n\n var updateArgs = [];\n\n var triggerUpdate = _lodash.default.debounce(function () {\n updateArgs = [];\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _this.updateItems.apply(_this, args);\n }, 100);\n\n this.triggerUpdate = function () {\n // Make sure we always resolve the previous promise before reassign it\n if (typeof _this.itemsLoadedResolve === 'function') {\n _this.itemsLoadedResolve();\n }\n\n _this.itemsLoaded = new _nativePromiseOnly.default(function (resolve) {\n _this.itemsLoadedResolve = resolve;\n });\n\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n if (args.length) {\n updateArgs = args;\n }\n\n return triggerUpdate.apply(void 0, _toConsumableArray(updateArgs));\n }; // Keep track of the select options.\n\n\n this.selectOptions = [];\n\n if (this.itemsFromUrl) {\n this.isFromSearch = false;\n this.searchServerCount = null;\n this.defaultServerCount = null;\n this.isScrollLoading = false;\n this.searchDownloadedResources = [];\n this.defaultDownloadedResources = [];\n } // If this component has been activated.\n\n\n this.activated = false;\n this.itemsLoaded = new _nativePromiseOnly.default(function (resolve) {\n _this.itemsLoadedResolve = resolve;\n });\n\n if (this.isHtmlRenderMode()) {\n this.activate();\n } // Get the template keys for this select component.\n\n\n this.getTemplateKeys();\n }\n }, {\n key: \"dataReady\",\n get: function get() {\n // If the root submission has been set, and we are still not attached, then assume\n // that our data is ready.\n if (this.root && this.root.submissionSet && !this.attached) {\n return _nativePromiseOnly.default.resolve();\n }\n\n return this.itemsLoaded;\n }\n }, {\n key: \"defaultSchema\",\n get: function get() {\n return SelectComponent.schema();\n }\n }, {\n key: \"emptyValue\",\n get: function get() {\n if (this.component.multiple) {\n return [];\n } // if select has JSON data source type, we are defining if empty value would be an object or a string by checking JSON's first item\n\n\n if (this.component.dataSrc === 'json' && this.component.data.json) {\n var firstItem = this.component.data.json[0];\n var firstValue;\n\n if (this.valueProperty) {\n firstValue = _lodash.default.get(firstItem, this.valueProperty);\n } else {\n firstValue = firstItem;\n }\n\n if (firstValue && typeof firstValue === 'string') {\n return '';\n } else {\n return {};\n }\n }\n\n if (this.valueProperty) {\n return '';\n }\n\n return {};\n }\n }, {\n key: \"valueProperty\",\n get: function get() {\n if (this.component.valueProperty) {\n return this.component.valueProperty;\n } // Force values datasource to use values without actually setting it on the component settings.\n\n\n if (this.component.dataSrc === 'values') {\n return 'value';\n }\n\n return '';\n }\n }, {\n key: \"inputInfo\",\n get: function get() {\n var info = _get(_getPrototypeOf(SelectComponent.prototype), \"elementInfo\", this).call(this);\n\n info.type = 'select';\n info.changeEvent = 'change';\n return info;\n }\n }, {\n key: \"isSelectResource\",\n get: function get() {\n return this.component.dataSrc === 'resource';\n }\n }, {\n key: \"isSelectURL\",\n get: function get() {\n return this.component.dataSrc === 'url';\n }\n }, {\n key: \"itemsFromUrl\",\n get: function get() {\n return this.isSelectResource || this.isSelectURL;\n }\n }, {\n key: \"isInfiniteScrollProvided\",\n get: function get() {\n return this.itemsFromUrl;\n }\n }, {\n key: \"shouldDisabled\",\n get: function get() {\n return _get(_getPrototypeOf(SelectComponent.prototype), \"shouldDisabled\", this) || this.parentDisabled;\n }\n }, {\n key: \"isEntireObjectDisplay\",\n value: function isEntireObjectDisplay() {\n return this.component.dataSrc === 'resource' && this.valueProperty === 'data';\n }\n }, {\n key: \"getSelectTemplate\",\n value: function getSelectTemplate(data, value) {\n if (!this.component.template) {\n return data.label;\n }\n\n var options = {\n noeval: this.itemsFromUrl,\n data: {}\n };\n var template = this.sanitize(this.component.template ? this.interpolate(this.component.template, {\n item: data\n }) : data.label, this.shouldSanitizeValue);\n\n if (value && !_lodash.default.isObject(value) && options.data.item) {\n // If the value is not an object, then we need to save the template data off for when it is selected.\n this.templateData[value] = options.data.item;\n }\n\n return template;\n }\n }, {\n key: \"selectValueAndLabel\",\n value: function selectValueAndLabel(data) {\n var value = this.getOptionValue(this.itemValue(data));\n return {\n value: value,\n label: this.itemTemplate(data, value)\n };\n }\n }, {\n key: \"itemTemplate\",\n value: function itemTemplate(data, value) {\n if (!_lodash.default.isNumber(data) && _lodash.default.isEmpty(data)) {\n return '';\n } // If they wish to show the value in read only mode, then just return the itemValue here.\n\n\n if (this.options.readOnly && this.component.readOnlyValue) {\n return this.itemValue(data);\n } // Perform a fast interpretation if we should not use the template.\n\n\n if (data && !this.component.template) {\n var itemLabel = data.label || data;\n\n var _value = typeof itemLabel === 'string' ? this.t(itemLabel, {\n _userInput: true\n }) : itemLabel;\n\n return this.sanitize(_value, this.shouldSanitizeValue);\n }\n\n if (typeof data === 'string' || typeof data === 'number') {\n var selectData = this.selectData;\n\n if (selectData && selectData[value]) {\n data = selectData[value];\n } else {\n return this.sanitize(this.t(data, {\n _userInput: true\n }), this.shouldSanitizeValue);\n }\n }\n\n if (data.data) {\n // checking additional fields in the template for the selected Entire Object option\n var hasNestedFields = /item\\.data\\.\\w*/g.test(this.component.template);\n data.data = this.isEntireObjectDisplay() && _lodash.default.isObject(data.data) && !hasNestedFields ? JSON.stringify(data.data) : data.data;\n }\n\n var template = this.sanitize(this.getSelectTemplate(data, value), this.shouldSanitizeValue);\n\n if (template) {\n var _this$i18next;\n\n var label = template.replace(/<\\/?[^>]+(>|$)/g, '');\n var hasTranslator = (_this$i18next = this.i18next) === null || _this$i18next === void 0 ? void 0 : _this$i18next.translator;\n if (!label || hasTranslator && !this.t(label, {\n _userInput: true\n })) return;\n return hasTranslator ? template.replace(label, this.t(label, {\n _userInput: true\n })) : label;\n } else {\n return this.sanitize(JSON.stringify(data), this.shouldSanitizeValue);\n }\n }\n /**\n * Adds an option to the select dropdown.\n *\n * @param value\n * @param label\n */\n\n }, {\n key: \"addOption\",\n value: function addOption(value, label) {\n var attrs = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var id = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : (0, _utils.getRandomComponentId)();\n if (_lodash.default.isNil(label)) return;\n var idPath = this.component.idPath ? this.component.idPath.split('.').reduceRight(function (obj, key) {\n return _defineProperty({}, key, obj);\n }, id) : {};\n\n var option = _objectSpread({\n value: this.getOptionValue(value),\n label: label\n }, idPath);\n\n var skipOption = this.component.uniqueOptions ? !!this.selectOptions.find(function (selectOption) {\n return _lodash.default.isEqual(selectOption.value, option.value);\n }) : false;\n\n if (skipOption) {\n return;\n }\n\n if (value) {\n this.selectOptions.push(option);\n }\n\n if (this.refs.selectContainer && this.component.widget === 'html5') {\n // Replace an empty Object value to an empty String.\n if (option.value && _lodash.default.isObject(option.value) && _lodash.default.isEmpty(option.value)) {\n option.value = '';\n } // Add element to option so we can reference it later.\n\n\n var div = document.createElement('div');\n div.innerHTML = this.sanitize(this.renderTemplate('selectOption', {\n selected: _lodash.default.isEqual(this.getOptionValue(this.dataValue), option.value),\n option: option,\n attrs: attrs,\n id: id,\n useId: this.valueProperty === '' && _lodash.default.isObject(value) && id\n }), this.shouldSanitizeValue).trim();\n option.element = div.firstChild;\n this.refs.selectContainer.appendChild(option.element);\n }\n }\n }, {\n key: \"addValueOptions\",\n value: function addValueOptions(items) {\n items = items || [];\n var added = false;\n\n if (!this.selectOptions.length) {\n // Add the currently selected choices if they don't already exist.\n var currentChoices = Array.isArray(this.dataValue) ? this.dataValue : [this.dataValue];\n added = this.addCurrentChoices(currentChoices, items);\n\n if (!added && !this.component.multiple) {\n this.addPlaceholder();\n }\n }\n\n return added;\n }\n }, {\n key: \"disableInfiniteScroll\",\n value: function disableInfiniteScroll() {\n if (!this.downloadedResources) {\n return;\n }\n\n this.downloadedResources.serverCount = this.downloadedResources.length;\n this.serverCount = this.downloadedResources.length;\n }\n /* eslint-disable max-statements */\n\n }, {\n key: \"setItems\",\n value: function setItems(items, fromSearch) {\n var _this2 = this,\n _this$choices,\n _this$choices$input;\n\n // If the items is a string, then parse as JSON.\n if (typeof items == 'string') {\n try {\n items = JSON.parse(items);\n } catch (err) {\n console.warn(err.message);\n items = [];\n }\n } // Allow js processing (needed for form builder)\n\n\n if (this.component.onSetItems && typeof this.component.onSetItems === 'function') {\n var newItems = this.component.onSetItems(this, items);\n\n if (newItems) {\n items = newItems;\n }\n }\n\n if (!this.choices && this.refs.selectContainer) {\n this.empty(this.refs.selectContainer);\n } // If they provided select values, then we need to get them instead.\n\n\n if (this.component.selectValues) {\n items = _lodash.default.get(items, this.component.selectValues, items) || [];\n }\n\n var areItemsEqual;\n\n if (this.itemsFromUrl) {\n areItemsEqual = this.isSelectURL ? _lodash.default.isEqual(items, this.downloadedResources) : false;\n var areItemsEnded = this.component.limit > items.length;\n var areItemsDownloaded = areItemsEqual && this.downloadedResources && this.downloadedResources.length === items.length;\n\n if (areItemsEnded) {\n this.disableInfiniteScroll();\n } else if (areItemsDownloaded) {\n this.selectOptions = [];\n } else {\n this.serverCount = items.serverCount;\n }\n }\n\n if (this.isScrollLoading && items) {\n if (!areItemsEqual) {\n this.downloadedResources = this.downloadedResources ? this.downloadedResources.concat(items) : items;\n }\n\n this.downloadedResources.serverCount = items.serverCount || this.downloadedResources.serverCount;\n } else {\n this.downloadedResources = items || [];\n this.selectOptions = []; // If there is new select option with same id as already selected, set the new one\n\n if (!_lodash.default.isEmpty(this.dataValue) && this.component.idPath) {\n var selectedOptionId = _lodash.default.get(this.dataValue, this.component.idPath, null);\n\n var newOptionWithSameId = !_lodash.default.isNil(selectedOptionId) && items.find(function (item) {\n var itemId = _lodash.default.get(item, _this2.component.idPath);\n\n return itemId === selectedOptionId;\n });\n\n if (newOptionWithSameId) {\n this.setValue(newOptionWithSameId);\n }\n }\n } // Add the value options.\n\n\n if (!fromSearch) {\n this.addValueOptions(items);\n }\n\n if (this.component.widget === 'html5' && !this.component.placeholder) {\n this.addOption(null, '');\n } // Iterate through each of the items.\n\n\n _lodash.default.each(items, function (item, index) {\n // preventing references of the components inside the form to the parent form when building forms\n if (_this2.root && _this2.root.options.editForm && _this2.root.options.editForm._id && _this2.root.options.editForm._id === item._id) return;\n\n var itemValueAndLabel = _this2.selectValueAndLabel(item);\n\n _this2.addOption(itemValueAndLabel.value, itemValueAndLabel.label, {}, _lodash.default.get(item, _this2.component.idPath, String(index)));\n });\n\n if (this.choices) {\n this.choices.setChoices(this.selectOptions, 'value', 'label', true);\n } else if (this.loading) {// Re-attach select input.\n // this.appendTo(this.refs.input[0], this.selectContainer);\n } // We are no longer loading.\n\n\n this.isScrollLoading = false;\n this.loading = false;\n var searching = fromSearch && ((_this$choices = this.choices) === null || _this$choices === void 0 ? void 0 : (_this$choices$input = _this$choices.input) === null || _this$choices$input === void 0 ? void 0 : _this$choices$input.isFocussed);\n\n if (!searching) {\n // If a value is provided, then select it.\n if (!this.isEmpty()) {\n this.setValue(this.dataValue, {\n noUpdateEvent: true\n });\n } else if (this.shouldAddDefaultValue && !this.options.readOnly) {\n // If a default value is provided then select it.\n var defaultValue = this.defaultValue;\n\n if (!this.isEmpty(defaultValue)) {\n this.setValue(defaultValue);\n }\n }\n } // Say we are done loading the items.\n\n\n this.itemsLoadedResolve();\n }\n }, {\n key: \"getSingleItemValueForHTMLMode\",\n value: function getSingleItemValueForHTMLMode(data) {\n var _this$selectOptions;\n\n var option = (_this$selectOptions = this.selectOptions) === null || _this$selectOptions === void 0 ? void 0 : _this$selectOptions.find(function (_ref2) {\n var value = _ref2.value;\n return _lodash.default.isEqual(value, data);\n });\n\n if (option) {\n return option.label || data;\n }\n\n return data;\n }\n }, {\n key: \"itemValueForHTMLMode\",\n value: function itemValueForHTMLMode(value) {\n var _this3 = this;\n\n if (!this.isHtmlRenderMode()) {\n return _get(_getPrototypeOf(SelectComponent.prototype), \"itemValueForHTMLMode\", this).call(this, value);\n }\n\n if (Array.isArray(value)) {\n var values = value.map(function (item) {\n return Array.isArray(item) ? _this3.itemValueForHTMLMode(item) : _this3.getSingleItemValueForHTMLMode(item);\n });\n return values.join(', ');\n }\n\n return this.getSingleItemValueForHTMLMode(value);\n }\n /* eslint-enable max-statements */\n\n }, {\n key: \"defaultValue\",\n get: function get() {\n var defaultValue = _get(_getPrototypeOf(SelectComponent.prototype), \"defaultValue\", this);\n\n if (!defaultValue && (this.component.defaultValue === false || this.component.defaultValue === 0)) {\n defaultValue = this.component.defaultValue;\n }\n\n return defaultValue;\n }\n }, {\n key: \"getTemplateKeys\",\n value: function getTemplateKeys() {\n var _this4 = this;\n\n this.templateKeys = [];\n\n if (this.options.readOnly && this.component.template) {\n var keys = this.component.template.match(/({{\\s*(.*?)\\s*}})/g);\n\n if (keys) {\n keys.forEach(function (key) {\n var propKey = key.match(/{{\\s*item\\.(.*?)\\s*}}/);\n\n if (propKey && propKey.length > 1) {\n _this4.templateKeys.push(propKey[1]);\n }\n });\n }\n }\n }\n }, {\n key: \"loadingError\",\n get: function get() {\n return !this.component.refreshOn && !this.component.refreshOnBlur && this.networkError;\n }\n }, {\n key: \"selectData\",\n get: function get() {\n var selectData = _lodash.default.get(this.root, 'submission.metadata.selectData', {});\n\n return _lodash.default.get(selectData, this.path);\n }\n }, {\n key: \"shouldLoad\",\n get: function get() {\n if (this.loadingError) {\n return false;\n } // Live forms should always load.\n\n\n if (!this.options.readOnly) {\n return true;\n } // If there are template keys, then we need to see if we have the data.\n\n\n if (this.templateKeys && this.templateKeys.length) {\n // See if we already have the data we need.\n var dataValue = this.dataValue;\n var selectData = this.selectData;\n return this.templateKeys.reduce(function (shouldLoad, key) {\n var hasValue = _lodash.default.has(dataValue, key) || _lodash.default.has(selectData, key);\n\n return shouldLoad || !hasValue;\n }, false);\n } // Return that we should load.\n\n\n return true;\n }\n }, {\n key: \"loadItems\",\n value: function loadItems(url, search, headers, options, method, body) {\n var _this5 = this;\n\n options = options || {}; // See if we should load items or not.\n\n if (!this.shouldLoad || !this.itemsFromUrl && this.options.readOnly) {\n this.isScrollLoading = false;\n this.loading = false;\n this.itemsLoadedResolve();\n return;\n } // See if they have not met the minimum search requirements.\n\n\n var minSearch = parseInt(this.component.minSearch, 10);\n\n if (this.component.searchField && minSearch > 0 && (!search || search.length < minSearch)) {\n // Set empty items.\n return this.setItems([]);\n } // Ensure we have a method and remove any body if method is get\n\n\n method = method || 'GET';\n\n if (method.toUpperCase() === 'GET') {\n body = null;\n }\n\n var limit = this.component.limit || 100;\n var skip = this.isScrollLoading ? this.selectOptions.length : 0;\n var query = this.component.disableLimit ? {} : {\n limit: limit,\n skip: skip\n }; // Allow for url interpolation.\n\n url = this.interpolate(url, {\n formioBase: _Formio.GlobalFormio.getBaseUrl(),\n search: search,\n limit: limit,\n skip: skip,\n page: Math.abs(Math.floor(skip / limit))\n }); // Add search capability.\n\n if (this.component.searchField && search) {\n if (Array.isArray(search)) {\n query[\"\".concat(this.component.searchField)] = search.join(',');\n } else {\n query[\"\".concat(this.component.searchField)] = search;\n }\n } // If they wish to return only some fields.\n\n\n if (this.component.selectFields) {\n query.select = this.component.selectFields;\n } // Add sort capability\n\n\n if (this.component.sort) {\n query.sort = this.component.sort;\n }\n\n if (!_lodash.default.isEmpty(query)) {\n // Add the query string.\n url += (!url.includes('?') ? '?' : '&') + _Formio.GlobalFormio.serialize(query, function (item) {\n return _this5.interpolate(item);\n });\n } // Add filter capability\n\n\n if (this.component.filter) {\n url += (!url.includes('?') ? '?' : '&') + this.interpolate(this.component.filter);\n } // Set ignoreCache if it is\n\n\n options.ignoreCache = this.component.ignoreCache; // Make the request.\n\n options.header = headers;\n this.loading = true;\n\n _Formio.GlobalFormio.makeRequest(this.options.formio, 'select', url, method, body, options).then(function (response) {\n _this5.loading = false;\n _this5.error = null;\n\n _this5.setItems(response, !!search);\n }).catch(function (err) {\n if (_this5.itemsFromUrl) {\n _this5.setItems([]);\n\n _this5.disableInfiniteScroll();\n }\n\n _this5.isScrollLoading = false;\n\n _this5.handleLoadingError(err);\n });\n }\n }, {\n key: \"handleLoadingError\",\n value: function handleLoadingError(err) {\n this.loading = false;\n\n if (err.networkError) {\n this.networkError = true;\n }\n\n this.itemsLoadedResolve();\n this.emit('componentError', {\n component: this.component,\n message: err.toString()\n });\n console.warn(\"Unable to load resources for \".concat(this.key));\n }\n /**\n * Get the request headers for this select dropdown.\n */\n\n }, {\n key: \"requestHeaders\",\n get: function get() {\n var _this6 = this;\n\n // Create the headers object.\n var headers = new _Formio.GlobalFormio.Headers(); // Add custom headers to the url.\n\n if (this.component.data && this.component.data.headers) {\n try {\n _lodash.default.each(this.component.data.headers, function (header) {\n if (header.key) {\n headers.set(header.key, _this6.interpolate(header.value));\n }\n });\n } catch (err) {\n console.warn(err.message);\n }\n }\n\n return headers;\n }\n }, {\n key: \"getCustomItems\",\n value: function getCustomItems() {\n var customItems = this.evaluate(this.component.data.custom, {\n values: []\n }, 'values');\n this.asyncValues = (0, _utils.isPromise)(customItems);\n return customItems;\n }\n }, {\n key: \"asyncCustomValues\",\n value: function asyncCustomValues() {\n if (!_lodash.default.isBoolean(this.asyncValues)) {\n this.getCustomItems();\n }\n\n return this.asyncValues;\n }\n }, {\n key: \"updateCustomItems\",\n value: function updateCustomItems(forceUpdate) {\n var _this7 = this;\n\n if (this.asyncCustomValues()) {\n if (!forceUpdate && !this.active) {\n this.itemsLoadedResolve();\n return;\n }\n\n this.loading = true;\n this.getCustomItems().then(function (items) {\n _this7.loading = false;\n\n _this7.setItems(items || []);\n }).catch(function (err) {\n _this7.handleLoadingError(err);\n });\n } else {\n this.setItems(this.getCustomItems() || []);\n }\n }\n }, {\n key: \"isEmpty\",\n value: function isEmpty() {\n var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.dataValue;\n return _get(_getPrototypeOf(SelectComponent.prototype), \"isEmpty\", this).call(this, value) || value === undefined;\n }\n }, {\n key: \"refresh\",\n value: function refresh(value, _ref3) {\n var instance = _ref3.instance;\n\n if (this.component.clearOnRefresh && instance && !instance.pristine) {\n this.setValue(this.emptyValue);\n }\n\n this.updateItems(null, true);\n }\n }, {\n key: \"additionalResourcesAvailable\",\n get: function get() {\n return _lodash.default.isNil(this.serverCount) || this.serverCount > this.downloadedResources.length;\n }\n }, {\n key: \"serverCount\",\n get: function get() {\n if (this.isFromSearch) {\n return this.searchServerCount;\n }\n\n return this.defaultServerCount;\n },\n set: function set(value) {\n if (this.isFromSearch) {\n this.searchServerCount = value;\n } else {\n this.defaultServerCount = value;\n }\n }\n }, {\n key: \"downloadedResources\",\n get: function get() {\n if (this.isFromSearch) {\n return this.searchDownloadedResources;\n }\n\n return this.defaultDownloadedResources;\n },\n set: function set(value) {\n if (this.isFromSearch) {\n this.searchDownloadedResources = value;\n } else {\n this.defaultDownloadedResources = value;\n }\n }\n /* eslint-disable max-statements */\n\n }, {\n key: \"updateItems\",\n value: function updateItems(searchInput, forceUpdate) {\n var _this8 = this;\n\n if (!this.component.data) {\n console.warn(\"Select component \".concat(this.key, \" does not have data configuration.\"));\n this.itemsLoadedResolve();\n return;\n } // Only load the data if it is visible.\n\n\n if (!this.visible) {\n this.itemsLoadedResolve();\n return;\n }\n\n switch (this.component.dataSrc) {\n case 'values':\n this.setItems(this.component.data.values);\n break;\n\n case 'json':\n this.setItems(this.component.data.json);\n break;\n\n case 'custom':\n this.updateCustomItems(forceUpdate);\n break;\n\n case 'resource':\n {\n // If there is no resource, or we are lazyLoading, wait until active.\n if (!this.component.data.resource || !forceUpdate && !this.active) {\n this.itemsLoadedResolve();\n return;\n }\n\n var resourceUrl = this.options.formio ? this.options.formio.formsUrl : \"\".concat(_Formio.GlobalFormio.getProjectUrl(), \"/form\");\n resourceUrl += \"/\".concat(this.component.data.resource, \"/submission\");\n\n if (forceUpdate || this.additionalResourcesAvailable || !this.serverCount) {\n try {\n this.loadItems(resourceUrl, searchInput, this.requestHeaders);\n } catch (err) {\n console.warn(\"Unable to load resources for \".concat(this.key));\n }\n } else {\n this.setItems(this.downloadedResources);\n }\n\n break;\n }\n\n case 'url':\n {\n if (!forceUpdate && !this.active && !this.calculatedValue) {\n // If we are lazyLoading, wait until activated.\n this.itemsLoadedResolve();\n return;\n }\n\n var url = this.component.data.url;\n var method;\n var body;\n\n if (url.startsWith('/')) {\n // if URL starts with '/project', we should use base URL to avoid issues with URL formed like //project//...\n var baseUrl = url.startsWith('/project') ? _Formio.GlobalFormio.getBaseUrl() : _Formio.GlobalFormio.getProjectUrl() || _Formio.GlobalFormio.getBaseUrl();\n url = baseUrl + url;\n }\n\n if (!this.component.data.method) {\n method = 'GET';\n } else {\n method = this.component.data.method;\n\n if (method.toUpperCase() === 'POST') {\n body = this.component.data.body;\n } else {\n body = null;\n }\n }\n\n var options = this.component.authenticate ? {} : {\n noToken: true\n };\n this.loadItems(url, searchInput, this.requestHeaders, options, method, body);\n break;\n }\n\n case 'indexeddb':\n {\n if (typeof window === 'undefined') {\n return;\n }\n\n if (!window.indexedDB) {\n window.alert(\"Your browser doesn't support current version of indexedDB\");\n }\n\n if (this.component.indexeddb && this.component.indexeddb.database && this.component.indexeddb.table) {\n var request = window.indexedDB.open(this.component.indexeddb.database);\n\n request.onupgradeneeded = function (event) {\n if (_this8.component.customOptions) {\n var db = event.target.result;\n var objectStore = db.createObjectStore(_this8.component.indexeddb.table, {\n keyPath: 'myKey',\n autoIncrement: true\n });\n\n objectStore.transaction.oncomplete = function () {\n var transaction = db.transaction(_this8.component.indexeddb.table, 'readwrite');\n\n _this8.component.customOptions.forEach(function (item) {\n transaction.objectStore(_this8.component.indexeddb.table).put(item);\n });\n };\n }\n };\n\n request.onerror = function () {\n window.alert(request.errorCode);\n };\n\n request.onsuccess = function (event) {\n var db = event.target.result;\n var transaction = db.transaction(_this8.component.indexeddb.table, 'readwrite');\n var objectStore = transaction.objectStore(_this8.component.indexeddb.table);\n new _nativePromiseOnly.default(function (resolve) {\n var responseItems = [];\n\n objectStore.getAll().onsuccess = function (event) {\n event.target.result.forEach(function (item) {\n responseItems.push(item);\n });\n resolve(responseItems);\n };\n }).then(function (items) {\n if (!_lodash.default.isEmpty(_this8.component.indexeddb.filter)) {\n items = _lodash.default.filter(items, _this8.component.indexeddb.filter);\n }\n\n _this8.setItems(items);\n });\n };\n }\n }\n }\n }\n /* eslint-enable max-statements */\n\n }, {\n key: \"addPlaceholder\",\n value: function addPlaceholder() {\n if (!this.component.placeholder) {\n return;\n }\n\n this.addOption('', this.component.placeholder, {\n placeholder: true\n });\n }\n /**\n * Activate this select control.\n */\n\n }, {\n key: \"activate\",\n value: function activate() {\n if (this.loading || !this.active) {\n this.setLoadingItem();\n }\n\n if (this.active) {\n return;\n }\n\n this.activated = true;\n this.triggerUpdate();\n }\n }, {\n key: \"setLoadingItem\",\n value: function setLoadingItem() {\n var addToCurrentList = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n if (this.choices) {\n if (addToCurrentList) {\n this.choices.setChoices([{\n value: \"\".concat(this.id, \"-loading\"),\n label: 'Loading...',\n disabled: true\n }], 'value', 'label');\n } else {\n this.choices.setChoices([{\n value: '',\n label: \"\"),\n disabled: true\n }], 'value', 'label', true);\n }\n } else if (this.component.dataSrc === 'url' || this.component.dataSrc === 'resource') {\n this.addOption('', this.t('loading...'));\n }\n }\n }, {\n key: \"active\",\n get: function get() {\n return !this.component.lazyLoad || this.activated;\n }\n }, {\n key: \"render\",\n value: function render() {\n var info = this.inputInfo;\n info.attr = info.attr || {};\n info.multiple = this.component.multiple;\n return _get(_getPrototypeOf(SelectComponent.prototype), \"render\", this).call(this, this.wrapElement(this.renderTemplate('select', {\n input: info,\n selectOptions: '',\n index: null\n })));\n }\n }, {\n key: \"wrapElement\",\n value: function wrapElement(element) {\n return this.component.addResource && !this.options.readOnly ? this.renderTemplate('resourceAdd', {\n element: element\n }) : element;\n }\n }, {\n key: \"choicesOptions\",\n value: function choicesOptions() {\n var useSearch = this.component.hasOwnProperty('searchEnabled') ? this.component.searchEnabled : true;\n var placeholderValue = this.t(this.component.placeholder, {\n _userInput: true\n });\n var customOptions = this.component.customOptions || {};\n\n if (typeof customOptions == 'string') {\n try {\n customOptions = JSON.parse(customOptions);\n } catch (err) {\n console.warn(err.message);\n customOptions = {};\n }\n }\n\n var commonFuseOptions = {\n maxPatternLength: 1000,\n distance: 1000\n };\n return _objectSpread({\n removeItemButton: this.component.disabled ? false : _lodash.default.get(this.component, 'removeItemButton', true),\n itemSelectText: '',\n classNames: {\n containerOuter: 'choices form-group formio-choices',\n containerInner: this.transform('class', 'form-control ui fluid selection dropdown')\n },\n addItemText: false,\n placeholder: !!this.component.placeholder,\n placeholderValue: placeholderValue,\n noResultsText: this.t('No results found'),\n noChoicesText: this.t('No choices to choose from'),\n searchPlaceholderValue: this.t('Type to search'),\n shouldSort: false,\n position: this.component.dropdown || 'auto',\n searchEnabled: useSearch,\n searchChoices: !this.component.searchField,\n searchFields: _lodash.default.get(this, 'component.searchFields', ['label']),\n shadowRoot: this.root ? this.root.shadowRoot : null,\n fuseOptions: this.component.useExactSearch ? _objectSpread({\n tokenize: true,\n matchAllTokens: true\n }, commonFuseOptions) : Object.assign({}, _lodash.default.get(this, 'component.fuseOptions', {}), _objectSpread({\n include: 'score',\n threshold: _lodash.default.get(this, 'component.selectThreshold', 0.3)\n }, commonFuseOptions)),\n valueComparer: _lodash.default.isEqual,\n resetScrollPosition: false\n }, customOptions);\n }\n /* eslint-disable max-statements */\n\n }, {\n key: \"attach\",\n value: function attach(element) {\n var _this9 = this,\n _this$choices2,\n _this$choices2$contai,\n _this$choices2$contai2;\n\n var superAttach = _get(_getPrototypeOf(SelectComponent.prototype), \"attach\", this).call(this, element);\n\n this.loadRefs(element, {\n selectContainer: 'single',\n addResource: 'single',\n autocompleteInput: 'single'\n }); //enable autocomplete for select\n\n var autocompleteInput = this.refs.autocompleteInput;\n\n if (autocompleteInput) {\n this.addEventListener(autocompleteInput, 'change', function (event) {\n _this9.setValue(event.target.value);\n });\n }\n\n var input = this.refs.selectContainer;\n\n if (!input) {\n return;\n }\n\n this.addEventListener(input, this.inputInfo.changeEvent, function () {\n return _this9.updateValue(null, {\n modified: true\n });\n });\n this.attachRefreshOnBlur();\n\n if (this.component.widget === 'html5') {\n this.triggerUpdate(null, true);\n\n if (this.visible) {\n this.setItems(this.selectOptions || []);\n }\n\n this.focusableElement = input;\n this.addEventListener(input, 'focus', function () {\n return _this9.update();\n });\n this.addEventListener(input, 'keydown', function (event) {\n var key = event.key;\n\n if (['Backspace', 'Delete'].includes(key)) {\n _this9.setValue(_this9.emptyValue);\n }\n });\n return;\n }\n\n var tabIndex = input.tabIndex;\n this.addPlaceholder();\n input.setAttribute('dir', this.i18next.dir());\n\n if ((_this$choices2 = this.choices) !== null && _this$choices2 !== void 0 && (_this$choices2$contai = _this$choices2.containerOuter) !== null && _this$choices2$contai !== void 0 && (_this$choices2$contai2 = _this$choices2$contai.element) !== null && _this$choices2$contai2 !== void 0 && _this$choices2$contai2.parentNode) {\n this.choices.destroy();\n }\n\n var choicesOptions = this.choicesOptions();\n\n if (Choices) {\n this.choices = new Choices(input, choicesOptions);\n\n if (this.selectOptions && this.selectOptions.length) {\n this.choices.setChoices(this.selectOptions, 'value', 'label', true);\n }\n\n if (this.component.multiple) {\n this.focusableElement = this.choices.input.element;\n } else {\n this.focusableElement = this.choices.containerInner.element;\n this.choices.containerOuter.element.setAttribute('tabIndex', '-1');\n\n if (choicesOptions.searchEnabled) {\n this.addEventListener(this.choices.containerOuter.element, 'focus', function () {\n return _this9.focusableElement.focus();\n });\n }\n }\n\n if (this.itemsFromUrl) {\n this.scrollList = this.choices.choiceList.element;\n this.addEventListener(this.scrollList, 'scroll', function () {\n return _this9.onScroll();\n });\n }\n }\n\n this.focusableElement.setAttribute('tabIndex', tabIndex); // If a search field is provided, then add an event listener to update items on search.\n\n if (this.component.searchField) {\n // Make sure to clear the search when no value is provided.\n if (this.choices && this.choices.input && this.choices.input.element) {\n this.addEventListener(this.choices.input.element, 'input', function (event) {\n _this9.isFromSearch = !!event.target.value;\n\n if (!event.target.value) {\n _this9.triggerUpdate();\n } else {\n _this9.serverCount = null;\n _this9.downloadedResources = [];\n }\n });\n }\n\n this.addEventListener(input, 'choice', function () {\n if (_this9.component.multiple && _this9.component.dataSrc === 'resource' && _this9.isFromSearch) {\n _this9.triggerUpdate();\n }\n\n _this9.isFromSearch = false;\n }); // avoid spamming the resource/url endpoint when we have server side filtering enabled.\n\n var debounceTimeout = this.component.searchField && (this.isSelectResource || this.isSelectURL) ? (this.component.searchDebounce === 0 ? 0 : this.component.searchDebounce || this.defaultSchema.searchDebounce) * 1000 : 0;\n\n var updateComponent = function updateComponent(evt) {\n _this9.triggerUpdate(evt.detail.value);\n };\n\n this.addEventListener(input, 'search', _lodash.default.debounce(updateComponent, debounceTimeout));\n this.addEventListener(input, 'stopSearch', function () {\n return _this9.triggerUpdate();\n });\n this.addEventListener(input, 'hideDropdown', function () {\n if (_this9.choices && _this9.choices.input && _this9.choices.input.element) {\n _this9.choices.input.element.value = '';\n }\n\n _this9.updateItems(null, true);\n });\n }\n\n this.addEventListener(input, 'showDropdown', function () {\n return _this9.update();\n });\n\n if (this.choices && choicesOptions.placeholderValue && this.choices._isSelectOneElement) {\n this.addPlaceholderItem(choicesOptions.placeholderValue);\n this.addEventListener(input, 'removeItem', function () {\n _this9.addPlaceholderItem(choicesOptions.placeholderValue);\n });\n } // Add value options.\n\n\n this.addValueOptions();\n this.setChoicesValue(this.dataValue);\n\n if (this.isSelectResource && this.refs.addResource) {\n this.addEventListener(this.refs.addResource, 'click', function (event) {\n event.preventDefault();\n\n var formioForm = _this9.ce('div');\n\n var dialog = _this9.createModal(formioForm);\n\n var projectUrl = _lodash.default.get(_this9.root, 'formio.projectUrl', _Formio.GlobalFormio.getProjectUrl());\n\n var formUrl = \"\".concat(projectUrl, \"/form/\").concat(_this9.component.data.resource);\n new _Form.default(formioForm, formUrl, {}).ready.then(function (form) {\n form.on('submit', function (submission) {\n // If valueProperty is set, replace the submission with the corresponding value\n var value = _this9.valueProperty ? _lodash.default.get(submission, _this9.valueProperty) : submission;\n\n if (_this9.component.multiple) {\n value = [].concat(_toConsumableArray(_this9.dataValue), [value]);\n }\n\n _this9.setValue(value);\n\n _this9.triggerUpdate();\n\n dialog.close();\n });\n });\n });\n } // Force the disabled state with getters and setters.\n\n\n this.disabled = this.shouldDisabled;\n this.triggerUpdate();\n return superAttach;\n }\n }, {\n key: \"isLoadingAvailable\",\n get: function get() {\n return !this.isScrollLoading && this.additionalResourcesAvailable;\n }\n }, {\n key: \"onScroll\",\n value: function onScroll() {\n if (this.isLoadingAvailable) {\n this.isScrollLoading = true;\n this.setLoadingItem(true);\n this.triggerUpdate(this.choices.input.element.value);\n }\n }\n }, {\n key: \"attachRefreshOnBlur\",\n value: function attachRefreshOnBlur() {\n var _this10 = this;\n\n if (this.component.refreshOnBlur) {\n this.on('blur', function (instance) {\n _this10.checkRefreshOn([{\n instance: instance,\n value: instance.dataValue\n }], {\n fromBlur: true\n });\n });\n }\n }\n }, {\n key: \"addPlaceholderItem\",\n value: function addPlaceholderItem(placeholderValue) {\n var items = this.choices._store.activeItems;\n\n if (!items.length) {\n this.choices._addItem({\n value: placeholderValue,\n label: placeholderValue,\n choiceId: 0,\n groupId: -1,\n customProperties: null,\n placeholder: true,\n keyCode: null\n });\n }\n }\n /* eslint-enable max-statements */\n\n }, {\n key: \"update\",\n value: function update() {\n if (this.component.dataSrc === 'custom') {\n this.updateCustomItems();\n } // Activate the control.\n\n\n this.activate();\n }\n }, {\n key: \"disabled\",\n get: function get() {\n return _get(_getPrototypeOf(SelectComponent.prototype), \"disabled\", this);\n },\n set: function set(disabled) {\n _set(_getPrototypeOf(SelectComponent.prototype), \"disabled\", disabled, this, true);\n\n if (!this.choices) {\n return;\n }\n\n if (disabled) {\n this.setDisabled(this.choices.containerInner.element, true);\n this.focusableElement.removeAttribute('tabIndex');\n this.choices.disable();\n } else {\n this.setDisabled(this.choices.containerInner.element, false);\n this.focusableElement.setAttribute('tabIndex', this.component.tabindex || 0);\n this.choices.enable();\n }\n }\n }, {\n key: \"visible\",\n get: function get() {\n return _get(_getPrototypeOf(SelectComponent.prototype), \"visible\", this);\n }\n /**\n * @param {*} value\n * @param {Array} items\n */\n ,\n set: function set(value) {\n // If we go from hidden to visible, trigger a refresh.\n if (value && !this._visible !== !value) {\n this.triggerUpdate();\n }\n\n _set(_getPrototypeOf(SelectComponent.prototype), \"visible\", value, this, true);\n }\n }, {\n key: \"addCurrentChoices\",\n value: function addCurrentChoices(values, items, keyValue) {\n var _this11 = this;\n\n if (!values) {\n return false;\n }\n\n var notFoundValuesToAdd = [];\n var added = values.reduce(function (defaultAdded, value) {\n if (!value || _lodash.default.isEmpty(value)) {\n return defaultAdded;\n }\n\n var found = false; // Make sure that `items` and `this.selectOptions` points\n // to the same reference. Because `this.selectOptions` is\n // internal property and all items are populated by\n // `this.addOption` method, we assume that items has\n // 'label' and 'value' properties. This assumption allows\n // us to read correct value from the item.\n\n var isSelectOptions = items === _this11.selectOptions;\n\n if (items && items.length) {\n _lodash.default.each(items, function (choice) {\n if (choice._id && value._id && choice._id === value._id) {\n found = true;\n return false;\n }\n\n var itemValue = keyValue ? choice.value : _this11.itemValue(choice, isSelectOptions);\n found |= _lodash.default.isEqual(itemValue, value);\n return found ? false : true;\n });\n } // Add the default option if no item is found.\n\n\n if (!found) {\n notFoundValuesToAdd.push(_this11.selectValueAndLabel(value));\n return true;\n }\n\n return found || defaultAdded;\n }, false);\n\n if (notFoundValuesToAdd.length) {\n if (this.choices) {\n this.choices.setChoices(notFoundValuesToAdd, 'value', 'label');\n }\n\n notFoundValuesToAdd.map(function (notFoundValue) {\n _this11.addOption(notFoundValue.value, notFoundValue.label);\n });\n }\n\n return added;\n }\n }, {\n key: \"getValueAsString\",\n value: function getValueAsString(data) {\n return this.component.multiple && Array.isArray(data) ? data.map(this.asString.bind(this)).join(', ') : this.asString(data);\n }\n }, {\n key: \"getValue\",\n value: function getValue() {\n // If the widget isn't active.\n if (this.viewOnly || this.loading || !this.component.lazyLoad && !this.selectOptions.length || !this.element) {\n return this.dataValue;\n }\n\n var value = this.emptyValue;\n\n if (this.choices) {\n value = this.choices.getValue(true); // Make sure we don't get the placeholder\n\n if (!this.component.multiple && this.component.placeholder && value === this.t(this.component.placeholder, {\n _userInput: true\n })) {\n value = this.emptyValue;\n }\n } else if (this.refs.selectContainer) {\n value = this.refs.selectContainer.value;\n\n if (this.valueProperty === '') {\n if (value === '') {\n return {};\n }\n\n var option = this.selectOptions[value];\n\n if (option && _lodash.default.isObject(option.value)) {\n value = option.value;\n }\n }\n } else {\n value = this.dataValue;\n } // Choices will return undefined if nothing is selected. We really want '' to be empty.\n\n\n if (value === undefined || value === null) {\n value = '';\n }\n\n return value;\n }\n }, {\n key: \"redraw\",\n value: function redraw() {\n var done = _get(_getPrototypeOf(SelectComponent.prototype), \"redraw\", this).call(this);\n\n this.triggerUpdate();\n return done;\n }\n }, {\n key: \"normalizeSingleValue\",\n value: function normalizeSingleValue(value, retainObject) {\n var _this$root,\n _this12 = this;\n\n if (_lodash.default.isNil(value)) {\n return;\n }\n\n var valueIsObject = _lodash.default.isObject(value); //check if value equals to default emptyValue\n\n\n if (valueIsObject && Object.keys(value).length === 0) {\n return value;\n } // Check to see if we need to save off the template data into our metadata.\n\n\n if (value && !valueIsObject && this.templateData && this.templateData[value] && (_this$root = this.root) !== null && _this$root !== void 0 && _this$root.submission) {\n var submission = this.root.submission;\n\n if (!submission.metadata) {\n submission.metadata = {};\n }\n\n if (!submission.metadata.selectData) {\n submission.metadata.selectData = {};\n }\n\n var selectedTemplateData = _lodash.default.pickBy(this.templateData, function (value, key) {\n var dataValues = _lodash.default.isArray(_this12.dataValue) ? _this12.dataValue : [_this12.dataValue];\n return _lodash.default.includes(dataValues, key);\n });\n\n _lodash.default.set(submission.metadata.selectData, this.path, _lodash.default.cloneDeep(selectedTemplateData));\n }\n\n var displayEntireObject = this.isEntireObjectDisplay();\n var dataType = this.component.dataType || 'auto';\n var normalize = {\n value: value,\n number: function number() {\n var numberValue = Number(this.value);\n var isEquivalent = value.toString() === numberValue.toString();\n\n if (!Number.isNaN(numberValue) && Number.isFinite(numberValue) && value !== '' && isEquivalent) {\n this.value = numberValue;\n }\n\n return this;\n },\n boolean: function boolean() {\n if (_lodash.default.isString(this.value) && (this.value.toLowerCase() === 'true' || this.value.toLowerCase() === 'false')) {\n this.value = this.value.toLowerCase() === 'true';\n }\n\n return this;\n },\n string: function string() {\n this.value = String(this.value);\n return this;\n },\n object: function object() {\n if (_lodash.default.isObject(this.value) && displayEntireObject && !retainObject) {\n this.value = JSON.stringify(this.value);\n }\n\n return this;\n },\n auto: function auto() {\n if (_lodash.default.isObject(this.value)) {\n this.value = this.object().value;\n } else {\n this.value = this.string().number().boolean().value;\n }\n\n return this;\n }\n };\n\n try {\n return normalize[dataType]().value;\n } catch (err) {\n console.warn('Failed to normalize value', err);\n return value;\n }\n }\n /**\n * Normalize values coming into updateValue.\n *\n * @param value\n * @return {*}\n */\n\n }, {\n key: \"normalizeValue\",\n value: function normalizeValue(value) {\n var _this13 = this;\n\n if (this.component.multiple && Array.isArray(value)) {\n return value.map(function (singleValue) {\n return _this13.normalizeSingleValue(singleValue, true);\n });\n }\n\n return _get(_getPrototypeOf(SelectComponent.prototype), \"normalizeValue\", this).call(this, this.normalizeSingleValue(value, true));\n }\n }, {\n key: \"setValue\",\n value: function setValue(value) {\n var _this14 = this;\n\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var previousValue = this.dataValue;\n\n if (this.component.widget === 'html5' && (_lodash.default.isEqual(value, previousValue) || _lodash.default.isEqual(previousValue, {}) && _lodash.default.isEqual(flags, {}))) {\n return false;\n }\n\n var changed = this.updateValue(value, flags);\n value = this.dataValue;\n var hasPreviousValue = !this.isEmpty(previousValue);\n var hasValue = !this.isEmpty(value); // Undo typing when searching to set the value.\n\n if (this.component.multiple && Array.isArray(value)) {\n value = value.map(function (value) {\n if (typeof value === 'boolean' || typeof value === 'number') {\n return value.toString();\n }\n\n return value;\n });\n } else {\n if (typeof value === 'boolean' || typeof value === 'number') {\n value = value.toString();\n }\n }\n\n if (this.isHtmlRenderMode() && flags && flags.fromSubmission && changed) {\n this.itemsLoaded.then(function () {\n _this14.redraw();\n });\n return changed;\n } // Do not set the value if we are loading... that will happen after it is done.\n\n\n if (this.loading) {\n return changed;\n } // Determine if we need to perform an initial lazyLoad api call if searchField is provided.\n\n\n if (this.isInitApiCallNeeded(hasValue)) {\n this.loading = true;\n this.lazyLoadInit = true;\n var searchProperty = this.component.searchField || this.component.valueProperty;\n this.triggerUpdate(_lodash.default.get(value.data || value, searchProperty, value), true);\n return changed;\n } // Add the value options.\n\n\n this.itemsLoaded.then(function () {\n _this14.addValueOptions();\n\n _this14.setChoicesValue(value, hasPreviousValue, flags);\n });\n return changed;\n }\n }, {\n key: \"isInitApiCallNeeded\",\n value: function isInitApiCallNeeded(hasValue) {\n return this.component.lazyLoad && !this.lazyLoadInit && !this.active && !this.selectOptions.length && hasValue && this.shouldLoad && this.visible && (this.component.searchField || this.component.valueProperty);\n }\n }, {\n key: \"setChoicesValue\",\n value: function setChoicesValue(value, hasPreviousValue) {\n var flags = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var hasValue = !this.isEmpty(value) || flags.fromSubmission;\n hasPreviousValue = hasPreviousValue === undefined ? true : hasPreviousValue;\n\n if (this.choices) {\n // Now set the value.\n if (hasValue) {\n this.choices.removeActiveItems(); // Add the currently selected choices if they don't already exist.\n\n var currentChoices = Array.isArray(value) ? value : [value];\n\n if (!this.addCurrentChoices(currentChoices, this.selectOptions, true)) {\n this.choices.setChoices(this.selectOptions, 'value', 'label', true);\n }\n\n this.choices.setChoiceByValue(value);\n } else if (hasPreviousValue || flags.resetValue) {\n this.choices.removeActiveItems();\n }\n } else {\n if (hasValue) {\n var values = Array.isArray(value) ? value : [value];\n\n if (!_lodash.default.isEqual(this.dataValue, this.defaultValue) && this.selectOptions.length < 2) {\n var _this$selectValueAndL = this.selectValueAndLabel(this.dataValue),\n _value2 = _this$selectValueAndL.value,\n label = _this$selectValueAndL.label;\n\n this.addOption(_value2, label);\n }\n\n _lodash.default.each(this.selectOptions, function (selectOption) {\n _lodash.default.each(values, function (val) {\n if (selectOption.value === '') {\n selectOption.value = {};\n }\n\n if (_lodash.default.isEqual(val, selectOption.value) && selectOption.element) {\n selectOption.element.selected = true;\n selectOption.element.setAttribute('selected', 'selected');\n return false;\n }\n });\n });\n } else {\n _lodash.default.each(this.selectOptions, function (selectOption) {\n if (selectOption.element) {\n selectOption.element.selected = false;\n selectOption.element.removeAttribute('selected');\n }\n });\n }\n }\n }\n }, {\n key: \"itemsLoaded\",\n get: function get() {\n return this._itemsLoaded || _nativePromiseOnly.default.resolve();\n },\n set: function set(promise) {\n this._itemsLoaded = promise;\n }\n }, {\n key: \"validateValueAvailability\",\n value: function validateValueAvailability(setting, value) {\n var _this15 = this;\n\n if (!(0, _utils.boolValue)(setting) || !value) {\n return true;\n }\n\n var values = this.getOptionsValues();\n\n if (values) {\n if (_lodash.default.isObject(value)) {\n var compareComplexValues = function compareComplexValues(optionValue) {\n var normalizedOptionValue = _this15.normalizeSingleValue(optionValue, true);\n\n if (!_lodash.default.isObject(normalizedOptionValue)) {\n return false;\n }\n\n try {\n return JSON.stringify(normalizedOptionValue) === JSON.stringify(value);\n } catch (err) {\n console.warn.error('Error while comparing items', err);\n return false;\n }\n };\n\n return values.findIndex(function (optionValue) {\n return compareComplexValues(optionValue);\n }) !== -1;\n }\n\n return values.findIndex(function (optionValue) {\n return _this15.normalizeSingleValue(optionValue) === value;\n }) !== -1;\n }\n\n return false;\n }\n /**\n * Performs required transformations on the initial value to use in selectOptions\n * @param {*} value\n */\n\n }, {\n key: \"getOptionValue\",\n value: function getOptionValue(value) {\n return _lodash.default.isObject(value) && this.isEntireObjectDisplay() ? this.normalizeSingleValue(value) : _lodash.default.isObject(value) && (this.valueProperty || this.component.key !== 'resource') ? value : _lodash.default.isObject(value) && !this.valueProperty ? this.interpolate(this.component.template, {\n item: value\n }).replace(/<\\/?[^>]+(>|$)/g, '') : _lodash.default.isNull(value) ? this.emptyValue : String(this.normalizeSingleValue(value));\n }\n /**\n * If component has static values (values, json) or custom values, returns an array of them\n * @returns {Array<*>|undefined}\n */\n\n }, {\n key: \"getOptionsValues\",\n value: function getOptionsValues() {\n var _this16 = this;\n\n var rawItems = [];\n\n switch (this.component.dataSrc) {\n case 'values':\n rawItems = this.component.data.values;\n break;\n\n case 'json':\n rawItems = this.component.data.json;\n break;\n\n case 'custom':\n rawItems = this.getCustomItems();\n break;\n }\n\n if (typeof rawItems === 'string') {\n try {\n rawItems = JSON.parse(rawItems);\n } catch (err) {\n console.warn(err.message);\n rawItems = [];\n }\n }\n\n if (!Array.isArray(rawItems)) {\n return;\n }\n\n return rawItems.map(function (item) {\n return _this16.getOptionValue(_this16.itemValue(item));\n });\n }\n /**\n * Deletes the value of the component.\n */\n\n }, {\n key: \"deleteValue\",\n value: function deleteValue() {\n this.setValue('', {\n noUpdateEvent: true\n });\n this.unset();\n }\n /**\n * Check if a component is eligible for multiple validation\n *\n * @return {boolean}\n */\n\n }, {\n key: \"validateMultiple\",\n value: function validateMultiple() {\n // Select component will contain one input when flagged as multiple.\n return false;\n }\n /**\n * Output this select dropdown as a string value.\n * @return {*}\n */\n\n }, {\n key: \"isBooleanOrNumber\",\n value: function isBooleanOrNumber(value) {\n return typeof value === 'number' || typeof value === 'boolean';\n }\n }, {\n key: \"getNormalizedValues\",\n value: function getNormalizedValues() {\n var _this17 = this;\n\n if (!this.component || !this.component.data || !this.component.data.values) {\n return;\n }\n\n return this.component.data.values.map(function (value) {\n return {\n label: value.label,\n value: String(_this17.normalizeSingleValue(value.value))\n };\n });\n }\n }, {\n key: \"asString\",\n value: function asString(value) {\n var _value3,\n _this18 = this;\n\n value = (_value3 = value) !== null && _value3 !== void 0 ? _value3 : this.getValue(); //need to convert values to strings to be able to compare values with available options that are strings\n\n var convertToString = function convertToString(data, valueProperty) {\n if (valueProperty) {\n if (Array.isArray(data)) {\n data.forEach(function (item) {\n return item[valueProperty] = item[valueProperty].toString();\n });\n } else {\n data[valueProperty] = data[valueProperty].toString();\n }\n\n return data;\n }\n\n if (_this18.isBooleanOrNumber(data)) {\n data = data.toString();\n }\n\n if (Array.isArray(data) && data.some(function (item) {\n return _this18.isBooleanOrNumber(item);\n })) {\n data = data.map(function (item) {\n if (_this18.isBooleanOrNumber(item)) {\n item = item.toString();\n }\n });\n }\n\n return data;\n };\n\n value = convertToString(value);\n\n if (['values', 'custom'].includes(this.component.dataSrc) && !this.asyncCustomValues()) {\n var _getFromValues;\n\n var _ref4 = this.component.dataSrc === 'values' ? {\n items: convertToString(this.getNormalizedValues(), 'value'),\n valueProperty: 'value'\n } : {\n items: convertToString(this.getCustomItems(), this.valueProperty),\n valueProperty: this.valueProperty\n },\n items = _ref4.items,\n valueProperty = _ref4.valueProperty;\n\n var getFromValues = function getFromValues() {\n var initialValue = _lodash.default.find(items, [valueProperty, value]);\n\n var values = _this18.defaultSchema.data.values || [];\n return _lodash.default.isEqual(initialValue, values[0]) ? '-' : initialValue;\n };\n\n value = this.component.multiple && Array.isArray(value) ? _lodash.default.filter(items, function (item) {\n return value.includes(item.value);\n }) : valueProperty ? (_getFromValues = getFromValues()) !== null && _getFromValues !== void 0 ? _getFromValues : {\n value: value,\n label: value\n } : value;\n }\n\n if (_lodash.default.isString(value)) {\n return value;\n }\n\n if (Array.isArray(value)) {\n var _items = [];\n value.forEach(function (item) {\n return _items.push(_this18.itemTemplate(item));\n });\n return _items.length > 0 ? _items.join('
') : '-';\n }\n\n return !_lodash.default.isNil(value) ? this.itemTemplate(value) : '-';\n }\n }, {\n key: \"detach\",\n value: function detach() {\n _get(_getPrototypeOf(SelectComponent.prototype), \"detach\", this).call(this);\n\n this.off('blur');\n\n if (this.choices) {\n var _this$choices$contain, _this$choices$contain2;\n\n if ((_this$choices$contain = this.choices.containerOuter) !== null && _this$choices$contain !== void 0 && (_this$choices$contain2 = _this$choices$contain.element) !== null && _this$choices$contain2 !== void 0 && _this$choices$contain2.parentNode) {\n this.choices.destroy();\n }\n\n this.choices = null;\n }\n }\n }, {\n key: \"focus\",\n value: function focus() {\n if (this.focusableElement) {\n _get(_getPrototypeOf(SelectComponent.prototype), \"focus\", this).call(this);\n\n this.focusableElement.focus();\n }\n }\n }, {\n key: \"setErrorClasses\",\n value: function setErrorClasses(elements, dirty, hasError, hasMessages) {\n var element = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : this.element;\n\n _get(_getPrototypeOf(SelectComponent.prototype), \"setErrorClasses\", this).call(this, elements, dirty, hasError, hasMessages, element);\n\n if (this.choices) {\n _get(_getPrototypeOf(SelectComponent.prototype), \"setErrorClasses\", this).call(this, [this.choices.containerInner.element], dirty, hasError, hasMessages, element);\n } else {\n _get(_getPrototypeOf(SelectComponent.prototype), \"setErrorClasses\", this).call(this, [this.refs.selectContainer], dirty, hasError, hasMessages, element);\n }\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len3 = arguments.length, extend = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n extend[_key3] = arguments[_key3];\n }\n\n return _Field2.default.schema.apply(_Field2.default, [{\n type: 'select',\n label: 'Select',\n key: 'select',\n idPath: 'id',\n data: {\n values: [{\n label: '',\n value: ''\n }],\n json: '',\n url: '',\n resource: '',\n custom: ''\n },\n clearOnRefresh: false,\n limit: 100,\n dataSrc: 'values',\n valueProperty: '',\n lazyLoad: true,\n filter: '',\n searchEnabled: true,\n searchDebounce: 0.3,\n searchField: '',\n minSearch: 0,\n readOnlyValue: false,\n authenticate: false,\n ignoreCache: false,\n template: '{{ item.label }}',\n selectFields: '',\n selectThreshold: 0.3,\n uniqueOptions: false,\n tableView: true,\n fuseOptions: {\n include: 'score',\n threshold: 0.3\n },\n validate: {\n onlyAvailableItems: false\n },\n indexeddb: {\n filter: {}\n },\n customOptions: {},\n useExactSearch: false\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Select',\n group: 'basic',\n icon: 'th-list',\n weight: 70,\n documentation: '/userguide/forms/form-components#select',\n schema: SelectComponent.schema()\n };\n }\n }]);\n\n return SelectComponent;\n}(_Field2.default);\n\nexports[\"default\"] = SelectComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/select/Select.js?"); +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.set.js */ \"./node_modules/core-js/modules/es.reflect.set.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.from.js */ \"./node_modules/core-js/modules/es.array.from.js\");\n__webpack_require__(/*! core-js/modules/es.array.slice.js */ \"./node_modules/core-js/modules/es.array.slice.js\");\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptors.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-properties.js */ \"./node_modules/core-js/modules/es.object.define-properties.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.array.find.js */ \"./node_modules/core-js/modules/es.array.find.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-string.js */ \"./node_modules/core-js/modules/es.date.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.array.is-array.js */ \"./node_modules/core-js/modules/es.array.is-array.js\");\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n__webpack_require__(/*! core-js/modules/es.array.reduce-right.js */ \"./node_modules/core-js/modules/es.array.reduce-right.js\");\n__webpack_require__(/*! core-js/modules/es.string.trim.js */ \"./node_modules/core-js/modules/es.string.trim.js\");\n__webpack_require__(/*! core-js/modules/es.array.join.js */ \"./node_modules/core-js/modules/es.array.join.js\");\n__webpack_require__(/*! core-js/modules/es.string.match.js */ \"./node_modules/core-js/modules/es.string.match.js\");\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.array.reduce.js */ \"./node_modules/core-js/modules/es.array.reduce.js\");\n__webpack_require__(/*! core-js/modules/es.parse-int.js */ \"./node_modules/core-js/modules/es.parse-int.js\");\n__webpack_require__(/*! core-js/modules/es.string.ends-with.js */ \"./node_modules/core-js/modules/es.string.ends-with.js\");\n__webpack_require__(/*! core-js/modules/es.array.sort.js */ \"./node_modules/core-js/modules/es.array.sort.js\");\n__webpack_require__(/*! core-js/modules/es.array.includes.js */ \"./node_modules/core-js/modules/es.array.includes.js\");\n__webpack_require__(/*! core-js/modules/es.string.includes.js */ \"./node_modules/core-js/modules/es.string.includes.js\");\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n__webpack_require__(/*! core-js/modules/es.object.assign.js */ \"./node_modules/core-js/modules/es.object.assign.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.number.is-nan.js */ \"./node_modules/core-js/modules/es.number.is-nan.js\");\n__webpack_require__(/*! core-js/modules/es.number.is-finite.js */ \"./node_modules/core-js/modules/es.number.is-finite.js\");\n__webpack_require__(/*! core-js/modules/es.array.find-index.js */ \"./node_modules/core-js/modules/es.array.find-index.js\");\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.some.js */ \"./node_modules/core-js/modules/es.array.some.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nvar _Formio = __webpack_require__(/*! ../../Formio */ \"./lib/Formio.js\");\nvar _ListComponent2 = _interopRequireDefault(__webpack_require__(/*! ../_classes/list/ListComponent */ \"./lib/components/_classes/list/ListComponent.js\"));\nvar _Form = _interopRequireDefault(__webpack_require__(/*! ../../Form */ \"./lib/Form.js\"));\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\nvar _utils = __webpack_require__(/*! ../../utils/utils */ \"./lib/utils/utils.js\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction set(target, property, value, receiver) { if (typeof Reflect !== \"undefined\" && Reflect.set) { set = Reflect.set; } else { set = function set(target, property, value, receiver) { var base = _superPropBase(target, property); var desc; if (base) { desc = Object.getOwnPropertyDescriptor(base, property); if (desc.set) { desc.set.call(receiver, value); return true; } else if (!desc.writable) { return false; } } desc = Object.getOwnPropertyDescriptor(receiver, property); if (desc) { if (!desc.writable) { return false; } desc.value = value; Object.defineProperty(receiver, property, desc); } else { _defineProperty(receiver, property, value); } return true; }; } return set(target, property, value, receiver); }\nfunction _set(target, property, value, receiver, isStrict) { var s = set(target, property, value, receiver || target); if (!s && isStrict) { throw new Error('failed to set property'); } return value; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar Choices;\nif (typeof window !== 'undefined') {\n Choices = (__webpack_require__(/*! ../../utils/ChoicesWrapper */ \"./lib/utils/ChoicesWrapper.js\")[\"default\"]);\n}\nvar SelectComponent = /*#__PURE__*/function (_ListComponent) {\n _inherits(SelectComponent, _ListComponent);\n var _super = _createSuper(SelectComponent);\n function SelectComponent() {\n _classCallCheck(this, SelectComponent);\n return _super.apply(this, arguments);\n }\n _createClass(SelectComponent, [{\n key: \"init\",\n value: function init() {\n var _this = this;\n _get(_getPrototypeOf(SelectComponent.prototype), \"init\", this).call(this);\n this.templateData = {};\n this.validators = this.validators.concat(['select', 'onlyAvailableItems']);\n\n // Trigger an update.\n var updateArgs = [];\n var triggerUpdate = _lodash[\"default\"].debounce(function () {\n updateArgs = [];\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n return _this.updateItems.apply(_this, args);\n }, 100);\n this.triggerUpdate = function () {\n // Make sure we always resolve the previous promise before reassign it\n if (typeof _this.itemsLoadedResolve === 'function') {\n _this.itemsLoadedResolve();\n }\n _this.itemsLoaded = new _nativePromiseOnly[\"default\"](function (resolve) {\n _this.itemsLoadedResolve = resolve;\n });\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n if (args.length) {\n updateArgs = args;\n }\n return triggerUpdate.apply(void 0, _toConsumableArray(updateArgs));\n };\n\n // Keep track of the select options.\n this.selectOptions = [];\n if (this.itemsFromUrl) {\n this.isFromSearch = false;\n this.searchServerCount = null;\n this.defaultServerCount = null;\n this.isScrollLoading = false;\n this.searchDownloadedResources = [];\n this.defaultDownloadedResources = [];\n }\n\n // If this component has been activated.\n this.activated = false;\n this.itemsLoaded = new _nativePromiseOnly[\"default\"](function (resolve) {\n _this.itemsLoadedResolve = resolve;\n });\n if (this.isHtmlRenderMode()) {\n this.activate();\n }\n\n // Get the template keys for this select component.\n this.getTemplateKeys();\n }\n }, {\n key: \"dataReady\",\n get: function get() {\n // If the root submission has been set, and we are still not attached, then assume\n // that our data is ready.\n if (this.root && this.root.submissionSet && !this.attached) {\n return _nativePromiseOnly[\"default\"].resolve();\n }\n return this.itemsLoaded;\n }\n }, {\n key: \"defaultSchema\",\n get: function get() {\n return SelectComponent.schema();\n }\n }, {\n key: \"emptyValue\",\n get: function get() {\n if (this.component.multiple) {\n return [];\n }\n // if select has JSON data source type, we are defining if empty value would be an object or a string by checking JSON's first item\n if (this.component.dataSrc === 'json' && this.component.data.json) {\n var firstItem = this.component.data.json[0];\n var firstValue;\n if (this.valueProperty) {\n firstValue = _lodash[\"default\"].get(firstItem, this.valueProperty);\n } else {\n firstValue = firstItem;\n }\n if (firstValue && typeof firstValue === 'string') {\n return '';\n } else {\n return {};\n }\n }\n if (this.valueProperty) {\n return '';\n }\n return {};\n }\n }, {\n key: \"valueProperty\",\n get: function get() {\n if (this.component.valueProperty) {\n return this.component.valueProperty;\n }\n // Force values datasource to use values without actually setting it on the component settings.\n if (this.component.dataSrc === 'values') {\n return 'value';\n }\n return '';\n }\n }, {\n key: \"inputInfo\",\n get: function get() {\n var info = _get(_getPrototypeOf(SelectComponent.prototype), \"elementInfo\", this).call(this);\n info.type = 'select';\n info.changeEvent = 'change';\n return info;\n }\n }, {\n key: \"isSelectResource\",\n get: function get() {\n return this.component.dataSrc === 'resource';\n }\n }, {\n key: \"itemsFromUrl\",\n get: function get() {\n return this.isSelectResource || this.isSelectURL;\n }\n }, {\n key: \"isInfiniteScrollProvided\",\n get: function get() {\n return this.itemsFromUrl;\n }\n }, {\n key: \"shouldDisabled\",\n get: function get() {\n return _get(_getPrototypeOf(SelectComponent.prototype), \"shouldDisabled\", this) || this.parentDisabled;\n }\n }, {\n key: \"isEntireObjectDisplay\",\n value: function isEntireObjectDisplay() {\n return this.component.dataSrc === 'resource' && this.valueProperty === 'data';\n }\n }, {\n key: \"selectValueAndLabel\",\n value: function selectValueAndLabel(data) {\n var value = this.getOptionValue(this.isEntireObjectDisplay() && !this.itemValue(data) ? data : this.itemValue(data));\n return {\n value: value,\n label: this.itemTemplate(this.isEntireObjectDisplay() && !_lodash[\"default\"].isObject(data.data) ? {\n data: data\n } : data, value)\n };\n }\n }, {\n key: \"itemTemplate\",\n value: function itemTemplate(data, value) {\n var _this2 = this;\n if (!_lodash[\"default\"].isNumber(data) && _lodash[\"default\"].isEmpty(data)) {\n return '';\n }\n\n // If they wish to show the value in read only mode, then just return the itemValue here.\n if (this.options.readOnly && this.component.readOnlyValue) {\n return this.itemValue(data);\n }\n // Perform a fast interpretation if we should not use the template.\n if (data && !this.component.template) {\n var itemLabel = data.label || data;\n var _value = typeof itemLabel === 'string' ? this.t(itemLabel, {\n _userInput: true\n }) : itemLabel;\n return this.sanitize(_value, this.shouldSanitizeValue);\n }\n if (this.component.multiple ? this.dataValue.find(function (val) {\n return value === val;\n }) : this.dataValue === value) {\n var selectData = this.selectData;\n if (selectData) {\n var templateValue = this.component.reference && value !== null && value !== void 0 && value._id ? value._id.toString() : value;\n if (!this.templateData || !this.templateData[templateValue]) {\n this.getOptionTemplate(data, value);\n }\n if (this.component.multiple) {\n if (selectData[templateValue]) {\n data = selectData[templateValue];\n }\n } else {\n data = selectData;\n }\n }\n }\n if (typeof data === 'string' || typeof data === 'number') {\n return this.sanitize(this.t(data, {\n _userInput: true\n }), this.shouldSanitizeValue);\n }\n if (Array.isArray(data)) {\n return data.map(function (val) {\n if (typeof val === 'string' || typeof val === 'number') {\n return _this2.sanitize(_this2.t(val, {\n _userInput: true\n }), _this2.shouldSanitizeValue);\n }\n return val;\n });\n }\n if (data.data) {\n // checking additional fields in the template for the selected Entire Object option\n var hasNestedFields = /item\\.data\\.\\w*/g.test(this.component.template);\n data.data = this.isEntireObjectDisplay() && _lodash[\"default\"].isObject(data.data) && !hasNestedFields ? JSON.stringify(data.data) : data.data;\n }\n return _get(_getPrototypeOf(SelectComponent.prototype), \"itemTemplate\", this).call(this, data, value);\n }\n\n /**\n * Adds an option to the select dropdown.\n *\n * @param value\n * @param label\n */\n }, {\n key: \"addOption\",\n value: function addOption(value, label) {\n var attrs = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var id = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : (0, _utils.getRandomComponentId)();\n if (_lodash[\"default\"].isNil(label)) return;\n var idPath = this.component.idPath ? this.component.idPath.split('.').reduceRight(function (obj, key) {\n return _defineProperty({}, key, obj);\n }, id) : {};\n var option = _objectSpread({\n value: this.getOptionValue(value),\n label: label\n }, idPath);\n var skipOption = this.component.uniqueOptions ? !!this.selectOptions.find(function (selectOption) {\n return _lodash[\"default\"].isEqual(selectOption.value, option.value);\n }) : false;\n if (skipOption) {\n return;\n }\n if (value) {\n this.selectOptions.push(option);\n }\n if (this.refs.selectContainer && this.component.widget === 'html5') {\n // Replace an empty Object value to an empty String.\n if (option.value && _lodash[\"default\"].isObject(option.value) && _lodash[\"default\"].isEmpty(option.value)) {\n option.value = '';\n }\n // Add element to option so we can reference it later.\n var div = document.createElement('div');\n div.innerHTML = this.sanitize(this.renderTemplate('selectOption', {\n selected: _lodash[\"default\"].isEqual(this.getOptionValue(this.dataValue), option.value),\n option: option,\n attrs: attrs,\n id: id,\n useId: (this.valueProperty === '' || this.isEntireObjectDisplay()) && _lodash[\"default\"].isObject(value) && id\n }), this.shouldSanitizeValue).trim();\n option.element = div.firstChild;\n this.refs.selectContainer.appendChild(option.element);\n }\n }\n }, {\n key: \"addValueOptions\",\n value: function addValueOptions(items) {\n var _this3 = this;\n items = items || [];\n var added = false;\n var data = this.dataValue;\n\n // preset submission value with value property before request.\n if (this.options.pdf && !items.length && this.component.dataSrc === 'url' && this.valueProperty) {\n data = Array.isArray(data) ? data.map(function (item) {\n return _lodash[\"default\"].set({}, _this3.valueProperty, item);\n }) : _lodash[\"default\"].set({}, this.valueProperty, data);\n }\n if (!this.selectOptions.length) {\n // Add the currently selected choices if they don't already exist.\n var currentChoices = Array.isArray(data) && this.component.multiple ? data : [data];\n added = this.addCurrentChoices(currentChoices, items);\n if (!added && !this.component.multiple) {\n this.addPlaceholder();\n }\n }\n return added;\n }\n }, {\n key: \"disableInfiniteScroll\",\n value: function disableInfiniteScroll() {\n if (!this.downloadedResources) {\n return;\n }\n this.downloadedResources.serverCount = this.downloadedResources.length;\n this.serverCount = this.downloadedResources.length;\n }\n\n /* eslint-disable max-statements */\n }, {\n key: \"setItems\",\n value: function setItems(items, fromSearch) {\n var _this4 = this,\n _this$choices,\n _this$choices$input;\n // If the items is a string, then parse as JSON.\n if (typeof items == 'string') {\n try {\n items = JSON.parse(items);\n } catch (err) {\n console.warn(err.message);\n items = [];\n }\n }\n\n // Allow js processing (needed for form builder)\n if (this.component.onSetItems && typeof this.component.onSetItems === 'function') {\n var newItems = this.component.onSetItems(this, items);\n if (newItems) {\n items = newItems;\n }\n }\n if (!this.choices && this.refs.selectContainer) {\n this.empty(this.refs.selectContainer);\n }\n\n // If they provided select values, then we need to get them instead.\n if (this.component.selectValues) {\n items = _lodash[\"default\"].get(items, this.component.selectValues, items) || [];\n }\n var areItemsEqual;\n if (this.itemsFromUrl) {\n areItemsEqual = this.isSelectURL ? _lodash[\"default\"].isEqual(items, this.downloadedResources) : false;\n var areItemsEnded = this.component.limit > items.length;\n var areItemsDownloaded = areItemsEqual && this.downloadedResources && this.downloadedResources.length === items.length;\n if (areItemsEnded) {\n this.disableInfiniteScroll();\n } else if (areItemsDownloaded) {\n this.selectOptions = [];\n } else {\n this.serverCount = items.serverCount;\n }\n }\n if (this.isScrollLoading && items) {\n if (!areItemsEqual) {\n this.downloadedResources = this.downloadedResources ? this.downloadedResources.concat(items) : items;\n }\n this.downloadedResources.serverCount = items.serverCount || this.downloadedResources.serverCount;\n } else {\n this.downloadedResources = items || [];\n this.selectOptions = [];\n // If there is new select option with same id as already selected, set the new one\n if (!_lodash[\"default\"].isEmpty(this.dataValue) && this.component.idPath) {\n var selectedOptionId = _lodash[\"default\"].get(this.dataValue, this.component.idPath, null);\n var newOptionWithSameId = !_lodash[\"default\"].isNil(selectedOptionId) && items.find(function (item) {\n var itemId = _lodash[\"default\"].get(item, _this4.component.idPath);\n return itemId === selectedOptionId;\n });\n if (newOptionWithSameId) {\n this.setValue(newOptionWithSameId);\n }\n }\n }\n\n // Add the value options.\n if (!fromSearch) {\n this.addValueOptions(items);\n }\n if (this.component.widget === 'html5' && !this.component.placeholder) {\n this.addOption(null, '');\n }\n\n // Iterate through each of the items.\n _lodash[\"default\"].each(items, function (item, index) {\n // preventing references of the components inside the form to the parent form when building forms\n if (_this4.root && _this4.root.options.editForm && _this4.root.options.editForm._id && _this4.root.options.editForm._id === item._id) return;\n var itemValueAndLabel = _this4.selectValueAndLabel(item);\n _this4.addOption(itemValueAndLabel.value, itemValueAndLabel.label, {}, _lodash[\"default\"].get(item, _this4.component.idPath, String(index)));\n });\n if (this.choices) {\n this.choices.setChoices(this.selectOptions, 'value', 'label', true);\n } else if (this.loading) {\n // Re-attach select input.\n // this.appendTo(this.refs.input[0], this.selectContainer);\n }\n\n // We are no longer loading.\n this.isScrollLoading = false;\n this.loading = false;\n var searching = fromSearch && ((_this$choices = this.choices) === null || _this$choices === void 0 ? void 0 : (_this$choices$input = _this$choices.input) === null || _this$choices$input === void 0 ? void 0 : _this$choices$input.isFocussed);\n if (!searching) {\n // If a value is provided, then select it.\n if (!this.isEmpty()) {\n this.setValue(this.dataValue, {\n noUpdateEvent: true\n });\n } else if (this.shouldAddDefaultValue && !this.options.readOnly) {\n // If a default value is provided then select it.\n var defaultValue = this.defaultValue;\n if (!this.isEmpty(defaultValue)) {\n this.setValue(defaultValue);\n }\n }\n }\n\n // Say we are done loading the items.\n this.itemsLoadedResolve();\n }\n }, {\n key: \"getSingleItemValueForHTMLMode\",\n value: function getSingleItemValueForHTMLMode(data) {\n var _this$selectOptions;\n var option = (_this$selectOptions = this.selectOptions) === null || _this$selectOptions === void 0 ? void 0 : _this$selectOptions.find(function (_ref2) {\n var value = _ref2.value;\n return _lodash[\"default\"].isEqual(value, data);\n });\n if (option) {\n return option.label || data;\n }\n return data;\n }\n }, {\n key: \"itemValueForHTMLMode\",\n value: function itemValueForHTMLMode(value) {\n var _this5 = this;\n if (!this.isHtmlRenderMode()) {\n return _get(_getPrototypeOf(SelectComponent.prototype), \"itemValueForHTMLMode\", this).call(this, value);\n }\n if (Array.isArray(value)) {\n var values = value.map(function (item) {\n return Array.isArray(item) ? _this5.itemValueForHTMLMode(item) : _this5.getSingleItemValueForHTMLMode(item);\n });\n return values.join(', ');\n }\n return this.getSingleItemValueForHTMLMode(value);\n }\n\n /* eslint-enable max-statements */\n }, {\n key: \"defaultValue\",\n get: function get() {\n var defaultValue = _get(_getPrototypeOf(SelectComponent.prototype), \"defaultValue\", this);\n if (!defaultValue && (this.component.defaultValue === false || this.component.defaultValue === 0)) {\n defaultValue = this.component.defaultValue;\n }\n return defaultValue;\n }\n }, {\n key: \"getTemplateKeys\",\n value: function getTemplateKeys() {\n var _this6 = this;\n this.templateKeys = [];\n if (this.options.readOnly && this.component.template) {\n var keys = this.component.template.match(/({{\\s*(.*?)\\s*}})/g);\n if (keys) {\n keys.forEach(function (key) {\n var propKey = key.match(/{{\\s*item\\.(.*?)\\s*}}/);\n if (propKey && propKey.length > 1) {\n _this6.templateKeys.push(propKey[1]);\n }\n });\n }\n }\n }\n }, {\n key: \"loadingError\",\n get: function get() {\n return !this.component.refreshOn && !this.component.refreshOnBlur && this.networkError;\n }\n }, {\n key: \"selectData\",\n get: function get() {\n var selectData = _lodash[\"default\"].get(this.root, 'submission.metadata.selectData', {});\n return _lodash[\"default\"].get(selectData, this.path);\n }\n }, {\n key: \"shouldLoad\",\n get: function get() {\n if (this.loadingError) {\n return false;\n }\n // Live forms should always load.\n if (!this.options.readOnly) {\n return true;\n }\n\n // If there are template keys, then we need to see if we have the data.\n if (this.templateKeys && this.templateKeys.length) {\n // See if we already have the data we need.\n var dataValue = this.dataValue;\n var selectData = this.selectData;\n return this.templateKeys.reduce(function (shouldLoad, key) {\n var hasValue = _lodash[\"default\"].has(dataValue, key) || _lodash[\"default\"].has(selectData, key);\n return shouldLoad || !hasValue;\n }, false);\n }\n\n // Return that we should load.\n return true;\n }\n }, {\n key: \"loadItems\",\n value: function loadItems(url, search, headers, options, method, body) {\n var _this7 = this;\n options = options || {};\n\n // See if we should load items or not.\n if (!this.shouldLoad || !this.itemsFromUrl && this.options.readOnly) {\n this.isScrollLoading = false;\n this.loading = false;\n this.itemsLoadedResolve();\n return;\n }\n\n // See if they have not met the minimum search requirements.\n var minSearch = parseInt(this.component.minSearch, 10);\n if (this.component.searchField && minSearch > 0 && (!search || search.length < minSearch)) {\n // Set empty items.\n return this.setItems([]);\n }\n\n // Ensure we have a method and remove any body if method is get\n method = method || 'GET';\n if (method.toUpperCase() === 'GET') {\n body = null;\n }\n var limit = this.component.limit || 100;\n var skip = this.isScrollLoading ? this.selectOptions.length : 0;\n var query = this.component.disableLimit ? {} : {\n limit: limit,\n skip: skip\n };\n\n // Allow for url interpolation.\n url = this.interpolate(url, {\n formioBase: _Formio.GlobalFormio.getBaseUrl(),\n search: search,\n limit: limit,\n skip: skip,\n page: Math.abs(Math.floor(skip / limit))\n });\n\n // Add search capability.\n if (this.component.searchField && search) {\n var searchValue = Array.isArray(search) ? search.join(',') : search;\n query[this.component.searchField] = this.component.searchField.endsWith('__regex') ? _lodash[\"default\"].escapeRegExp(searchValue) : searchValue;\n }\n\n // If they wish to return only some fields.\n if (this.component.selectFields) {\n query.select = this.component.selectFields;\n }\n\n // Add sort capability\n if (this.component.sort) {\n query.sort = this.component.sort;\n }\n if (!_lodash[\"default\"].isEmpty(query)) {\n // Add the query string.\n url += (!url.includes('?') ? '?' : '&') + _Formio.GlobalFormio.serialize(query, function (item) {\n return _this7.interpolate(item);\n });\n }\n\n // Add filter capability\n if (this.component.filter) {\n url += (!url.includes('?') ? '?' : '&') + this.interpolate(this.component.filter);\n }\n\n // Set ignoreCache if it is\n options.ignoreCache = this.component.ignoreCache;\n\n // Make the request.\n options.header = headers;\n this.loading = true;\n _Formio.GlobalFormio.makeRequest(this.options.formio, 'select', url, method, body, options).then(function (response) {\n _this7.loading = false;\n _this7.error = null;\n _this7.setItems(response, !!search);\n })[\"catch\"](function (err) {\n if (_this7.itemsFromUrl) {\n _this7.setItems([]);\n _this7.disableInfiniteScroll();\n }\n _this7.isScrollLoading = false;\n _this7.handleLoadingError(err);\n });\n }\n }, {\n key: \"handleLoadingError\",\n value: function handleLoadingError(err) {\n this.loading = false;\n if (err.networkError) {\n this.networkError = true;\n }\n this.itemsLoadedResolve();\n this.emit('componentError', {\n component: this.component,\n message: err.toString()\n });\n console.warn(\"Unable to load resources for \".concat(this.key));\n }\n /**\n * Get the request headers for this select dropdown.\n */\n }, {\n key: \"requestHeaders\",\n get: function get() {\n var _this8 = this;\n // Create the headers object.\n var headers = new _Formio.GlobalFormio.Headers();\n\n // Add custom headers to the url.\n if (this.component.data && this.component.data.headers) {\n try {\n _lodash[\"default\"].each(this.component.data.headers, function (header) {\n if (header.key) {\n headers.set(header.key, _this8.interpolate(header.value));\n }\n });\n } catch (err) {\n console.warn(err.message);\n }\n }\n return headers;\n }\n }, {\n key: \"getCustomItems\",\n value: function getCustomItems() {\n var customItems = this.evaluate(this.component.data.custom, {\n values: []\n }, 'values');\n this.asyncValues = (0, _utils.isPromise)(customItems);\n return customItems;\n }\n }, {\n key: \"asyncCustomValues\",\n value: function asyncCustomValues() {\n if (!_lodash[\"default\"].isBoolean(this.asyncValues)) {\n this.getCustomItems();\n }\n return this.asyncValues;\n }\n }, {\n key: \"updateCustomItems\",\n value: function updateCustomItems(forceUpdate) {\n var _this9 = this;\n if (this.asyncCustomValues()) {\n if (!forceUpdate && !this.active) {\n this.itemsLoadedResolve();\n return;\n }\n this.loading = true;\n this.getCustomItems().then(function (items) {\n _this9.loading = false;\n _this9.setItems(items || []);\n })[\"catch\"](function (err) {\n _this9.handleLoadingError(err);\n });\n } else {\n this.setItems(this.getCustomItems() || []);\n }\n }\n }, {\n key: \"isEmpty\",\n value: function isEmpty() {\n var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.dataValue;\n return _get(_getPrototypeOf(SelectComponent.prototype), \"isEmpty\", this).call(this, value) || value === undefined;\n }\n }, {\n key: \"refresh\",\n value: function refresh(value, _ref3) {\n var instance = _ref3.instance;\n if (this.component.clearOnRefresh && instance && !instance.pristine) {\n this.setValue(this.emptyValue);\n }\n this.updateItems(null, true);\n }\n }, {\n key: \"additionalResourcesAvailable\",\n get: function get() {\n return _lodash[\"default\"].isNil(this.serverCount) || this.serverCount > this.downloadedResources.length;\n }\n }, {\n key: \"serverCount\",\n get: function get() {\n if (this.isFromSearch) {\n return this.searchServerCount;\n }\n return this.defaultServerCount;\n },\n set: function set(value) {\n if (this.isFromSearch) {\n this.searchServerCount = value;\n } else {\n this.defaultServerCount = value;\n }\n }\n }, {\n key: \"downloadedResources\",\n get: function get() {\n if (this.isFromSearch) {\n return this.searchDownloadedResources;\n }\n return this.defaultDownloadedResources;\n },\n set: function set(value) {\n if (this.isFromSearch) {\n this.searchDownloadedResources = value;\n } else {\n this.defaultDownloadedResources = value;\n }\n }\n }, {\n key: \"addPlaceholder\",\n value: function addPlaceholder() {\n if (!this.component.placeholder) {\n return;\n }\n this.addOption('', this.component.placeholder, {\n placeholder: true\n });\n }\n\n /**\n * Activate this select control.\n */\n }, {\n key: \"activate\",\n value: function activate() {\n if (this.loading || !this.active) {\n this.setLoadingItem();\n }\n if (this.active) {\n return;\n }\n this.activated = true;\n this.triggerUpdate();\n }\n }, {\n key: \"setLoadingItem\",\n value: function setLoadingItem() {\n var addToCurrentList = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n if (this.choices) {\n if (addToCurrentList) {\n this.choices.setChoices([{\n value: \"\".concat(this.id, \"-loading\"),\n label: 'Loading...',\n disabled: true\n }], 'value', 'label');\n } else {\n this.choices.setChoices([{\n value: '',\n label: \"\"),\n disabled: true\n }], 'value', 'label', true);\n }\n } else if (this.component.dataSrc === 'url' || this.component.dataSrc === 'resource') {\n this.addOption('', this.t('loading...'));\n }\n }\n }, {\n key: \"active\",\n get: function get() {\n return !this.component.lazyLoad || this.activated;\n }\n }, {\n key: \"render\",\n value: function render() {\n var info = this.inputInfo;\n info.attr = info.attr || {};\n info.multiple = this.component.multiple;\n return _get(_getPrototypeOf(SelectComponent.prototype), \"render\", this).call(this, this.wrapElement(this.renderTemplate('select', {\n input: info,\n selectOptions: '',\n index: null\n })));\n }\n }, {\n key: \"wrapElement\",\n value: function wrapElement(element) {\n return this.component.addResource && !this.options.readOnly ? this.renderTemplate('resourceAdd', {\n element: element\n }) : element;\n }\n }, {\n key: \"choicesOptions\",\n value: function choicesOptions() {\n var useSearch = this.component.hasOwnProperty('searchEnabled') ? this.component.searchEnabled : true;\n var placeholderValue = this.t(this.component.placeholder, {\n _userInput: true\n });\n var customOptions = this.component.customOptions || {};\n if (typeof customOptions == 'string') {\n try {\n customOptions = JSON.parse(customOptions);\n } catch (err) {\n console.warn(err.message);\n customOptions = {};\n }\n }\n var commonFuseOptions = {\n maxPatternLength: 1000,\n distance: 1000\n };\n return _objectSpread({\n removeItemButton: this.component.disabled ? false : _lodash[\"default\"].get(this.component, 'removeItemButton', true),\n itemSelectText: '',\n classNames: {\n containerOuter: 'choices form-group formio-choices',\n containerInner: this.transform('class', 'form-control ui fluid selection dropdown')\n },\n addItemText: false,\n allowHTML: true,\n placeholder: !!this.component.placeholder,\n placeholderValue: placeholderValue,\n noResultsText: this.t('No results found'),\n noChoicesText: this.t('No choices to choose from'),\n searchPlaceholderValue: this.t('Type to search'),\n shouldSort: false,\n position: this.component.dropdown || 'auto',\n searchEnabled: useSearch,\n searchChoices: !this.component.searchField,\n searchFields: _lodash[\"default\"].get(this, 'component.searchFields', ['label']),\n shadowRoot: this.root ? this.root.shadowRoot : null,\n fuseOptions: this.component.useExactSearch ? _objectSpread({\n tokenize: true,\n matchAllTokens: true\n }, commonFuseOptions) : Object.assign({}, _lodash[\"default\"].get(this, 'component.fuseOptions', {}), _objectSpread({\n include: 'score',\n threshold: _lodash[\"default\"].get(this, 'component.selectThreshold', 0.3)\n }, commonFuseOptions)),\n valueComparer: _lodash[\"default\"].isEqual,\n resetScrollPosition: false\n }, customOptions);\n }\n\n /* eslint-disable max-statements */\n }, {\n key: \"attach\",\n value: function attach(element) {\n var _this10 = this,\n _this$choices2,\n _this$choices2$contai,\n _this$choices2$contai2;\n var superAttach = _get(_getPrototypeOf(SelectComponent.prototype), \"attach\", this).call(this, element);\n this.loadRefs(element, {\n selectContainer: 'single',\n addResource: 'single',\n autocompleteInput: 'single'\n });\n //enable autocomplete for select\n var autocompleteInput = this.refs.autocompleteInput;\n if (autocompleteInput) {\n this.addEventListener(autocompleteInput, 'change', function (event) {\n _this10.setValue(event.target.value);\n });\n }\n var input = this.refs.selectContainer;\n if (!input) {\n return;\n }\n this.addEventListener(input, this.inputInfo.changeEvent, function () {\n return _this10.updateValue(null, {\n modified: true\n });\n });\n this.attachRefreshOnBlur();\n if (this.component.widget === 'html5') {\n this.addFocusBlurEvents(input);\n this.triggerUpdate(null, true);\n if (this.visible) {\n this.setItems(this.selectOptions || []);\n }\n this.focusableElement = input;\n this.addEventListener(input, 'focus', function () {\n return _this10.update();\n });\n this.addEventListener(input, 'keydown', function (event) {\n var key = event.key;\n if (['Backspace', 'Delete'].includes(key)) {\n _this10.setValue(_this10.emptyValue);\n }\n });\n return;\n }\n var tabIndex = input.tabIndex;\n this.addPlaceholder();\n input.setAttribute('dir', this.i18next.dir());\n if ((_this$choices2 = this.choices) !== null && _this$choices2 !== void 0 && (_this$choices2$contai = _this$choices2.containerOuter) !== null && _this$choices2$contai !== void 0 && (_this$choices2$contai2 = _this$choices2$contai.element) !== null && _this$choices2$contai2 !== void 0 && _this$choices2$contai2.parentNode) {\n this.choices.destroy();\n }\n var choicesOptions = this.choicesOptions();\n if (Choices) {\n this.choices = new Choices(input, choicesOptions);\n if (this.selectOptions && this.selectOptions.length) {\n this.choices.setChoices(this.selectOptions, 'value', 'label', true);\n }\n if (this.component.multiple) {\n this.focusableElement = this.choices.input.element;\n } else {\n this.focusableElement = this.choices.containerInner.element;\n this.choices.containerOuter.element.setAttribute('tabIndex', '-1');\n this.addEventListener(this.choices.containerOuter.element, 'focus', function () {\n return _this10.focusableElement.focus();\n });\n }\n this.addFocusBlurEvents(this.focusableElement);\n if (this.itemsFromUrl && !this.component.noRefreshOnScroll) {\n this.scrollList = this.choices.choiceList.element;\n this.addEventListener(this.scrollList, 'scroll', function () {\n return _this10.onScroll();\n });\n }\n }\n this.focusableElement.setAttribute('tabIndex', tabIndex);\n\n // If a search field is provided, then add an event listener to update items on search.\n if (this.component.searchField) {\n // Make sure to clear the search when no value is provided.\n if (this.choices && this.choices.input && this.choices.input.element) {\n this.addEventListener(this.choices.input.element, 'input', function (event) {\n _this10.isFromSearch = !!event.target.value;\n if (!event.target.value) {\n _this10.triggerUpdate();\n } else {\n _this10.serverCount = null;\n _this10.downloadedResources = [];\n }\n });\n }\n this.addEventListener(input, 'choice', function () {\n if (_this10.component.multiple && _this10.component.dataSrc === 'resource' && _this10.isFromSearch) {\n _this10.triggerUpdate();\n }\n _this10.isFromSearch = false;\n });\n // avoid spamming the resource/url endpoint when we have server side filtering enabled.\n var debounceTimeout = this.component.searchField && (this.isSelectResource || this.isSelectURL) ? (this.component.searchDebounce === 0 ? 0 : this.component.searchDebounce || this.defaultSchema.searchDebounce) * 1000 : 0;\n var updateComponent = function updateComponent(evt) {\n _this10.triggerUpdate(evt.detail.value);\n };\n this.addEventListener(input, 'search', _lodash[\"default\"].debounce(updateComponent, debounceTimeout));\n this.addEventListener(input, 'stopSearch', function () {\n return _this10.triggerUpdate();\n });\n this.addEventListener(input, 'hideDropdown', function () {\n if (_this10.choices && _this10.choices.input && _this10.choices.input.element) {\n _this10.choices.input.element.value = '';\n }\n _this10.updateItems(null, true);\n });\n }\n this.addEventListener(input, 'showDropdown', function () {\n return _this10.update();\n });\n if (this.choices && choicesOptions.placeholderValue && this.choices._isSelectOneElement) {\n this.addPlaceholderItem(choicesOptions.placeholderValue);\n this.addEventListener(input, 'removeItem', function () {\n _this10.addPlaceholderItem(choicesOptions.placeholderValue);\n });\n }\n\n // Add value options.\n this.addValueOptions();\n this.setChoicesValue(this.dataValue);\n if (this.isSelectResource && this.refs.addResource) {\n this.addEventListener(this.refs.addResource, 'click', function (event) {\n event.preventDefault();\n var formioForm = _this10.ce('div');\n var dialog = _this10.createModal(formioForm);\n var projectUrl = _lodash[\"default\"].get(_this10.root, 'formio.projectUrl', _Formio.GlobalFormio.getProjectUrl());\n var formUrl = \"\".concat(projectUrl, \"/form/\").concat(_this10.component.data.resource);\n new _Form[\"default\"](formioForm, formUrl, {}).ready.then(function (form) {\n form.on('submit', function (submission) {\n // If valueProperty is set, replace the submission with the corresponding value\n var value = _this10.valueProperty ? _lodash[\"default\"].get(submission, _this10.valueProperty) : submission;\n if (_this10.component.multiple) {\n value = [].concat(_toConsumableArray(_this10.dataValue), [value]);\n }\n _this10.setValue(value);\n _this10.triggerUpdate();\n dialog.close();\n });\n });\n });\n }\n\n // Force the disabled state with getters and setters.\n this.disabled = this.shouldDisabled;\n this.triggerUpdate();\n return superAttach;\n }\n }, {\n key: \"isLoadingAvailable\",\n get: function get() {\n return !this.isScrollLoading && this.additionalResourcesAvailable;\n }\n }, {\n key: \"onScroll\",\n value: function onScroll() {\n if (this.isLoadingAvailable) {\n this.isScrollLoading = true;\n this.setLoadingItem(true);\n this.triggerUpdate(this.choices.input.element.value);\n }\n }\n }, {\n key: \"attachRefreshOnBlur\",\n value: function attachRefreshOnBlur() {\n var _this11 = this;\n if (this.component.refreshOnBlur) {\n this.on('blur', function (instance) {\n _this11.checkRefreshOn([{\n instance: instance,\n value: instance.dataValue\n }], {\n fromBlur: true\n });\n });\n }\n }\n }, {\n key: \"addPlaceholderItem\",\n value: function addPlaceholderItem(placeholderValue) {\n var items = this.choices._store.activeItems;\n if (!items.length) {\n this.choices._addItem({\n value: placeholderValue,\n label: placeholderValue,\n choiceId: 0,\n groupId: -1,\n customProperties: null,\n placeholder: true,\n keyCode: null\n });\n }\n }\n\n /* eslint-enable max-statements */\n }, {\n key: \"update\",\n value: function update() {\n if (this.component.dataSrc === 'custom') {\n this.updateCustomItems();\n }\n // Activate the control.\n this.activate();\n }\n }, {\n key: \"disabled\",\n get: function get() {\n return _get(_getPrototypeOf(SelectComponent.prototype), \"disabled\", this);\n },\n set: function set(disabled) {\n _set(_getPrototypeOf(SelectComponent.prototype), \"disabled\", disabled, this, true);\n if (!this.choices) {\n return;\n }\n if (disabled) {\n this.setDisabled(this.choices.containerInner.element, true);\n this.focusableElement.removeAttribute('tabIndex');\n this.choices.disable();\n } else {\n this.setDisabled(this.choices.containerInner.element, false);\n this.focusableElement.setAttribute('tabIndex', this.component.tabindex || 0);\n this.choices.enable();\n }\n }\n }, {\n key: \"visible\",\n get: function get() {\n return _get(_getPrototypeOf(SelectComponent.prototype), \"visible\", this);\n }\n\n /**\n * @param {*} value\n * @param {Array} items\n */,\n set: function set(value) {\n // If we go from hidden to visible, trigger a refresh.\n if (value && !this._visible !== !value) {\n this.triggerUpdate();\n }\n _set(_getPrototypeOf(SelectComponent.prototype), \"visible\", value, this, true);\n }\n }, {\n key: \"addCurrentChoices\",\n value: function addCurrentChoices(values, items, keyValue) {\n var _this12 = this;\n if (!values) {\n return false;\n }\n var notFoundValuesToAdd = [];\n var added = values.reduce(function (defaultAdded, value) {\n if (!value || _lodash[\"default\"].isEmpty(value)) {\n return defaultAdded;\n }\n var found = false;\n\n // Make sure that `items` and `this.selectOptions` points\n // to the same reference. Because `this.selectOptions` is\n // internal property and all items are populated by\n // `this.addOption` method, we assume that items has\n // 'label' and 'value' properties. This assumption allows\n // us to read correct value from the item.\n var isSelectOptions = items === _this12.selectOptions;\n if (items && items.length) {\n _lodash[\"default\"].each(items, function (choice) {\n if (choice._id && value._id && choice._id === value._id) {\n found = true;\n return false;\n }\n var itemValue = keyValue ? choice.value : _this12.itemValue(choice, isSelectOptions);\n found |= _lodash[\"default\"].isEqual(itemValue, value);\n return found ? false : true;\n });\n }\n\n // Add the default option if no item is found.\n if (!found) {\n notFoundValuesToAdd.push(_this12.selectValueAndLabel(value));\n return true;\n }\n return found || defaultAdded;\n }, false);\n if (notFoundValuesToAdd.length) {\n if (this.choices) {\n this.choices.setChoices(notFoundValuesToAdd, 'value', 'label');\n }\n notFoundValuesToAdd.map(function (notFoundValue) {\n _this12.addOption(notFoundValue.value, notFoundValue.label);\n });\n }\n return added;\n }\n }, {\n key: \"getValueAsString\",\n value: function getValueAsString(data) {\n return this.component.multiple && Array.isArray(data) ? data.map(this.asString.bind(this)).join(', ') : this.asString(data);\n }\n }, {\n key: \"getValue\",\n value: function getValue() {\n // If the widget isn't active.\n if (this.viewOnly || this.loading || !this.component.lazyLoad && !this.selectOptions.length || !this.element) {\n return this.dataValue;\n }\n var value = this.emptyValue;\n if (this.choices) {\n value = this.choices.getValue(true);\n\n // Make sure we don't get the placeholder\n if (!this.component.multiple && this.component.placeholder && value === this.t(this.component.placeholder, {\n _userInput: true\n })) {\n value = this.emptyValue;\n }\n } else if (this.refs.selectContainer) {\n value = this.refs.selectContainer.value;\n if (this.valueProperty === '' || this.isEntireObjectDisplay()) {\n if (value === '') {\n return {};\n }\n var option = this.selectOptions[value] || this.selectOptions.find(function (option) {\n return option.id === value;\n });\n if (option && _lodash[\"default\"].isObject(option.value)) {\n value = option.value;\n }\n }\n } else {\n value = this.dataValue;\n }\n // Choices will return undefined if nothing is selected. We really want '' to be empty.\n if (value === undefined || value === null) {\n value = '';\n }\n return value;\n }\n }, {\n key: \"redraw\",\n value: function redraw() {\n var done = _get(_getPrototypeOf(SelectComponent.prototype), \"redraw\", this).call(this);\n this.triggerUpdate();\n return done;\n }\n }, {\n key: \"normalizeSingleValue\",\n value: function normalizeSingleValue(value, retainObject) {\n var _this13 = this;\n if (_lodash[\"default\"].isNil(value)) {\n return;\n }\n var valueIsObject = _lodash[\"default\"].isObject(value);\n //check if value equals to default emptyValue\n if (valueIsObject && Object.keys(value).length === 0) {\n return value;\n }\n // Check to see if we need to save off the template data into our metadata.\n if (retainObject) {\n var _this$root;\n var templateValue = this.component.reference && value !== null && value !== void 0 && value._id ? value._id.toString() : value;\n var shouldSaveData = !valueIsObject || this.component.reference;\n if (templateValue && shouldSaveData && this.templateData && this.templateData[templateValue] && (_this$root = this.root) !== null && _this$root !== void 0 && _this$root.submission) {\n var submission = this.root.submission;\n if (!submission.metadata) {\n submission.metadata = {};\n }\n if (!submission.metadata.selectData) {\n submission.metadata.selectData = {};\n }\n var templateData = this.templateData[templateValue];\n if (this.component.multiple) {\n templateData = {};\n var dataValue = this.dataValue;\n if (dataValue && dataValue.length) {\n dataValue.forEach(function (dataValueItem) {\n var dataValueItemValue = _this13.component.reference ? dataValueItem._id.toString() : dataValueItem;\n templateData[dataValueItemValue] = _this13.templateData[dataValueItemValue];\n });\n }\n }\n _lodash[\"default\"].set(submission.metadata.selectData, this.path, templateData);\n }\n }\n var dataType = this.component.dataType || 'auto';\n var normalize = {\n value: value,\n number: function number() {\n var numberValue = Number(this.value);\n var isEquivalent = value.toString() === numberValue.toString();\n if (!Number.isNaN(numberValue) && Number.isFinite(numberValue) && value !== '' && isEquivalent) {\n this.value = numberValue;\n }\n return this;\n },\n \"boolean\": function boolean() {\n if (_lodash[\"default\"].isString(this.value) && (this.value.toLowerCase() === 'true' || this.value.toLowerCase() === 'false')) {\n this.value = this.value.toLowerCase() === 'true';\n }\n return this;\n },\n string: function string() {\n this.value = String(this.value);\n return this;\n },\n object: function object() {\n return this;\n },\n auto: function auto() {\n if (_lodash[\"default\"].isObject(this.value)) {\n this.value = this.object().value;\n } else {\n this.value = this.string().number()[\"boolean\"]().value;\n }\n return this;\n }\n };\n try {\n return normalize[dataType]().value;\n } catch (err) {\n console.warn('Failed to normalize value', err);\n return value;\n }\n }\n\n /**\n * Normalize values coming into updateValue.\n *\n * @param value\n * @return {*}\n */\n }, {\n key: \"normalizeValue\",\n value: function normalizeValue(value) {\n var _this14 = this;\n if (this.component.multiple && Array.isArray(value)) {\n return value.map(function (singleValue) {\n return _this14.normalizeSingleValue(singleValue, true);\n });\n }\n return _get(_getPrototypeOf(SelectComponent.prototype), \"normalizeValue\", this).call(this, this.normalizeSingleValue(value, true));\n }\n }, {\n key: \"setValue\",\n value: function setValue(value) {\n var _this15 = this;\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var previousValue = this.dataValue;\n if (this.component.widget === 'html5' && (_lodash[\"default\"].isEqual(value, previousValue) || _lodash[\"default\"].isEqual(previousValue, {}) && _lodash[\"default\"].isEqual(flags, {}))) {\n return false;\n }\n var changed = this.updateValue(value, flags);\n value = this.dataValue;\n var hasPreviousValue = !this.isEmpty(previousValue);\n var hasValue = !this.isEmpty(value);\n\n // Undo typing when searching to set the value.\n if (this.component.multiple && Array.isArray(value)) {\n value = value.map(function (value) {\n if (typeof value === 'boolean' || typeof value === 'number') {\n return value.toString();\n }\n return value;\n });\n } else {\n if (typeof value === 'boolean' || typeof value === 'number') {\n value = value.toString();\n }\n }\n if (this.isHtmlRenderMode() && flags && flags.fromSubmission && changed) {\n this.itemsLoaded.then(function () {\n _this15.redraw();\n });\n return changed;\n }\n\n // Do not set the value if we are loading... that will happen after it is done.\n if (this.loading) {\n return changed;\n }\n\n // Determine if we need to perform an initial lazyLoad api call if searchField is provided.\n if (this.isInitApiCallNeeded(hasValue)) {\n this.loading = true;\n this.lazyLoadInit = true;\n var searchProperty = this.component.searchField || this.component.valueProperty;\n this.triggerUpdate(_lodash[\"default\"].get(value.data || value, searchProperty, value), true);\n return changed;\n }\n\n // Add the value options.\n this.itemsLoaded.then(function () {\n _this15.addValueOptions();\n _this15.setChoicesValue(value, hasPreviousValue, flags);\n });\n return changed;\n }\n }, {\n key: \"isInitApiCallNeeded\",\n value: function isInitApiCallNeeded(hasValue) {\n return this.component.lazyLoad && !this.lazyLoadInit && !this.active && !this.selectOptions.length && hasValue && this.shouldLoad && this.visible && (this.component.searchField || this.component.valueProperty);\n }\n }, {\n key: \"setChoicesValue\",\n value: function setChoicesValue(value, hasPreviousValue) {\n var flags = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var hasValue = !this.isEmpty(value) || flags.fromSubmission;\n hasPreviousValue = hasPreviousValue === undefined ? true : hasPreviousValue;\n if (this.choices) {\n // Now set the value.\n if (hasValue) {\n this.choices.removeActiveItems();\n // Add the currently selected choices if they don't already exist.\n var currentChoices = Array.isArray(value) && this.component.multiple ? value : [value];\n if (!this.addCurrentChoices(currentChoices, this.selectOptions, true)) {\n this.choices.setChoices(this.selectOptions, 'value', 'label', true);\n }\n this.choices.setChoiceByValue(currentChoices);\n } else if (hasPreviousValue || flags.resetValue) {\n this.choices.removeActiveItems();\n }\n } else {\n if (hasValue) {\n var values = Array.isArray(value) ? value : [value];\n if (!_lodash[\"default\"].isEqual(this.dataValue, this.defaultValue) && this.selectOptions.length < 2) {\n var _this$selectValueAndL = this.selectValueAndLabel(this.dataValue),\n _value2 = _this$selectValueAndL.value,\n label = _this$selectValueAndL.label;\n this.addOption(_value2, label);\n }\n _lodash[\"default\"].each(this.selectOptions, function (selectOption) {\n _lodash[\"default\"].each(values, function (val) {\n if (selectOption.value === '') {\n selectOption.value = {};\n }\n if (_lodash[\"default\"].isEqual(val, selectOption.value) && selectOption.element) {\n selectOption.element.selected = true;\n selectOption.element.setAttribute('selected', 'selected');\n return false;\n }\n });\n });\n } else {\n _lodash[\"default\"].each(this.selectOptions, function (selectOption) {\n if (selectOption.element) {\n selectOption.element.selected = false;\n selectOption.element.removeAttribute('selected');\n }\n });\n }\n }\n }\n }, {\n key: \"itemsLoaded\",\n get: function get() {\n return this._itemsLoaded || _nativePromiseOnly[\"default\"].resolve();\n },\n set: function set(promise) {\n this._itemsLoaded = promise;\n }\n }, {\n key: \"validateValueAvailability\",\n value: function validateValueAvailability(setting, value) {\n var _this16 = this;\n if (!(0, _utils.boolValue)(setting) || !value) {\n return true;\n }\n var values = this.getOptionsValues();\n if (values) {\n if (_lodash[\"default\"].isObject(value)) {\n var compareComplexValues = function compareComplexValues(optionValue) {\n var normalizedOptionValue = _this16.normalizeSingleValue(optionValue, true);\n if (!_lodash[\"default\"].isObject(normalizedOptionValue)) {\n return false;\n }\n try {\n return JSON.stringify(normalizedOptionValue) === JSON.stringify(value);\n } catch (err) {\n console.warn.error('Error while comparing items', err);\n return false;\n }\n };\n return values.findIndex(function (optionValue) {\n return compareComplexValues(optionValue);\n }) !== -1;\n }\n return values.findIndex(function (optionValue) {\n return _this16.normalizeSingleValue(optionValue) === value;\n }) !== -1;\n }\n return false;\n }\n\n /**\n * Performs required transformations on the initial value to use in selectOptions\n * @param {*} value\n */\n }, {\n key: \"getOptionValue\",\n value: function getOptionValue(value) {\n return _lodash[\"default\"].isObject(value) && this.isEntireObjectDisplay() ? this.normalizeSingleValue(value) : _lodash[\"default\"].isObject(value) && (this.valueProperty || this.component.key !== 'resource') ? value : _lodash[\"default\"].isObject(value) && !this.valueProperty ? this.interpolate(this.component.template, {\n item: value\n }).replace(/<\\/?[^>]+(>|$)/g, '') : _lodash[\"default\"].isNull(value) ? this.emptyValue : String(this.normalizeSingleValue(value));\n }\n\n /**\n * If component has static values (values, json) or custom values, returns an array of them\n * @returns {Array<*>|undefined}\n */\n }, {\n key: \"getOptionsValues\",\n value: function getOptionsValues() {\n var _this17 = this;\n var rawItems = [];\n switch (this.component.dataSrc) {\n case 'values':\n rawItems = this.component.data.values;\n break;\n case 'json':\n rawItems = this.component.data.json;\n break;\n case 'custom':\n rawItems = this.getCustomItems();\n break;\n }\n if (typeof rawItems === 'string') {\n try {\n rawItems = JSON.parse(rawItems);\n } catch (err) {\n console.warn(err.message);\n rawItems = [];\n }\n }\n if (!Array.isArray(rawItems)) {\n return;\n }\n return rawItems.map(function (item) {\n return _this17.getOptionValue(_this17.itemValue(item));\n });\n }\n\n /**\n * Deletes the value of the component.\n */\n }, {\n key: \"deleteValue\",\n value: function deleteValue() {\n this.setValue('', {\n noUpdateEvent: true\n });\n this.unset();\n }\n\n /**\n * Check if a component is eligible for multiple validation\n *\n * @return {boolean}\n */\n }, {\n key: \"validateMultiple\",\n value: function validateMultiple() {\n // Select component will contain one input when flagged as multiple.\n return false;\n }\n\n /**\n * Output this select dropdown as a string value.\n * @return {*}\n */\n }, {\n key: \"isBooleanOrNumber\",\n value: function isBooleanOrNumber(value) {\n return typeof value === 'number' || typeof value === 'boolean';\n }\n }, {\n key: \"getNormalizedValues\",\n value: function getNormalizedValues() {\n var _this18 = this;\n if (!this.component || !this.component.data || !this.component.data.values) {\n return;\n }\n return this.component.data.values.map(function (value) {\n return {\n label: value.label,\n value: String(_this18.normalizeSingleValue(value.value))\n };\n });\n }\n }, {\n key: \"asString\",\n value: function asString(value) {\n var _value3,\n _this19 = this;\n value = (_value3 = value) !== null && _value3 !== void 0 ? _value3 : this.getValue();\n //need to convert values to strings to be able to compare values with available options that are strings\n var convertToString = function convertToString(data, valueProperty) {\n if (valueProperty) {\n if (Array.isArray(data)) {\n data.forEach(function (item) {\n return item[valueProperty] = item[valueProperty].toString();\n });\n } else {\n data[valueProperty] = data[valueProperty].toString();\n }\n return data;\n }\n if (_this19.isBooleanOrNumber(data)) {\n data = data.toString();\n }\n if (Array.isArray(data) && data.some(function (item) {\n return _this19.isBooleanOrNumber(item);\n })) {\n data = data.map(function (item) {\n if (_this19.isBooleanOrNumber(item)) {\n item = item.toString();\n }\n });\n }\n return data;\n };\n value = convertToString(value);\n if (['values', 'custom'].includes(this.component.dataSrc) && !this.asyncCustomValues()) {\n var _getFromValues;\n var _ref4 = this.component.dataSrc === 'values' ? {\n items: convertToString(this.getNormalizedValues(), 'value'),\n valueProperty: 'value'\n } : {\n items: convertToString(this.getCustomItems(), this.valueProperty),\n valueProperty: this.valueProperty\n },\n items = _ref4.items,\n valueProperty = _ref4.valueProperty;\n var getFromValues = function getFromValues() {\n var initialValue = _lodash[\"default\"].find(items, [valueProperty, value]);\n var values = _this19.defaultSchema.data.values || [];\n return _lodash[\"default\"].isEqual(initialValue, values[0]) ? '-' : initialValue;\n };\n value = this.component.multiple && Array.isArray(value) ? _lodash[\"default\"].filter(items, function (item) {\n return value.includes(item.value);\n }) : valueProperty ? (_getFromValues = getFromValues()) !== null && _getFromValues !== void 0 ? _getFromValues : {\n value: value,\n label: value\n } : value;\n }\n if (_lodash[\"default\"].isString(value)) {\n return value;\n }\n if (Array.isArray(value)) {\n var _items = [];\n value.forEach(function (item) {\n return _items.push(_this19.itemTemplate(item));\n });\n if (this.component.dataSrc === 'resource' && _items.length > 0) {\n return _items.join(', ');\n } else if (_items.length > 0) {\n return _items.join('
');\n } else {\n return '-';\n }\n }\n return !_lodash[\"default\"].isNil(value) ? this.itemTemplate(value) : '-';\n }\n }, {\n key: \"detach\",\n value: function detach() {\n _get(_getPrototypeOf(SelectComponent.prototype), \"detach\", this).call(this);\n this.off('blur');\n if (this.choices) {\n var _this$choices$contain, _this$choices$contain2;\n if ((_this$choices$contain = this.choices.containerOuter) !== null && _this$choices$contain !== void 0 && (_this$choices$contain2 = _this$choices$contain.element) !== null && _this$choices$contain2 !== void 0 && _this$choices$contain2.parentNode) {\n this.choices.destroy();\n }\n this.choices = null;\n }\n }\n }, {\n key: \"focus\",\n value: function focus() {\n if (this.focusableElement) {\n _get(_getPrototypeOf(SelectComponent.prototype), \"focus\", this).call(this);\n this.focusableElement.focus();\n }\n }\n }, {\n key: \"setErrorClasses\",\n value: function setErrorClasses(elements, dirty, hasError, hasMessages) {\n var element = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : this.element;\n _get(_getPrototypeOf(SelectComponent.prototype), \"setErrorClasses\", this).call(this, elements, dirty, hasError, hasMessages, element);\n if (this.choices) {\n _get(_getPrototypeOf(SelectComponent.prototype), \"setErrorClasses\", this).call(this, [this.choices.containerInner.element], dirty, hasError, hasMessages, element);\n } else {\n _get(_getPrototypeOf(SelectComponent.prototype), \"setErrorClasses\", this).call(this, [this.refs.selectContainer], dirty, hasError, hasMessages, element);\n }\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len3 = arguments.length, extend = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n extend[_key3] = arguments[_key3];\n }\n return _ListComponent2[\"default\"].schema.apply(_ListComponent2[\"default\"], [{\n type: 'select',\n label: 'Select',\n key: 'select',\n idPath: 'id',\n data: {\n values: [{\n label: '',\n value: ''\n }],\n json: '',\n url: '',\n resource: '',\n custom: ''\n },\n clearOnRefresh: false,\n limit: 100,\n valueProperty: '',\n lazyLoad: true,\n filter: '',\n searchEnabled: true,\n searchDebounce: 0.3,\n searchField: '',\n minSearch: 0,\n readOnlyValue: false,\n selectFields: '',\n selectThreshold: 0.3,\n uniqueOptions: false,\n tableView: true,\n fuseOptions: {\n include: 'score',\n threshold: 0.3\n },\n indexeddb: {\n filter: {}\n },\n customOptions: {},\n useExactSearch: false\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Select',\n group: 'basic',\n icon: 'th-list',\n weight: 70,\n documentation: '/userguide/form-building/form-components#select',\n schema: SelectComponent.schema()\n };\n }\n }]);\n return SelectComponent;\n}(_ListComponent2[\"default\"]);\nexports[\"default\"] = SelectComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/select/Select.js?"); /***/ }), @@ -1751,7 +1784,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.regexp.flags.js */ \"./node_modules/core-js/modules/es.regexp.flags.js\");\n\nvar _utils = __webpack_require__(/*! ../../../utils/utils */ \"./lib/utils/utils.js\");\n\nvar _default = [{\n type: 'select',\n input: true,\n weight: 0,\n tooltip: 'The source to use for the select data. Values lets you provide your own values and labels. JSON lets you provide raw JSON data. URL lets you provide a URL to retrieve the JSON data from.',\n key: 'dataSrc',\n defaultValue: 'values',\n label: 'Data Source Type',\n dataSrc: 'values',\n data: {\n values: [{\n label: 'Values',\n value: 'values'\n }, {\n label: 'URL',\n value: 'url'\n }, {\n label: 'Resource',\n value: 'resource'\n }, {\n label: 'Custom',\n value: 'custom'\n }, {\n label: 'Raw JSON',\n value: 'json'\n }]\n }\n}, {\n type: 'textfield',\n weight: 10,\n input: true,\n key: 'indexeddb.database',\n label: 'Database name',\n tooltip: 'The name of the indexeddb database.',\n conditional: {\n json: {\n '===': [{\n var: 'data.dataSrc'\n }, 'indexeddb']\n }\n }\n}, {\n type: 'textfield',\n input: true,\n key: 'indexeddb.table',\n label: 'Table name',\n weight: 16,\n tooltip: 'The name of table in the indexeddb database.',\n conditional: {\n json: {\n '===': [{\n var: 'data.dataSrc'\n }, 'indexeddb']\n }\n }\n}, {\n type: 'textarea',\n as: 'json',\n editor: 'ace',\n weight: 18,\n input: true,\n key: 'indexeddb.filter',\n label: 'Row Filter',\n tooltip: 'Filter table items that match the object.',\n defaultValue: {},\n conditional: {\n json: {\n '===': [{\n var: 'data.dataSrc'\n }, 'indexeddb']\n }\n }\n}, {\n type: 'textarea',\n as: 'json',\n editor: 'ace',\n weight: 10,\n input: true,\n key: 'data.json',\n label: 'Data Source Raw JSON',\n tooltip: 'A valid JSON array to use as a data source.',\n description: '
Example:
[\"apple\", \"banana\", \"orange\"].
Example 2:
[{\"name\": \"John\", \"email\": \"john.doe@test.com\"}, {\"name\": \"Jane\", \"email\": \"jane.doe@test.com\"}].
',\n conditional: {\n json: {\n '===': [{\n var: 'data.dataSrc'\n }, 'json']\n }\n }\n}, {\n type: 'textfield',\n input: true,\n key: 'data.url',\n weight: 10,\n label: 'Data Source URL',\n placeholder: 'Data Source URL',\n tooltip: 'A URL that returns a JSON array to use as the data source.',\n conditional: {\n json: {\n '===': [{\n var: 'data.dataSrc'\n }, 'url']\n }\n }\n}, {\n type: 'checkbox',\n input: true,\n label: 'Lazy Load Data',\n key: 'lazyLoad',\n tooltip: 'When set, this will not fire off the request to the URL until this control is within focus. This can improve performance if you have many Select dropdowns on your form where the API\\'s will only fire when the control is activated.',\n weight: 11,\n conditional: {\n json: {\n and: [{\n in: [{\n var: 'data.dataSrc'\n }, ['resource', 'url']]\n }, {\n '!==': [{\n var: 'data.widget'\n }, 'html5']\n }]\n }\n }\n}, {\n type: 'datagrid',\n input: true,\n label: 'Request Headers',\n key: 'data.headers',\n tooltip: 'Set any headers that should be sent along with the request to the url. This is useful for authentication.',\n weight: 11,\n components: [{\n label: 'Key',\n key: 'key',\n input: true,\n type: 'textfield'\n }, {\n label: 'Value',\n key: 'value',\n input: true,\n type: 'textfield'\n }],\n conditional: {\n json: {\n '===': [{\n var: 'data.dataSrc'\n }, 'url']\n }\n }\n}, {\n type: 'datagrid',\n input: true,\n label: 'Data Source Values',\n key: 'data.values',\n tooltip: 'Values to use as the data source. Labels are shown in the select field. Values are the corresponding values saved with the submission.',\n weight: 10,\n reorder: true,\n defaultValue: [{\n label: '',\n value: ''\n }],\n components: [{\n label: 'Label',\n key: 'label',\n input: true,\n type: 'textfield'\n }, {\n label: 'Value',\n key: 'value',\n input: true,\n type: 'textfield',\n allowCalculateOverride: true,\n calculateValue: 'value = _.camelCase(row.label);'\n }],\n conditional: {\n json: {\n '===': [{\n var: 'data.dataSrc'\n }, 'values']\n }\n }\n}, {\n type: 'select',\n input: true,\n dataSrc: 'url',\n data: {\n url: '/form?type=resource&limit=1000000&select=_id,title'\n },\n authenticate: true,\n template: '{{ item.title }}',\n valueProperty: '_id',\n clearOnHide: false,\n label: 'Resource',\n key: 'data.resource',\n lazyLoad: false,\n weight: 10,\n tooltip: 'The resource to be used with this field.',\n conditional: {\n json: {\n '===': [{\n var: 'data.dataSrc'\n }, 'resource']\n }\n }\n}, {\n type: 'textfield',\n input: true,\n label: 'Data Path',\n key: 'selectValues',\n weight: 12,\n description: 'The object path to the iterable items.',\n tooltip: 'The property within the source data, where iterable items reside. For example: results.items or results[0].items',\n conditional: {\n json: {\n '===': [{\n var: 'data.dataSrc'\n }, 'url']\n }\n }\n}, {\n type: 'select',\n input: true,\n label: 'Value Property',\n key: 'valueProperty',\n skipMerge: true,\n clearOnHide: true,\n tooltip: 'The field to use as the value.',\n weight: 11,\n refreshOn: 'data.resource',\n template: '{{ item.label }}',\n valueProperty: 'key',\n dataSrc: 'url',\n lazyLoad: false,\n onSetItems: function onSetItems(component, form) {\n var newItems = form.type === 'resource' ? [{\n label: '{Entire Object}',\n key: 'data'\n }] : [];\n (0, _utils.eachComponent)(form.components, function (component, path) {\n if (component.input) {\n newItems.push({\n label: component.label || component.key,\n key: \"data.\".concat(path)\n });\n }\n });\n return newItems;\n },\n onChange: function onChange(context) {\n if (context && context.flags && context.flags.modified) {\n var valueProp = context.instance.data.valueProperty;\n var templateProp = valueProp ? valueProp : 'data';\n var template = \"{{ item.\".concat(templateProp, \" }}\");\n var searchField = valueProp ? \"\".concat(valueProp, \"__regex\") : '';\n context.instance.root.getComponent('template').setValue(template);\n context.instance.root.getComponent('searchField').setValue(searchField);\n }\n },\n data: {\n url: '/form/{{ data.data.resource }}'\n },\n conditional: {\n json: {\n and: [{\n '===': [{\n var: 'data.dataSrc'\n }, 'resource']\n }, {\n '!==': [{\n var: 'data.reference'\n }, true]\n }, {\n var: 'data.data.resource'\n }]\n }\n }\n}, {\n type: 'select',\n input: true,\n label: 'Storage Type',\n key: 'dataType',\n clearOnHide: true,\n tooltip: 'The type to store the data. If you select something other than autotype, it will force it to that type.',\n weight: 12,\n template: '{{ item.label }}',\n dataSrc: 'values',\n data: {\n values: [{\n label: 'Autotype',\n value: 'auto'\n }, {\n label: 'String',\n value: 'string'\n }, {\n label: 'Number',\n value: 'number'\n }, {\n label: 'Boolean',\n value: 'boolean'\n }, {\n label: 'Object',\n value: 'object'\n }]\n }\n}, {\n type: 'textfield',\n input: true,\n key: 'idPath',\n weight: 12,\n label: 'ID Path',\n placeholder: 'id',\n tooltip: 'Path to the select option id.'\n}, {\n type: 'textfield',\n input: true,\n label: 'Value Property',\n key: 'valueProperty',\n skipMerge: true,\n clearOnHide: false,\n weight: 13,\n description: \"The selected item's property to save.\",\n tooltip: 'The property of each item in the data source to use as the select value. If not specified, the item itself will be used.',\n conditional: {\n json: {\n in: [{\n var: 'data.dataSrc'\n }, ['json', 'url', 'custom']]\n }\n }\n}, {\n type: 'textfield',\n input: true,\n label: 'Select Fields',\n key: 'selectFields',\n tooltip: 'The properties on the resource to return as part of the options. Separate property names by commas. If left blank, all properties will be returned.',\n placeholder: 'Comma separated list of fields to select.',\n weight: 14,\n conditional: {\n json: {\n and: [{\n '===': [{\n var: 'data.dataSrc'\n }, 'resource']\n }, {\n '===': [{\n var: 'data.valueProperty'\n }, '']\n }]\n }\n }\n}, {\n type: 'checkbox',\n input: true,\n key: 'disableLimit',\n label: 'Disable limiting response',\n tooltip: 'When enabled the request will not include the limit and skip options in the query string',\n weight: 15,\n conditional: {\n json: {\n '===': [{\n var: 'data.dataSrc'\n }, 'url']\n }\n }\n}, {\n type: 'textfield',\n input: true,\n key: 'searchField',\n label: 'Search Query Name',\n weight: 16,\n description: 'Name of URL query parameter',\n tooltip: 'The name of the search querystring parameter used when sending a request to filter results with. The server at the URL must handle this query parameter.',\n conditional: {\n json: {\n in: [{\n var: 'data.dataSrc'\n }, ['url', 'resource']]\n }\n }\n}, {\n type: 'number',\n input: true,\n key: 'searchDebounce',\n label: 'Search request delay',\n weight: 16,\n description: 'The delay (in seconds) before the search request is sent.',\n tooltip: 'The delay in seconds before the search request is sent, measured from the last character input in the search field.',\n validate: {\n min: 0,\n customMessage: '',\n json: '',\n max: 1\n },\n delimiter: false,\n requireDecimal: false,\n encrypted: false,\n defaultValue: 0.3,\n conditional: {\n json: {\n in: [{\n var: 'data.dataSrc'\n }, ['url', 'resource']]\n }\n }\n}, {\n type: 'number',\n input: true,\n key: 'minSearch',\n weight: 17,\n label: 'Minimum Search Length',\n tooltip: 'The minimum amount of characters they must type before a search is made.',\n defaultValue: 0,\n conditional: {\n json: {\n and: [{\n '===': [{\n var: 'data.dataSrc'\n }, 'url']\n }, {\n '!=': [{\n var: 'data.searchField'\n }, '']\n }]\n }\n }\n}, {\n type: 'textfield',\n input: true,\n key: 'filter',\n label: 'Filter Query',\n weight: 18,\n description: 'The filter query for results.',\n tooltip: 'Use this to provide additional filtering using query parameters.',\n conditional: {\n json: {\n in: [{\n var: 'data.dataSrc'\n }, ['url', 'resource']]\n }\n }\n}, {\n type: 'textfield',\n input: true,\n key: 'sort',\n label: 'Sort Query',\n weight: 18,\n description: 'The sort query for results',\n tooltip: 'Use this to provide additional sorting using query parameters',\n conditional: {\n json: {\n in: [{\n var: 'data.dataSrc'\n }, ['url', 'resource']]\n }\n }\n}, {\n type: 'number',\n input: true,\n key: 'limit',\n label: 'Limit',\n weight: 18,\n description: 'Maximum number of items to view per page of results.',\n tooltip: 'Use this to limit the number of items to request or view.',\n clearOnHide: false,\n conditional: {\n json: {\n and: [{\n in: [{\n var: 'data.dataSrc'\n }, ['url', 'resource']]\n }, {\n '!==': [{\n var: 'data.disableLimit'\n }, true]\n }]\n }\n }\n}, {\n type: 'textarea',\n input: true,\n key: 'data.custom',\n label: 'Custom Values',\n editor: 'ace',\n rows: 10,\n weight: 14,\n placeholder: \"values = data['mykey'] or values = Promise.resolve(['myValue'])\",\n tooltip: 'Write custom code to return the value options or a promise with value options. The form data object is available.',\n conditional: {\n json: {\n '===': [{\n var: 'data.dataSrc'\n }, 'custom']\n }\n }\n}, {\n type: 'textarea',\n input: true,\n key: 'template',\n label: 'Item Template',\n editor: 'ace',\n as: 'html',\n rows: 3,\n weight: 18,\n tooltip: 'The HTML template for the result data items.',\n allowCalculateOverride: true,\n calculateValue: function calculateValue(context) {\n if (!context.data.template) {\n if (context.instance && context.instance._currentForm.options.editComponent) {\n return context.instance._currentForm.options.editComponent.template;\n }\n }\n\n return context.data.template;\n }\n}, {\n type: 'select',\n input: true,\n key: 'refreshOn',\n label: 'Refresh Options On',\n weight: 19,\n tooltip: 'Refresh data when another field changes.',\n dataSrc: 'custom',\n valueProperty: 'value',\n data: {\n custom: function custom(context) {\n var values = [];\n values.push({\n label: 'Any Change',\n value: 'data'\n });\n context.utils.eachComponent(context.instance.options.editForm.components, function (component, path) {\n if (component.key !== context.data.key) {\n values.push({\n label: component.label || component.key,\n value: path\n });\n }\n });\n return values;\n }\n },\n conditional: {\n json: {\n in: [{\n var: 'data.dataSrc'\n }, ['url', 'resource', 'values', 'custom']]\n }\n }\n}, {\n type: 'select',\n input: true,\n key: 'refreshOnBlur',\n label: 'Refresh Options On Blur',\n weight: 19,\n tooltip: 'Refresh data when another field is blured.',\n dataSrc: 'custom',\n valueProperty: 'value',\n data: {\n custom: function custom(context) {\n var values = [];\n values.push({\n label: 'Any Change',\n value: 'data'\n });\n context.utils.eachComponent(context.instance.options.editForm.components, function (component, path) {\n if (component.key !== context.data.key) {\n values.push({\n label: component.label || component.key,\n value: path\n });\n }\n });\n return values;\n }\n },\n conditional: {\n json: {\n in: [{\n var: 'data.dataSrc'\n }, ['url', 'resource', 'values']]\n }\n }\n}, {\n type: 'checkbox',\n input: true,\n weight: 20,\n key: 'clearOnRefresh',\n label: 'Clear Value On Refresh Options',\n defaultValue: false,\n tooltip: 'When the Refresh On field is changed, clear this components value.',\n conditional: {\n json: {\n in: [{\n var: 'data.dataSrc'\n }, ['url', 'resource', 'values', 'custom']]\n }\n }\n}, {\n type: 'checkbox',\n input: true,\n weight: 21,\n key: 'searchEnabled',\n label: 'Enable Static Search',\n defaultValue: true,\n tooltip: 'When checked, the select dropdown will allow for searching within the static list of items provided.'\n}, {\n label: 'Search Threshold',\n mask: false,\n tableView: true,\n alwaysEnabled: false,\n type: 'number',\n input: true,\n key: 'selectThreshold',\n validate: {\n min: 0,\n customMessage: '',\n json: '',\n max: 1\n },\n delimiter: false,\n requireDecimal: false,\n encrypted: false,\n defaultValue: 0.3,\n weight: 22,\n tooltip: 'At what point does the match algorithm give up. A threshold of 0.0 requires a perfect match, a threshold of 1.0 would match anything.'\n}, {\n type: 'checkbox',\n input: true,\n weight: 23,\n key: 'addResource',\n label: 'Add Resource',\n tooltip: 'Allows to create a new resource while entering a submission.',\n conditional: {\n json: {\n '===': [{\n var: 'data.dataSrc'\n }, 'resource']\n }\n }\n}, {\n type: 'textfield',\n label: 'Add Resource Label',\n key: 'addResourceLabel',\n tooltip: 'Set the text of the Add Resource button.',\n placeholder: 'Add Resource',\n weight: 24,\n input: true,\n conditional: {\n json: {\n and: [{\n '===': [{\n var: 'data.dataSrc'\n }, 'resource']\n }, {\n '!!': {\n var: 'data.addResource'\n }\n }]\n }\n }\n}, {\n type: 'checkbox',\n input: true,\n weight: 25,\n key: 'reference',\n label: 'Save as reference',\n tooltip: 'Using this option will save this field as a reference and link its value to the value of the origin record.',\n conditional: {\n json: {\n '===': [{\n var: 'data.dataSrc'\n }, 'resource']\n }\n }\n}, {\n type: 'checkbox',\n input: true,\n weight: 26,\n key: 'authenticate',\n label: 'Formio Authenticate',\n tooltip: 'Check this if you would like to use Formio Authentication with the request.',\n conditional: {\n json: {\n '===': [{\n var: 'data.dataSrc'\n }, 'url']\n }\n }\n}, {\n type: 'checkbox',\n input: true,\n weight: 27,\n key: 'readOnlyValue',\n label: 'Read Only Value',\n tooltip: 'Check this if you would like to show just the value when in Read Only mode.'\n}, {\n type: 'textarea',\n as: 'json',\n editor: 'ace',\n weight: 28,\n input: true,\n key: 'customOptions',\n label: 'Choices.js options',\n tooltip: 'A raw JSON object to use as options for the Select component (Choices JS).',\n defaultValue: {}\n}, {\n type: 'checkbox',\n input: true,\n weight: 29,\n key: 'useExactSearch',\n label: 'Use exact search',\n tooltip: 'Disables search algorithm threshold.'\n}, {\n type: 'checkbox',\n input: true,\n weight: 29,\n key: 'ignoreCache',\n label: 'Disables Storing Request Result in the Cache',\n tooltip: 'Check it if you don\\'t want the requests and its results to be stored in the cache. By default, it is stored and if the Select tries to make the request to the same URL with the same paremetrs, the cached data will be returned. It allows to increase performance, but if the remote source\\'s data is changing quite often and you always need to keep it up-to-date, uncheck this option.',\n conditional: {\n json: {\n 'or': [{\n '===': [{\n var: 'data.dataSrc'\n }, 'url']\n }, {\n '===': [{\n var: 'data.dataSrc'\n }, 'resource']\n }]\n }\n }\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/select/editForm/Select.edit.data.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.regexp.flags.js */ \"./node_modules/core-js/modules/es.regexp.flags.js\");\nvar _utils = __webpack_require__(/*! ../../../utils/utils */ \"./lib/utils/utils.js\");\nvar _default = [{\n key: 'dataSrc',\n data: {\n values: [{\n label: 'Values',\n value: 'values'\n }, {\n label: 'URL',\n value: 'url'\n }, {\n label: 'Resource',\n value: 'resource'\n }, {\n label: 'Custom',\n value: 'custom'\n }, {\n label: 'Raw JSON',\n value: 'json'\n }]\n }\n}, {\n type: 'textfield',\n weight: 10,\n input: true,\n key: 'indexeddb.database',\n label: 'Database name',\n tooltip: 'The name of the indexeddb database.',\n conditional: {\n json: {\n '===': [{\n \"var\": 'data.dataSrc'\n }, 'indexeddb']\n }\n }\n}, {\n type: 'textfield',\n input: true,\n key: 'indexeddb.table',\n label: 'Table name',\n weight: 16,\n tooltip: 'The name of table in the indexeddb database.',\n conditional: {\n json: {\n '===': [{\n \"var\": 'data.dataSrc'\n }, 'indexeddb']\n }\n }\n}, {\n type: 'textarea',\n as: 'json',\n editor: 'ace',\n weight: 18,\n input: true,\n key: 'indexeddb.filter',\n label: 'Row Filter',\n tooltip: 'Filter table items that match the object.',\n defaultValue: {},\n conditional: {\n json: {\n '===': [{\n \"var\": 'data.dataSrc'\n }, 'indexeddb']\n }\n }\n}, {\n type: 'textarea',\n as: 'json',\n editor: 'ace',\n weight: 10,\n input: true,\n key: 'data.json',\n label: 'Data Source Raw JSON',\n tooltip: 'A valid JSON array to use as a data source.',\n description: '
Example:
[\"apple\", \"banana\", \"orange\"].
Example 2:
[{\"name\": \"John\", \"email\": \"john.doe@test.com\"}, {\"name\": \"Jane\", \"email\": \"jane.doe@test.com\"}].
',\n conditional: {\n json: {\n '===': [{\n \"var\": 'data.dataSrc'\n }, 'json']\n }\n }\n}, {\n type: 'checkbox',\n input: true,\n label: 'Lazy Load Data',\n key: 'lazyLoad',\n tooltip: 'When set, this will not fire off the request to the URL until this control is within focus. This can improve performance if you have many Select dropdowns on your form where the API\\'s will only fire when the control is activated.',\n weight: 11,\n conditional: {\n json: {\n and: [{\n \"in\": [{\n \"var\": 'data.dataSrc'\n }, ['resource', 'url']]\n }, {\n '!==': [{\n \"var\": 'data.widget'\n }, 'html5']\n }]\n }\n }\n}, {\n type: 'datagrid',\n input: true,\n label: 'Data Source Values',\n key: 'data.values',\n tooltip: 'Values to use as the data source. Labels are shown in the select field. Values are the corresponding values saved with the submission.',\n weight: 10,\n reorder: true,\n defaultValue: [{\n label: '',\n value: ''\n }],\n components: [{\n label: 'Label',\n key: 'label',\n input: true,\n type: 'textfield'\n }, {\n label: 'Value',\n key: 'value',\n input: true,\n type: 'textfield',\n allowCalculateOverride: true,\n calculateValue: 'value = _.camelCase(row.label);'\n }],\n conditional: {\n json: {\n '===': [{\n \"var\": 'data.dataSrc'\n }, 'values']\n }\n }\n}, {\n type: 'select',\n input: true,\n dataSrc: 'url',\n data: {\n url: '/form?type=resource&limit=1000000&select=_id,title'\n },\n authenticate: true,\n template: '{{ item.title }}',\n valueProperty: '_id',\n clearOnHide: false,\n label: 'Resource',\n key: 'data.resource',\n lazyLoad: false,\n weight: 10,\n tooltip: 'The resource to be used with this field.',\n conditional: {\n json: {\n '===': [{\n \"var\": 'data.dataSrc'\n }, 'resource']\n }\n }\n}, {\n type: 'textfield',\n input: true,\n label: 'Data Path',\n key: 'selectValues',\n weight: 12,\n description: 'The object path to the iterable items.',\n tooltip: 'The property within the source data, where iterable items reside. For example: results.items or results[0].items',\n conditional: {\n json: {\n '===': [{\n \"var\": 'data.dataSrc'\n }, 'url']\n }\n }\n}, {\n type: 'select',\n input: true,\n label: 'Value Property',\n key: 'valueProperty',\n skipMerge: true,\n clearOnHide: true,\n tooltip: 'The field to use as the value.',\n weight: 11,\n refreshOn: 'data.resource',\n template: '{{ item.label }}',\n valueProperty: 'key',\n dataSrc: 'url',\n lazyLoad: false,\n onSetItems: function onSetItems(component, form) {\n var newItems = form.type === 'resource' ? [{\n label: '{Entire Object}',\n key: 'data'\n }] : [];\n (0, _utils.eachComponent)(form.components, function (component, path) {\n if (component.input) {\n newItems.push({\n label: component.label || component.key,\n key: \"data.\".concat(path)\n });\n }\n });\n return newItems;\n },\n onChange: function onChange(context) {\n if (context && context.flags && context.flags.modified) {\n var valueProp = context.instance.data.valueProperty;\n var templateProp = valueProp ? valueProp : 'data';\n var template = \"{{ item.\".concat(templateProp, \" }}\");\n var searchField = valueProp ? \"\".concat(valueProp, \"__regex\") : '';\n context.instance.root.getComponent('template').setValue(template);\n context.instance.root.getComponent('searchField').setValue(searchField);\n }\n },\n data: {\n url: '/form/{{ data.data.resource }}'\n },\n conditional: {\n json: {\n and: [{\n '===': [{\n \"var\": 'data.dataSrc'\n }, 'resource']\n }, {\n '!==': [{\n \"var\": 'data.reference'\n }, true]\n }, {\n \"var\": 'data.data.resource'\n }]\n }\n }\n}, {\n type: 'select',\n input: true,\n label: 'Storage Type',\n key: 'dataType',\n clearOnHide: true,\n tooltip: 'The type to store the data. If you select something other than autotype, it will force it to that type.',\n weight: 12,\n template: '{{ item.label }}',\n dataSrc: 'values',\n data: {\n values: [{\n label: 'Autotype',\n value: 'auto'\n }, {\n label: 'String',\n value: 'string'\n }, {\n label: 'Number',\n value: 'number'\n }, {\n label: 'Boolean',\n value: 'boolean'\n }, {\n label: 'Object',\n value: 'object'\n }]\n }\n}, {\n type: 'textfield',\n input: true,\n key: 'idPath',\n weight: 12,\n label: 'ID Path',\n placeholder: 'id',\n tooltip: 'Path to the select option id.'\n}, {\n type: 'textfield',\n input: true,\n label: 'Select Fields',\n key: 'selectFields',\n tooltip: 'The properties on the resource to return as part of the options. Separate property names by commas. If left blank, all properties will be returned.',\n placeholder: 'Comma separated list of fields to select.',\n weight: 14,\n conditional: {\n json: {\n and: [{\n '===': [{\n \"var\": 'data.dataSrc'\n }, 'resource']\n }, {\n '===': [{\n \"var\": 'data.valueProperty'\n }, '']\n }]\n }\n }\n}, {\n type: 'checkbox',\n input: true,\n key: 'disableLimit',\n label: 'Disable limiting response',\n tooltip: 'When enabled the request will not include the limit and skip options in the query string',\n weight: 15,\n conditional: {\n json: {\n '===': [{\n \"var\": 'data.dataSrc'\n }, 'url']\n }\n }\n}, {\n type: 'textfield',\n input: true,\n key: 'searchField',\n label: 'Search Query Name',\n weight: 16,\n description: 'Name of URL query parameter',\n tooltip: 'The name of the search querystring parameter used when sending a request to filter results with. The server at the URL must handle this query parameter.',\n conditional: {\n json: {\n \"in\": [{\n \"var\": 'data.dataSrc'\n }, ['url', 'resource']]\n }\n }\n}, {\n type: 'number',\n input: true,\n key: 'searchDebounce',\n label: 'Search request delay',\n weight: 16,\n description: 'The delay (in seconds) before the search request is sent.',\n tooltip: 'The delay in seconds before the search request is sent, measured from the last character input in the search field.',\n validate: {\n min: 0,\n customMessage: '',\n json: '',\n max: 1\n },\n delimiter: false,\n requireDecimal: false,\n encrypted: false,\n defaultValue: 0.3,\n conditional: {\n json: {\n \"in\": [{\n \"var\": 'data.dataSrc'\n }, ['url', 'resource']]\n }\n }\n}, {\n type: 'number',\n input: true,\n key: 'minSearch',\n weight: 17,\n label: 'Minimum Search Length',\n tooltip: 'The minimum amount of characters they must type before a search is made.',\n defaultValue: 0,\n conditional: {\n json: {\n and: [{\n '===': [{\n \"var\": 'data.dataSrc'\n }, 'url']\n }, {\n '!=': [{\n \"var\": 'data.searchField'\n }, '']\n }]\n }\n }\n}, {\n type: 'textfield',\n input: true,\n key: 'filter',\n label: 'Filter Query',\n weight: 18,\n description: 'The filter query for results.',\n tooltip: 'Use this to provide additional filtering using query parameters.',\n conditional: {\n json: {\n \"in\": [{\n \"var\": 'data.dataSrc'\n }, ['url', 'resource']]\n }\n }\n}, {\n type: 'textfield',\n input: true,\n key: 'sort',\n label: 'Sort Query',\n weight: 18,\n description: 'The sort query for results',\n tooltip: 'Use this to provide additional sorting using query parameters',\n conditional: {\n json: {\n \"in\": [{\n \"var\": 'data.dataSrc'\n }, ['url', 'resource']]\n }\n }\n}, {\n type: 'number',\n input: true,\n key: 'limit',\n label: 'Limit',\n weight: 18,\n description: 'Maximum number of items to view per page of results.',\n tooltip: 'Use this to limit the number of items to request or view.',\n clearOnHide: false,\n conditional: {\n json: {\n and: [{\n \"in\": [{\n \"var\": 'data.dataSrc'\n }, ['url', 'resource']]\n }, {\n '!==': [{\n \"var\": 'data.disableLimit'\n }, true]\n }]\n }\n }\n}, {\n type: 'textarea',\n input: true,\n key: 'data.custom',\n label: 'Custom Values',\n editor: 'ace',\n rows: 10,\n weight: 14,\n placeholder: \"values = data['mykey'] or values = Promise.resolve(['myValue'])\",\n tooltip: 'Write custom code to return the value options or a promise with value options. The form data object is available.',\n conditional: {\n json: {\n '===': [{\n \"var\": 'data.dataSrc'\n }, 'custom']\n }\n }\n}, {\n type: 'select',\n input: true,\n key: 'refreshOn',\n label: 'Refresh Options On',\n weight: 19,\n tooltip: 'Refresh data when another field changes.',\n dataSrc: 'custom',\n valueProperty: 'value',\n data: {\n custom: function custom(context) {\n var values = [];\n values.push({\n label: 'Any Change',\n value: 'data'\n });\n context.utils.eachComponent(context.instance.options.editForm.components, function (component, path) {\n if (component.key !== context.data.key) {\n values.push({\n label: component.label || component.key,\n value: path\n });\n }\n });\n return values;\n }\n },\n conditional: {\n json: {\n \"in\": [{\n \"var\": 'data.dataSrc'\n }, ['url', 'resource', 'values', 'custom']]\n }\n }\n}, {\n type: 'select',\n input: true,\n key: 'refreshOnBlur',\n label: 'Refresh Options On Blur',\n weight: 19,\n tooltip: 'Refresh data when another field is blured.',\n dataSrc: 'custom',\n valueProperty: 'value',\n data: {\n custom: function custom(context) {\n var values = [];\n values.push({\n label: 'Any Change',\n value: 'data'\n });\n context.utils.eachComponent(context.instance.options.editForm.components, function (component, path) {\n if (component.key !== context.data.key) {\n values.push({\n label: component.label || component.key,\n value: path\n });\n }\n });\n return values;\n }\n },\n conditional: {\n json: {\n \"in\": [{\n \"var\": 'data.dataSrc'\n }, ['url', 'resource', 'values']]\n }\n }\n}, {\n type: 'checkbox',\n input: true,\n weight: 20,\n key: 'clearOnRefresh',\n label: 'Clear Value On Refresh Options',\n defaultValue: false,\n tooltip: 'When the Refresh On field is changed, clear this components value.',\n conditional: {\n json: {\n \"in\": [{\n \"var\": 'data.dataSrc'\n }, ['url', 'resource', 'values', 'custom']]\n }\n }\n}, {\n type: 'checkbox',\n input: true,\n weight: 21,\n key: 'searchEnabled',\n label: 'Enable Static Search',\n defaultValue: true,\n tooltip: 'When checked, the select dropdown will allow for searching within the static list of items provided.'\n}, {\n type: 'checkbox',\n input: true,\n weight: 21,\n key: 'noRefreshOnScroll',\n label: 'Disable Options Refresh When Scrolling',\n defaultValue: false,\n tooltip: 'When checked, the select with search input won\\'t perform new api requests when scrolling through the list of options.',\n conditional: {\n json: {\n and: [{\n \"in\": [{\n \"var\": 'data.dataSrc'\n }, ['url', 'resource']]\n }, {\n '===': [{\n \"var\": 'data.searchEnabled'\n }, true]\n }]\n }\n }\n}, {\n label: 'Search Threshold',\n mask: false,\n tableView: true,\n alwaysEnabled: false,\n type: 'number',\n input: true,\n key: 'selectThreshold',\n validate: {\n min: 0,\n customMessage: '',\n json: '',\n max: 1\n },\n delimiter: false,\n requireDecimal: false,\n encrypted: false,\n defaultValue: 0.3,\n weight: 22,\n tooltip: 'At what point does the match algorithm give up. A threshold of 0.0 requires a perfect match, a threshold of 1.0 would match anything.'\n}, {\n type: 'checkbox',\n input: true,\n weight: 23,\n key: 'addResource',\n label: 'Add Resource',\n tooltip: 'Allows to create a new resource while entering a submission.',\n conditional: {\n json: {\n '===': [{\n \"var\": 'data.dataSrc'\n }, 'resource']\n }\n }\n}, {\n type: 'textfield',\n label: 'Add Resource Label',\n key: 'addResourceLabel',\n tooltip: 'Set the text of the Add Resource button.',\n placeholder: 'Add Resource',\n weight: 24,\n input: true,\n conditional: {\n json: {\n and: [{\n '===': [{\n \"var\": 'data.dataSrc'\n }, 'resource']\n }, {\n '!!': {\n \"var\": 'data.addResource'\n }\n }]\n }\n }\n}, {\n type: 'checkbox',\n input: true,\n weight: 25,\n key: 'reference',\n label: 'Save as reference',\n tooltip: 'Using this option will save this field as a reference and link its value to the value of the origin record.',\n conditional: {\n json: {\n '===': [{\n \"var\": 'data.dataSrc'\n }, 'resource']\n }\n }\n}, {\n type: 'checkbox',\n input: true,\n weight: 27,\n key: 'readOnlyValue',\n label: 'Read Only Value',\n tooltip: 'Check this if you would like to show just the value when in Read Only mode.'\n}, {\n type: 'textarea',\n as: 'json',\n editor: 'ace',\n weight: 28,\n input: true,\n key: 'customOptions',\n label: 'Choices.js options',\n tooltip: 'A raw JSON object to use as options for the Select component (Choices JS).',\n defaultValue: {}\n}, {\n type: 'checkbox',\n input: true,\n weight: 29,\n key: 'useExactSearch',\n label: 'Use exact search',\n tooltip: 'Disables search algorithm threshold.'\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/select/editForm/Select.edit.data.js?"); /***/ }), @@ -1759,10 +1792,10 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /*!***************************************************************!*\ !*** ./lib/components/select/editForm/Select.edit.display.js ***! \***************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n type: 'select',\n input: true,\n weight: 20,\n tooltip: 'Select the type of widget you\\'d like to use.',\n key: 'widget',\n defaultValue: 'choicesjs',\n label: 'Widget Type',\n dataSrc: 'values',\n data: {\n values: [{\n label: 'ChoicesJS',\n value: 'choicesjs'\n }, {\n label: 'HTML 5',\n value: 'html5'\n }]\n }\n}, {\n weight: 1230,\n type: 'checkbox',\n label: 'Unique Options',\n tooltip: 'Display only unique dropdown options.',\n key: 'uniqueOptions',\n input: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/select/editForm/Select.edit.display.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n type: 'select',\n input: true,\n weight: 20,\n tooltip: 'Select the type of widget you\\'d like to use.',\n key: 'widget',\n defaultValue: 'choicesjs',\n label: 'Widget Type',\n dataSrc: 'values',\n data: {\n values: [{\n label: 'ChoicesJS',\n value: 'choicesjs'\n }, {\n label: 'HTML 5',\n value: 'html5'\n }]\n }\n}, {\n weight: 1230,\n type: 'checkbox',\n label: 'Unique Options',\n tooltip: 'Display only unique dropdown options.',\n key: 'uniqueOptions',\n input: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/select/editForm/Select.edit.display.js?"); /***/ }), @@ -1770,10 +1803,10 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /*!******************************************************************!*\ !*** ./lib/components/select/editForm/Select.edit.validation.js ***! \******************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n weight: 50,\n type: 'checkbox',\n label: 'Perform server validation of remote value',\n tooltip: 'Check this if you would like for the server to perform a validation check to ensure the selected value is an available option. This requires a Search query to ensure a record is found.',\n key: 'validate.select',\n input: true,\n conditional: {\n json: {\n var: 'data.searchField'\n }\n }\n}, {\n weight: 52,\n type: 'checkbox',\n label: 'Allow only available values',\n tooltip: 'Check this if you would like to perform a validation check to ensure the selected value is an available option (only for synchronous values).',\n key: 'validate.onlyAvailableItems',\n input: true,\n conditional: {\n json: {\n in: [{\n var: 'data.dataSrc'\n }, ['values', 'json', 'custom']]\n }\n }\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/select/editForm/Select.edit.validation.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n weight: 50,\n type: 'checkbox',\n label: 'Perform server validation of remote value',\n tooltip: 'Check this if you would like for the server to perform a validation check to ensure the selected value is an available option. This requires a Search query to ensure a record is found.',\n key: 'validate.select',\n input: true,\n conditional: {\n json: {\n \"var\": 'data.searchField'\n }\n }\n}, {\n weight: 52,\n type: 'checkbox',\n label: 'Allow only available values',\n tooltip: 'Check this if you would like to perform a validation check to ensure the selected value is an available option (only for synchronous values).',\n key: 'validate.onlyAvailableItems',\n input: true,\n conditional: {\n json: {\n \"in\": [{\n \"var\": 'data.dataSrc'\n }, ['values', 'json', 'custom']]\n }\n }\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/select/editForm/Select.edit.validation.js?"); /***/ }), @@ -1784,7 +1817,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\nvar _Radio = _interopRequireDefault(__webpack_require__(/*! ../radio/Radio.form */ \"./lib/components/radio/Radio.form.js\"));\n\nvar _SelectBoxesEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/SelectBoxes.edit.validation */ \"./lib/components/selectboxes/editForm/SelectBoxes.edit.validation.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _Radio.default.apply(void 0, [[{\n key: 'data',\n components: [{\n key: 'dataType',\n ignore: true\n }]\n }, {\n key: 'validation',\n components: _SelectBoxesEdit.default\n }, {\n key: 'addons',\n ignore: true\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/selectboxes/SelectBoxes.form.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\nvar _Radio = _interopRequireDefault(__webpack_require__(/*! ../radio/Radio.form */ \"./lib/components/radio/Radio.form.js\"));\nvar _SelectBoxesEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/SelectBoxes.edit.validation */ \"./lib/components/selectboxes/editForm/SelectBoxes.edit.validation.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _Radio[\"default\"].apply(void 0, [[{\n key: 'data',\n components: [{\n key: 'dataType',\n ignore: true\n }]\n }, {\n key: 'validation',\n components: _SelectBoxesEdit[\"default\"]\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/selectboxes/SelectBoxes.form.js?"); /***/ }), @@ -1795,7 +1828,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.join.js */ \"./node_modules/core-js/modules/es.array.join.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.find.js */ \"./node_modules/core-js/modules/es.array.find.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nvar _Radio = _interopRequireDefault(__webpack_require__(/*! ../radio/Radio */ \"./lib/components/radio/Radio.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar SelectBoxesComponent = /*#__PURE__*/function (_RadioComponent) {\n _inherits(SelectBoxesComponent, _RadioComponent);\n\n var _super = _createSuper(SelectBoxesComponent);\n\n function SelectBoxesComponent() {\n var _this;\n\n _classCallCheck(this, SelectBoxesComponent);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n _this.validators = _this.validators.concat('minSelectedCount', 'maxSelectedCount');\n return _this;\n }\n\n _createClass(SelectBoxesComponent, [{\n key: \"init\",\n value: function init() {\n _get(_getPrototypeOf(SelectBoxesComponent.prototype), \"init\", this).call(this);\n\n this.component.inputType = 'checkbox';\n }\n }, {\n key: \"defaultSchema\",\n get: function get() {\n return SelectBoxesComponent.schema();\n }\n }, {\n key: \"inputInfo\",\n get: function get() {\n var info = _get(_getPrototypeOf(SelectBoxesComponent.prototype), \"elementInfo\", this).call(this);\n\n info.attr.name += '[]';\n info.attr.type = 'checkbox';\n info.attr.class = 'form-check-input';\n return info;\n }\n }, {\n key: \"emptyValue\",\n get: function get() {\n return this.component.values.reduce(function (prev, value) {\n if (value.value) {\n prev[value.value] = false;\n }\n\n return prev;\n }, {});\n }\n }, {\n key: \"defaultValue\",\n get: function get() {\n var defaultValue = this.emptyValue;\n\n if (!_lodash.default.isEmpty(this.component.defaultValue)) {\n defaultValue = this.component.defaultValue;\n }\n\n if (this.component.customDefaultValue && !this.options.preview) {\n defaultValue = this.evaluate(this.component.customDefaultValue, {\n value: ''\n }, 'value');\n }\n\n return defaultValue;\n }\n /**\n * Only empty if the values are all false.\n *\n * @param value\n * @return {boolean}\n */\n\n }, {\n key: \"isEmpty\",\n value: function isEmpty() {\n var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.dataValue;\n var empty = true;\n\n for (var key in value) {\n if (value.hasOwnProperty(key) && value[key]) {\n empty = false;\n break;\n }\n }\n\n return empty;\n }\n }, {\n key: \"getValue\",\n value: function getValue() {\n if (this.viewOnly || !this.refs.input || !this.refs.input.length) {\n return this.dataValue;\n }\n\n var value = {};\n\n _lodash.default.each(this.refs.input, function (input) {\n value[input.value] = !!input.checked;\n });\n\n return value;\n }\n /**\n * Normalize values coming into updateValue.\n *\n * @param value\n * @return {*}\n */\n\n }, {\n key: \"normalizeValue\",\n value: function normalizeValue(value) {\n value = value || {};\n\n if (_typeof(value) !== 'object') {\n if (typeof value === 'string') {\n value = _defineProperty({}, value, true);\n } else {\n value = {};\n }\n }\n\n if (Array.isArray(value)) {\n _lodash.default.each(value, function (val) {\n value[val] = true;\n });\n }\n\n return value;\n }\n /**\n * Set the value of this component.\n *\n * @param value\n * @param flags\n */\n\n }, {\n key: \"setValue\",\n value: function setValue(value) {\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var changed = this.updateValue(value, flags);\n value = this.dataValue;\n\n if (this.isHtmlRenderMode()) {\n if (changed) {\n this.redraw();\n }\n } else {\n _lodash.default.each(this.refs.input, function (input) {\n if (_lodash.default.isUndefined(value[input.value])) {\n value[input.value] = false;\n }\n\n input.checked = !!value[input.value];\n });\n }\n\n return changed;\n }\n }, {\n key: \"getValueAsString\",\n value: function getValueAsString(value) {\n if (!value) {\n return '';\n }\n\n return (0, _lodash.default)(this.component.values || []).filter(function (v) {\n return value[v.value];\n }).map('label').join(', ');\n }\n }, {\n key: \"setSelectedClasses\",\n value: function setSelectedClasses() {\n var _this2 = this;\n\n if (this.refs.wrapper) {\n //add/remove selected option class\n var value = this.dataValue;\n var valuesKeys = Object.keys(value);\n this.refs.wrapper.forEach(function (wrapper, index) {\n var key = valuesKeys[index];\n var input = _this2.refs.input[index];\n\n if ((input === null || input === void 0 ? void 0 : input.value.toString()) !== key) {\n key = valuesKeys.find(function (k) {\n return (input === null || input === void 0 ? void 0 : input.value.toString()) === k;\n });\n }\n\n var isChecked = value[key];\n\n if (isChecked && key) {\n //add class to container when selected\n _this2.addClass(wrapper, _this2.optionSelectedClass); //change \"checked\" attribute\n\n\n input.setAttribute('checked', 'true');\n } else if (!isChecked && key) {\n _this2.removeClass(wrapper, _this2.optionSelectedClass);\n\n input.removeAttribute('checked');\n }\n });\n }\n }\n }, {\n key: \"setInputsDisabled\",\n value: function setInputsDisabled(value, onlyUnchecked) {\n if (this.refs.input) {\n this.refs.input.forEach(function (item) {\n if (onlyUnchecked && !item.checked || !onlyUnchecked) {\n item.disabled = value;\n }\n });\n }\n }\n }, {\n key: \"checkComponentValidity\",\n value: function checkComponentValidity(data, dirty, rowData, options) {\n var _this3 = this;\n\n var minCount = this.component.validate.minSelectedCount;\n var maxCount = this.component.validate.maxSelectedCount;\n var isValid = this.isValid(data, dirty);\n\n if (maxCount || minCount) {\n var count = Object.keys(this.validationValue).reduce(function (total, key) {\n if (_this3.validationValue[key]) {\n total++;\n }\n\n return total;\n }, 0); // Disable the rest of inputs if the max amount is already checked\n\n if (maxCount && count >= maxCount) {\n this.setInputsDisabled(true, true);\n } else if (maxCount && !this.shouldDisabled) {\n this.setInputsDisabled(false);\n }\n\n if (!isValid && maxCount && count > maxCount) {\n var message = this.t(this.component.maxSelectedCountMessage || 'You can only select up to {{maxCount}} items.', {\n maxCount: maxCount\n });\n this.setCustomValidity(message, dirty);\n return false;\n } else if (!isValid && minCount && count < minCount) {\n this.setInputsDisabled(false);\n\n var _message = this.t(this.component.minSelectedCountMessage || 'You must select at least {{minCount}} items.', {\n minCount: minCount\n });\n\n this.setCustomValidity(_message, dirty);\n return false;\n }\n }\n\n return _get(_getPrototypeOf(SelectBoxesComponent.prototype), \"checkComponentValidity\", this).call(this, data, dirty, rowData, options);\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len2 = arguments.length, extend = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n extend[_key2] = arguments[_key2];\n }\n\n return _Radio.default.schema.apply(_Radio.default, [{\n type: 'selectboxes',\n label: 'Select Boxes',\n key: 'selectBoxes',\n inline: false\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Select Boxes',\n group: 'basic',\n icon: 'plus-square',\n weight: 60,\n documentation: '/userguide/forms/form-components#select-boxes',\n schema: SelectBoxesComponent.schema()\n };\n }\n }]);\n\n return SelectBoxesComponent;\n}(_Radio.default);\n\nexports[\"default\"] = SelectBoxesComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/selectboxes/SelectBoxes.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n__webpack_require__(/*! core-js/modules/es.array.reduce.js */ \"./node_modules/core-js/modules/es.array.reduce.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.is-array.js */ \"./node_modules/core-js/modules/es.array.is-array.js\");\n__webpack_require__(/*! core-js/modules/es.array.join.js */ \"./node_modules/core-js/modules/es.array.join.js\");\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-string.js */ \"./node_modules/core-js/modules/es.date.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.array.find.js */ \"./node_modules/core-js/modules/es.array.find.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nvar _Radio = _interopRequireDefault(__webpack_require__(/*! ../radio/Radio */ \"./lib/components/radio/Radio.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar SelectBoxesComponent = /*#__PURE__*/function (_RadioComponent) {\n _inherits(SelectBoxesComponent, _RadioComponent);\n var _super = _createSuper(SelectBoxesComponent);\n function SelectBoxesComponent() {\n var _this;\n _classCallCheck(this, SelectBoxesComponent);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _this.validators = _this.validators.concat('minSelectedCount', 'maxSelectedCount', 'availableValueProperty');\n return _this;\n }\n _createClass(SelectBoxesComponent, [{\n key: \"init\",\n value: function init() {\n _get(_getPrototypeOf(SelectBoxesComponent.prototype), \"init\", this).call(this);\n this.component.inputType = 'checkbox';\n }\n }, {\n key: \"defaultSchema\",\n get: function get() {\n return SelectBoxesComponent.schema();\n }\n }, {\n key: \"inputInfo\",\n get: function get() {\n var info = _get(_getPrototypeOf(SelectBoxesComponent.prototype), \"elementInfo\", this).call(this);\n info.attr.name += '[]';\n info.attr.type = 'checkbox';\n info.attr[\"class\"] = 'form-check-input';\n return info;\n }\n }, {\n key: \"emptyValue\",\n get: function get() {\n return this.component.values.reduce(function (prev, value) {\n if (value.value) {\n prev[value.value] = false;\n }\n return prev;\n }, {});\n }\n }, {\n key: \"defaultValue\",\n get: function get() {\n var defaultValue = this.emptyValue;\n if (!_lodash[\"default\"].isEmpty(this.component.defaultValue)) {\n defaultValue = this.component.defaultValue;\n }\n if (this.component.customDefaultValue && !this.options.preview) {\n defaultValue = this.evaluate(this.component.customDefaultValue, {\n value: ''\n }, 'value');\n }\n return defaultValue;\n }\n\n /**\n * Only empty if the values are all false.\n *\n * @param value\n * @return {boolean}\n */\n }, {\n key: \"isEmpty\",\n value: function isEmpty() {\n var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.dataValue;\n var empty = true;\n for (var key in value) {\n if (value.hasOwnProperty(key) && value[key]) {\n empty = false;\n break;\n }\n }\n return empty;\n }\n }, {\n key: \"getValue\",\n value: function getValue() {\n if (this.viewOnly || !this.refs.input || !this.refs.input.length) {\n return this.dataValue;\n }\n var value = {};\n _lodash[\"default\"].each(this.refs.input, function (input) {\n value[input.value] = !!input.checked;\n });\n return value;\n }\n\n /**\n * Normalize values coming into updateValue.\n *\n * @param value\n * @return {*}\n */\n }, {\n key: \"normalizeValue\",\n value: function normalizeValue(value) {\n value = value || {};\n if (_typeof(value) !== 'object') {\n if (typeof value === 'string') {\n value = _defineProperty({}, value, true);\n } else {\n value = {};\n }\n }\n if (Array.isArray(value)) {\n _lodash[\"default\"].each(value, function (val) {\n value[val] = true;\n });\n }\n return value;\n }\n\n /**\n * Set the value of this component.\n *\n * @param value\n * @param flags\n */\n }, {\n key: \"setValue\",\n value: function setValue(value) {\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var changed = this.updateValue(value, flags);\n value = this.dataValue;\n if (this.isHtmlRenderMode()) {\n if (changed) {\n this.redraw();\n }\n } else {\n _lodash[\"default\"].each(this.refs.input, function (input) {\n if (_lodash[\"default\"].isUndefined(value[input.value])) {\n value[input.value] = false;\n }\n input.checked = !!value[input.value];\n });\n }\n return changed;\n }\n }, {\n key: \"getValueAsString\",\n value: function getValueAsString(value) {\n if (!value) {\n return '';\n }\n return (0, _lodash[\"default\"])(this.component.values || []).filter(function (v) {\n return value[v.value];\n }).map('label').join(', ');\n }\n }, {\n key: \"setSelectedClasses\",\n value: function setSelectedClasses() {\n var _this2 = this;\n if (this.refs.wrapper) {\n //add/remove selected option class\n var value = this.dataValue;\n var valuesKeys = Object.keys(value);\n this.refs.wrapper.forEach(function (wrapper, index) {\n var key = valuesKeys[index];\n var input = _this2.refs.input[index];\n if ((input === null || input === void 0 ? void 0 : input.value.toString()) !== key) {\n key = valuesKeys.find(function (k) {\n return (input === null || input === void 0 ? void 0 : input.value.toString()) === k;\n });\n }\n var isChecked = value[key];\n if (isChecked && key) {\n //add class to container when selected\n _this2.addClass(wrapper, _this2.optionSelectedClass);\n //change \"checked\" attribute\n input.setAttribute('checked', 'true');\n } else if (!isChecked && key) {\n _this2.removeClass(wrapper, _this2.optionSelectedClass);\n input.removeAttribute('checked');\n }\n });\n }\n }\n }, {\n key: \"setInputsDisabled\",\n value: function setInputsDisabled(value, onlyUnchecked) {\n if (this.refs.input) {\n this.refs.input.forEach(function (item) {\n if (onlyUnchecked && !item.checked || !onlyUnchecked) {\n item.disabled = value;\n }\n });\n }\n }\n }, {\n key: \"checkComponentValidity\",\n value: function checkComponentValidity(data, dirty, rowData, options) {\n var _this3 = this;\n var minCount = this.component.validate.minSelectedCount;\n var maxCount = this.component.validate.maxSelectedCount;\n var isValid = this.isValid(data, dirty);\n if ((maxCount || minCount) && !this.shouldSkipValidation(data, dirty, rowData)) {\n var count = Object.keys(this.validationValue).reduce(function (total, key) {\n if (_this3.validationValue[key]) {\n total++;\n }\n return total;\n }, 0);\n\n // Disable the rest of inputs if the max amount is already checked\n if (maxCount && count >= maxCount) {\n this.setInputsDisabled(true, true);\n } else if (maxCount && !this.shouldDisabled) {\n this.setInputsDisabled(false);\n }\n if (!isValid && maxCount && count > maxCount) {\n var message = this.t(this.component.maxSelectedCountMessage || 'You can only select up to {{maxCount}} items.', {\n maxCount: maxCount\n });\n this.setCustomValidity(message, dirty);\n return false;\n } else if (!isValid && minCount && count < minCount) {\n this.setInputsDisabled(false);\n var _message = this.t(this.component.minSelectedCountMessage || 'You must select at least {{minCount}} items.', {\n minCount: minCount\n });\n this.setCustomValidity(_message, dirty);\n return false;\n }\n }\n return _get(_getPrototypeOf(SelectBoxesComponent.prototype), \"checkComponentValidity\", this).call(this, data, dirty, rowData, options);\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len2 = arguments.length, extend = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n extend[_key2] = arguments[_key2];\n }\n return _Radio[\"default\"].schema.apply(_Radio[\"default\"], [{\n type: 'selectboxes',\n label: 'Select Boxes',\n key: 'selectBoxes',\n inline: false\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Select Boxes',\n group: 'basic',\n icon: 'plus-square',\n weight: 60,\n documentation: '/userguide/form-building/form-components#select-box',\n schema: SelectBoxesComponent.schema()\n };\n }\n }]);\n return SelectBoxesComponent;\n}(_Radio[\"default\"]);\nexports[\"default\"] = SelectBoxesComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/selectboxes/SelectBoxes.js?"); /***/ }), @@ -1803,10 +1836,10 @@ eval("\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \". /*!****************************************************************************!*\ !*** ./lib/components/selectboxes/editForm/SelectBoxes.edit.validation.js ***! \****************************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n type: 'number',\n input: true,\n key: 'validate.minSelectedCount',\n label: 'Minimum checked number',\n tooltip: 'Minimum checkboxes required before form can be submitted.',\n weight: 250\n}, {\n type: 'number',\n input: true,\n key: 'validate.maxSelectedCount',\n label: 'Maximum checked number',\n tooltip: 'Maximum checkboxes possible before form can be submitted.',\n weight: 250\n}, {\n type: 'textfield',\n input: true,\n key: 'minSelectedCountMessage',\n label: 'Minimum checked error message',\n tooltip: 'Error message displayed if minimum number of items not checked.',\n weight: 250\n}, {\n type: 'textfield',\n input: true,\n key: 'maxSelectedCountMessage',\n label: 'Maximum checked error message',\n tooltip: 'Error message displayed if maximum number of items checked.',\n weight: 250\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/selectboxes/editForm/SelectBoxes.edit.validation.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n type: 'number',\n input: true,\n key: 'validate.minSelectedCount',\n label: 'Minimum checked number',\n tooltip: 'Minimum checkboxes required before form can be submitted.',\n weight: 250\n}, {\n type: 'number',\n input: true,\n key: 'validate.maxSelectedCount',\n label: 'Maximum checked number',\n tooltip: 'Maximum checkboxes possible before form can be submitted.',\n weight: 250\n}, {\n type: 'textfield',\n input: true,\n key: 'minSelectedCountMessage',\n label: 'Minimum checked error message',\n tooltip: 'Error message displayed if minimum number of items not checked.',\n weight: 250\n}, {\n type: 'textfield',\n input: true,\n key: 'maxSelectedCountMessage',\n label: 'Maximum checked error message',\n tooltip: 'Error message displayed if maximum number of items checked.',\n weight: 250\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/selectboxes/editForm/SelectBoxes.edit.validation.js?"); /***/ }), @@ -1817,7 +1850,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\nvar _Components = _interopRequireDefault(__webpack_require__(/*! ../Components */ \"./lib/components/Components.js\"));\n\nvar _SignatureEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/Signature.edit.data */ \"./lib/components/signature/editForm/Signature.edit.data.js\"));\n\nvar _SignatureEdit2 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Signature.edit.display */ \"./lib/components/signature/editForm/Signature.edit.display.js\"));\n\nvar _SignatureEdit3 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Signature.edit.validation */ \"./lib/components/signature/editForm/Signature.edit.validation.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _Components.default.baseEditForm.apply(_Components.default, [[{\n key: 'display',\n components: _SignatureEdit2.default\n }, {\n key: 'data',\n components: _SignatureEdit.default\n }, {\n key: 'validation',\n components: _SignatureEdit3.default\n }, {\n key: 'addons',\n ignore: true\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/signature/Signature.form.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\nvar _Components = _interopRequireDefault(__webpack_require__(/*! ../Components */ \"./lib/components/Components.js\"));\nvar _SignatureEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/Signature.edit.data */ \"./lib/components/signature/editForm/Signature.edit.data.js\"));\nvar _SignatureEdit2 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Signature.edit.display */ \"./lib/components/signature/editForm/Signature.edit.display.js\"));\nvar _SignatureEdit3 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Signature.edit.validation */ \"./lib/components/signature/editForm/Signature.edit.validation.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _Components[\"default\"].baseEditForm.apply(_Components[\"default\"], [[{\n key: 'display',\n components: _SignatureEdit2[\"default\"]\n }, {\n key: 'data',\n components: _SignatureEdit[\"default\"]\n }, {\n key: 'validation',\n components: _SignatureEdit3[\"default\"]\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/signature/Signature.form.js?"); /***/ }), @@ -1828,7 +1861,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\nvar _signature_pad = _interopRequireDefault(__webpack_require__(/*! signature_pad */ \"./node_modules/signature_pad/dist/signature_pad.js\"));\n\nvar _resizeObserverPolyfill = _interopRequireDefault(__webpack_require__(/*! resize-observer-polyfill */ \"./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js\"));\n\nvar _Input2 = _interopRequireDefault(__webpack_require__(/*! ../_classes/input/Input */ \"./lib/components/_classes/input/Input.js\"));\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar SignatureComponent = /*#__PURE__*/function (_Input) {\n _inherits(SignatureComponent, _Input);\n\n var _super = _createSuper(SignatureComponent);\n\n function SignatureComponent() {\n _classCallCheck(this, SignatureComponent);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(SignatureComponent, [{\n key: \"init\",\n value: function init() {\n var _this$options, _this$component$overl, _this$component$overl2;\n\n _get(_getPrototypeOf(SignatureComponent.prototype), \"init\", this).call(this);\n\n this.currentWidth = 0;\n this.scale = 1;\n this.ratio = 1;\n\n if (!this.component.width) {\n this.component.width = '100%';\n }\n\n if (!this.component.height) {\n this.component.height = '200px';\n }\n\n if (this.component.keepOverlayRatio && ((_this$options = this.options) === null || _this$options === void 0 ? void 0 : _this$options.display) === 'pdf' && (_this$component$overl = this.component.overlay) !== null && _this$component$overl !== void 0 && _this$component$overl.width && (_this$component$overl2 = this.component.overlay) !== null && _this$component$overl2 !== void 0 && _this$component$overl2.height) {\n var _this$component$overl3, _this$component$overl4;\n\n this.ratio = ((_this$component$overl3 = this.component.overlay) === null || _this$component$overl3 === void 0 ? void 0 : _this$component$overl3.width) / ((_this$component$overl4 = this.component.overlay) === null || _this$component$overl4 === void 0 ? void 0 : _this$component$overl4.height);\n this.component.width = '100%';\n this.component.height = 'auto';\n }\n }\n }, {\n key: \"emptyValue\",\n get: function get() {\n return '';\n }\n }, {\n key: \"defaultSchema\",\n get: function get() {\n return SignatureComponent.schema();\n }\n }, {\n key: \"inputInfo\",\n get: function get() {\n var info = _get(_getPrototypeOf(SignatureComponent.prototype), \"inputInfo\", this);\n\n info.type = 'input';\n info.attr.type = 'hidden';\n return info;\n }\n }, {\n key: \"className\",\n get: function get() {\n return \"\".concat(_get(_getPrototypeOf(SignatureComponent.prototype), \"className\", this), \" signature-pad\");\n }\n }, {\n key: \"labelIsHidden\",\n value: function labelIsHidden() {\n return this.component.hideLabel;\n }\n }, {\n key: \"setValue\",\n value: function setValue(value) {\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n var changed = _get(_getPrototypeOf(SignatureComponent.prototype), \"setValue\", this).call(this, value, flags);\n\n if (this.refs.signatureImage && (this.options.readOnly || this.disabled)) {\n this.refs.signatureImage.setAttribute('src', value);\n this.showCanvas(false);\n }\n\n if (this.signaturePad) {\n if (!value) {\n this.signaturePad.clear();\n } else if (changed) {\n this.triggerChange();\n }\n }\n\n if (this.signaturePad && this.dataValue && this.signaturePad.isEmpty()) {\n this.setDataToSigaturePad();\n }\n\n return changed;\n }\n }, {\n key: \"showCanvas\",\n value: function showCanvas(show) {\n if (show) {\n if (this.refs.canvas) {\n this.refs.canvas.style.display = 'inherit';\n }\n\n if (this.refs.signatureImage) {\n this.refs.signatureImage.style.display = 'none';\n }\n } else {\n if (this.refs.canvas) {\n this.refs.canvas.style.display = 'none';\n }\n\n if (this.refs.signatureImage) {\n this.refs.signatureImage.style.display = 'inherit';\n this.refs.signatureImage.style.maxHeight = '100%';\n }\n }\n }\n }, {\n key: \"onDisabled\",\n value: function onDisabled() {\n this.showCanvas(!_get(_getPrototypeOf(SignatureComponent.prototype), \"disabled\", this));\n\n if (this.signaturePad) {\n if (_get(_getPrototypeOf(SignatureComponent.prototype), \"disabled\", this)) {\n this.signaturePad.off();\n\n if (this.refs.refresh) {\n this.refs.refresh.classList.add('disabled');\n }\n\n if (this.refs.signatureImage && this.dataValue) {\n this.refs.signatureImage.setAttribute('src', this.dataValue);\n }\n } else {\n this.signaturePad.on();\n\n if (this.refs.refresh) {\n this.refs.refresh.classList.remove('disabled');\n }\n }\n }\n }\n }, {\n key: \"checkSize\",\n value: function checkSize(force, scale) {\n if (this.refs.padBody && (force || this.refs.padBody && this.refs.padBody.offsetWidth !== this.currentWidth)) {\n this.scale = force ? scale : this.scale;\n this.currentWidth = this.refs.padBody.offsetWidth;\n var width = this.currentWidth * this.scale;\n this.refs.canvas.width = width;\n var height = this.ratio ? width / this.ratio : this.refs.padBody.offsetHeight * this.scale;\n var maxHeight = this.refs.padBody.offsetHeight * this.scale;\n this.refs.canvas.height = height > maxHeight ? maxHeight : height;\n this.refs.canvas.style.maxWidth = \"\".concat(this.currentWidth * this.scale, \"px\");\n this.refs.canvas.style.maxHeight = \"\".concat(maxHeight, \"px\");\n var ctx = this.refs.canvas.getContext('2d');\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.scale(1 / this.scale, 1 / this.scale);\n ctx.fillStyle = this.signaturePad.backgroundColor;\n ctx.fillRect(0, 0, this.refs.canvas.width, this.refs.canvas.height);\n this.signaturePad.clear();\n\n if (this.dataValue) {\n this.setDataToSigaturePad();\n }\n }\n }\n }, {\n key: \"renderElement\",\n value: function renderElement(value, index) {\n return this.renderTemplate('signature', {\n element: _get(_getPrototypeOf(SignatureComponent.prototype), \"renderElement\", this).call(this, value, index),\n required: _lodash.default.get(this.component, 'validate.required', false)\n });\n }\n }, {\n key: \"hasModalSaveButton\",\n get: function get() {\n return false;\n }\n }, {\n key: \"getModalPreviewTemplate\",\n value: function getModalPreviewTemplate() {\n return this.renderTemplate('modalPreview', {\n previewText: this.dataValue ? \"\") : this.t('Click to Sign')\n });\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n var _this = this;\n\n this.loadRefs(element, {\n canvas: 'single',\n refresh: 'single',\n padBody: 'single',\n signatureImage: 'single'\n });\n\n var superAttach = _get(_getPrototypeOf(SignatureComponent.prototype), \"attach\", this).call(this, element);\n\n if (this.refs.refresh && this.options.readOnly) {\n this.refs.refresh.classList.add('disabled');\n } // Create the signature pad.\n\n\n if (this.refs.canvas) {\n this.signaturePad = new _signature_pad.default(this.refs.canvas, {\n minWidth: this.component.minWidth,\n maxWidth: this.component.maxWidth,\n penColor: this.component.penColor,\n backgroundColor: this.component.backgroundColor\n });\n this.signaturePad.addEventListener('endStroke', function () {\n return _this.setValue(_this.signaturePad.toDataURL());\n });\n this.refs.signatureImage.setAttribute('src', this.signaturePad.toDataURL());\n this.onDisabled(); // Ensure the signature is always the size of its container.\n\n if (this.refs.padBody) {\n if (!this.refs.padBody.style.maxWidth) {\n this.refs.padBody.style.maxWidth = '100%';\n }\n\n if (!this.builderMode && !this.options.preview) {\n this.observer = new _resizeObserverPolyfill.default(function () {\n _this.checkSize();\n });\n this.observer.observe(this.refs.padBody);\n }\n\n this.addEventListener(window, 'resize', _lodash.default.debounce(function () {\n return _this.checkSize();\n }, 10));\n setTimeout(function checkWidth() {\n if (this.refs.padBody && this.refs.padBody.offsetWidth) {\n this.checkSize();\n } else {\n setTimeout(checkWidth.bind(this), 20);\n }\n }.bind(this), 20);\n }\n }\n\n this.addEventListener(this.refs.refresh, 'click', function (event) {\n event.preventDefault();\n\n _this.showCanvas(true);\n\n _this.signaturePad.clear();\n\n _this.setValue(_this.defaultValue);\n });\n this.setValue(this.dataValue);\n return superAttach;\n }\n /* eslint-enable max-statements */\n\n }, {\n key: \"detach\",\n value: function detach() {\n if (this.observer) {\n this.observer.disconnect();\n this.observer = null;\n }\n\n if (this.signaturePad) {\n this.signaturePad.off();\n }\n\n this.signaturePad = null;\n this.currentWidth = 0;\n\n _get(_getPrototypeOf(SignatureComponent.prototype), \"detach\", this).call(this);\n }\n }, {\n key: \"getValueAsString\",\n value: function getValueAsString(value) {\n return value ? 'Yes' : 'No';\n }\n }, {\n key: \"focus\",\n value: function focus() {\n this.refs.padBody.focus();\n }\n }, {\n key: \"setDataToSigaturePad\",\n value: function setDataToSigaturePad() {\n this.signaturePad.fromDataURL(this.dataValue, {\n ratio: 1,\n width: this.refs.canvas.width,\n height: this.refs.canvas.height\n });\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _Input2.default.schema.apply(_Input2.default, [{\n type: 'signature',\n label: 'Signature',\n key: 'signature',\n footer: 'Sign above',\n width: '100%',\n height: '150px',\n penColor: 'black',\n backgroundColor: 'rgb(245,245,235)',\n minWidth: '0.5',\n maxWidth: '2.5',\n keepOverlayRatio: true\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Signature',\n group: 'advanced',\n icon: 'pencil',\n weight: 120,\n documentation: '/userguide/forms/form-components#signature',\n schema: SignatureComponent.schema()\n };\n }\n }]);\n\n return SignatureComponent;\n}(_Input2.default);\n\nexports[\"default\"] = SignatureComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/signature/Signature.js?"); +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/web.timers.js */ \"./node_modules/core-js/modules/web.timers.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _signature_pad = _interopRequireDefault(__webpack_require__(/*! signature_pad */ \"./node_modules/signature_pad/dist/signature_pad.js\"));\nvar _resizeObserverPolyfill = _interopRequireDefault(__webpack_require__(/*! resize-observer-polyfill */ \"./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js\"));\nvar _Input2 = _interopRequireDefault(__webpack_require__(/*! ../_classes/input/Input */ \"./lib/components/_classes/input/Input.js\"));\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar SignatureComponent = /*#__PURE__*/function (_Input) {\n _inherits(SignatureComponent, _Input);\n var _super = _createSuper(SignatureComponent);\n function SignatureComponent() {\n _classCallCheck(this, SignatureComponent);\n return _super.apply(this, arguments);\n }\n _createClass(SignatureComponent, [{\n key: \"init\",\n value: function init() {\n var _this$options, _this$component$overl, _this$component$overl2;\n _get(_getPrototypeOf(SignatureComponent.prototype), \"init\", this).call(this);\n this.currentWidth = 0;\n this.scale = 1;\n this.ratio = 1;\n if (!this.component.width) {\n this.component.width = '100%';\n }\n if (!this.component.height) {\n this.component.height = '200px';\n }\n if (this.component.keepOverlayRatio && ((_this$options = this.options) === null || _this$options === void 0 ? void 0 : _this$options.display) === 'pdf' && (_this$component$overl = this.component.overlay) !== null && _this$component$overl !== void 0 && _this$component$overl.width && (_this$component$overl2 = this.component.overlay) !== null && _this$component$overl2 !== void 0 && _this$component$overl2.height) {\n var _this$component$overl3, _this$component$overl4;\n this.ratio = ((_this$component$overl3 = this.component.overlay) === null || _this$component$overl3 === void 0 ? void 0 : _this$component$overl3.width) / ((_this$component$overl4 = this.component.overlay) === null || _this$component$overl4 === void 0 ? void 0 : _this$component$overl4.height);\n this.component.width = '100%';\n this.component.height = 'auto';\n }\n }\n }, {\n key: \"emptyValue\",\n get: function get() {\n return '';\n }\n }, {\n key: \"defaultSchema\",\n get: function get() {\n return SignatureComponent.schema();\n }\n }, {\n key: \"inputInfo\",\n get: function get() {\n var info = _get(_getPrototypeOf(SignatureComponent.prototype), \"inputInfo\", this);\n info.type = 'input';\n info.attr.type = 'hidden';\n return info;\n }\n }, {\n key: \"className\",\n get: function get() {\n return \"\".concat(_get(_getPrototypeOf(SignatureComponent.prototype), \"className\", this), \" signature-pad\");\n }\n }, {\n key: \"labelIsHidden\",\n value: function labelIsHidden() {\n return this.component.hideLabel;\n }\n }, {\n key: \"setValue\",\n value: function setValue(value) {\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var changed = _get(_getPrototypeOf(SignatureComponent.prototype), \"setValue\", this).call(this, value, flags);\n if (this.refs.signatureImage && (this.options.readOnly || this.disabled)) {\n this.refs.signatureImage.setAttribute('src', value);\n this.showCanvas(false);\n }\n if (this.signaturePad) {\n if (!value) {\n this.signaturePad.clear();\n } else if (changed) {\n this.triggerChange();\n }\n }\n if (this.signaturePad && this.dataValue && this.signaturePad.isEmpty()) {\n this.setDataToSigaturePad();\n }\n return changed;\n }\n }, {\n key: \"showCanvas\",\n value: function showCanvas(show) {\n if (show) {\n if (this.refs.canvas) {\n this.refs.canvas.style.display = 'inherit';\n }\n if (this.refs.signatureImage) {\n this.refs.signatureImage.style.display = 'none';\n }\n } else {\n if (this.refs.canvas) {\n this.refs.canvas.style.display = 'none';\n }\n if (this.refs.signatureImage) {\n this.refs.signatureImage.style.display = 'inherit';\n this.refs.signatureImage.style.maxHeight = '100%';\n }\n }\n }\n }, {\n key: \"onDisabled\",\n value: function onDisabled() {\n this.showCanvas(!_get(_getPrototypeOf(SignatureComponent.prototype), \"disabled\", this));\n if (this.signaturePad) {\n if (_get(_getPrototypeOf(SignatureComponent.prototype), \"disabled\", this)) {\n this.signaturePad.off();\n if (this.refs.refresh) {\n this.refs.refresh.classList.add('disabled');\n }\n if (this.refs.signatureImage && this.dataValue) {\n this.refs.signatureImage.setAttribute('src', this.dataValue);\n }\n } else {\n this.signaturePad.on();\n if (this.refs.refresh) {\n this.refs.refresh.classList.remove('disabled');\n }\n }\n }\n }\n }, {\n key: \"checkSize\",\n value: function checkSize(force, scale) {\n if (this.refs.padBody && (force || this.refs.padBody && this.refs.padBody.offsetWidth !== this.currentWidth)) {\n this.scale = force ? scale : this.scale;\n this.currentWidth = this.refs.padBody.offsetWidth;\n var width = this.currentWidth * this.scale;\n this.refs.canvas.width = width;\n var height = this.ratio ? width / this.ratio : this.refs.padBody.offsetHeight * this.scale;\n var maxHeight = this.refs.padBody.offsetHeight * this.scale;\n this.refs.canvas.height = height > maxHeight ? maxHeight : height;\n this.refs.canvas.style.maxWidth = \"\".concat(this.currentWidth * this.scale, \"px\");\n this.refs.canvas.style.maxHeight = \"\".concat(maxHeight, \"px\");\n var ctx = this.refs.canvas.getContext('2d');\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.scale(1 / this.scale, 1 / this.scale);\n ctx.fillStyle = this.signaturePad.backgroundColor;\n ctx.fillRect(0, 0, this.refs.canvas.width, this.refs.canvas.height);\n this.signaturePad.clear();\n if (this.dataValue) {\n this.setDataToSigaturePad();\n }\n this.showCanvas(true);\n }\n }\n }, {\n key: \"renderElement\",\n value: function renderElement(value, index) {\n return this.renderTemplate('signature', {\n element: _get(_getPrototypeOf(SignatureComponent.prototype), \"renderElement\", this).call(this, value, index),\n required: _lodash[\"default\"].get(this.component, 'validate.required', false)\n });\n }\n }, {\n key: \"hasModalSaveButton\",\n get: function get() {\n return false;\n }\n }, {\n key: \"getModalPreviewTemplate\",\n value: function getModalPreviewTemplate() {\n return this.renderTemplate('modalPreview', {\n previewText: this.dataValue ? \"\") : this.t('Click to Sign')\n });\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n var _this = this;\n this.loadRefs(element, {\n canvas: 'single',\n refresh: 'single',\n padBody: 'single',\n signatureImage: 'single'\n });\n var superAttach = _get(_getPrototypeOf(SignatureComponent.prototype), \"attach\", this).call(this, element);\n if (this.refs.refresh && this.options.readOnly) {\n this.refs.refresh.classList.add('disabled');\n }\n\n // Create the signature pad.\n if (this.refs.canvas) {\n this.signaturePad = new _signature_pad[\"default\"](this.refs.canvas, {\n minWidth: this.component.minWidth,\n maxWidth: this.component.maxWidth,\n penColor: this.component.penColor,\n backgroundColor: this.component.backgroundColor\n });\n this.signaturePad.addEventListener('endStroke', function () {\n return _this.setValue(_this.signaturePad.toDataURL());\n });\n this.refs.signatureImage.setAttribute('src', this.signaturePad.toDataURL());\n this.onDisabled();\n\n // Ensure the signature is always the size of its container.\n if (this.refs.padBody) {\n if (!this.refs.padBody.style.maxWidth) {\n this.refs.padBody.style.maxWidth = '100%';\n }\n if (!this.builderMode && !this.options.preview) {\n this.observer = new _resizeObserverPolyfill[\"default\"](function () {\n _this.checkSize();\n });\n this.observer.observe(this.refs.padBody);\n }\n this.addEventListener(window, 'resize', _lodash[\"default\"].debounce(function () {\n return _this.checkSize();\n }, 10));\n setTimeout(function checkWidth() {\n if (this.refs.padBody && this.refs.padBody.offsetWidth) {\n this.checkSize();\n } else {\n setTimeout(checkWidth.bind(this), 20);\n }\n }.bind(this), 20);\n }\n }\n this.addEventListener(this.refs.refresh, 'click', function (event) {\n event.preventDefault();\n _this.showCanvas(true);\n _this.signaturePad.clear();\n _this.setValue(_this.defaultValue);\n });\n this.setValue(this.dataValue);\n return superAttach;\n }\n /* eslint-enable max-statements */\n }, {\n key: \"detach\",\n value: function detach() {\n if (this.observer) {\n this.observer.disconnect();\n this.observer = null;\n }\n if (this.signaturePad) {\n this.signaturePad.off();\n }\n this.signaturePad = null;\n this.currentWidth = 0;\n _get(_getPrototypeOf(SignatureComponent.prototype), \"detach\", this).call(this);\n }\n }, {\n key: \"getValueAsString\",\n value: function getValueAsString(value) {\n return value ? 'Yes' : 'No';\n }\n }, {\n key: \"focus\",\n value: function focus() {\n this.refs.padBody.focus();\n }\n }, {\n key: \"setDataToSigaturePad\",\n value: function setDataToSigaturePad() {\n this.signaturePad.fromDataURL(this.dataValue, {\n ratio: 1,\n width: this.refs.canvas.width,\n height: this.refs.canvas.height\n });\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _Input2[\"default\"].schema.apply(_Input2[\"default\"], [{\n type: 'signature',\n label: 'Signature',\n key: 'signature',\n footer: 'Sign above',\n width: '100%',\n height: '150px',\n penColor: 'black',\n backgroundColor: 'rgb(245,245,235)',\n minWidth: '0.5',\n maxWidth: '2.5',\n keepOverlayRatio: true\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Signature',\n group: 'advanced',\n icon: 'pencil',\n weight: 120,\n documentation: '/developers/integrations/esign/esign-integrations#signature-component',\n schema: SignatureComponent.schema()\n };\n }\n }]);\n return SignatureComponent;\n}(_Input2[\"default\"]);\nexports[\"default\"] = SignatureComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/signature/Signature.js?"); /***/ }), @@ -1836,10 +1869,10 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /*!******************************************************************!*\ !*** ./lib/components/signature/editForm/Signature.edit.data.js ***! \******************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'multiple',\n ignore: true\n}, {\n key: 'defaultValue',\n ignore: true\n}, {\n key: 'dbIndex',\n ignore: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/signature/editForm/Signature.edit.data.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'multiple',\n ignore: true\n}, {\n key: 'defaultValue',\n ignore: true\n}, {\n key: 'dbIndex',\n ignore: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/signature/editForm/Signature.edit.data.js?"); /***/ }), @@ -1847,10 +1880,10 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /*!*********************************************************************!*\ !*** ./lib/components/signature/editForm/Signature.edit.display.js ***! \*********************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n type: 'textfield',\n input: true,\n key: 'footer',\n label: 'Footer Label',\n tooltip: 'The footer text that appears below the signature area.',\n placeholder: 'Footer Label',\n weight: 10\n}, {\n type: 'textfield',\n input: true,\n key: 'width',\n label: 'Width',\n tooltip: 'The width of the signature area.',\n placeholder: 'Width',\n conditional: {\n json: {\n '!': [{\n var: 'data.keepOverlayRatio'\n }]\n }\n },\n weight: 50\n}, {\n type: 'textfield',\n input: true,\n key: 'height',\n label: 'Height',\n tooltip: 'The height of the signature area.',\n placeholder: 'Height',\n conditional: {\n json: {\n '!': [{\n var: 'data.keepOverlayRatio'\n }]\n }\n },\n weight: 51\n}, {\n weight: 52,\n type: 'checkbox',\n label: 'Keep Overlay Aspect Ratio',\n tooltip: 'If checked, the field will have the same aspect ratio as its preview.',\n key: 'keepOverlayRatio',\n customConditional: function customConditional(_ref) {\n var _options$editForm;\n\n var options = _ref.options;\n return (options === null || options === void 0 ? void 0 : (_options$editForm = options.editForm) === null || _options$editForm === void 0 ? void 0 : _options$editForm.display) === 'pdf';\n },\n input: true\n}, {\n type: 'textfield',\n input: true,\n key: 'backgroundColor',\n label: 'Background Color',\n tooltip: 'The background color of the signature area.',\n placeholder: 'Background Color',\n weight: 52\n}, {\n type: 'textfield',\n input: true,\n key: 'penColor',\n label: 'Pen Color',\n tooltip: 'The ink color for the signature area.',\n placeholder: 'Pen Color',\n weight: 53\n}, {\n key: 'placeholder',\n ignore: true\n}, {\n key: 'autofocus',\n ignore: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/signature/editForm/Signature.edit.display.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n type: 'textfield',\n input: true,\n key: 'footer',\n label: 'Footer Label',\n tooltip: 'The footer text that appears below the signature area.',\n placeholder: 'Footer Label',\n weight: 10\n}, {\n type: 'textfield',\n input: true,\n key: 'width',\n label: 'Width',\n tooltip: 'The width of the signature area.',\n placeholder: 'Width',\n conditional: {\n json: {\n '!': [{\n \"var\": 'data.keepOverlayRatio'\n }]\n }\n },\n weight: 50\n}, {\n type: 'textfield',\n input: true,\n key: 'height',\n label: 'Height',\n tooltip: 'The height of the signature area.',\n placeholder: 'Height',\n conditional: {\n json: {\n '!': [{\n \"var\": 'data.keepOverlayRatio'\n }]\n }\n },\n weight: 51\n}, {\n weight: 52,\n type: 'checkbox',\n label: 'Keep Overlay Aspect Ratio',\n tooltip: 'If checked, the field will have the same aspect ratio as its preview.',\n key: 'keepOverlayRatio',\n customConditional: function customConditional(_ref) {\n var _options$editForm;\n var options = _ref.options;\n return (options === null || options === void 0 ? void 0 : (_options$editForm = options.editForm) === null || _options$editForm === void 0 ? void 0 : _options$editForm.display) === 'pdf';\n },\n input: true\n}, {\n type: 'textfield',\n input: true,\n key: 'backgroundColor',\n label: 'Background Color',\n tooltip: 'The background color of the signature area.',\n placeholder: 'Background Color',\n weight: 52\n}, {\n type: 'textfield',\n input: true,\n key: 'penColor',\n label: 'Pen Color',\n tooltip: 'The ink color for the signature area.',\n placeholder: 'Pen Color',\n weight: 53\n}, {\n key: 'placeholder',\n ignore: true\n}, {\n key: 'autofocus',\n ignore: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/signature/editForm/Signature.edit.display.js?"); /***/ }), @@ -1858,10 +1891,10 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /*!************************************************************************!*\ !*** ./lib/components/signature/editForm/Signature.edit.validation.js ***! \************************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'unique',\n ignore: true\n}, {\n key: 'validateOn',\n ignore: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/signature/editForm/Signature.edit.validation.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'unique',\n ignore: true\n}, {\n key: 'validateOn',\n ignore: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/signature/editForm/Signature.edit.validation.js?"); /***/ }), @@ -1872,7 +1905,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\nvar _Components = _interopRequireDefault(__webpack_require__(/*! ../Components */ \"./lib/components/Components.js\"));\n\nvar _SurveyEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/Survey.edit.data */ \"./lib/components/survey/editForm/Survey.edit.data.js\"));\n\nvar _SurveyEdit2 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Survey.edit.display */ \"./lib/components/survey/editForm/Survey.edit.display.js\"));\n\nvar _SurveyEdit3 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Survey.edit.validation */ \"./lib/components/survey/editForm/Survey.edit.validation.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _Components.default.baseEditForm.apply(_Components.default, [[{\n key: 'display',\n components: _SurveyEdit2.default\n }, {\n key: 'data',\n components: _SurveyEdit.default\n }, {\n key: 'validation',\n components: _SurveyEdit3.default\n }, {\n key: 'addons',\n ignore: true\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/survey/Survey.form.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\nvar _Components = _interopRequireDefault(__webpack_require__(/*! ../Components */ \"./lib/components/Components.js\"));\nvar _SurveyEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/Survey.edit.data */ \"./lib/components/survey/editForm/Survey.edit.data.js\"));\nvar _SurveyEdit2 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Survey.edit.display */ \"./lib/components/survey/editForm/Survey.edit.display.js\"));\nvar _SurveyEdit3 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Survey.edit.validation */ \"./lib/components/survey/editForm/Survey.edit.validation.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _Components[\"default\"].baseEditForm.apply(_Components[\"default\"], [[{\n key: 'display',\n components: _SurveyEdit2[\"default\"]\n }, {\n key: 'data',\n components: _SurveyEdit[\"default\"]\n }, {\n key: 'validation',\n components: _SurveyEdit3[\"default\"]\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/survey/Survey.form.js?"); /***/ }), @@ -1883,7 +1916,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.set.js */ \"./node_modules/core-js/modules/es.reflect.set.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.find.js */ \"./node_modules/core-js/modules/es.array.find.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nvar _Field2 = _interopRequireDefault(__webpack_require__(/*! ../_classes/field/Field */ \"./lib/components/_classes/field/Field.js\"));\n\nvar _utils = __webpack_require__(/*! ../../utils/utils */ \"./lib/utils/utils.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction set(target, property, value, receiver) { if (typeof Reflect !== \"undefined\" && Reflect.set) { set = Reflect.set; } else { set = function set(target, property, value, receiver) { var base = _superPropBase(target, property); var desc; if (base) { desc = Object.getOwnPropertyDescriptor(base, property); if (desc.set) { desc.set.call(receiver, value); return true; } else if (!desc.writable) { return false; } } desc = Object.getOwnPropertyDescriptor(receiver, property); if (desc) { if (!desc.writable) { return false; } desc.value = value; Object.defineProperty(receiver, property, desc); } else { _defineProperty(receiver, property, value); } return true; }; } return set(target, property, value, receiver); }\n\nfunction _set(target, property, value, receiver, isStrict) { var s = set(target, property, value, receiver || target); if (!s && isStrict) { throw new Error('failed to set property'); } return value; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar SurveyComponent = /*#__PURE__*/function (_Field) {\n _inherits(SurveyComponent, _Field);\n\n var _super = _createSuper(SurveyComponent);\n\n function SurveyComponent() {\n _classCallCheck(this, SurveyComponent);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(SurveyComponent, [{\n key: \"defaultSchema\",\n get: function get() {\n return SurveyComponent.schema();\n }\n }, {\n key: \"render\",\n value: function render() {\n return _get(_getPrototypeOf(SurveyComponent.prototype), \"render\", this).call(this, this.renderTemplate('survey'));\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n var _this = this;\n\n this.loadRefs(element, {\n input: 'multiple'\n });\n\n var superAttach = _get(_getPrototypeOf(SurveyComponent.prototype), \"attach\", this).call(this, element);\n\n this.refs.input.forEach(function (input) {\n if (_this.disabled) {\n input.setAttribute('disabled', 'disabled');\n } else {\n _this.addEventListener(input, 'change', function () {\n return _this.updateValue(null, {\n modified: true\n });\n });\n }\n });\n this.setValue(this.dataValue);\n return superAttach;\n }\n }, {\n key: \"setValue\",\n value: function setValue(value) {\n var _this2 = this;\n\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n if (!value) {\n return false;\n }\n\n _lodash.default.each(this.component.questions, function (question) {\n _lodash.default.each(_this2.refs.input, function (input) {\n if (input.name === _this2.getInputName(question)) {\n input.checked = input.value === value[question.value];\n }\n });\n });\n\n var changed = this.updateValue(value, flags);\n\n if (changed && this.isHtmlRenderMode()) {\n this.redraw();\n }\n\n return changed;\n }\n }, {\n key: \"emptyValue\",\n get: function get() {\n return {};\n }\n }, {\n key: \"defaultValue\",\n get: function get() {\n var defaultValue = _get(_getPrototypeOf(SurveyComponent.prototype), \"defaultValue\", this); //support for default values created in old formio.js versions\n\n\n if (defaultValue && !_lodash.default.isObject(defaultValue) && this.component.values.some(function (value) {\n return value.value === defaultValue;\n })) {\n var adoptedDefaultValue = {};\n this.component.questions.forEach(function (question) {\n adoptedDefaultValue[question.value] = defaultValue;\n });\n return adoptedDefaultValue;\n }\n\n return defaultValue;\n }\n }, {\n key: \"getValue\",\n value: function getValue() {\n var _this3 = this;\n\n if (this.viewOnly || !this.refs.input || !this.refs.input.length) {\n return this.dataValue;\n }\n\n var value = {};\n\n _lodash.default.each(this.component.questions, function (question) {\n _lodash.default.each(_this3.refs.input, function (input) {\n if (input.checked && input.name === _this3.getInputName(question)) {\n value[question.value] = input.value;\n return false;\n }\n });\n });\n\n return value;\n }\n }, {\n key: \"disabled\",\n get: function get() {\n return _get(_getPrototypeOf(SurveyComponent.prototype), \"disabled\", this);\n },\n set: function set(disabled) {\n _set(_getPrototypeOf(SurveyComponent.prototype), \"disabled\", disabled, this, true);\n\n _lodash.default.each(this.refs.input, function (input) {\n input.disabled = true;\n });\n }\n }, {\n key: \"validateRequired\",\n value: function validateRequired(setting, value) {\n if (!(0, _utils.boolValue)(setting)) {\n return true;\n }\n\n return this.component.questions.reduce(function (result, question) {\n return result && Boolean(value[question.value]);\n }, true);\n }\n }, {\n key: \"getInputName\",\n value: function getInputName(question) {\n return \"\".concat(this.options.name, \"[\").concat(question.value, \"]\");\n }\n }, {\n key: \"getValueAsString\",\n value: function getValueAsString(value, options) {\n var _this4 = this;\n\n if (options !== null && options !== void 0 && options.email) {\n var result = \"\\n \\n \\n \\n \\n \\n \\n \\n \\n \";\n\n _lodash.default.forIn(value, function (value, key) {\n var question = _lodash.default.find(_this4.component.questions, ['value', key]);\n\n var answer = _lodash.default.find(_this4.component.values, ['value', value]);\n\n if (!question || !answer) {\n return;\n }\n\n result += \"\\n \\n \\n \\n \\n \");\n });\n\n result += '
QuestionValue
\".concat(question.label, \"\").concat(answer.label, \"
';\n return result;\n }\n\n return _get(_getPrototypeOf(SurveyComponent.prototype), \"getValueAsString\", this).call(this, value, options);\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _Field2.default.schema.apply(_Field2.default, [{\n type: 'survey',\n label: 'Survey',\n key: 'survey',\n questions: [],\n values: []\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Survey',\n group: 'advanced',\n icon: 'list',\n weight: 110,\n documentation: '/userguide/forms/form-components#survey',\n schema: SurveyComponent.schema()\n };\n }\n }]);\n\n return SurveyComponent;\n}(_Field2.default);\n\nexports[\"default\"] = SurveyComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/survey/Survey.js?"); +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.set.js */ \"./node_modules/core-js/modules/es.reflect.set.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n__webpack_require__(/*! core-js/modules/es.array.some.js */ \"./node_modules/core-js/modules/es.array.some.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.reduce.js */ \"./node_modules/core-js/modules/es.array.reduce.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.array.find.js */ \"./node_modules/core-js/modules/es.array.find.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nvar _Field2 = _interopRequireDefault(__webpack_require__(/*! ../_classes/field/Field */ \"./lib/components/_classes/field/Field.js\"));\nvar _utils = __webpack_require__(/*! ../../utils/utils */ \"./lib/utils/utils.js\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction set(target, property, value, receiver) { if (typeof Reflect !== \"undefined\" && Reflect.set) { set = Reflect.set; } else { set = function set(target, property, value, receiver) { var base = _superPropBase(target, property); var desc; if (base) { desc = Object.getOwnPropertyDescriptor(base, property); if (desc.set) { desc.set.call(receiver, value); return true; } else if (!desc.writable) { return false; } } desc = Object.getOwnPropertyDescriptor(receiver, property); if (desc) { if (!desc.writable) { return false; } desc.value = value; Object.defineProperty(receiver, property, desc); } else { _defineProperty(receiver, property, value); } return true; }; } return set(target, property, value, receiver); }\nfunction _set(target, property, value, receiver, isStrict) { var s = set(target, property, value, receiver || target); if (!s && isStrict) { throw new Error('failed to set property'); } return value; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar SurveyComponent = /*#__PURE__*/function (_Field) {\n _inherits(SurveyComponent, _Field);\n var _super = _createSuper(SurveyComponent);\n function SurveyComponent() {\n _classCallCheck(this, SurveyComponent);\n return _super.apply(this, arguments);\n }\n _createClass(SurveyComponent, [{\n key: \"defaultSchema\",\n get: function get() {\n return SurveyComponent.schema();\n }\n }, {\n key: \"render\",\n value: function render() {\n return _get(_getPrototypeOf(SurveyComponent.prototype), \"render\", this).call(this, this.renderTemplate('survey'));\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n var _this = this;\n this.loadRefs(element, {\n input: 'multiple'\n });\n var superAttach = _get(_getPrototypeOf(SurveyComponent.prototype), \"attach\", this).call(this, element);\n this.refs.input.forEach(function (input) {\n if (_this.disabled) {\n input.setAttribute('disabled', 'disabled');\n } else {\n _this.addEventListener(input, 'change', function () {\n return _this.updateValue(null, {\n modified: true\n });\n });\n }\n });\n this.setValue(this.dataValue);\n return superAttach;\n }\n }, {\n key: \"setValue\",\n value: function setValue(value) {\n var _this2 = this;\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n if (!value) {\n return false;\n }\n _lodash[\"default\"].each(this.component.questions, function (question) {\n _lodash[\"default\"].each(_this2.refs.input, function (input) {\n if (input.name === _this2.getInputName(question)) {\n input.checked = input.value === value[question.value];\n }\n });\n });\n var changed = this.updateValue(value, flags);\n if (changed && this.isHtmlRenderMode()) {\n this.redraw();\n }\n return changed;\n }\n }, {\n key: \"emptyValue\",\n get: function get() {\n return {};\n }\n }, {\n key: \"defaultValue\",\n get: function get() {\n var defaultValue = _get(_getPrototypeOf(SurveyComponent.prototype), \"defaultValue\", this);\n //support for default values created in old formio.js versions\n if (defaultValue && !_lodash[\"default\"].isObject(defaultValue) && this.component.values.some(function (value) {\n return value.value === defaultValue;\n })) {\n var adoptedDefaultValue = {};\n this.component.questions.forEach(function (question) {\n adoptedDefaultValue[question.value] = defaultValue;\n });\n return adoptedDefaultValue;\n }\n return defaultValue;\n }\n }, {\n key: \"getValue\",\n value: function getValue() {\n var _this3 = this;\n if (this.viewOnly || !this.refs.input || !this.refs.input.length) {\n return this.dataValue;\n }\n var value = {};\n _lodash[\"default\"].each(this.component.questions, function (question) {\n _lodash[\"default\"].each(_this3.refs.input, function (input) {\n if (input.checked && input.name === _this3.getInputName(question)) {\n value[question.value] = input.value;\n return false;\n }\n });\n });\n return value;\n }\n }, {\n key: \"disabled\",\n get: function get() {\n return _get(_getPrototypeOf(SurveyComponent.prototype), \"disabled\", this);\n },\n set: function set(disabled) {\n _set(_getPrototypeOf(SurveyComponent.prototype), \"disabled\", disabled, this, true);\n _lodash[\"default\"].each(this.refs.input, function (input) {\n input.disabled = true;\n });\n }\n }, {\n key: \"validateRequired\",\n value: function validateRequired(setting, value) {\n if (!(0, _utils.boolValue)(setting)) {\n return true;\n }\n return this.component.questions.reduce(function (result, question) {\n return result && Boolean(value[question.value]);\n }, true);\n }\n }, {\n key: \"getInputName\",\n value: function getInputName(question) {\n return \"\".concat(this.options.name, \"[\").concat(question.value, \"]\");\n }\n }, {\n key: \"getValueAsString\",\n value: function getValueAsString(value, options) {\n var _this4 = this;\n if (options !== null && options !== void 0 && options.email) {\n var result = \"\\n \\n \\n \\n \\n \\n \\n \\n \\n \";\n _lodash[\"default\"].forIn(value, function (value, key) {\n var question = _lodash[\"default\"].find(_this4.component.questions, ['value', key]);\n var answer = _lodash[\"default\"].find(_this4.component.values, ['value', value]);\n if (!question || !answer) {\n return;\n }\n result += \"\\n \\n \\n \\n \\n \");\n });\n result += '
QuestionValue
\".concat(question.label, \"\").concat(answer.label, \"
';\n return result;\n }\n return _get(_getPrototypeOf(SurveyComponent.prototype), \"getValueAsString\", this).call(this, value, options);\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _Field2[\"default\"].schema.apply(_Field2[\"default\"], [{\n type: 'survey',\n label: 'Survey',\n key: 'survey',\n questions: [],\n values: []\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Survey',\n group: 'advanced',\n icon: 'list',\n weight: 110,\n documentation: '/userguide/form-building/advanced-components#survey',\n schema: SurveyComponent.schema()\n };\n }\n }]);\n return SurveyComponent;\n}(_Field2[\"default\"]);\nexports[\"default\"] = SurveyComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/survey/Survey.js?"); /***/ }), @@ -1891,10 +1924,10 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /*!************************************************************!*\ !*** ./lib/components/survey/editForm/Survey.edit.data.js ***! \************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'multiple',\n ignore: true\n}, {\n type: 'datagrid',\n input: true,\n label: 'Questions',\n key: 'questions',\n tooltip: 'The questions you would like to ask in this survey question.',\n weight: 0,\n reorder: true,\n defaultValue: [{\n label: '',\n value: ''\n }],\n components: [{\n label: 'Label',\n key: 'label',\n input: true,\n type: 'textfield'\n }, {\n label: 'Value',\n key: 'value',\n input: true,\n type: 'textfield',\n allowCalculateOverride: true,\n calculateValue: {\n _camelCase: [{\n var: 'row.label'\n }]\n }\n }, {\n label: 'Tooltip',\n key: 'tooltip',\n input: true,\n type: 'textfield'\n }]\n}, {\n type: 'datagrid',\n input: true,\n label: 'Values',\n key: 'values',\n tooltip: 'The values that can be selected per question. Example: \\'Satisfied\\', \\'Very Satisfied\\', etc.',\n weight: 1,\n reorder: true,\n defaultValue: [{\n label: '',\n value: ''\n }],\n components: [{\n label: 'Label',\n key: 'label',\n input: true,\n type: 'textfield'\n }, {\n label: 'Value',\n key: 'value',\n input: true,\n type: 'textfield',\n allowCalculateOverride: true,\n calculateValue: {\n _camelCase: [{\n var: 'row.label'\n }]\n }\n }, {\n label: 'Tooltip',\n key: 'tooltip',\n input: true,\n type: 'textfield'\n }]\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/survey/editForm/Survey.edit.data.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'multiple',\n ignore: true\n}, {\n type: 'datagrid',\n input: true,\n label: 'Questions',\n key: 'questions',\n tooltip: 'The questions you would like to ask in this survey question.',\n weight: 0,\n reorder: true,\n defaultValue: [{\n label: '',\n value: ''\n }],\n components: [{\n label: 'Label',\n key: 'label',\n input: true,\n type: 'textfield'\n }, {\n label: 'Value',\n key: 'value',\n input: true,\n type: 'textfield',\n allowCalculateOverride: true,\n calculateValue: {\n _camelCase: [{\n \"var\": 'row.label'\n }]\n }\n }, {\n label: 'Tooltip',\n key: 'tooltip',\n input: true,\n type: 'textfield'\n }]\n}, {\n type: 'datagrid',\n input: true,\n label: 'Values',\n key: 'values',\n tooltip: 'The values that can be selected per question. Example: \\'Satisfied\\', \\'Very Satisfied\\', etc.',\n weight: 1,\n reorder: true,\n defaultValue: [{\n label: '',\n value: ''\n }],\n components: [{\n label: 'Label',\n key: 'label',\n input: true,\n type: 'textfield'\n }, {\n label: 'Value',\n key: 'value',\n input: true,\n type: 'textfield',\n allowCalculateOverride: true,\n calculateValue: {\n _camelCase: [{\n \"var\": 'row.label'\n }]\n }\n }, {\n label: 'Tooltip',\n key: 'tooltip',\n input: true,\n type: 'textfield'\n }]\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/survey/editForm/Survey.edit.data.js?"); /***/ }), @@ -1902,10 +1935,10 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /*!***************************************************************!*\ !*** ./lib/components/survey/editForm/Survey.edit.display.js ***! \***************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'placeholder',\n ignore: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/survey/editForm/Survey.edit.display.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'placeholder',\n ignore: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/survey/editForm/Survey.edit.display.js?"); /***/ }), @@ -1913,10 +1946,10 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /*!******************************************************************!*\ !*** ./lib/components/survey/editForm/Survey.edit.validation.js ***! \******************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'validateOn',\n ignore: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/survey/editForm/Survey.edit.validation.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'validateOn',\n ignore: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/survey/editForm/Survey.edit.validation.js?"); /***/ }), @@ -1927,7 +1960,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\nvar _NestedComponent = _interopRequireDefault(__webpack_require__(/*! ../_classes/nested/NestedComponent.form */ \"./lib/components/_classes/nested/NestedComponent.form.js\"));\n\nvar _TableEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/Table.edit.display */ \"./lib/components/table/editForm/Table.edit.display.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _NestedComponent.default.apply(void 0, [[{\n key: 'display',\n components: _TableEdit.default\n }, {\n key: 'addons',\n ignore: true\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/table/Table.form.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\nvar _NestedComponent = _interopRequireDefault(__webpack_require__(/*! ../_classes/nested/NestedComponent.form */ \"./lib/components/_classes/nested/NestedComponent.form.js\"));\nvar _TableEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/Table.edit.display */ \"./lib/components/table/editForm/Table.edit.display.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _NestedComponent[\"default\"].apply(void 0, [[{\n key: 'display',\n components: _TableEdit[\"default\"]\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/table/Table.form.js?"); /***/ }), @@ -1938,7 +1971,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptors.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.slice.js */ \"./node_modules/core-js/modules/es.array.slice.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nvar _builder = _interopRequireDefault(__webpack_require__(/*! ../../utils/builder */ \"./lib/utils/builder.js\"));\n\nvar _NestedComponent2 = _interopRequireDefault(__webpack_require__(/*! ../_classes/nested/NestedComponent */ \"./lib/components/_classes/nested/NestedComponent.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar TableComponent = /*#__PURE__*/function (_NestedComponent) {\n _inherits(TableComponent, _NestedComponent);\n\n var _super = _createSuper(TableComponent);\n\n function TableComponent() {\n var _this;\n\n _classCallCheck(this, TableComponent);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n _this.noField = true;\n return _this;\n }\n\n _createClass(TableComponent, [{\n key: \"defaultSchema\",\n get: function get() {\n return TableComponent.schema();\n }\n }, {\n key: \"schema\",\n get: function get() {\n var _this2 = this;\n\n var schema = _lodash.default.omit(_get(_getPrototypeOf(TableComponent.prototype), \"schema\", this), 'components');\n\n schema.rows = [];\n this.eachComponent(function (component) {\n if (!schema.rows || !schema.rows.length) {\n schema.rows = TableComponent.emptyTable(_this2.component.numRows, _this2.component.numCols);\n }\n\n if (!schema.rows[component.tableRow]) {\n schema.rows[component.tableRow] = [];\n }\n\n if (!schema.rows[component.tableRow][component.tableColumn]) {\n schema.rows[component.tableRow][component.column] = {\n components: []\n };\n }\n\n schema.rows[component.tableRow][component.tableColumn].components.push(component.schema);\n });\n\n if (!schema.rows.length) {\n schema.rows = TableComponent.emptyTable(this.component.numRows, this.component.numCols);\n }\n\n return schema;\n }\n }, {\n key: \"className\",\n get: function get() {\n var name = \"table-responsive \".concat(_get(_getPrototypeOf(TableComponent.prototype), \"className\", this));\n\n if (!this.component.bordered) {\n name += ' no-top-border-table';\n }\n\n return name;\n }\n }, {\n key: \"cellClassName\",\n get: function get() {\n var name = '';\n\n if (this.component.cellAlignment) {\n name = \"cell-align-\".concat(this.component.cellAlignment);\n }\n\n return name;\n }\n }, {\n key: \"tableKey\",\n get: function get() {\n return \"table-\".concat(this.key);\n }\n }, {\n key: \"colWidth\",\n get: function get() {\n var numCols = this.component.numCols;\n\n if (!numCols || typeof numCols !== 'number') {\n return '';\n }\n\n return Math.floor(12 / numCols).toString();\n }\n }, {\n key: \"init\",\n value: function init() {\n var _this3 = this;\n\n _get(_getPrototypeOf(TableComponent.prototype), \"init\", this).call(this); // Ensure component.rows has the correct number of rows and columns.\n\n\n for (var rowIndex = 0; rowIndex < this.component.numRows; rowIndex++) {\n this.component.rows[rowIndex] = this.component.rows[rowIndex] || [];\n\n for (var colIndex = 0; colIndex < this.component.numCols; colIndex++) {\n this.component.rows[rowIndex][colIndex] = this.component.rows[rowIndex][colIndex] || {\n components: []\n };\n }\n\n this.component.rows[rowIndex] = this.component.rows[rowIndex].slice(0, this.component.numCols);\n }\n\n this.component.rows = this.component.rows.slice(0, this.component.numRows);\n var lastNonEmptyRow = [];\n this.table = [];\n\n _lodash.default.each(this.component.rows, function (row, rowIndex) {\n _this3.table[rowIndex] = [];\n\n _lodash.default.each(row, function (column, colIndex) {\n _this3.table[rowIndex][colIndex] = [];\n\n if (_this3.component.cloneRows) {\n if (column.components.length) {\n lastNonEmptyRow[colIndex] = column;\n } else if (lastNonEmptyRow[colIndex]) {\n column.components = _lodash.default.cloneDeep(lastNonEmptyRow[colIndex].components);\n\n _builder.default.uniquify(_this3.root._form.components, column);\n }\n }\n\n _lodash.default.each(column.components, function (comp) {\n var columnComponent;\n\n if (_this3.builderMode) {\n comp.id = comp.id + rowIndex;\n columnComponent = comp;\n } else {\n columnComponent = _objectSpread(_objectSpread({}, comp), {}, {\n id: comp.id + rowIndex\n });\n }\n\n var component = _this3.createComponent(columnComponent);\n\n component.tableRow = rowIndex;\n component.tableColumn = colIndex;\n\n _this3.table[rowIndex][colIndex].push(component);\n });\n });\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this4 = this;\n\n return _get(_getPrototypeOf(TableComponent.prototype), \"render\", this).call(this, this.renderTemplate('table', {\n cellClassName: this.cellClassName,\n tableKey: this.tableKey,\n colWidth: this.colWidth,\n tableComponents: this.table.map(function (row) {\n return row.map(function (column) {\n return _this4.renderComponents(column);\n });\n })\n }));\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n var _this5 = this;\n\n var keys = this.table.reduce(function (prev, row, rowIndex) {\n prev[\"\".concat(_this5.tableKey, \"-\").concat(rowIndex)] = 'multiple';\n return prev;\n }, {});\n this.loadRefs(element, keys);\n\n var superAttach = _get(_getPrototypeOf(TableComponent.prototype), \"attach\", this).call(this, element);\n\n this.table.forEach(function (row, rowIndex) {\n row.forEach(function (column, columnIndex) {\n _this5.attachComponents(_this5.refs[\"\".concat(_this5.tableKey, \"-\").concat(rowIndex)][columnIndex], _this5.table[rowIndex][columnIndex], _this5.component.rows[rowIndex][columnIndex].components);\n });\n });\n return superAttach;\n }\n }, {\n key: \"destroy\",\n value: function destroy(all) {\n _get(_getPrototypeOf(TableComponent.prototype), \"destroy\", this).call(this, all);\n\n delete this.table;\n }\n }], [{\n key: \"emptyTable\",\n value: function emptyTable(numRows, numCols) {\n var rows = [];\n\n for (var i = 0; i < numRows; i++) {\n var cols = [];\n\n for (var j = 0; j < numCols; j++) {\n cols.push({\n components: []\n });\n }\n\n rows.push(cols);\n }\n\n return rows;\n }\n }, {\n key: \"schema\",\n value: function schema() {\n for (var _len2 = arguments.length, extend = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n extend[_key2] = arguments[_key2];\n }\n\n return _NestedComponent2.default.schema.apply(_NestedComponent2.default, [{\n label: 'Table',\n type: 'table',\n input: false,\n key: 'table',\n numRows: 3,\n numCols: 3,\n rows: TableComponent.emptyTable(3, 3),\n header: [],\n caption: '',\n cloneRows: false,\n striped: false,\n bordered: false,\n hover: false,\n condensed: false,\n persistent: false\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Table',\n group: 'layout',\n icon: 'table',\n weight: 40,\n documentation: '/userguide/forms/layout-components#table',\n schema: TableComponent.schema()\n };\n }\n }]);\n\n return TableComponent;\n}(_NestedComponent2.default);\n\nexports[\"default\"] = TableComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/table/Table.js?"); +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptors.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-properties.js */ \"./node_modules/core-js/modules/es.object.define-properties.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-string.js */ \"./node_modules/core-js/modules/es.date.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.array.slice.js */ \"./node_modules/core-js/modules/es.array.slice.js\");\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n__webpack_require__(/*! core-js/modules/es.array.reduce.js */ \"./node_modules/core-js/modules/es.array.reduce.js\");\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nvar _builder = _interopRequireDefault(__webpack_require__(/*! ../../utils/builder */ \"./lib/utils/builder.js\"));\nvar _NestedComponent2 = _interopRequireDefault(__webpack_require__(/*! ../_classes/nested/NestedComponent */ \"./lib/components/_classes/nested/NestedComponent.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar TableComponent = /*#__PURE__*/function (_NestedComponent) {\n _inherits(TableComponent, _NestedComponent);\n var _super = _createSuper(TableComponent);\n function TableComponent() {\n var _this;\n _classCallCheck(this, TableComponent);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _this.noField = true;\n return _this;\n }\n _createClass(TableComponent, [{\n key: \"defaultSchema\",\n get: function get() {\n return TableComponent.schema();\n }\n }, {\n key: \"schema\",\n get: function get() {\n var _this2 = this;\n var schema = _lodash[\"default\"].omit(_get(_getPrototypeOf(TableComponent.prototype), \"schema\", this), 'components');\n schema.rows = [];\n this.eachComponent(function (component) {\n if (!schema.rows || !schema.rows.length) {\n schema.rows = TableComponent.emptyTable(_this2.component.numRows, _this2.component.numCols);\n }\n if (!schema.rows[component.tableRow]) {\n schema.rows[component.tableRow] = [];\n }\n if (!schema.rows[component.tableRow][component.tableColumn]) {\n schema.rows[component.tableRow][component.column] = {\n components: []\n };\n }\n schema.rows[component.tableRow][component.tableColumn].components.push(component.schema);\n });\n if (!schema.rows.length) {\n schema.rows = TableComponent.emptyTable(this.component.numRows, this.component.numCols);\n }\n return schema;\n }\n }, {\n key: \"className\",\n get: function get() {\n var name = \"table-responsive \".concat(_get(_getPrototypeOf(TableComponent.prototype), \"className\", this));\n if (!this.component.bordered) {\n name += ' no-top-border-table';\n }\n return name;\n }\n }, {\n key: \"cellClassName\",\n get: function get() {\n var name = '';\n if (this.component.cellAlignment) {\n name = \"cell-align-\".concat(this.component.cellAlignment);\n }\n return name;\n }\n }, {\n key: \"tableKey\",\n get: function get() {\n return \"table-\".concat(this.key);\n }\n }, {\n key: \"colWidth\",\n get: function get() {\n var numCols = this.component.numCols;\n if (!numCols || typeof numCols !== 'number') {\n return '';\n }\n return Math.floor(12 / numCols).toString();\n }\n }, {\n key: \"init\",\n value: function init() {\n var _this3 = this;\n _get(_getPrototypeOf(TableComponent.prototype), \"init\", this).call(this);\n // Ensure component.rows has the correct number of rows and columns.\n for (var rowIndex = 0; rowIndex < this.component.numRows; rowIndex++) {\n this.component.rows[rowIndex] = this.component.rows[rowIndex] || [];\n for (var colIndex = 0; colIndex < this.component.numCols; colIndex++) {\n this.component.rows[rowIndex][colIndex] = this.component.rows[rowIndex][colIndex] || {\n components: []\n };\n }\n this.component.rows[rowIndex] = this.component.rows[rowIndex].slice(0, this.component.numCols);\n }\n this.component.rows = this.component.rows.slice(0, this.component.numRows);\n var lastNonEmptyRow = [];\n this.table = [];\n _lodash[\"default\"].each(this.component.rows, function (row, rowIndex) {\n _this3.table[rowIndex] = [];\n _lodash[\"default\"].each(row, function (column, colIndex) {\n _this3.table[rowIndex][colIndex] = [];\n if (_this3.component.cloneRows) {\n if (column.components.length) {\n lastNonEmptyRow[colIndex] = column;\n } else if (lastNonEmptyRow[colIndex]) {\n column.components = _lodash[\"default\"].cloneDeep(lastNonEmptyRow[colIndex].components);\n _builder[\"default\"].uniquify(_this3.root._form.components, column);\n }\n }\n _lodash[\"default\"].each(column.components, function (comp) {\n var columnComponent;\n if (_this3.builderMode) {\n comp.id = comp.id + rowIndex;\n columnComponent = comp;\n } else {\n columnComponent = _objectSpread(_objectSpread({}, comp), {}, {\n id: comp.id + rowIndex\n });\n }\n var component = _this3.createComponent(columnComponent);\n component.tableRow = rowIndex;\n component.tableColumn = colIndex;\n _this3.table[rowIndex][colIndex].push(component);\n });\n });\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this4 = this;\n return _get(_getPrototypeOf(TableComponent.prototype), \"render\", this).call(this, this.renderTemplate('table', {\n cellClassName: this.cellClassName,\n tableKey: this.tableKey,\n colWidth: this.colWidth,\n tableComponents: this.table.map(function (row) {\n return row.map(function (column) {\n return _this4.renderComponents(column);\n });\n })\n }));\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n var _this5 = this;\n var keys = this.table.reduce(function (prev, row, rowIndex) {\n prev[\"\".concat(_this5.tableKey, \"-\").concat(rowIndex)] = 'multiple';\n return prev;\n }, {});\n this.loadRefs(element, keys);\n var superAttach = _get(_getPrototypeOf(TableComponent.prototype), \"attach\", this).call(this, element);\n this.table.forEach(function (row, rowIndex) {\n row.forEach(function (column, columnIndex) {\n _this5.attachComponents(_this5.refs[\"\".concat(_this5.tableKey, \"-\").concat(rowIndex)][columnIndex], _this5.table[rowIndex][columnIndex], _this5.component.rows[rowIndex][columnIndex].components);\n });\n });\n return superAttach;\n }\n }, {\n key: \"destroy\",\n value: function destroy(all) {\n _get(_getPrototypeOf(TableComponent.prototype), \"destroy\", this).call(this, all);\n delete this.table;\n }\n }], [{\n key: \"emptyTable\",\n value: function emptyTable(numRows, numCols) {\n var rows = [];\n for (var i = 0; i < numRows; i++) {\n var cols = [];\n for (var j = 0; j < numCols; j++) {\n cols.push({\n components: []\n });\n }\n rows.push(cols);\n }\n return rows;\n }\n }, {\n key: \"schema\",\n value: function schema() {\n for (var _len2 = arguments.length, extend = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n extend[_key2] = arguments[_key2];\n }\n return _NestedComponent2[\"default\"].schema.apply(_NestedComponent2[\"default\"], [{\n label: 'Table',\n type: 'table',\n input: false,\n key: 'table',\n numRows: 3,\n numCols: 3,\n rows: TableComponent.emptyTable(3, 3),\n header: [],\n caption: '',\n cloneRows: false,\n striped: false,\n bordered: false,\n hover: false,\n condensed: false,\n persistent: false\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Table',\n group: 'layout',\n icon: 'table',\n weight: 40,\n documentation: '/userguide/form-building/layout-components#table',\n schema: TableComponent.schema()\n };\n }\n }]);\n return TableComponent;\n}(_NestedComponent2[\"default\"]);\nexports[\"default\"] = TableComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/table/Table.js?"); /***/ }), @@ -1946,10 +1979,10 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /*!*************************************************************!*\ !*** ./lib/components/table/editForm/Table.edit.display.js ***! \*************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'labelPosition',\n ignore: true\n}, {\n key: 'placeholder',\n ignore: true\n}, {\n key: 'description',\n ignore: true\n}, {\n key: 'autofocus',\n ignore: true\n}, {\n key: 'tooltip',\n ignore: true\n}, {\n key: 'tabindex',\n ignore: true\n}, {\n key: 'disabled',\n ignore: true\n}, {\n key: 'tableView',\n ignore: true\n}, {\n type: 'number',\n label: 'Number of Rows',\n key: 'numRows',\n input: true,\n weight: 1,\n placeholder: 'Number of Rows',\n tooltip: 'Enter the number or rows that should be displayed by this table.'\n}, {\n type: 'number',\n label: 'Number of Columns',\n key: 'numCols',\n input: true,\n weight: 2,\n placeholder: 'Number of Columns',\n tooltip: 'Enter the number or columns that should be displayed by this table.'\n}, {\n type: 'checkbox',\n label: 'Clone Row Components',\n key: 'cloneRows',\n input: true,\n weight: 3,\n tooltip: 'Check this if you would like to \\'clone\\' the first row of components to all additional empty rows of the table.'\n}, {\n type: 'select',\n label: 'Cell Alignment',\n key: 'cellAlignment',\n input: true,\n tooltip: 'Horizontal alignment for cells of the table.',\n dataSrc: 'values',\n data: {\n values: [{\n label: 'Left',\n value: 'left'\n }, {\n label: 'Center',\n value: 'center'\n }, {\n label: 'Right',\n value: 'right'\n }]\n },\n defaultValue: 'left',\n weight: 3\n}, {\n type: 'checkbox',\n label: 'Striped',\n key: 'striped',\n tooltip: 'This will stripe the table if checked.',\n input: true,\n weight: 701\n}, {\n type: 'checkbox',\n label: 'Bordered',\n key: 'bordered',\n input: true,\n tooltip: 'This will border the table if checked.',\n weight: 702\n}, {\n type: 'checkbox',\n label: 'Hover',\n key: 'hover',\n input: true,\n tooltip: 'Highlight a row on hover.',\n weight: 703\n}, {\n type: 'checkbox',\n label: 'Condensed',\n key: 'condensed',\n input: true,\n tooltip: 'Condense the size of the table.',\n weight: 704\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/table/editForm/Table.edit.display.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'labelPosition',\n ignore: true\n}, {\n key: 'placeholder',\n ignore: true\n}, {\n key: 'description',\n ignore: true\n}, {\n key: 'autofocus',\n ignore: true\n}, {\n key: 'tooltip',\n ignore: true\n}, {\n key: 'tabindex',\n ignore: true\n}, {\n key: 'disabled',\n ignore: true\n}, {\n key: 'tableView',\n ignore: true\n}, {\n type: 'number',\n label: 'Number of Rows',\n key: 'numRows',\n input: true,\n weight: 1,\n placeholder: 'Number of Rows',\n tooltip: 'Enter the number or rows that should be displayed by this table.'\n}, {\n type: 'number',\n label: 'Number of Columns',\n key: 'numCols',\n input: true,\n weight: 2,\n placeholder: 'Number of Columns',\n tooltip: 'Enter the number or columns that should be displayed by this table.'\n}, {\n type: 'checkbox',\n label: 'Clone Row Components',\n key: 'cloneRows',\n input: true,\n weight: 3,\n tooltip: 'Check this if you would like to \\'clone\\' the first row of components to all additional empty rows of the table.'\n}, {\n type: 'select',\n label: 'Cell Alignment',\n key: 'cellAlignment',\n input: true,\n tooltip: 'Horizontal alignment for cells of the table.',\n dataSrc: 'values',\n data: {\n values: [{\n label: 'Left',\n value: 'left'\n }, {\n label: 'Center',\n value: 'center'\n }, {\n label: 'Right',\n value: 'right'\n }]\n },\n defaultValue: 'left',\n weight: 3\n}, {\n type: 'checkbox',\n label: 'Striped',\n key: 'striped',\n tooltip: 'This will stripe the table if checked.',\n input: true,\n weight: 701\n}, {\n type: 'checkbox',\n label: 'Bordered',\n key: 'bordered',\n input: true,\n tooltip: 'This will border the table if checked.',\n weight: 702\n}, {\n type: 'checkbox',\n label: 'Hover',\n key: 'hover',\n input: true,\n tooltip: 'Highlight a row on hover.',\n weight: 703\n}, {\n type: 'checkbox',\n label: 'Condensed',\n key: 'condensed',\n input: true,\n tooltip: 'Condense the size of the table.',\n weight: 704\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/table/editForm/Table.edit.display.js?"); /***/ }), @@ -1960,7 +1993,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\nvar _NestedComponent = _interopRequireDefault(__webpack_require__(/*! ../_classes/nested/NestedComponent.form */ \"./lib/components/_classes/nested/NestedComponent.form.js\"));\n\nvar _TabsEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/Tabs.edit.display */ \"./lib/components/tabs/editForm/Tabs.edit.display.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _NestedComponent.default.apply(void 0, [[{\n key: 'display',\n components: _TabsEdit.default\n }, {\n key: 'addons',\n ignore: true\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/tabs/Tabs.form.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\nvar _NestedComponent = _interopRequireDefault(__webpack_require__(/*! ../_classes/nested/NestedComponent.form */ \"./lib/components/_classes/nested/NestedComponent.form.js\"));\nvar _TabsEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/Tabs.edit.display */ \"./lib/components/tabs/editForm/Tabs.edit.display.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _NestedComponent[\"default\"].apply(void 0, [[{\n key: 'display',\n components: _TabsEdit[\"default\"]\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/tabs/Tabs.form.js?"); /***/ }), @@ -1971,7 +2004,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.from.js */ \"./node_modules/core-js/modules/es.array.from.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.slice.js */ \"./node_modules/core-js/modules/es.array.slice.js\");\n\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.find-index.js */ \"./node_modules/core-js/modules/es.array.find-index.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.includes.js */ \"./node_modules/core-js/modules/es.array.includes.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.includes.js */ \"./node_modules/core-js/modules/es.string.includes.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nvar _NestedComponent2 = _interopRequireDefault(__webpack_require__(/*! ../_classes/nested/NestedComponent */ \"./lib/components/_classes/nested/NestedComponent.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar TabsComponent = /*#__PURE__*/function (_NestedComponent) {\n _inherits(TabsComponent, _NestedComponent);\n\n var _super = _createSuper(TabsComponent);\n\n function TabsComponent() {\n var _this;\n\n _classCallCheck(this, TabsComponent);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n _this.currentTab = 0;\n _this.noField = true;\n return _this;\n }\n\n _createClass(TabsComponent, [{\n key: \"defaultSchema\",\n get: function get() {\n return TabsComponent.schema();\n }\n }, {\n key: \"schema\",\n get: function get() {\n var _this2 = this;\n\n var schema = _get(_getPrototypeOf(TabsComponent.prototype), \"schema\", this); // We need to clone this because the builder uses the \"components\" reference and this would reset that reference.\n\n\n var components = _lodash.default.cloneDeep(this.component.components);\n\n schema.components = components.map(function (tab, index) {\n tab.components = _this2.tabs[index].map(function (component) {\n return component.schema;\n });\n return tab;\n });\n return schema;\n }\n }, {\n key: \"tabKey\",\n get: function get() {\n return \"tab-\".concat(this.key);\n }\n }, {\n key: \"tabLikey\",\n get: function get() {\n return \"tabLi-\".concat(this.key);\n }\n }, {\n key: \"tabLinkKey\",\n get: function get() {\n return \"tabLink-\".concat(this.key);\n }\n }, {\n key: \"init\",\n value: function init() {\n var _this3 = this;\n\n this.components = [];\n this.tabs = [];\n\n _lodash.default.each(this.component.components, function (tab, index) {\n _this3.tabs[index] = []; // Initialize empty tabs.\n\n tab.components = tab.components || [];\n\n _lodash.default.each(tab.components, function (comp) {\n var component = _this3.createComponent(comp);\n\n component.tab = index;\n\n _this3.tabs[index].push(component);\n });\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this4 = this;\n\n return _get(_getPrototypeOf(TabsComponent.prototype), \"render\", this).call(this, this.renderTemplate('tab', {\n tabKey: this.tabKey,\n tabLikey: this.tabLikey,\n tabLinkKey: this.tabLinkKey,\n currentTab: this.currentTab,\n tabComponents: this.tabs.map(function (tab) {\n return _this4.renderComponents(tab);\n })\n }, this.options.flatten || this.options.pdf ? 'flat' : null));\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n var _this$loadRefs,\n _this5 = this;\n\n this.loadRefs(element, (_this$loadRefs = {}, _defineProperty(_this$loadRefs, this.tabLinkKey, 'multiple'), _defineProperty(_this$loadRefs, this.tabKey, 'multiple'), _defineProperty(_this$loadRefs, this.tabLikey, 'multiple'), _this$loadRefs));\n ['change', 'error'].forEach(function (event) {\n return _this5.on(event, _this5.handleTabsValidation.bind(_this5));\n });\n\n var superAttach = _get(_getPrototypeOf(TabsComponent.prototype), \"attach\", this).call(this, element);\n\n this.refs[this.tabLinkKey].forEach(function (tabLink, index) {\n _this5.addEventListener(tabLink, 'click', function (event) {\n event.preventDefault();\n\n _this5.setTab(index);\n });\n });\n this.refs[this.tabKey].forEach(function (tab, index) {\n _this5.attachComponents(tab, _this5.tabs[index], _this5.component.components[index].components);\n });\n return superAttach;\n }\n }, {\n key: \"detach\",\n value: function detach(all) {\n _get(_getPrototypeOf(TabsComponent.prototype), \"detach\", this).call(this, all);\n }\n /**\n * Set the current tab.\n *\n * @param index\n */\n\n }, {\n key: \"setTab\",\n value: function setTab(index) {\n var _this6 = this;\n\n if (!this.tabs || !this.tabs[index] || !this.refs[this.tabKey] || !this.refs[this.tabKey][index]) {\n return;\n }\n\n this.currentTab = index;\n\n _lodash.default.each(this.refs[this.tabKey], function (tab) {\n _this6.removeClass(tab, 'formio-tab-panel-active');\n\n tab.style.display = 'none';\n });\n\n this.addClass(this.refs[this.tabKey][index], 'formio-tab-panel-active');\n this.refs[this.tabKey][index].style.display = 'block';\n\n _lodash.default.each(this.refs[this.tabLinkKey], function (tabLink, tabIndex) {\n if (_this6.refs[_this6.tabLinkKey][tabIndex]) {\n _this6.removeClass(tabLink, 'formio-tab-link-active');\n }\n\n if (_this6.refs[_this6.tabLikey][tabIndex]) {\n _this6.removeClass(_this6.refs[_this6.tabLikey][tabIndex], 'formio-tab-link-container-active');\n }\n });\n\n if (this.refs[this.tabLikey][index]) {\n this.addClass(this.refs[this.tabLikey][index], 'formio-tab-link-container-active');\n }\n\n if (this.refs[this.tabLinkKey][index]) {\n this.addClass(this.refs[this.tabLinkKey][index], 'formio-tab-link-active');\n }\n\n this.triggerChange();\n }\n }, {\n key: \"beforeFocus\",\n value: function beforeFocus(component) {\n if ('beforeFocus' in this.parent) {\n this.parent.beforeFocus(this);\n }\n\n var tabIndex = this.tabs.findIndex(function (tab) {\n return tab.some(function (comp) {\n return comp === component;\n });\n });\n\n if (tabIndex !== -1 && this.currentTab !== tabIndex) {\n this.setTab(tabIndex);\n }\n }\n }, {\n key: \"setErrorClasses\",\n value: function setErrorClasses(elements, dirty, hasErrors, hasMessages) {\n var _this7 = this;\n\n var element = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : this.element;\n\n if (this.component.modalEdit) {\n _get(_getPrototypeOf(TabsComponent.prototype), \"setErrorClasses\", this).call(this, elements, dirty, hasErrors, hasMessages, element);\n }\n\n elements.forEach(function (element) {\n _this7.addClass(element, 'is-invalid');\n\n if (element.getAttribute('ref') !== 'openModal') {\n if (_this7.options.highlightErrors) {\n _this7.addClass(element, 'tab-error');\n } else {\n _this7.addClass(element, 'has-error');\n }\n }\n });\n }\n }, {\n key: \"clearErrorClasses\",\n value: function clearErrorClasses(elements) {\n var _this8 = this;\n\n if (this.options.server || !this.rendered) {\n return;\n }\n\n if (this.component.modalEdit) {\n var element = Array.isArray(elements) || elements instanceof NodeList ? this.element : elements;\n\n _get(_getPrototypeOf(TabsComponent.prototype), \"clearErrorClasses\", this).call(this, element);\n }\n\n elements = Array.isArray(elements) || elements instanceof NodeList ? elements : [elements];\n elements.forEach(function (element) {\n _this8.removeClass(element, 'is-invalid');\n\n _this8.removeClass(element, 'tab-error');\n\n _this8.removeClass(element, 'has-error');\n });\n }\n }, {\n key: \"handleTabsValidation\",\n value: function handleTabsValidation() {\n if (!this.refs[this.tabLinkKey] || !this.refs[this.tabLinkKey].length || !this.tabs.length) {\n return;\n }\n\n this.clearErrorClasses(this.refs[this.tabLinkKey]);\n var invalidTabsIndexes = this.tabs.reduce(function (invalidTabs, tab, tabIndex) {\n var hasComponentWithError = tab.some(function (comp) {\n return !!comp.error;\n });\n return hasComponentWithError ? [].concat(_toConsumableArray(invalidTabs), [tabIndex]) : invalidTabs;\n }, []);\n\n if (!invalidTabsIndexes.length) {\n return;\n }\n\n var invalidTabs = _toConsumableArray(this.refs[this.tabLinkKey]).filter(function (_, tabIndex) {\n return invalidTabsIndexes.includes(tabIndex);\n });\n\n this.setErrorClasses(invalidTabs);\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len2 = arguments.length, extend = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n extend[_key2] = arguments[_key2];\n }\n\n return _NestedComponent2.default.schema.apply(_NestedComponent2.default, [{\n label: 'Tabs',\n type: 'tabs',\n input: false,\n key: 'tabs',\n persistent: false,\n tableView: false,\n components: [{\n label: 'Tab 1',\n key: 'tab1',\n components: []\n }],\n verticalLayout: false\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Tabs',\n group: 'layout',\n icon: 'folder-o',\n weight: 50,\n documentation: '/userguide/forms/layout-components#tabs',\n schema: TabsComponent.schema()\n };\n }\n }]);\n\n return TabsComponent;\n}(_NestedComponent2.default);\n\nexports[\"default\"] = TabsComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/tabs/Tabs.js?"); +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.from.js */ \"./node_modules/core-js/modules/es.array.from.js\");\n__webpack_require__(/*! core-js/modules/es.array.slice.js */ \"./node_modules/core-js/modules/es.array.slice.js\");\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.array.find-index.js */ \"./node_modules/core-js/modules/es.array.find-index.js\");\n__webpack_require__(/*! core-js/modules/es.array.some.js */ \"./node_modules/core-js/modules/es.array.some.js\");\n__webpack_require__(/*! core-js/modules/es.array.is-array.js */ \"./node_modules/core-js/modules/es.array.is-array.js\");\n__webpack_require__(/*! core-js/modules/es.array.reduce.js */ \"./node_modules/core-js/modules/es.array.reduce.js\");\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n__webpack_require__(/*! core-js/modules/es.array.includes.js */ \"./node_modules/core-js/modules/es.array.includes.js\");\n__webpack_require__(/*! core-js/modules/es.string.includes.js */ \"./node_modules/core-js/modules/es.string.includes.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nvar _NestedComponent2 = _interopRequireDefault(__webpack_require__(/*! ../_classes/nested/NestedComponent */ \"./lib/components/_classes/nested/NestedComponent.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar TabsComponent = /*#__PURE__*/function (_NestedComponent) {\n _inherits(TabsComponent, _NestedComponent);\n var _super = _createSuper(TabsComponent);\n function TabsComponent() {\n var _this;\n _classCallCheck(this, TabsComponent);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _this.currentTab = 0;\n _this.noField = true;\n return _this;\n }\n _createClass(TabsComponent, [{\n key: \"defaultSchema\",\n get: function get() {\n return TabsComponent.schema();\n }\n }, {\n key: \"schema\",\n get: function get() {\n var _this2 = this;\n var schema = _get(_getPrototypeOf(TabsComponent.prototype), \"schema\", this);\n // We need to clone this because the builder uses the \"components\" reference and this would reset that reference.\n var components = _lodash[\"default\"].cloneDeep(this.component.components);\n schema.components = components.map(function (tab, index) {\n tab.components = _this2.tabs[index].map(function (component) {\n return component.schema;\n });\n return tab;\n });\n return schema;\n }\n }, {\n key: \"tabKey\",\n get: function get() {\n return \"tab-\".concat(this.key);\n }\n }, {\n key: \"tabLikey\",\n get: function get() {\n return \"tabLi-\".concat(this.key);\n }\n }, {\n key: \"tabLinkKey\",\n get: function get() {\n return \"tabLink-\".concat(this.key);\n }\n }, {\n key: \"init\",\n value: function init() {\n var _this3 = this;\n this.components = [];\n this.tabs = [];\n _lodash[\"default\"].each(this.component.components, function (tab, index) {\n _this3.tabs[index] = [];\n // Initialize empty tabs.\n tab.components = tab.components || [];\n _lodash[\"default\"].each(tab.components, function (comp) {\n var component = _this3.createComponent(comp);\n component.tab = index;\n _this3.tabs[index].push(component);\n });\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this4 = this;\n return _get(_getPrototypeOf(TabsComponent.prototype), \"render\", this).call(this, this.renderTemplate('tab', {\n tabKey: this.tabKey,\n tabLikey: this.tabLikey,\n tabLinkKey: this.tabLinkKey,\n currentTab: this.currentTab,\n tabComponents: this.tabs.map(function (tab) {\n return _this4.renderComponents(tab);\n })\n }, this.options.flatten || this.options.pdf ? 'flat' : null));\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n var _this$loadRefs,\n _this5 = this;\n this.loadRefs(element, (_this$loadRefs = {}, _defineProperty(_this$loadRefs, this.tabLinkKey, 'multiple'), _defineProperty(_this$loadRefs, this.tabKey, 'multiple'), _defineProperty(_this$loadRefs, this.tabLikey, 'multiple'), _this$loadRefs));\n ['change', 'error'].forEach(function (event) {\n return _this5.on(event, _this5.handleTabsValidation.bind(_this5));\n });\n var superAttach = _get(_getPrototypeOf(TabsComponent.prototype), \"attach\", this).call(this, element);\n this.refs[this.tabLinkKey].forEach(function (tabLink, index) {\n _this5.addEventListener(tabLink, 'click', function (event) {\n event.preventDefault();\n _this5.setTab(index);\n });\n });\n this.refs[this.tabKey].forEach(function (tab, index) {\n _this5.attachComponents(tab, _this5.tabs[index], _this5.component.components[index].components);\n });\n return superAttach;\n }\n }, {\n key: \"detach\",\n value: function detach(all) {\n _get(_getPrototypeOf(TabsComponent.prototype), \"detach\", this).call(this, all);\n }\n\n /**\n * Set the current tab.\n *\n * @param index\n */\n }, {\n key: \"setTab\",\n value: function setTab(index) {\n var _this6 = this;\n if (!this.tabs || !this.tabs[index] || !this.refs[this.tabKey] || !this.refs[this.tabKey][index]) {\n return;\n }\n this.currentTab = index;\n _lodash[\"default\"].each(this.refs[this.tabKey], function (tab) {\n _this6.removeClass(tab, 'formio-tab-panel-active');\n tab.style.display = 'none';\n });\n this.addClass(this.refs[this.tabKey][index], 'formio-tab-panel-active');\n this.refs[this.tabKey][index].style.display = 'block';\n _lodash[\"default\"].each(this.refs[this.tabLinkKey], function (tabLink, tabIndex) {\n if (_this6.refs[_this6.tabLinkKey][tabIndex]) {\n _this6.removeClass(tabLink, 'formio-tab-link-active');\n }\n if (_this6.refs[_this6.tabLikey][tabIndex]) {\n _this6.removeClass(_this6.refs[_this6.tabLikey][tabIndex], 'formio-tab-link-container-active');\n }\n });\n if (this.refs[this.tabLikey][index]) {\n this.addClass(this.refs[this.tabLikey][index], 'formio-tab-link-container-active');\n }\n if (this.refs[this.tabLinkKey][index]) {\n this.addClass(this.refs[this.tabLinkKey][index], 'formio-tab-link-active');\n }\n this.triggerChange();\n }\n }, {\n key: \"beforeFocus\",\n value: function beforeFocus(component) {\n if ('beforeFocus' in this.parent) {\n this.parent.beforeFocus(this);\n }\n var tabIndex = this.tabs.findIndex(function (tab) {\n return tab.some(function (comp) {\n return comp === component;\n });\n });\n if (tabIndex !== -1 && this.currentTab !== tabIndex) {\n this.setTab(tabIndex);\n }\n }\n }, {\n key: \"setErrorClasses\",\n value: function setErrorClasses(elements, dirty, hasErrors, hasMessages) {\n var _this7 = this;\n var element = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : this.element;\n if (this.component.modalEdit) {\n _get(_getPrototypeOf(TabsComponent.prototype), \"setErrorClasses\", this).call(this, elements, dirty, hasErrors, hasMessages, element);\n }\n elements.forEach(function (element) {\n _this7.addClass(element, 'is-invalid');\n if (element.getAttribute('ref') !== 'openModal') {\n if (_this7.options.highlightErrors) {\n _this7.addClass(element, 'tab-error');\n } else {\n _this7.addClass(element, 'has-error');\n }\n }\n });\n }\n }, {\n key: \"clearErrorClasses\",\n value: function clearErrorClasses(elements) {\n var _this8 = this;\n if (this.options.server || !this.rendered) {\n return;\n }\n if (this.component.modalEdit) {\n var element = Array.isArray(elements) || elements instanceof NodeList ? this.element : elements;\n _get(_getPrototypeOf(TabsComponent.prototype), \"clearErrorClasses\", this).call(this, element);\n }\n elements = Array.isArray(elements) || elements instanceof NodeList ? elements : [elements];\n elements.forEach(function (element) {\n _this8.removeClass(element, 'is-invalid');\n _this8.removeClass(element, 'tab-error');\n _this8.removeClass(element, 'has-error');\n });\n }\n }, {\n key: \"handleTabsValidation\",\n value: function handleTabsValidation() {\n if (!this.refs[this.tabLinkKey] || !this.refs[this.tabLinkKey].length || !this.tabs.length) {\n return;\n }\n this.clearErrorClasses(this.refs[this.tabLinkKey]);\n var invalidTabsIndexes = this.tabs.reduce(function (invalidTabs, tab, tabIndex) {\n var hasComponentWithError = tab.some(function (comp) {\n return !!comp.error;\n });\n return hasComponentWithError ? [].concat(_toConsumableArray(invalidTabs), [tabIndex]) : invalidTabs;\n }, []);\n if (!invalidTabsIndexes.length) {\n return;\n }\n var invalidTabs = _toConsumableArray(this.refs[this.tabLinkKey]).filter(function (_, tabIndex) {\n return invalidTabsIndexes.includes(tabIndex);\n });\n this.setErrorClasses(invalidTabs);\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len2 = arguments.length, extend = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n extend[_key2] = arguments[_key2];\n }\n return _NestedComponent2[\"default\"].schema.apply(_NestedComponent2[\"default\"], [{\n label: 'Tabs',\n type: 'tabs',\n input: false,\n key: 'tabs',\n persistent: false,\n tableView: false,\n components: [{\n label: 'Tab 1',\n key: 'tab1',\n components: []\n }],\n verticalLayout: false\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Tabs',\n group: 'layout',\n icon: 'folder-o',\n weight: 50,\n documentation: '/userguide/form-building/layout-components#tabs',\n schema: TabsComponent.schema()\n };\n }\n }]);\n return TabsComponent;\n}(_NestedComponent2[\"default\"]);\nexports[\"default\"] = TabsComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/tabs/Tabs.js?"); /***/ }), @@ -1979,10 +2012,10 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /*!***********************************************************!*\ !*** ./lib/components/tabs/editForm/Tabs.edit.display.js ***! \***********************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'labelPosition',\n ignore: true\n}, {\n key: 'placeholder',\n ignore: true\n}, {\n key: 'description',\n ignore: true\n}, {\n key: 'autofocus',\n ignore: true\n}, {\n key: 'tooltip',\n ignore: true\n}, {\n key: 'tabindex',\n ignore: true\n}, {\n key: 'disabled',\n ignore: true\n}, {\n key: 'tableView',\n ignore: true\n}, {\n key: 'components',\n type: 'datagrid',\n input: true,\n label: 'Tabs',\n weight: 50,\n reorder: true,\n components: [{\n type: 'textfield',\n input: true,\n key: 'label',\n label: 'Label'\n }, {\n type: 'textfield',\n input: true,\n key: 'key',\n label: 'Key',\n allowCalculateOverride: true,\n calculateValue: {\n _camelCase: [{\n var: 'row.label'\n }]\n }\n }]\n}, {\n weight: 1100,\n type: 'checkbox',\n label: 'Vertical Layout',\n tooltip: 'Make this field display in vertical orientation.',\n key: 'verticalLayout',\n input: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/tabs/editForm/Tabs.edit.display.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'labelPosition',\n ignore: true\n}, {\n key: 'placeholder',\n ignore: true\n}, {\n key: 'description',\n ignore: true\n}, {\n key: 'autofocus',\n ignore: true\n}, {\n key: 'tooltip',\n ignore: true\n}, {\n key: 'tabindex',\n ignore: true\n}, {\n key: 'disabled',\n ignore: true\n}, {\n key: 'tableView',\n ignore: true\n}, {\n key: 'components',\n type: 'datagrid',\n input: true,\n label: 'Tabs',\n weight: 50,\n reorder: true,\n components: [{\n type: 'textfield',\n input: true,\n key: 'label',\n label: 'Label'\n }, {\n type: 'textfield',\n input: true,\n key: 'key',\n label: 'Key',\n allowCalculateOverride: true,\n calculateValue: {\n _camelCase: [{\n \"var\": 'row.label'\n }]\n }\n }]\n}, {\n weight: 1100,\n type: 'checkbox',\n label: 'Vertical Layout',\n tooltip: 'Make this field display in vertical orientation.',\n key: 'verticalLayout',\n input: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/tabs/editForm/Tabs.edit.display.js?"); /***/ }), @@ -1993,7 +2026,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\nvar _Components = _interopRequireDefault(__webpack_require__(/*! ../Components */ \"./lib/components/Components.js\"));\n\nvar _TagsEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/Tags.edit.data */ \"./lib/components/tags/editForm/Tags.edit.data.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _Components.default.baseEditForm.apply(_Components.default, [[{\n key: 'data',\n components: _TagsEdit.default\n }, {\n key: 'addons',\n ignore: true\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/tags/Tags.form.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\nvar _Components = _interopRequireDefault(__webpack_require__(/*! ../Components */ \"./lib/components/Components.js\"));\nvar _TagsEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/Tags.edit.data */ \"./lib/components/tags/editForm/Tags.edit.data.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _Components[\"default\"].baseEditForm.apply(_Components[\"default\"], [[{\n key: 'data',\n components: _TagsEdit[\"default\"]\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/tags/Tags.form.js?"); /***/ }), @@ -2004,7 +2037,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.set.js */ \"./node_modules/core-js/modules/es.reflect.set.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.trim.js */ \"./node_modules/core-js/modules/es.string.trim.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.join.js */ \"./node_modules/core-js/modules/es.array.join.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.split.js */ \"./node_modules/core-js/modules/es.string.split.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\nvar _Input2 = _interopRequireDefault(__webpack_require__(/*! ../_classes/input/Input */ \"./lib/components/_classes/input/Input.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction set(target, property, value, receiver) { if (typeof Reflect !== \"undefined\" && Reflect.set) { set = Reflect.set; } else { set = function set(target, property, value, receiver) { var base = _superPropBase(target, property); var desc; if (base) { desc = Object.getOwnPropertyDescriptor(base, property); if (desc.set) { desc.set.call(receiver, value); return true; } else if (!desc.writable) { return false; } } desc = Object.getOwnPropertyDescriptor(receiver, property); if (desc) { if (!desc.writable) { return false; } desc.value = value; Object.defineProperty(receiver, property, desc); } else { _defineProperty(receiver, property, value); } return true; }; } return set(target, property, value, receiver); }\n\nfunction _set(target, property, value, receiver, isStrict) { var s = set(target, property, value, receiver || target); if (!s && isStrict) { throw new Error('failed to set property'); } return value; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar Choices;\n\nif (typeof window !== 'undefined') {\n Choices = __webpack_require__(/*! @formio/choices.js */ \"./node_modules/@formio/choices.js/public/assets/scripts/choices.js\");\n}\n\nvar TagsComponent = /*#__PURE__*/function (_Input) {\n _inherits(TagsComponent, _Input);\n\n var _super = _createSuper(TagsComponent);\n\n function TagsComponent() {\n _classCallCheck(this, TagsComponent);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(TagsComponent, [{\n key: \"init\",\n value: function init() {\n _get(_getPrototypeOf(TagsComponent.prototype), \"init\", this).call(this);\n }\n }, {\n key: \"emptyValue\",\n get: function get() {\n return this.component.storeas === 'string' ? '' : [];\n }\n }, {\n key: \"defaultSchema\",\n get: function get() {\n return TagsComponent.schema();\n }\n }, {\n key: \"inputInfo\",\n get: function get() {\n var info = _get(_getPrototypeOf(TagsComponent.prototype), \"inputInfo\", this);\n\n info.type = 'input';\n info.attr.type = 'text';\n info.changeEvent = 'change';\n return info;\n }\n }, {\n key: \"delimiter\",\n get: function get() {\n return this.component.delimeter || ',';\n }\n }, {\n key: \"attachElement\",\n value: function attachElement(element, index) {\n var _this = this;\n\n _get(_getPrototypeOf(TagsComponent.prototype), \"attachElement\", this).call(this, element, index);\n\n if (!element) {\n return;\n }\n\n element.setAttribute('dir', this.i18next.dir());\n\n if (this.choices) {\n this.choices.destroy();\n }\n\n if (!Choices) {\n return;\n }\n\n var hasPlaceholder = !!this.component.placeholder;\n this.choices = new Choices(element, {\n delimiter: this.delimiter,\n editItems: true,\n maxItemCount: this.component.maxTags,\n removeItemButton: true,\n duplicateItemsAllowed: false,\n shadowRoot: this.root ? this.root.shadowRoot : null,\n placeholder: hasPlaceholder,\n placeholderValue: hasPlaceholder ? this.t(this.component.placeholder, {\n _userInput: true\n }) : null\n });\n this.choices.itemList.element.tabIndex = element.tabIndex;\n this.addEventListener(this.choices.input.element, 'blur', function () {\n var value = _this.choices.input.value;\n var maxTagsNumber = _this.component.maxTags;\n\n var valuesCount = _this.choices.getValue(true).length;\n\n var isRepeatedValue = _this.choices.getValue(true).some(function (existingValue) {\n return existingValue.trim() === value.trim();\n });\n\n if (value) {\n if (maxTagsNumber && valuesCount === maxTagsNumber) {\n _this.choices.addItems = false;\n\n _this.choices.clearInput();\n } else if (isRepeatedValue) {\n _this.choices.clearInput();\n } else {\n _this.choices.setValue([value]);\n\n _this.choices.clearInput();\n\n _this.choices.hideDropdown(true);\n\n _this.updateValue(null, {\n modified: true\n });\n }\n }\n });\n }\n }, {\n key: \"detach\",\n value: function detach() {\n _get(_getPrototypeOf(TagsComponent.prototype), \"detach\", this).call(this);\n\n if (this.choices) {\n this.choices.destroy();\n this.choices = null;\n }\n }\n }, {\n key: \"normalizeValue\",\n value: function normalizeValue(value) {\n if (this.component.storeas === 'string' && Array.isArray(value)) {\n return value.join(this.delimiter);\n } else if (this.component.storeas === 'array' && typeof value === 'string') {\n return value.split(this.delimiter).filter(function (result) {\n return result;\n });\n }\n\n return value;\n }\n }, {\n key: \"setValue\",\n value: function setValue(value) {\n var _this2 = this;\n\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n var changed = _get(_getPrototypeOf(TagsComponent.prototype), \"setValue\", this).call(this, value, flags);\n\n if (this.choices) {\n var dataValue = this.dataValue;\n this.choices.removeActiveItems();\n\n if (dataValue) {\n if (typeof dataValue === 'string') {\n dataValue = dataValue.split(this.delimiter).filter(function (result) {\n return result;\n });\n }\n\n var _value = Array.isArray(dataValue) ? dataValue : [dataValue];\n\n this.choices.setValue(_value.map(function (val) {\n return _this2.sanitize(val, _this2.shouldSanitizeValue);\n }));\n }\n }\n\n return changed;\n }\n }, {\n key: \"disabled\",\n get: function get() {\n return _get(_getPrototypeOf(TagsComponent.prototype), \"disabled\", this);\n },\n set: function set(disabled) {\n _set(_getPrototypeOf(TagsComponent.prototype), \"disabled\", disabled, this, true);\n\n if (!this.choices) {\n return;\n }\n\n if (disabled) {\n this.choices.disable();\n } else {\n this.choices.enable();\n }\n }\n }, {\n key: \"focus\",\n value: function focus() {\n if (this.refs.input && this.refs.input.length) {\n this.refs.input[0].parentNode.lastChild.focus();\n }\n }\n }, {\n key: \"getValueAsString\",\n value: function getValueAsString(value) {\n if (!value) {\n return '';\n }\n\n if (Array.isArray(value)) {\n return value.join(\"\".concat(this.delimiter || ',', \" \"));\n }\n\n var stringValue = value.toString();\n return this.sanitize(stringValue, this.shouldSanitizeValue);\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _Input2.default.schema.apply(_Input2.default, [{\n type: 'tags',\n label: 'Tags',\n key: 'tags',\n delimeter: ',',\n storeas: 'string',\n maxTags: 0\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Tags',\n icon: 'tags',\n group: 'advanced',\n documentation: '/userguide/forms/form-components#tags',\n weight: 30,\n schema: TagsComponent.schema()\n };\n }\n }]);\n\n return TagsComponent;\n}(_Input2.default);\n\nexports[\"default\"] = TagsComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/tags/Tags.js?"); +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.set.js */ \"./node_modules/core-js/modules/es.reflect.set.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.array.some.js */ \"./node_modules/core-js/modules/es.array.some.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.string.trim.js */ \"./node_modules/core-js/modules/es.string.trim.js\");\n__webpack_require__(/*! core-js/modules/es.array.is-array.js */ \"./node_modules/core-js/modules/es.array.is-array.js\");\n__webpack_require__(/*! core-js/modules/es.array.join.js */ \"./node_modules/core-js/modules/es.array.join.js\");\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n__webpack_require__(/*! core-js/modules/es.string.split.js */ \"./node_modules/core-js/modules/es.string.split.js\");\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-string.js */ \"./node_modules/core-js/modules/es.date.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _Input2 = _interopRequireDefault(__webpack_require__(/*! ../_classes/input/Input */ \"./lib/components/_classes/input/Input.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction set(target, property, value, receiver) { if (typeof Reflect !== \"undefined\" && Reflect.set) { set = Reflect.set; } else { set = function set(target, property, value, receiver) { var base = _superPropBase(target, property); var desc; if (base) { desc = Object.getOwnPropertyDescriptor(base, property); if (desc.set) { desc.set.call(receiver, value); return true; } else if (!desc.writable) { return false; } } desc = Object.getOwnPropertyDescriptor(receiver, property); if (desc) { if (!desc.writable) { return false; } desc.value = value; Object.defineProperty(receiver, property, desc); } else { _defineProperty(receiver, property, value); } return true; }; } return set(target, property, value, receiver); }\nfunction _set(target, property, value, receiver, isStrict) { var s = set(target, property, value, receiver || target); if (!s && isStrict) { throw new Error('failed to set property'); } return value; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar Choices;\nif (typeof window !== 'undefined') {\n Choices = __webpack_require__(/*! @formio/choices.js */ \"./node_modules/@formio/choices.js/public/assets/scripts/choices.js\");\n}\nvar TagsComponent = /*#__PURE__*/function (_Input) {\n _inherits(TagsComponent, _Input);\n var _super = _createSuper(TagsComponent);\n function TagsComponent() {\n _classCallCheck(this, TagsComponent);\n return _super.apply(this, arguments);\n }\n _createClass(TagsComponent, [{\n key: \"init\",\n value: function init() {\n _get(_getPrototypeOf(TagsComponent.prototype), \"init\", this).call(this);\n }\n }, {\n key: \"emptyValue\",\n get: function get() {\n return this.component.storeas === 'string' ? '' : [];\n }\n }, {\n key: \"defaultSchema\",\n get: function get() {\n return TagsComponent.schema();\n }\n }, {\n key: \"inputInfo\",\n get: function get() {\n var info = _get(_getPrototypeOf(TagsComponent.prototype), \"inputInfo\", this);\n info.type = 'input';\n info.attr.type = 'text';\n info.changeEvent = 'change';\n return info;\n }\n }, {\n key: \"delimiter\",\n get: function get() {\n return this.component.delimeter || ',';\n }\n }, {\n key: \"attachElement\",\n value: function attachElement(element, index) {\n var _this = this;\n _get(_getPrototypeOf(TagsComponent.prototype), \"attachElement\", this).call(this, element, index);\n if (!element) {\n return;\n }\n element.setAttribute('dir', this.i18next.dir());\n if (this.choices) {\n this.choices.destroy();\n }\n if (!Choices) {\n return;\n }\n var hasPlaceholder = !!this.component.placeholder;\n this.choices = new Choices(element, {\n delimiter: this.delimiter,\n editItems: true,\n allowHTML: true,\n maxItemCount: this.component.maxTags,\n removeItemButton: true,\n duplicateItemsAllowed: false,\n shadowRoot: this.root ? this.root.shadowRoot : null,\n placeholder: hasPlaceholder,\n placeholderValue: hasPlaceholder ? this.t(this.component.placeholder, {\n _userInput: true\n }) : null\n });\n this.choices.itemList.element.tabIndex = element.tabIndex;\n this.addEventListener(this.choices.input.element, 'blur', function () {\n var value = _this.choices.input.value;\n var maxTagsNumber = _this.component.maxTags;\n var valuesCount = _this.choices.getValue(true).length;\n var isRepeatedValue = _this.choices.getValue(true).some(function (existingValue) {\n return existingValue.trim() === value.trim();\n });\n if (value) {\n if (maxTagsNumber && valuesCount === maxTagsNumber) {\n _this.choices.addItems = false;\n _this.choices.clearInput();\n } else if (isRepeatedValue) {\n _this.choices.clearInput();\n } else {\n _this.choices.setValue([value]);\n _this.choices.clearInput();\n _this.choices.hideDropdown(true);\n _this.updateValue(null, {\n modified: true\n });\n }\n }\n });\n }\n }, {\n key: \"detach\",\n value: function detach() {\n _get(_getPrototypeOf(TagsComponent.prototype), \"detach\", this).call(this);\n if (this.choices) {\n this.choices.destroy();\n this.choices = null;\n }\n }\n }, {\n key: \"normalizeValue\",\n value: function normalizeValue(value) {\n if (this.component.storeas === 'string' && Array.isArray(value)) {\n return value.join(this.delimiter);\n } else if (this.component.storeas === 'array' && typeof value === 'string') {\n return value.split(this.delimiter).filter(function (result) {\n return result;\n });\n }\n return value;\n }\n }, {\n key: \"setValue\",\n value: function setValue(value) {\n var _this2 = this;\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var changed = _get(_getPrototypeOf(TagsComponent.prototype), \"setValue\", this).call(this, value, flags);\n if (this.choices) {\n var dataValue = this.dataValue;\n this.choices.removeActiveItems();\n if (dataValue) {\n if (typeof dataValue === 'string') {\n dataValue = dataValue.split(this.delimiter).filter(function (result) {\n return result;\n });\n }\n var _value = Array.isArray(dataValue) ? dataValue : [dataValue];\n this.choices.setValue(_value.map(function (val) {\n return _this2.sanitize(val, _this2.shouldSanitizeValue);\n }));\n }\n }\n return changed;\n }\n }, {\n key: \"disabled\",\n get: function get() {\n return _get(_getPrototypeOf(TagsComponent.prototype), \"disabled\", this);\n },\n set: function set(disabled) {\n _set(_getPrototypeOf(TagsComponent.prototype), \"disabled\", disabled, this, true);\n if (!this.choices) {\n return;\n }\n if (disabled) {\n this.choices.disable();\n } else {\n this.choices.enable();\n }\n }\n }, {\n key: \"focus\",\n value: function focus() {\n if (this.refs.input && this.refs.input.length) {\n this.refs.input[0].parentNode.lastChild.focus();\n }\n }\n }, {\n key: \"getValueAsString\",\n value: function getValueAsString(value) {\n if (!value) {\n return '';\n }\n if (Array.isArray(value)) {\n return value.join(\"\".concat(this.delimiter || ',', \" \"));\n }\n var stringValue = value.toString();\n return this.sanitize(stringValue, this.shouldSanitizeValue);\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _Input2[\"default\"].schema.apply(_Input2[\"default\"], [{\n type: 'tags',\n label: 'Tags',\n key: 'tags',\n delimeter: ',',\n storeas: 'string',\n maxTags: 0\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Tags',\n icon: 'tags',\n group: 'advanced',\n documentation: '/userguide/form-building/advanced-components#tags',\n weight: 30,\n schema: TagsComponent.schema()\n };\n }\n }]);\n return TagsComponent;\n}(_Input2[\"default\"]);\nexports[\"default\"] = TagsComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/tags/Tags.js?"); /***/ }), @@ -2012,10 +2045,10 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /*!********************************************************!*\ !*** ./lib/components/tags/editForm/Tags.edit.data.js ***! \********************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'multiple',\n ignore: true\n}, {\n weight: 20,\n type: 'textfield',\n input: true,\n key: 'delimeter',\n label: 'Delimiter',\n tooltip: 'What is used to separate the tags.'\n}, {\n weight: 22,\n type: 'number',\n input: true,\n key: 'maxTags',\n label: 'Max Tags',\n defaultValue: 0,\n tooltip: 'The maximum amount of tags that can be added. 0 for infinity.'\n}, {\n weight: 24,\n type: 'select',\n input: true,\n key: 'storeas',\n label: 'Store As',\n dataSrc: 'values',\n data: {\n values: [{\n label: 'String (CSV)',\n value: 'string'\n }, {\n label: 'Array of Tags',\n value: 'array'\n }]\n }\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/tags/editForm/Tags.edit.data.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'multiple',\n ignore: true\n}, {\n weight: 20,\n type: 'textfield',\n input: true,\n key: 'delimeter',\n label: 'Delimiter',\n tooltip: 'What is used to separate the tags.'\n}, {\n weight: 22,\n type: 'number',\n input: true,\n key: 'maxTags',\n label: 'Max Tags',\n defaultValue: 0,\n tooltip: 'The maximum amount of tags that can be added. 0 for infinity.'\n}, {\n weight: 24,\n type: 'select',\n input: true,\n key: 'storeas',\n label: 'Store As',\n dataSrc: 'values',\n data: {\n values: [{\n label: 'String (CSV)',\n value: 'string'\n }, {\n label: 'Array of Tags',\n value: 'array'\n }]\n }\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/tags/editForm/Tags.edit.data.js?"); /***/ }), @@ -2026,7 +2059,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\nvar _TextField = _interopRequireDefault(__webpack_require__(/*! ../textfield/TextField.form */ \"./lib/components/textfield/TextField.form.js\"));\n\nvar _TextAreaEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/TextArea.edit.display */ \"./lib/components/textarea/editForm/TextArea.edit.display.js\"));\n\nvar _TextAreaEdit2 = _interopRequireDefault(__webpack_require__(/*! ./editForm/TextArea.edit.validation */ \"./lib/components/textarea/editForm/TextArea.edit.validation.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _TextField.default.apply(void 0, [[{\n key: 'display',\n components: _TextAreaEdit.default\n }, {\n key: 'validation',\n components: _TextAreaEdit2.default\n }, {\n key: 'addons',\n ignore: true\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/textarea/TextArea.form.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\nvar _TextField = _interopRequireDefault(__webpack_require__(/*! ../textfield/TextField.form */ \"./lib/components/textfield/TextField.form.js\"));\nvar _TextAreaEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/TextArea.edit.display */ \"./lib/components/textarea/editForm/TextArea.edit.display.js\"));\nvar _TextAreaEdit2 = _interopRequireDefault(__webpack_require__(/*! ./editForm/TextArea.edit.validation */ \"./lib/components/textarea/editForm/TextArea.edit.validation.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _TextField[\"default\"].apply(void 0, [[{\n key: 'display',\n components: _TextAreaEdit[\"default\"]\n }, {\n key: 'validation',\n components: _TextAreaEdit2[\"default\"]\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/textarea/TextArea.form.js?"); /***/ }), @@ -2037,7 +2070,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.constructor.js */ \"./node_modules/core-js/modules/es.regexp.constructor.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\nvar _TextField = _interopRequireDefault(__webpack_require__(/*! ../textfield/TextField */ \"./lib/components/textfield/TextField.js\"));\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\n\nvar _utils = __webpack_require__(/*! ../../utils/utils */ \"./lib/utils/utils.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar TextAreaComponent = /*#__PURE__*/function (_TextFieldComponent) {\n _inherits(TextAreaComponent, _TextFieldComponent);\n\n var _super = _createSuper(TextAreaComponent);\n\n function TextAreaComponent() {\n _classCallCheck(this, TextAreaComponent);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(TextAreaComponent, [{\n key: \"init\",\n value: function init() {\n _get(_getPrototypeOf(TextAreaComponent.prototype), \"init\", this).call(this);\n\n this.editors = [];\n this.editorsReady = [];\n this.updateSizes = []; // Never submit on enter for text areas.\n\n this.options.submitOnEnter = false;\n }\n }, {\n key: \"defaultSchema\",\n get: function get() {\n return TextAreaComponent.schema();\n }\n }, {\n key: \"inputInfo\",\n get: function get() {\n var info = _get(_getPrototypeOf(TextAreaComponent.prototype), \"inputInfo\", this);\n\n info.type = this.component.wysiwyg ? 'div' : 'textarea';\n\n if (this.component.rows) {\n info.attr.rows = this.component.rows;\n }\n\n return info;\n }\n }, {\n key: \"validateMultiple\",\n value: function validateMultiple() {\n return !this.isJsonValue;\n }\n }, {\n key: \"renderElement\",\n value: function renderElement(value, index) {\n var info = this.inputInfo;\n info.attr = info.attr || {};\n info.content = value;\n\n if ((this.options.readOnly || this.disabled) && !this.isHtmlRenderMode()) {\n var elementStyle = this.info.attr.style || '';\n var children = \"
\");\n return this.renderTemplate('well', {\n children: children,\n nestedKey: this.key,\n value: value\n });\n }\n\n return this.renderTemplate('input', {\n prefix: this.prefix,\n suffix: this.suffix,\n input: info,\n value: value,\n index: index\n });\n }\n }, {\n key: \"autoExpand\",\n get: function get() {\n return this.component.autoExpand;\n }\n /**\n * Updates the editor value.\n *\n * @param newValue\n */\n\n }, {\n key: \"updateEditorValue\",\n value: function updateEditorValue(index, newValue) {\n newValue = this.getConvertedValue(this.trimBlanks(newValue));\n var dataValue = this.dataValue;\n\n if (this.component.multiple && Array.isArray(dataValue)) {\n var newArray = _lodash.default.clone(dataValue);\n\n newArray[index] = newValue;\n newValue = newArray;\n }\n\n if (!_lodash.default.isEqual(newValue, dataValue) && (!_lodash.default.isEmpty(newValue) || !_lodash.default.isEmpty(dataValue))) {\n this.updateValue(newValue, {\n modified: !this.autoModified\n }, index);\n }\n\n this.autoModified = false;\n }\n }, {\n key: \"attachElement\",\n value: function attachElement(element, index) {\n var _this2 = this;\n\n if (this.autoExpand && (this.isPlain || this.options.readOnly || this.options.htmlView)) {\n if (element.nodeName === 'TEXTAREA') {\n this.addAutoExpanding(element, index);\n }\n }\n\n if (this.options.readOnly) {\n return element;\n }\n\n if (this.component.wysiwyg && !this.component.editor) {\n this.component.editor = 'ckeditor';\n }\n\n var settings = _lodash.default.isEmpty(this.component.wysiwyg) ? this.wysiwygDefault[this.component.editor] || this.wysiwygDefault.default : this.component.wysiwyg; // Keep track of when this editor is ready.\n\n this.editorsReady[index] = new _nativePromiseOnly.default(function (editorReady) {\n // Attempt to add a wysiwyg editor. In order to add one, it must be included on the global scope.\n switch (_this2.component.editor) {\n case 'ace':\n if (!settings) {\n settings = {};\n }\n\n settings.mode = _this2.component.as ? \"ace/mode/\".concat(_this2.component.as) : 'ace/mode/javascript';\n\n _this2.addAce(element, settings, function (newValue) {\n return _this2.updateEditorValue(index, newValue);\n }).then(function (ace) {\n _this2.editors[index] = ace;\n var dataValue = _this2.dataValue;\n dataValue = _this2.component.multiple && Array.isArray(dataValue) ? dataValue[index] : dataValue;\n ace.setValue(_this2.setConvertedValue(dataValue, index));\n editorReady(ace);\n return ace;\n }).catch(function (err) {\n return console.warn(err);\n });\n\n break;\n\n case 'quill':\n // Normalize the configurations for quill.\n if (settings.hasOwnProperty('toolbarGroups') || settings.hasOwnProperty('toolbar')) {\n console.warn('The WYSIWYG settings are configured for CKEditor. For this renderer, you will need to use configurations for the Quill Editor. See https://quilljs.com/docs/configuration for more information.');\n settings = _this2.wysiwygDefault.quill;\n } // Add the quill editor.\n\n\n _this2.addQuill(element, settings, function () {\n return _this2.updateEditorValue(index, _this2.editors[index].root.innerHTML);\n }).then(function (quill) {\n _this2.editors[index] = quill;\n\n if (_this2.component.isUploadEnabled) {\n var _this = _this2;\n\n quill.getModule('uploader').options.handler = function () {\n var _this$imageHandler;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n //we need initial 'this' because quill calls this method with its own context and we need some inner quill methods exposed in it\n //we also need current component instance as we use some fields and methods from it as well\n (_this$imageHandler = _this.imageHandler).call.apply(_this$imageHandler, [_this, this].concat(args));\n };\n }\n\n quill.root.spellcheck = _this2.component.spellcheck;\n\n if (_this2.options.readOnly || _this2.disabled) {\n quill.disable();\n }\n\n var dataValue = _this2.dataValue;\n dataValue = _this2.component.multiple && Array.isArray(dataValue) ? dataValue[index] : dataValue;\n quill.setContents(quill.clipboard.convert({\n html: _this2.setConvertedValue(dataValue, index)\n }));\n editorReady(quill);\n return quill;\n }).catch(function (err) {\n return console.warn(err);\n });\n\n break;\n\n case 'ckeditor':\n settings = settings || {};\n settings.rows = _this2.component.rows;\n\n _this2.addCKE(element, settings, function (newValue) {\n return _this2.updateEditorValue(index, newValue);\n }).then(function (editor) {\n _this2.editors[index] = editor;\n var dataValue = _this2.dataValue;\n dataValue = _this2.component.multiple && Array.isArray(dataValue) ? dataValue[index] : dataValue;\n\n var value = _this2.setConvertedValue(dataValue, index);\n\n var isReadOnly = _this2.options.readOnly || _this2.disabled; // Use ckeditor 4 in IE browser\n\n if ((0, _utils.getBrowserInfo)().ie) {\n editor.on('instanceReady', function () {\n editor.setReadOnly(isReadOnly);\n editor.setData(value);\n });\n } else {\n var numRows = parseInt(_this2.component.rows, 10);\n\n if (_lodash.default.isFinite(numRows) && _lodash.default.has(editor, 'ui.view.editable.editableElement')) {\n // Default height is 21px with 10px margin + a 14px top margin.\n var editorHeight = numRows * 31 + 14;\n editor.ui.view.editable.editableElement.style.height = \"\".concat(editorHeight, \"px\");\n }\n\n editor.isReadOnly = isReadOnly;\n editor.data.set(value);\n }\n\n editorReady(editor);\n return editor;\n });\n\n break;\n\n default:\n _get(_getPrototypeOf(TextAreaComponent.prototype), \"attachElement\", _this2).call(_this2, element, index);\n\n break;\n }\n });\n return element;\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n var attached = _get(_getPrototypeOf(TextAreaComponent.prototype), \"attach\", this).call(this, element); // Make sure we restore the value after attaching since wysiwygs and readonly texts need an additional set.\n\n\n this.restoreValue();\n return attached;\n }\n }, {\n key: \"imageHandler\",\n value: function imageHandler(moduleInstance, range, files) {\n var _this3 = this;\n\n var quillInstance = moduleInstance.quill;\n\n if (!files || !files.length) {\n console.warn('No files selected');\n return;\n }\n\n quillInstance.enable(false);\n var _this$component = this.component,\n uploadStorage = _this$component.uploadStorage,\n uploadUrl = _this$component.uploadUrl,\n uploadOptions = _this$component.uploadOptions,\n uploadDir = _this$component.uploadDir,\n fileKey = _this$component.fileKey;\n var requestData;\n this.fileService.uploadFile(uploadStorage, files[0], (0, _utils.uniqueName)(files[0].name), uploadDir || '', //should pass empty string if undefined\n null, uploadUrl, uploadOptions, fileKey).then(function (result) {\n requestData = result;\n return _this3.fileService.downloadFile(result);\n }).then(function (result) {\n quillInstance.enable(true);\n var Delta = Quill.import('delta');\n quillInstance.updateContents(new Delta().retain(range.index).delete(range.length).insert({\n image: result.url\n }, {\n alt: JSON.stringify(requestData)\n }), Quill.sources.USER);\n }).catch(function (error) {\n console.warn('Quill image upload failed');\n console.warn(error);\n quillInstance.enable(true);\n });\n }\n }, {\n key: \"isPlain\",\n get: function get() {\n return !this.component.wysiwyg && !this.component.editor;\n }\n }, {\n key: \"htmlView\",\n get: function get() {\n return this.options.readOnly && (this.component.editor || this.component.wysiwyg);\n }\n }, {\n key: \"setValueAt\",\n value: function setValueAt(index, value) {\n var _this4 = this;\n\n var flags = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n _get(_getPrototypeOf(TextAreaComponent.prototype), \"setValueAt\", this).call(this, index, value, flags);\n\n if (this.editorsReady[index]) {\n var setEditorsValue = function setEditorsValue(flags) {\n return function (editor) {\n if (!flags.skipWysiwyg) {\n _this4.autoModified = true;\n\n switch (_this4.component.editor) {\n case 'ace':\n editor.setValue(_this4.setConvertedValue(value, index));\n break;\n\n case 'quill':\n if (_this4.component.isUploadEnabled) {\n _this4.setAsyncConvertedValue(value).then(function (result) {\n var content = editor.clipboard.convert({\n html: result\n });\n editor.setContents(content);\n });\n } else {\n var convertedValue = _this4.setConvertedValue(value, index);\n\n var content = editor.clipboard.convert({\n html: convertedValue\n });\n editor.setContents(content);\n }\n\n break;\n\n case 'ckeditor':\n editor.data.set(_this4.setConvertedValue(value, index));\n break;\n }\n }\n };\n };\n\n this.editorsReady[index].then(setEditorsValue(_lodash.default.clone(flags)));\n }\n }\n }, {\n key: \"setValue\",\n value: function setValue(value) {\n var _this5 = this;\n\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n if (this.isPlain || this.options.readOnly || this.disabled) {\n value = this.component.multiple && Array.isArray(value) ? value.map(function (val, index) {\n return _this5.setConvertedValue(val, index);\n }) : this.setConvertedValue(value);\n return _get(_getPrototypeOf(TextAreaComponent.prototype), \"setValue\", this).call(this, value, flags);\n }\n\n flags.skipWysiwyg = _lodash.default.isEqual(value, this.getValue());\n return _get(_getPrototypeOf(TextAreaComponent.prototype), \"setValue\", this).call(this, value, flags);\n }\n }, {\n key: \"setContent\",\n value: function setContent(element, content, forceSanitize) {\n _get(_getPrototypeOf(TextAreaComponent.prototype), \"setContent\", this).call(this, element, content, forceSanitize, {\n addAttr: ['allow', 'allowfullscreen', 'frameborder', 'scrolling'],\n addTags: ['iframe']\n });\n }\n }, {\n key: \"setReadOnlyValue\",\n value: function setReadOnlyValue(value, index) {\n index = index || 0;\n\n if (this.options.readOnly || this.disabled) {\n if (this.refs.input && this.refs.input[index]) {\n if (this.component.inputFormat === 'plain') {\n this.refs.input[index].innerText = this.interpolate(value, {}, {\n noeval: true\n });\n } else {\n this.setContent(this.refs.input[index], this.interpolate(value, {}, {\n noeval: true\n }), this.shouldSanitizeValue);\n }\n }\n }\n }\n }, {\n key: \"isJsonValue\",\n get: function get() {\n return this.component.as && this.component.as === 'json';\n }\n }, {\n key: \"setConvertedValue\",\n value: function setConvertedValue(value, index) {\n if (this.isJsonValue && !_lodash.default.isNil(value)) {\n try {\n value = JSON.stringify(value, null, 2);\n } catch (err) {\n console.warn(err);\n }\n }\n\n if (!_lodash.default.isString(value)) {\n value = '';\n }\n\n this.setReadOnlyValue(value, index);\n return value;\n }\n }, {\n key: \"setAsyncConvertedValue\",\n value: function setAsyncConvertedValue(value) {\n if (this.isJsonValue && value) {\n try {\n value = JSON.stringify(value, null, 2);\n } catch (err) {\n console.warn(err);\n }\n }\n\n if (!_lodash.default.isString(value)) {\n value = '';\n }\n\n var htmlDoc = new DOMParser().parseFromString(value, 'text/html');\n var images = htmlDoc.getElementsByTagName('img');\n\n if (images.length) {\n return this.setImagesUrl(images).then(function () {\n value = htmlDoc.getElementsByTagName('body')[0].innerHTML;\n return value;\n });\n } else {\n return _nativePromiseOnly.default.resolve(value);\n }\n }\n }, {\n key: \"setImagesUrl\",\n value: function setImagesUrl(images) {\n var _this6 = this;\n\n return _nativePromiseOnly.default.all(_lodash.default.map(images, function (image) {\n var requestData;\n\n try {\n requestData = JSON.parse(image.getAttribute('alt'));\n } catch (error) {\n console.warn(error);\n }\n\n return _this6.fileService.downloadFile(requestData).then(function (result) {\n image.setAttribute('src', result.url);\n });\n }));\n }\n }, {\n key: \"addAutoExpanding\",\n value: function addAutoExpanding(textarea, index) {\n var heightOffset = null;\n var previousHeight = null;\n\n var changeOverflow = function changeOverflow(value) {\n var width = textarea.style.width;\n textarea.style.width = '0px';\n textarea.offsetWidth;\n textarea.style.width = width;\n textarea.style.overflowY = value;\n };\n\n var preventParentScroll = function preventParentScroll(element, changeSize) {\n var nodeScrolls = [];\n\n while (element && element.parentNode && element.parentNode instanceof Element) {\n if (element.parentNode.scrollTop) {\n nodeScrolls.push({\n node: element.parentNode,\n scrollTop: element.parentNode.scrollTop\n });\n }\n\n element = element.parentNode;\n }\n\n changeSize();\n nodeScrolls.forEach(function (nodeScroll) {\n nodeScroll.node.scrollTop = nodeScroll.scrollTop;\n });\n };\n\n var resize = function resize() {\n if (textarea.scrollHeight === 0) {\n return;\n }\n\n preventParentScroll(textarea, function () {\n textarea.style.height = '';\n textarea.style.height = \"\".concat(textarea.scrollHeight + heightOffset, \"px\");\n });\n };\n\n var update = _lodash.default.debounce(function () {\n resize();\n var styleHeight = Math.round(parseFloat(textarea.style.height));\n var computed = window.getComputedStyle(textarea, null);\n var currentHeight = textarea.offsetHeight;\n\n if (currentHeight < styleHeight && computed.overflowY === 'hidden') {\n changeOverflow('scroll');\n } else if (computed.overflowY !== 'hidden') {\n changeOverflow('hidden');\n }\n\n resize();\n currentHeight = textarea.offsetHeight;\n\n if (previousHeight !== currentHeight) {\n previousHeight = currentHeight;\n update();\n }\n }, 200);\n\n var computedStyle = window.getComputedStyle(textarea, null);\n textarea.style.resize = 'none';\n heightOffset = parseFloat(computedStyle.borderTopWidth) + parseFloat(computedStyle.borderBottomWidth) || 0;\n\n if (window) {\n this.addEventListener(window, 'resize', update);\n }\n\n this.addEventListener(textarea, 'input', update);\n this.on('initialized', update);\n this.updateSizes[index] = update;\n update();\n }\n }, {\n key: \"trimBlanks\",\n value: function trimBlanks(value) {\n if (!value || this.isPlain) {\n return value;\n }\n\n var trimBlanks = function trimBlanks(value) {\n var nbsp = '

 

';\n var br = '


';\n var brNbsp = '


 

';\n var regExp = new RegExp(\"^\".concat(nbsp, \"|\").concat(nbsp, \"$|^\").concat(br, \"|\").concat(br, \"$|^\").concat(brNbsp, \"|\").concat(brNbsp, \"$\"), 'g');\n return typeof value === 'string' ? value.replace(regExp, '') : value;\n };\n\n if (Array.isArray(value)) {\n value.forEach(function (input, index) {\n value[index] = trimBlanks(input);\n });\n } else {\n value = trimBlanks(value);\n }\n\n return value;\n }\n }, {\n key: \"onChange\",\n value: function onChange(flags, fromRoot) {\n var changed = _get(_getPrototypeOf(TextAreaComponent.prototype), \"onChange\", this).call(this, flags, fromRoot);\n\n this.updateSizes.forEach(function (updateSize) {\n return updateSize();\n });\n return changed;\n }\n }, {\n key: \"hasChanged\",\n value: function hasChanged(newValue, oldValue) {\n return _get(_getPrototypeOf(TextAreaComponent.prototype), \"hasChanged\", this).call(this, this.trimBlanks(newValue), this.trimBlanks(oldValue));\n }\n }, {\n key: \"isEmpty\",\n value: function isEmpty() {\n var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.dataValue;\n return _get(_getPrototypeOf(TextAreaComponent.prototype), \"isEmpty\", this).call(this, this.trimBlanks(value));\n }\n }, {\n key: \"defaultValue\",\n get: function get() {\n var defaultValue = _get(_getPrototypeOf(TextAreaComponent.prototype), \"defaultValue\", this);\n\n if (this.component.editor === 'quill' && !defaultValue) {\n defaultValue = '


';\n }\n\n return defaultValue;\n }\n }, {\n key: \"getConvertedValue\",\n value: function getConvertedValue(value) {\n if (this.isJsonValue && value) {\n try {\n value = JSON.parse(value);\n } catch (err) {// console.warn(err);\n }\n }\n\n return value;\n }\n }, {\n key: \"detach\",\n value: function detach() {\n var _this7 = this;\n\n // Destroy all editors.\n this.editors.forEach(function (editor) {\n if (editor.destroy) {\n editor.destroy();\n }\n });\n this.editors = [];\n this.editorsReady = [];\n this.updateSizes.forEach(function (updateSize) {\n return _this7.removeEventListener(window, 'resize', updateSize);\n });\n this.updateSizes = [];\n\n _get(_getPrototypeOf(TextAreaComponent.prototype), \"detach\", this).call(this);\n }\n }, {\n key: \"getValue\",\n value: function getValue() {\n if (this.isPlain) {\n return this.getConvertedValue(_get(_getPrototypeOf(TextAreaComponent.prototype), \"getValue\", this).call(this));\n }\n\n return this.dataValue;\n }\n }, {\n key: \"focus\",\n value: function focus() {\n _get(_getPrototypeOf(TextAreaComponent.prototype), \"focus\", this).call(this);\n\n switch (this.component.editor) {\n case 'ckeditor':\n {\n var _this$editors$0$editi, _this$editors$0$editi2;\n\n if ((_this$editors$0$editi = this.editors[0].editing) !== null && _this$editors$0$editi !== void 0 && (_this$editors$0$editi2 = _this$editors$0$editi.view) !== null && _this$editors$0$editi2 !== void 0 && _this$editors$0$editi2.focus) {\n this.editors[0].editing.view.focus();\n }\n\n this.element.scrollIntoView();\n break;\n }\n\n case 'ace':\n {\n this.editors[0].focus();\n this.element.scrollIntoView();\n break;\n }\n\n case 'quill':\n {\n this.editors[0].focus();\n break;\n }\n }\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len2 = arguments.length, extend = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n extend[_key2] = arguments[_key2];\n }\n\n return _TextField.default.schema.apply(_TextField.default, [{\n type: 'textarea',\n label: 'Text Area',\n key: 'textArea',\n rows: 3,\n wysiwyg: false,\n editor: '',\n fixedSize: true,\n inputFormat: 'html',\n validate: {\n minWords: '',\n maxWords: ''\n }\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Text Area',\n group: 'basic',\n icon: 'font',\n documentation: '/userguide/forms/form-components#text-area',\n weight: 20,\n schema: TextAreaComponent.schema()\n };\n }\n }]);\n\n return TextAreaComponent;\n}(_TextField.default);\n\nexports[\"default\"] = TextAreaComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/textarea/TextArea.js?"); +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.array.is-array.js */ \"./node_modules/core-js/modules/es.array.is-array.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.parse-int.js */ \"./node_modules/core-js/modules/es.parse-int.js\");\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.parse-float.js */ \"./node_modules/core-js/modules/es.parse-float.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.constructor.js */ \"./node_modules/core-js/modules/es.regexp.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _TextField = _interopRequireDefault(__webpack_require__(/*! ../textfield/TextField */ \"./lib/components/textfield/TextField.js\"));\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\nvar _utils = __webpack_require__(/*! ../../utils/utils */ \"./lib/utils/utils.js\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar TextAreaComponent = /*#__PURE__*/function (_TextFieldComponent) {\n _inherits(TextAreaComponent, _TextFieldComponent);\n var _super = _createSuper(TextAreaComponent);\n function TextAreaComponent() {\n _classCallCheck(this, TextAreaComponent);\n return _super.apply(this, arguments);\n }\n _createClass(TextAreaComponent, [{\n key: \"init\",\n value: function init() {\n _get(_getPrototypeOf(TextAreaComponent.prototype), \"init\", this).call(this);\n this.editors = [];\n this.editorsReady = [];\n this.updateSizes = [];\n\n // Never submit on enter for text areas.\n this.options.submitOnEnter = false;\n }\n }, {\n key: \"defaultSchema\",\n get: function get() {\n return TextAreaComponent.schema();\n }\n }, {\n key: \"inputInfo\",\n get: function get() {\n var info = _get(_getPrototypeOf(TextAreaComponent.prototype), \"inputInfo\", this);\n info.type = this.component.wysiwyg ? 'div' : 'textarea';\n if (this.component.rows) {\n info.attr.rows = this.component.rows;\n }\n return info;\n }\n }, {\n key: \"validateMultiple\",\n value: function validateMultiple() {\n return !this.isJsonValue;\n }\n }, {\n key: \"renderElement\",\n value: function renderElement(value, index) {\n var info = this.inputInfo;\n info.attr = info.attr || {};\n info.content = value;\n if ((this.options.readOnly || this.disabled) && !this.isHtmlRenderMode()) {\n var elementStyle = this.info.attr.style || '';\n var children = \"
\");\n return this.renderTemplate('well', {\n children: children,\n nestedKey: this.key,\n value: value\n });\n }\n return this.renderTemplate('input', {\n prefix: this.prefix,\n suffix: this.suffix,\n input: info,\n value: value,\n index: index\n });\n }\n }, {\n key: \"autoExpand\",\n get: function get() {\n return this.component.autoExpand;\n }\n\n /**\n * Updates the editor value.\n *\n * @param newValue\n */\n }, {\n key: \"updateEditorValue\",\n value: function updateEditorValue(index, newValue) {\n newValue = this.getConvertedValue(this.trimBlanks(newValue));\n var dataValue = this.dataValue;\n if (this.component.multiple && Array.isArray(dataValue)) {\n var newArray = _lodash[\"default\"].clone(dataValue);\n newArray[index] = newValue;\n newValue = newArray;\n }\n if (!_lodash[\"default\"].isEqual(newValue, dataValue) && (!_lodash[\"default\"].isEmpty(newValue) || !_lodash[\"default\"].isEmpty(dataValue))) {\n this.updateValue(newValue, {\n modified: !this.autoModified\n }, index);\n }\n this.autoModified = false;\n }\n }, {\n key: \"attachElement\",\n value: function attachElement(element, index) {\n var _this2 = this;\n if (this.autoExpand && (this.isPlain || this.options.readOnly || this.options.htmlView)) {\n if (element.nodeName === 'TEXTAREA') {\n this.addAutoExpanding(element, index);\n }\n }\n if (this.options.readOnly) {\n return element;\n }\n if (this.component.wysiwyg && !this.component.editor) {\n this.component.editor = 'ckeditor';\n }\n var settings = _lodash[\"default\"].isEmpty(this.component.wysiwyg) ? this.wysiwygDefault[this.component.editor] || this.wysiwygDefault[\"default\"] : this.component.wysiwyg;\n\n // Keep track of when this editor is ready.\n this.editorsReady[index] = new _nativePromiseOnly[\"default\"](function (editorReady) {\n // Attempt to add a wysiwyg editor. In order to add one, it must be included on the global scope.\n switch (_this2.component.editor) {\n case 'ace':\n if (!settings) {\n settings = {};\n }\n settings.mode = _this2.component.as ? \"ace/mode/\".concat(_this2.component.as) : 'ace/mode/javascript';\n _this2.addAce(element, settings, function (newValue) {\n return _this2.updateEditorValue(index, newValue);\n }).then(function (ace) {\n _this2.editors[index] = ace;\n var dataValue = _this2.dataValue;\n dataValue = _this2.component.multiple && Array.isArray(dataValue) ? dataValue[index] : dataValue;\n ace.setValue(_this2.setConvertedValue(dataValue, index));\n editorReady(ace);\n return ace;\n })[\"catch\"](function (err) {\n return console.warn(err);\n });\n break;\n case 'quill':\n // Normalize the configurations for quill.\n if (settings.hasOwnProperty('toolbarGroups') || settings.hasOwnProperty('toolbar')) {\n console.warn('The WYSIWYG settings are configured for CKEditor. For this renderer, you will need to use configurations for the Quill Editor. See https://quilljs.com/docs/configuration for more information.');\n settings = _this2.wysiwygDefault.quill;\n }\n\n // Add the quill editor.\n _this2.addQuill(element, settings, function () {\n return _this2.updateEditorValue(index, _this2.editors[index].root.innerHTML);\n }).then(function (quill) {\n _this2.editors[index] = quill;\n if (_this2.component.isUploadEnabled) {\n var _this = _this2;\n quill.getModule('uploader').options.handler = function () {\n var _this$imageHandler;\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n //we need initial 'this' because quill calls this method with its own context and we need some inner quill methods exposed in it\n //we also need current component instance as we use some fields and methods from it as well\n (_this$imageHandler = _this.imageHandler).call.apply(_this$imageHandler, [_this, this].concat(args));\n };\n }\n quill.root.spellcheck = _this2.component.spellcheck;\n if (_this2.options.readOnly || _this2.disabled) {\n quill.disable();\n }\n var dataValue = _this2.dataValue;\n dataValue = _this2.component.multiple && Array.isArray(dataValue) ? dataValue[index] : dataValue;\n quill.setContents(quill.clipboard.convert({\n html: _this2.setConvertedValue(dataValue, index)\n }));\n editorReady(quill);\n return quill;\n })[\"catch\"](function (err) {\n return console.warn(err);\n });\n break;\n case 'ckeditor':\n settings = settings || {};\n settings.rows = _this2.component.rows;\n _this2.addCKE(element, settings, function (newValue) {\n return _this2.updateEditorValue(index, newValue);\n }).then(function (editor) {\n _this2.editors[index] = editor;\n var dataValue = _this2.dataValue;\n dataValue = _this2.component.multiple && Array.isArray(dataValue) ? dataValue[index] : dataValue;\n var value = _this2.setConvertedValue(dataValue, index);\n var isReadOnly = _this2.options.readOnly || _this2.disabled;\n // Use ckeditor 4 in IE browser\n if ((0, _utils.getBrowserInfo)().ie) {\n editor.on('instanceReady', function () {\n editor.setReadOnly(isReadOnly);\n editor.setData(value);\n });\n } else {\n var numRows = parseInt(_this2.component.rows, 10);\n if (_lodash[\"default\"].isFinite(numRows) && _lodash[\"default\"].has(editor, 'ui.view.editable.editableElement')) {\n // Default height is 21px with 10px margin + a 14px top margin.\n var editorHeight = numRows * 31 + 14;\n editor.ui.view.editable.editableElement.style.height = \"\".concat(editorHeight, \"px\");\n }\n editor.isReadOnly = isReadOnly;\n editor.data.set(value);\n }\n editorReady(editor);\n return editor;\n });\n break;\n default:\n _get(_getPrototypeOf(TextAreaComponent.prototype), \"attachElement\", _this2).call(_this2, element, index);\n break;\n }\n });\n return element;\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n var attached = _get(_getPrototypeOf(TextAreaComponent.prototype), \"attach\", this).call(this, element);\n // Make sure we restore the value after attaching since wysiwygs and readonly texts need an additional set.\n this.restoreValue();\n return attached;\n }\n }, {\n key: \"imageHandler\",\n value: function imageHandler(moduleInstance, range, files) {\n var _this3 = this;\n var quillInstance = moduleInstance.quill;\n if (!files || !files.length) {\n console.warn('No files selected');\n return;\n }\n quillInstance.enable(false);\n var _this$component = this.component,\n uploadStorage = _this$component.uploadStorage,\n uploadUrl = _this$component.uploadUrl,\n uploadOptions = _this$component.uploadOptions,\n uploadDir = _this$component.uploadDir,\n fileKey = _this$component.fileKey;\n var requestData;\n this.fileService.uploadFile(uploadStorage, files[0], (0, _utils.uniqueName)(files[0].name), uploadDir || '',\n //should pass empty string if undefined\n null, uploadUrl, uploadOptions, fileKey).then(function (result) {\n requestData = result;\n return _this3.fileService.downloadFile(result);\n }).then(function (result) {\n quillInstance.enable(true);\n var Delta = Quill[\"import\"]('delta');\n quillInstance.updateContents(new Delta().retain(range.index)[\"delete\"](range.length).insert({\n image: result.url\n }, {\n alt: JSON.stringify(requestData)\n }), Quill.sources.USER);\n })[\"catch\"](function (error) {\n console.warn('Quill image upload failed');\n console.warn(error);\n quillInstance.enable(true);\n });\n }\n }, {\n key: \"isPlain\",\n get: function get() {\n return !this.component.wysiwyg && !this.component.editor;\n }\n }, {\n key: \"htmlView\",\n get: function get() {\n return this.options.readOnly && (this.component.editor || this.component.wysiwyg);\n }\n }, {\n key: \"setValueAt\",\n value: function setValueAt(index, value) {\n var _this4 = this;\n var flags = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n _get(_getPrototypeOf(TextAreaComponent.prototype), \"setValueAt\", this).call(this, index, value, flags);\n if (this.editorsReady[index]) {\n var setEditorsValue = function setEditorsValue(flags) {\n return function (editor) {\n if (!flags.skipWysiwyg) {\n _this4.autoModified = true;\n switch (_this4.component.editor) {\n case 'ace':\n editor.setValue(_this4.setConvertedValue(value, index));\n break;\n case 'quill':\n if (_this4.component.isUploadEnabled) {\n _this4.setAsyncConvertedValue(value).then(function (result) {\n var content = editor.clipboard.convert({\n html: result\n });\n editor.setContents(content);\n });\n } else {\n var convertedValue = _this4.setConvertedValue(value, index);\n var content = editor.clipboard.convert({\n html: convertedValue\n });\n editor.setContents(content);\n }\n break;\n case 'ckeditor':\n editor.data.set(_this4.setConvertedValue(value, index));\n break;\n }\n }\n };\n };\n this.editorsReady[index].then(setEditorsValue(_lodash[\"default\"].clone(flags)));\n }\n }\n }, {\n key: \"setValue\",\n value: function setValue(value) {\n var _this5 = this;\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n if (this.isPlain || this.options.readOnly || this.disabled) {\n value = this.component.multiple && Array.isArray(value) ? value.map(function (val, index) {\n return _this5.setConvertedValue(val, index);\n }) : this.setConvertedValue(value);\n return _get(_getPrototypeOf(TextAreaComponent.prototype), \"setValue\", this).call(this, value, flags);\n }\n flags.skipWysiwyg = value === '' && flags.resetValue ? false : _lodash[\"default\"].isEqual(value, this.getValue());\n return _get(_getPrototypeOf(TextAreaComponent.prototype), \"setValue\", this).call(this, value, flags);\n }\n }, {\n key: \"setContent\",\n value: function setContent(element, content, forceSanitize) {\n _get(_getPrototypeOf(TextAreaComponent.prototype), \"setContent\", this).call(this, element, content, forceSanitize, {\n addAttr: ['allow', 'allowfullscreen', 'frameborder', 'scrolling'],\n addTags: ['iframe']\n });\n }\n }, {\n key: \"setReadOnlyValue\",\n value: function setReadOnlyValue(value, index) {\n index = index || 0;\n if (this.options.readOnly || this.disabled) {\n if (this.refs.input && this.refs.input[index]) {\n if (this.component.inputFormat === 'plain') {\n this.refs.input[index].innerText = this.interpolate(value, {}, {\n noeval: true\n });\n } else {\n this.setContent(this.refs.input[index], this.interpolate(value, {}, {\n noeval: true\n }), this.shouldSanitizeValue);\n }\n }\n }\n }\n }, {\n key: \"isJsonValue\",\n get: function get() {\n return this.component.as && this.component.as === 'json';\n }\n }, {\n key: \"setConvertedValue\",\n value: function setConvertedValue(value, index) {\n if (this.isJsonValue && !_lodash[\"default\"].isNil(value)) {\n try {\n value = JSON.stringify(value, null, 2);\n } catch (err) {\n console.warn(err);\n }\n }\n if (!_lodash[\"default\"].isString(value)) {\n value = '';\n }\n this.setReadOnlyValue(value, index);\n return value;\n }\n }, {\n key: \"setAsyncConvertedValue\",\n value: function setAsyncConvertedValue(value) {\n if (this.isJsonValue && value) {\n try {\n value = JSON.stringify(value, null, 2);\n } catch (err) {\n console.warn(err);\n }\n }\n if (!_lodash[\"default\"].isString(value)) {\n value = '';\n }\n var htmlDoc = new DOMParser().parseFromString(value, 'text/html');\n var images = htmlDoc.getElementsByTagName('img');\n if (images.length) {\n return this.setImagesUrl(images).then(function () {\n value = htmlDoc.getElementsByTagName('body')[0].innerHTML;\n return value;\n });\n } else {\n return _nativePromiseOnly[\"default\"].resolve(value);\n }\n }\n }, {\n key: \"setImagesUrl\",\n value: function setImagesUrl(images) {\n var _this6 = this;\n return _nativePromiseOnly[\"default\"].all(_lodash[\"default\"].map(images, function (image) {\n var requestData;\n try {\n requestData = JSON.parse(image.getAttribute('alt'));\n } catch (error) {\n console.warn(error);\n }\n return _this6.fileService.downloadFile(requestData).then(function (result) {\n image.setAttribute('src', result.url);\n });\n }));\n }\n }, {\n key: \"addAutoExpanding\",\n value: function addAutoExpanding(textarea, index) {\n var heightOffset = null;\n var previousHeight = null;\n var changeOverflow = function changeOverflow(value) {\n var width = textarea.style.width;\n textarea.style.width = '0px';\n textarea.offsetWidth;\n textarea.style.width = width;\n textarea.style.overflowY = value;\n };\n var preventParentScroll = function preventParentScroll(element, changeSize) {\n var nodeScrolls = [];\n while (element && element.parentNode && element.parentNode instanceof Element) {\n if (element.parentNode.scrollTop) {\n nodeScrolls.push({\n node: element.parentNode,\n scrollTop: element.parentNode.scrollTop\n });\n }\n element = element.parentNode;\n }\n changeSize();\n nodeScrolls.forEach(function (nodeScroll) {\n nodeScroll.node.scrollTop = nodeScroll.scrollTop;\n });\n };\n var resize = function resize() {\n if (textarea.scrollHeight === 0) {\n return;\n }\n preventParentScroll(textarea, function () {\n textarea.style.height = '';\n textarea.style.height = \"\".concat(textarea.scrollHeight + heightOffset, \"px\");\n });\n };\n var update = _lodash[\"default\"].debounce(function () {\n resize();\n var styleHeight = Math.round(parseFloat(textarea.style.height));\n var computed = window.getComputedStyle(textarea, null);\n var currentHeight = textarea.offsetHeight;\n if (currentHeight < styleHeight && computed.overflowY === 'hidden') {\n changeOverflow('scroll');\n } else if (computed.overflowY !== 'hidden') {\n changeOverflow('hidden');\n }\n resize();\n currentHeight = textarea.offsetHeight;\n if (previousHeight !== currentHeight) {\n previousHeight = currentHeight;\n update();\n }\n }, 200);\n var computedStyle = window.getComputedStyle(textarea, null);\n textarea.style.resize = 'none';\n heightOffset = parseFloat(computedStyle.borderTopWidth) + parseFloat(computedStyle.borderBottomWidth) || 0;\n if (window) {\n this.addEventListener(window, 'resize', update);\n }\n this.addEventListener(textarea, 'input', update);\n this.on('initialized', update);\n this.updateSizes[index] = update;\n update();\n }\n }, {\n key: \"trimBlanks\",\n value: function trimBlanks(value) {\n if (!value || this.isPlain) {\n return value;\n }\n var trimBlanks = function trimBlanks(value) {\n var nbsp = '

 

';\n var br = '


';\n var brNbsp = '


 

';\n var regExp = new RegExp(\"^\".concat(nbsp, \"|\").concat(nbsp, \"$|^\").concat(br, \"|\").concat(br, \"$|^\").concat(brNbsp, \"|\").concat(brNbsp, \"$\"), 'g');\n return typeof value === 'string' ? value.replace(regExp, '') : value;\n };\n if (Array.isArray(value)) {\n value.forEach(function (input, index) {\n value[index] = trimBlanks(input);\n });\n } else {\n value = trimBlanks(value);\n }\n return value;\n }\n }, {\n key: \"onChange\",\n value: function onChange(flags, fromRoot) {\n var changed = _get(_getPrototypeOf(TextAreaComponent.prototype), \"onChange\", this).call(this, flags, fromRoot);\n this.updateSizes.forEach(function (updateSize) {\n return updateSize();\n });\n return changed;\n }\n }, {\n key: \"hasChanged\",\n value: function hasChanged(newValue, oldValue) {\n return _get(_getPrototypeOf(TextAreaComponent.prototype), \"hasChanged\", this).call(this, this.trimBlanks(newValue), this.trimBlanks(oldValue));\n }\n }, {\n key: \"isEmpty\",\n value: function isEmpty() {\n var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.dataValue;\n return _get(_getPrototypeOf(TextAreaComponent.prototype), \"isEmpty\", this).call(this, this.trimBlanks(value));\n }\n }, {\n key: \"defaultValue\",\n get: function get() {\n var defaultValue = _get(_getPrototypeOf(TextAreaComponent.prototype), \"defaultValue\", this);\n if (this.component.editor === 'quill' && !defaultValue) {\n defaultValue = '


';\n }\n return defaultValue;\n }\n }, {\n key: \"getConvertedValue\",\n value: function getConvertedValue(value) {\n if (this.isJsonValue && value) {\n try {\n value = JSON.parse(value);\n } catch (err) {\n // console.warn(err);\n }\n }\n return value;\n }\n }, {\n key: \"detach\",\n value: function detach() {\n var _this7 = this;\n // Destroy all editors.\n this.editors.forEach(function (editor) {\n if (editor.destroy) {\n editor.destroy();\n }\n });\n this.editors = [];\n this.editorsReady = [];\n this.updateSizes.forEach(function (updateSize) {\n return _this7.removeEventListener(window, 'resize', updateSize);\n });\n this.updateSizes = [];\n _get(_getPrototypeOf(TextAreaComponent.prototype), \"detach\", this).call(this);\n }\n }, {\n key: \"getValue\",\n value: function getValue() {\n if (this.isPlain) {\n return this.getConvertedValue(_get(_getPrototypeOf(TextAreaComponent.prototype), \"getValue\", this).call(this));\n }\n return this.dataValue;\n }\n }, {\n key: \"focus\",\n value: function focus() {\n var _this8 = this;\n _get(_getPrototypeOf(TextAreaComponent.prototype), \"focus\", this).call(this);\n switch (this.component.editor) {\n case 'ckeditor':\n {\n var _this$editorsReady$;\n // Wait for the editor to be ready.\n (_this$editorsReady$ = this.editorsReady[0]) === null || _this$editorsReady$ === void 0 ? void 0 : _this$editorsReady$.then(function () {\n var _this8$editors$0$edit, _this8$editors$0$edit2;\n if ((_this8$editors$0$edit = _this8.editors[0].editing) !== null && _this8$editors$0$edit !== void 0 && (_this8$editors$0$edit2 = _this8$editors$0$edit.view) !== null && _this8$editors$0$edit2 !== void 0 && _this8$editors$0$edit2.focus) {\n _this8.editors[0].editing.view.focus();\n }\n _this8.element.scrollIntoView();\n })[\"catch\"](function (err) {\n console.warn('An editor did not initialize properly when trying to focus:', err);\n });\n break;\n }\n case 'ace':\n {\n var _this$editorsReady$2;\n (_this$editorsReady$2 = this.editorsReady[0]) === null || _this$editorsReady$2 === void 0 ? void 0 : _this$editorsReady$2.then(function () {\n _this8.editors[0].focus();\n _this8.element.scrollIntoView();\n })[\"catch\"](function (err) {\n console.warn('An editor did not initialize properly when trying to focus:', err);\n });\n break;\n }\n case 'quill':\n {\n var _this$editorsReady$3;\n (_this$editorsReady$3 = this.editorsReady[0]) === null || _this$editorsReady$3 === void 0 ? void 0 : _this$editorsReady$3.then(function () {\n _this8.editors[0].focus();\n })[\"catch\"](function (err) {\n console.warn('An editor did not initialize properly when trying to focus:', err);\n });\n break;\n }\n }\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len2 = arguments.length, extend = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n extend[_key2] = arguments[_key2];\n }\n return _TextField[\"default\"].schema.apply(_TextField[\"default\"], [{\n type: 'textarea',\n label: 'Text Area',\n key: 'textArea',\n rows: 3,\n wysiwyg: false,\n editor: '',\n fixedSize: true,\n inputFormat: 'html',\n validate: {\n minWords: '',\n maxWords: ''\n }\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Text Area',\n group: 'basic',\n icon: 'font',\n documentation: '/userguide/form-building/form-components#text-area',\n weight: 20,\n schema: TextAreaComponent.schema()\n };\n }\n }]);\n return TextAreaComponent;\n}(_TextField[\"default\"]);\nexports[\"default\"] = TextAreaComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/textarea/TextArea.js?"); /***/ }), @@ -2048,7 +2081,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nvar _Formio = __webpack_require__(/*! ../../../Formio */ \"./lib/Formio.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = [{\n key: 'inputMask',\n ignore: true\n}, {\n key: 'allowMultipleMasks',\n ignore: true\n}, {\n key: 'mask',\n ignore: true\n}, {\n type: 'number',\n input: true,\n key: 'rows',\n label: 'Rows',\n weight: 210,\n tooltip: 'This allows control over how many rows are visible in the text area.',\n placeholder: 'Enter the amount of rows'\n}, {\n weight: 1350,\n type: 'checkbox',\n input: true,\n key: 'spellcheck',\n defaultValue: true,\n label: 'Allow Spellcheck'\n}, {\n type: 'select',\n input: true,\n key: 'editor',\n label: 'Editor',\n tooltip: 'Select the type of WYSIWYG editor to use for this text area.',\n dataSrc: 'values',\n data: {\n values: [{\n label: 'None',\n value: ''\n }, {\n label: 'ACE',\n value: 'ace'\n }, {\n label: 'CKEditor',\n value: 'ckeditor'\n }, {\n label: 'Quill',\n value: 'quill'\n }]\n },\n weight: 415\n}, {\n type: 'checkbox',\n input: true,\n key: 'autoExpand',\n label: 'Auto Expand',\n tooltip: 'This will make the TextArea auto expand it\\'s height as the user is typing into the area.',\n weight: 415,\n conditional: {\n json: {\n '==': [{\n var: 'data.editor'\n }, '']\n }\n }\n}, {\n type: 'checkbox',\n input: true,\n key: 'isUploadEnabled',\n label: 'Enable Image Upload',\n weight: 415.1,\n conditional: {\n json: {\n or: [{\n '===': [{\n var: 'data.editor'\n }, 'quill']\n }, {\n '===': [{\n var: 'data.editor'\n }, 'ckeditor']\n }]\n }\n }\n}, {\n type: 'select',\n input: true,\n key: 'uploadStorage',\n label: 'Image Upload Storage',\n placeholder: 'Select your file storage provider',\n weight: 415.2,\n tooltip: 'Which storage to save the files in.',\n valueProperty: 'value',\n dataSrc: 'custom',\n data: {\n custom: function custom() {\n return _lodash.default.map(_Formio.GlobalFormio.Providers.getProviders('storage'), function (storage, key) {\n return {\n label: storage.title,\n value: key\n };\n });\n }\n },\n conditional: {\n json: {\n '===': [{\n var: 'data.isUploadEnabled'\n }, true]\n }\n }\n}, {\n type: 'textfield',\n input: true,\n key: 'uploadUrl',\n label: 'Image Upload Url',\n weight: 415.3,\n placeholder: 'Enter the url to post the files to.',\n tooltip: 'See https://github.com/danialfarid/ng-file-upload#server-side for how to set up the server.',\n conditional: {\n json: {\n '===': [{\n var: 'data.uploadStorage'\n }, 'url']\n }\n }\n}, {\n type: 'textarea',\n key: 'uploadOptions',\n label: 'Image Upload Custom request options',\n tooltip: 'Pass your custom xhr options(optional)',\n rows: 5,\n editor: 'ace',\n input: true,\n weight: 415.4,\n placeholder: \"{\\n \\\"withCredentials\\\": true\\n }\",\n conditional: {\n json: {\n '===': [{\n var: 'data.uploadStorage'\n }, 'url']\n }\n }\n}, {\n type: 'textfield',\n input: true,\n key: 'uploadDir',\n label: 'Image Upload Directory',\n placeholder: '(optional) Enter a directory for the files',\n tooltip: 'This will place all the files uploaded in this field in the directory',\n weight: 415.5,\n conditional: {\n json: {\n '===': [{\n var: 'data.isUploadEnabled'\n }, true]\n }\n }\n}, {\n type: 'textfield',\n key: 'fileKey',\n input: true,\n label: 'File form-data Key',\n tooltip: 'Key name that you would like to modify for the file while calling API request.',\n rows: 5,\n weight: 415.6,\n placeholder: 'Enter the key name of a file for form data.',\n conditional: {\n json: {\n and: [{\n '===': [{\n var: 'data.editor'\n }, 'quill']\n }, {\n '===': [{\n var: 'data.isUploadEnabled'\n }, true]\n }, {\n '===': [{\n var: 'data.uploadStorage'\n }, 'url']\n }]\n }\n }\n}, {\n type: 'select',\n input: true,\n key: 'as',\n label: 'Save As',\n dataSrc: 'values',\n tooltip: 'This setting determines how the value should be entered and stored in the database.',\n clearOnHide: true,\n data: {\n values: [{\n label: 'String',\n value: 'string'\n }, {\n label: 'JSON',\n value: 'json'\n }, {\n label: 'HTML',\n value: 'html'\n }]\n },\n conditional: {\n json: {\n or: [{\n '===': [{\n var: 'data.editor'\n }, 'quill']\n }, {\n '===': [{\n var: 'data.editor'\n }, 'ace']\n }]\n }\n },\n weight: 416\n}, {\n type: 'textarea',\n input: true,\n editor: 'ace',\n rows: 10,\n as: 'json',\n label: 'Editor Settings',\n tooltip: 'Enter the WYSIWYG editor JSON configuration.',\n key: 'wysiwyg',\n customDefaultValue: function customDefaultValue(value, component, row, data, instance) {\n return instance ? instance.wysiwygDefault : '';\n },\n conditional: {\n json: {\n or: [{\n '===': [{\n var: 'data.editor'\n }, 'ace']\n }, {\n '===': [{\n var: 'data.editor'\n }, 'ckeditor']\n }, {\n '===': [{\n var: 'data.editor'\n }, 'quill']\n }]\n }\n },\n weight: 417\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/textarea/editForm/TextArea.edit.display.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nvar _Formio = __webpack_require__(/*! ../../../Formio */ \"./lib/Formio.js\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = [{\n key: 'inputMask',\n ignore: true\n}, {\n key: 'allowMultipleMasks',\n ignore: true\n}, {\n key: 'mask',\n ignore: true\n}, {\n type: 'number',\n input: true,\n key: 'rows',\n label: 'Rows',\n weight: 210,\n tooltip: 'This allows control over how many rows are visible in the text area.',\n placeholder: 'Enter the amount of rows'\n}, {\n weight: 1350,\n type: 'checkbox',\n input: true,\n key: 'spellcheck',\n defaultValue: true,\n label: 'Allow Spellcheck'\n}, {\n type: 'select',\n input: true,\n key: 'editor',\n label: 'Editor',\n tooltip: 'Select the type of WYSIWYG editor to use for this text area.',\n dataSrc: 'values',\n data: {\n values: [{\n label: 'None',\n value: ''\n }, {\n label: 'ACE',\n value: 'ace'\n }, {\n label: 'CKEditor',\n value: 'ckeditor'\n }, {\n label: 'Quill',\n value: 'quill'\n }]\n },\n weight: 415\n}, {\n type: 'checkbox',\n input: true,\n key: 'autoExpand',\n label: 'Auto Expand',\n tooltip: 'This will make the TextArea auto expand it\\'s height as the user is typing into the area.',\n weight: 415,\n conditional: {\n json: {\n '==': [{\n \"var\": 'data.editor'\n }, '']\n }\n }\n}, {\n type: 'checkbox',\n input: true,\n key: 'isUploadEnabled',\n label: 'Enable Image Upload',\n weight: 415.1,\n conditional: {\n json: {\n or: [{\n '===': [{\n \"var\": 'data.editor'\n }, 'quill']\n }, {\n '===': [{\n \"var\": 'data.editor'\n }, 'ckeditor']\n }]\n }\n }\n}, {\n type: 'select',\n input: true,\n key: 'uploadStorage',\n label: 'Image Upload Storage',\n placeholder: 'Select your file storage provider',\n weight: 415.2,\n tooltip: 'Which storage to save the files in.',\n valueProperty: 'value',\n dataSrc: 'custom',\n data: {\n custom: function custom() {\n return _lodash[\"default\"].map(_Formio.GlobalFormio.Providers.getProviders('storage'), function (storage, key) {\n return {\n label: storage.title,\n value: key\n };\n });\n }\n },\n conditional: {\n json: {\n '===': [{\n \"var\": 'data.isUploadEnabled'\n }, true]\n }\n }\n}, {\n type: 'textfield',\n input: true,\n key: 'uploadUrl',\n label: 'Image Upload Url',\n weight: 415.3,\n placeholder: 'Enter the url to post the files to.',\n tooltip: 'See https://github.com/danialfarid/ng-file-upload#server-side for how to set up the server.',\n conditional: {\n json: {\n '===': [{\n \"var\": 'data.uploadStorage'\n }, 'url']\n }\n }\n}, {\n type: 'textarea',\n key: 'uploadOptions',\n label: 'Image Upload Custom request options',\n tooltip: 'Pass your custom xhr options(optional)',\n rows: 5,\n editor: 'ace',\n input: true,\n weight: 415.4,\n placeholder: \"{\\n \\\"withCredentials\\\": true\\n }\",\n conditional: {\n json: {\n '===': [{\n \"var\": 'data.uploadStorage'\n }, 'url']\n }\n }\n}, {\n type: 'textfield',\n input: true,\n key: 'uploadDir',\n label: 'Image Upload Directory',\n placeholder: '(optional) Enter a directory for the files',\n tooltip: 'This will place all the files uploaded in this field in the directory',\n weight: 415.5,\n conditional: {\n json: {\n '===': [{\n \"var\": 'data.isUploadEnabled'\n }, true]\n }\n }\n}, {\n type: 'textfield',\n key: 'fileKey',\n input: true,\n label: 'File form-data Key',\n tooltip: 'Key name that you would like to modify for the file while calling API request.',\n rows: 5,\n weight: 415.6,\n placeholder: 'Enter the key name of a file for form data.',\n conditional: {\n json: {\n and: [{\n '===': [{\n \"var\": 'data.editor'\n }, 'quill']\n }, {\n '===': [{\n \"var\": 'data.isUploadEnabled'\n }, true]\n }, {\n '===': [{\n \"var\": 'data.uploadStorage'\n }, 'url']\n }]\n }\n }\n}, {\n type: 'select',\n input: true,\n key: 'as',\n label: 'Save As',\n dataSrc: 'values',\n tooltip: 'This setting determines how the value should be entered and stored in the database.',\n clearOnHide: true,\n data: {\n values: [{\n label: 'String',\n value: 'string'\n }, {\n label: 'JSON',\n value: 'json'\n }, {\n label: 'HTML',\n value: 'html'\n }]\n },\n conditional: {\n json: {\n or: [{\n '===': [{\n \"var\": 'data.editor'\n }, 'quill']\n }, {\n '===': [{\n \"var\": 'data.editor'\n }, 'ace']\n }]\n }\n },\n weight: 416\n}, {\n type: 'textarea',\n input: true,\n editor: 'ace',\n rows: 10,\n as: 'json',\n label: 'Editor Settings',\n tooltip: 'Enter the WYSIWYG editor JSON configuration.',\n key: 'wysiwyg',\n customDefaultValue: function customDefaultValue(value, component, row, data, instance) {\n return instance ? instance.wysiwygDefault : '';\n },\n conditional: {\n json: {\n or: [{\n '===': [{\n \"var\": 'data.editor'\n }, 'ace']\n }, {\n '===': [{\n \"var\": 'data.editor'\n }, 'ckeditor']\n }, {\n '===': [{\n \"var\": 'data.editor'\n }, 'quill']\n }]\n }\n },\n weight: 417\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/textarea/editForm/TextArea.edit.display.js?"); /***/ }), @@ -2056,10 +2089,10 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /*!**********************************************************************!*\ !*** ./lib/components/textarea/editForm/TextArea.edit.validation.js ***! \**********************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n weight: 125,\n key: 'validate.minWords',\n label: 'Minimum Word Length',\n placeholder: 'Minimum Word Length',\n type: 'number',\n tooltip: 'The minimum amount of words that can be added to this field.',\n input: true\n}, {\n weight: 126,\n key: 'validate.maxWords',\n label: 'Maximum Word Length',\n placeholder: 'Maximum Word Length',\n type: 'number',\n tooltip: 'The maximum amount of words that can be added to this field.',\n input: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/textarea/editForm/TextArea.edit.validation.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n weight: 125,\n key: 'validate.minWords',\n label: 'Minimum Word Length',\n placeholder: 'Minimum Word Length',\n type: 'number',\n tooltip: 'The minimum amount of words that can be added to this field.',\n input: true\n}, {\n weight: 126,\n key: 'validate.maxWords',\n label: 'Maximum Word Length',\n placeholder: 'Maximum Word Length',\n type: 'number',\n tooltip: 'The maximum amount of words that can be added to this field.',\n input: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/textarea/editForm/TextArea.edit.validation.js?"); /***/ }), @@ -2070,7 +2103,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\nvar _Components = _interopRequireDefault(__webpack_require__(/*! ../Components */ \"./lib/components/Components.js\"));\n\nvar _TextFieldEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/TextField.edit.data */ \"./lib/components/textfield/editForm/TextField.edit.data.js\"));\n\nvar _TextFieldEdit2 = _interopRequireDefault(__webpack_require__(/*! ./editForm/TextField.edit.display */ \"./lib/components/textfield/editForm/TextField.edit.display.js\"));\n\nvar _TextFieldEdit3 = _interopRequireDefault(__webpack_require__(/*! ./editForm/TextField.edit.validation */ \"./lib/components/textfield/editForm/TextField.edit.validation.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _Components.default.baseEditForm.apply(_Components.default, [[{\n key: 'display',\n components: _TextFieldEdit2.default\n }, {\n key: 'data',\n components: _TextFieldEdit.default\n }, {\n key: 'validation',\n components: _TextFieldEdit3.default\n }, {\n key: 'addons',\n ignore: true\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/textfield/TextField.form.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\nvar _Components = _interopRequireDefault(__webpack_require__(/*! ../Components */ \"./lib/components/Components.js\"));\nvar _TextFieldEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/TextField.edit.data */ \"./lib/components/textfield/editForm/TextField.edit.data.js\"));\nvar _TextFieldEdit2 = _interopRequireDefault(__webpack_require__(/*! ./editForm/TextField.edit.display */ \"./lib/components/textfield/editForm/TextField.edit.display.js\"));\nvar _TextFieldEdit3 = _interopRequireDefault(__webpack_require__(/*! ./editForm/TextField.edit.validation */ \"./lib/components/textfield/editForm/TextField.edit.validation.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _Components[\"default\"].baseEditForm.apply(_Components[\"default\"], [[{\n key: 'display',\n components: _TextFieldEdit2[\"default\"]\n }, {\n key: 'data',\n components: _TextFieldEdit[\"default\"]\n }, {\n key: 'validation',\n components: _TextFieldEdit3[\"default\"]\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/textfield/TextField.form.js?"); /***/ }), @@ -2081,7 +2114,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptors.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.weak-map.js */ \"./node_modules/core-js/modules/es.weak-map.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.trim.js */ \"./node_modules/core-js/modules/es.string.trim.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\nvar _Input2 = _interopRequireDefault(__webpack_require__(/*! ../_classes/input/Input */ \"./lib/components/_classes/input/Input.js\"));\n\nvar _vanillaTextMask = __webpack_require__(/*! @formio/vanilla-text-mask */ \"./node_modules/@formio/vanilla-text-mask/dist/vanillaTextMask.js\");\n\nvar FormioUtils = _interopRequireWildcard(__webpack_require__(/*! ../../utils/utils */ \"./lib/utils/utils.js\"));\n\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\n\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\n\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar TextFieldComponent = /*#__PURE__*/function (_Input) {\n _inherits(TextFieldComponent, _Input);\n\n var _super = _createSuper(TextFieldComponent);\n\n function TextFieldComponent(component, options, data) {\n var _this$component$widge, _this$component$widge2, _this$component$widge3;\n\n var _this;\n\n _classCallCheck(this, TextFieldComponent);\n\n _this = _super.call(this, component, options, data);\n var timezone = ((_this$component$widge = _this.component.widget) === null || _this$component$widge === void 0 ? void 0 : _this$component$widge.timezone) || _this.options.timezone;\n var displayInTimezone = ((_this$component$widge2 = _this.component.widget) === null || _this$component$widge2 === void 0 ? void 0 : _this$component$widge2.displayInTimezone) || 'viewer';\n\n if (((_this$component$widge3 = _this.component.widget) === null || _this$component$widge3 === void 0 ? void 0 : _this$component$widge3.type) === 'calendar') {\n _this.component.widget = _objectSpread(_objectSpread({}, _this.component.widget), {}, {\n readOnly: _this.options.readOnly,\n timezone: timezone,\n displayInTimezone: displayInTimezone,\n locale: _this.component.widget.locale || _this.options.language,\n saveAs: 'text'\n });\n }\n\n return _this;\n }\n\n _createClass(TextFieldComponent, [{\n key: \"defaultSchema\",\n get: function get() {\n return TextFieldComponent.schema();\n }\n }, {\n key: \"inputInfo\",\n get: function get() {\n var info = _get(_getPrototypeOf(TextFieldComponent.prototype), \"inputInfo\", this);\n\n info.type = 'input';\n\n if (this.component.hasOwnProperty('spellcheck')) {\n info.attr.spellcheck = this.component.spellcheck;\n }\n\n if (this.component.mask) {\n info.attr.type = 'password';\n } else {\n info.attr.type = this.component.inputType === 'password' ? 'password' : 'text';\n }\n\n info.changeEvent = 'input';\n return info;\n }\n }, {\n key: \"emptyValue\",\n get: function get() {\n return '';\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n this.loadRefs(element, {\n valueMaskInput: 'single'\n });\n return _get(_getPrototypeOf(TextFieldComponent.prototype), \"attach\", this).call(this, element);\n }\n /**\n * Returns the mask value object.\n *\n * @param value\n * @param flags\n * @return {*}\n */\n\n }, {\n key: \"maskValue\",\n value: function maskValue(value) {\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n // Convert it into the correct format.\n if (!value || _typeof(value) !== 'object') {\n value = {\n value: value,\n maskName: this.component.inputMasks[0].label\n };\n } // If no value is provided, then set the defaultValue.\n\n\n if (!value.value) {\n var defaultValue = flags.noDefault ? this.emptyValue : this.defaultValue;\n value.value = Array.isArray(defaultValue) ? defaultValue[0] : defaultValue;\n }\n\n return value;\n }\n /**\n * Normalize the value set in the data object.\n *\n * @param value\n * @param flags\n * @return {*}\n */\n\n }, {\n key: \"normalizeValue\",\n value: function normalizeValue(value) {\n var _this2 = this;\n\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n if (!this.isMultipleMasksField) {\n return _get(_getPrototypeOf(TextFieldComponent.prototype), \"normalizeValue\", this).call(this, value);\n }\n\n if (Array.isArray(value)) {\n return _get(_getPrototypeOf(TextFieldComponent.prototype), \"normalizeValue\", this).call(this, value.map(function (val) {\n return _this2.maskValue(val, flags);\n }));\n }\n\n return _get(_getPrototypeOf(TextFieldComponent.prototype), \"normalizeValue\", this).call(this, this.maskValue(value, flags));\n }\n /**\n * Sets the value at this index.\n *\n * @param index\n * @param value\n * @param flags\n */\n\n }, {\n key: \"setValueAt\",\n value: function setValueAt(index, value) {\n var flags = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n if (!this.isMultipleMasksField) {\n return _get(_getPrototypeOf(TextFieldComponent.prototype), \"setValueAt\", this).call(this, index, value, flags);\n }\n\n value = this.maskValue(value, flags);\n var textValue = value.value || '';\n var textInput = this.refs.mask ? this.refs.mask[index] : null;\n var maskInput = this.refs.select ? this.refs.select[index] : null;\n var mask = this.getMaskPattern(value.maskName);\n\n if (textInput && maskInput && mask) {\n var placeholderChar = this.placeholderChar;\n textInput.value = (0, _vanillaTextMask.conformToMask)(textValue, FormioUtils.getInputMask(mask), {\n placeholderChar: placeholderChar\n }).conformedValue;\n maskInput.value = value.maskName;\n } else {\n return _get(_getPrototypeOf(TextFieldComponent.prototype), \"setValueAt\", this).call(this, index, textValue, flags);\n }\n }\n }, {\n key: \"unmaskValue\",\n value: function unmaskValue(value) {\n var format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.component.displayMask;\n var mask = FormioUtils.getInputMask(format, this.placeholderChar);\n return FormioUtils.unmaskValue(value, mask, this.placeholderChar);\n }\n /**\n * Returns the value at this index.\n *\n * @param index\n * @return {*}\n */\n\n }, {\n key: \"getValueAt\",\n value: function getValueAt(index) {\n if (!this.isMultipleMasksField) {\n var _this$refs$valueMaskI;\n\n var value = _get(_getPrototypeOf(TextFieldComponent.prototype), \"getValueAt\", this).call(this, index);\n\n var valueMask = this.component.inputMask;\n var displayMask = this.component.displayMask; // If the input has only the valueMask or the displayMask is the same as the valueMask,\n // just return the value which is already formatted\n\n if (valueMask && !displayMask || displayMask === valueMask) {\n return value;\n } // If there is only the displayMask, return the raw (unmasked) value\n\n\n if (displayMask && !valueMask) {\n return this.unmaskValue(value, displayMask);\n }\n\n if ((_this$refs$valueMaskI = this.refs.valueMaskInput) !== null && _this$refs$valueMaskI !== void 0 && _this$refs$valueMaskI.mask) {\n var _this$refs$valueMaskI2;\n\n this.refs.valueMaskInput.mask.textMaskInputElement.update(value);\n return (_this$refs$valueMaskI2 = this.refs.valueMaskInput) === null || _this$refs$valueMaskI2 === void 0 ? void 0 : _this$refs$valueMaskI2.value;\n }\n\n return value;\n }\n\n var textInput = this.refs.mask ? this.refs.mask[index] : null;\n var maskInput = this.refs.select ? this.refs.select[index] : null;\n return {\n value: textInput ? textInput.value : undefined,\n maskName: maskInput ? maskInput.value : undefined\n };\n }\n }, {\n key: \"isHtmlRenderMode\",\n value: function isHtmlRenderMode() {\n return _get(_getPrototypeOf(TextFieldComponent.prototype), \"isHtmlRenderMode\", this).call(this) || (this.options.readOnly || this.disabled) && this.component.inputFormat === 'html' && this.type === 'textfield';\n }\n }, {\n key: \"isEmpty\",\n value: function isEmpty() {\n var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.dataValue;\n\n if (!this.isMultipleMasksField) {\n return _get(_getPrototypeOf(TextFieldComponent.prototype), \"isEmpty\", this).call(this, (value || '').toString().trim());\n }\n\n return _get(_getPrototypeOf(TextFieldComponent.prototype), \"isEmpty\", this).call(this, value) || (this.component.multiple ? value.length === 0 : !value.maskName || !value.value);\n }\n }, {\n key: \"truncateMultipleSpaces\",\n value: function truncateMultipleSpaces(value) {\n if (value) {\n return value.trim().replace(/\\s{2,}/g, ' ');\n }\n\n return value;\n }\n }, {\n key: \"validationValue\",\n get: function get() {\n var value = _get(_getPrototypeOf(TextFieldComponent.prototype), \"validationValue\", this);\n\n if (value && this.component.truncateMultipleSpaces) {\n return this.truncateMultipleSpaces(value);\n }\n\n return value;\n }\n }, {\n key: \"beforeSubmit\",\n value: function beforeSubmit() {\n var _this3 = this;\n\n var value = this.dataValue;\n\n if (!this.component.truncateMultipleSpaces || !value) {\n return _nativePromiseOnly.default.resolve(value);\n }\n\n value = this.truncateMultipleSpaces(value);\n this.dataValue = value;\n return _nativePromiseOnly.default.resolve(value).then(function () {\n return _get(_getPrototypeOf(TextFieldComponent.prototype), \"beforeSubmit\", _this3).call(_this3);\n });\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _Input2.default.schema.apply(_Input2.default, [{\n label: 'Text Field',\n key: 'textField',\n type: 'textfield',\n mask: false,\n inputType: 'text',\n inputFormat: 'plain',\n inputMask: '',\n displayMask: '',\n tableView: true,\n spellcheck: true,\n truncateMultipleSpaces: false,\n validate: {\n minLength: '',\n maxLength: '',\n pattern: ''\n }\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Text Field',\n icon: 'terminal',\n group: 'basic',\n documentation: '/userguide/forms/form-components#text-field',\n weight: 0,\n schema: TextFieldComponent.schema()\n };\n }\n }]);\n\n return TextFieldComponent;\n}(_Input2.default);\n\nexports[\"default\"] = TextFieldComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/textfield/TextField.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptors.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-properties.js */ \"./node_modules/core-js/modules/es.object.define-properties.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.weak-map.js */ \"./node_modules/core-js/modules/es.weak-map.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.array.is-array.js */ \"./node_modules/core-js/modules/es.array.is-array.js\");\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n__webpack_require__(/*! core-js/modules/esnext.string.replace-all.js */ \"./node_modules/core-js/modules/esnext.string.replace-all.js\");\n__webpack_require__(/*! core-js/modules/es.string.trim.js */ \"./node_modules/core-js/modules/es.string.trim.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-string.js */ \"./node_modules/core-js/modules/es.date.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _Input2 = _interopRequireDefault(__webpack_require__(/*! ../_classes/input/Input */ \"./lib/components/_classes/input/Input.js\"));\nvar _vanillaTextMask = __webpack_require__(/*! @formio/vanilla-text-mask */ \"./node_modules/@formio/vanilla-text-mask/dist/vanillaTextMask.js\");\nvar FormioUtils = _interopRequireWildcard(__webpack_require__(/*! ../../utils/utils */ \"./lib/utils/utils.js\"));\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") { return { \"default\": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj[\"default\"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar TextFieldComponent = /*#__PURE__*/function (_Input) {\n _inherits(TextFieldComponent, _Input);\n var _super = _createSuper(TextFieldComponent);\n function TextFieldComponent(component, options, data) {\n var _this$component$widge, _this$component$widge2, _this$component$widge3;\n var _this;\n _classCallCheck(this, TextFieldComponent);\n _this = _super.call(this, component, options, data);\n var timezone = ((_this$component$widge = _this.component.widget) === null || _this$component$widge === void 0 ? void 0 : _this$component$widge.timezone) || _this.options.timezone;\n var displayInTimezone = ((_this$component$widge2 = _this.component.widget) === null || _this$component$widge2 === void 0 ? void 0 : _this$component$widge2.displayInTimezone) || 'viewer';\n if (((_this$component$widge3 = _this.component.widget) === null || _this$component$widge3 === void 0 ? void 0 : _this$component$widge3.type) === 'calendar') {\n _this.component.widget = _objectSpread(_objectSpread({}, _this.component.widget), {}, {\n readOnly: _this.options.readOnly,\n timezone: timezone,\n displayInTimezone: displayInTimezone,\n locale: _this.component.widget.locale || _this.options.language,\n saveAs: 'text'\n });\n }\n return _this;\n }\n _createClass(TextFieldComponent, [{\n key: \"defaultSchema\",\n get: function get() {\n return TextFieldComponent.schema();\n }\n }, {\n key: \"inputInfo\",\n get: function get() {\n var info = _get(_getPrototypeOf(TextFieldComponent.prototype), \"inputInfo\", this);\n info.type = 'input';\n if (this.component.hasOwnProperty('spellcheck')) {\n info.attr.spellcheck = this.component.spellcheck;\n }\n if (this.component.mask) {\n info.attr.type = 'password';\n } else {\n info.attr.type = this.component.inputType === 'password' ? 'password' : 'text';\n }\n info.changeEvent = this.component.applyMaskOn === 'blur' ? 'blur' : 'input';\n return info;\n }\n }, {\n key: \"emptyValue\",\n get: function get() {\n return '';\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n this.loadRefs(element, {\n valueMaskInput: 'single'\n });\n return _get(_getPrototypeOf(TextFieldComponent.prototype), \"attach\", this).call(this, element);\n }\n\n /**\n * Returns the mask value object.\n *\n * @param value\n * @param flags\n * @return {*}\n */\n }, {\n key: \"maskValue\",\n value: function maskValue(value) {\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n // Convert it into the correct format.\n if (!value || _typeof(value) !== 'object') {\n value = {\n value: value,\n maskName: this.component.inputMasks[0].label\n };\n }\n\n // If no value is provided, then set the defaultValue.\n if (!value.value) {\n var defaultValue = flags.noDefault ? this.emptyValue : this.defaultValue;\n value.value = Array.isArray(defaultValue) ? defaultValue[0] : defaultValue;\n }\n return value;\n }\n\n /**\n * Normalize the value set in the data object.\n *\n * @param value\n * @param flags\n * @return {*}\n */\n }, {\n key: \"normalizeValue\",\n value: function normalizeValue(value) {\n var _this2 = this;\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n if (!this.isMultipleMasksField) {\n return _get(_getPrototypeOf(TextFieldComponent.prototype), \"normalizeValue\", this).call(this, value);\n }\n if (Array.isArray(value)) {\n return _get(_getPrototypeOf(TextFieldComponent.prototype), \"normalizeValue\", this).call(this, value.map(function (val) {\n return _this2.maskValue(val, flags);\n }));\n }\n return _get(_getPrototypeOf(TextFieldComponent.prototype), \"normalizeValue\", this).call(this, this.maskValue(value, flags));\n }\n\n /**\n * Sets the value at this index.\n *\n * @param index\n * @param value\n * @param flags\n */\n }, {\n key: \"setValueAt\",\n value: function setValueAt(index, value) {\n var flags = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n if (!this.isMultipleMasksField) {\n return _get(_getPrototypeOf(TextFieldComponent.prototype), \"setValueAt\", this).call(this, index, value, flags);\n }\n value = this.maskValue(value, flags);\n var textValue = value.value || '';\n var textInput = this.refs.mask ? this.refs.mask[index] : null;\n var maskInput = this.refs.select ? this.refs.select[index] : null;\n var mask = this.getMaskPattern(value.maskName);\n if (textInput && maskInput && mask) {\n var placeholderChar = this.placeholderChar;\n textInput.value = (0, _vanillaTextMask.conformToMask)(textValue, FormioUtils.getInputMask(mask), {\n placeholderChar: placeholderChar\n }).conformedValue;\n maskInput.value = value.maskName;\n } else {\n return _get(_getPrototypeOf(TextFieldComponent.prototype), \"setValueAt\", this).call(this, index, textValue, flags);\n }\n }\n }, {\n key: \"unmaskValue\",\n value: function unmaskValue(value) {\n var format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.component.displayMask;\n var mask = FormioUtils.getInputMask(format, this.placeholderChar);\n return FormioUtils.unmaskValue(value, mask, this.placeholderChar);\n }\n\n /**\n * Returns the value at this index.\n *\n * @param index\n * @return {*}\n */\n }, {\n key: \"getValueAt\",\n value: function getValueAt(index) {\n if (!this.isMultipleMasksField) {\n var _this$refs$valueMaskI;\n var value = _get(_getPrototypeOf(TextFieldComponent.prototype), \"getValueAt\", this).call(this, index);\n var valueMask = this.component.inputMask;\n var displayMask = this.component.displayMask;\n\n // If the input has only the valueMask or the displayMask is the same as the valueMask,\n // just return the value which is already formatted\n if (valueMask && !displayMask || displayMask === valueMask) {\n return value;\n }\n\n // If there is only the displayMask, return the raw (unmasked) value\n if (displayMask && !valueMask) {\n return this.unmaskValue(value, displayMask);\n }\n if ((_this$refs$valueMaskI = this.refs.valueMaskInput) !== null && _this$refs$valueMaskI !== void 0 && _this$refs$valueMaskI.mask) {\n var _this$refs$valueMaskI2;\n this.refs.valueMaskInput.mask.textMaskInputElement.update(value);\n return (_this$refs$valueMaskI2 = this.refs.valueMaskInput) === null || _this$refs$valueMaskI2 === void 0 ? void 0 : _this$refs$valueMaskI2.value;\n }\n return value;\n }\n var textInput = this.refs.mask ? this.refs.mask[index] : null;\n var maskInput = this.refs.select ? this.refs.select[index] : null;\n return {\n value: textInput ? textInput.value : undefined,\n maskName: maskInput ? maskInput.value : undefined\n };\n }\n }, {\n key: \"getValueAsString\",\n value: function getValueAsString(value, options) {\n if (value && this.component.inputFormat === 'plain' && /<[^<>]+>/g.test(value)) {\n value = value.replaceAll('<', '<').replaceAll('>', '>');\n }\n return _get(_getPrototypeOf(TextFieldComponent.prototype), \"getValueAsString\", this).call(this, value, options);\n }\n }, {\n key: \"isHtmlRenderMode\",\n value: function isHtmlRenderMode() {\n return _get(_getPrototypeOf(TextFieldComponent.prototype), \"isHtmlRenderMode\", this).call(this) || (this.options.readOnly || this.disabled) && this.component.inputFormat === 'html' && this.type === 'textfield';\n }\n }, {\n key: \"isEmpty\",\n value: function isEmpty() {\n var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.dataValue;\n if (!this.isMultipleMasksField) {\n return _get(_getPrototypeOf(TextFieldComponent.prototype), \"isEmpty\", this).call(this, (value || '').toString().trim());\n }\n return _get(_getPrototypeOf(TextFieldComponent.prototype), \"isEmpty\", this).call(this, value) || (this.component.multiple ? value.length === 0 : !value.maskName || !value.value);\n }\n }, {\n key: \"truncateMultipleSpaces\",\n value: function truncateMultipleSpaces(value) {\n if (value) {\n return value.trim().replace(/\\s{2,}/g, ' ');\n }\n return value;\n }\n }, {\n key: \"validationValue\",\n get: function get() {\n var value = _get(_getPrototypeOf(TextFieldComponent.prototype), \"validationValue\", this);\n if (value && this.component.truncateMultipleSpaces) {\n return this.truncateMultipleSpaces(value);\n }\n return value;\n }\n }, {\n key: \"beforeSubmit\",\n value: function beforeSubmit() {\n var _this3 = this;\n var value = this.dataValue;\n if (!this.component.truncateMultipleSpaces || !value) {\n return _nativePromiseOnly[\"default\"].resolve(value);\n }\n value = this.truncateMultipleSpaces(value);\n this.dataValue = value;\n return _nativePromiseOnly[\"default\"].resolve(value).then(function () {\n return _get(_getPrototypeOf(TextFieldComponent.prototype), \"beforeSubmit\", _this3).call(_this3);\n });\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _Input2[\"default\"].schema.apply(_Input2[\"default\"], [{\n label: 'Text Field',\n key: 'textField',\n type: 'textfield',\n mask: false,\n inputType: 'text',\n inputFormat: 'plain',\n inputMask: '',\n displayMask: '',\n tableView: true,\n spellcheck: true,\n truncateMultipleSpaces: false,\n validate: {\n minLength: '',\n maxLength: '',\n pattern: ''\n }\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Text Field',\n icon: 'terminal',\n group: 'basic',\n documentation: '/userguide/form-building/form-components#text-field',\n weight: 0,\n schema: TextFieldComponent.schema()\n };\n }\n }]);\n return TextFieldComponent;\n}(_Input2[\"default\"]);\nexports[\"default\"] = TextFieldComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/textfield/TextField.js?"); /***/ }), @@ -2089,10 +2122,10 @@ eval("\n\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_ /*!******************************************************************!*\ !*** ./lib/components/textfield/editForm/TextField.edit.data.js ***! \******************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n type: 'select',\n label: 'Input Format',\n key: 'inputFormat',\n weight: 105,\n placeholder: 'Input Format',\n tooltip: 'Force the output of this field to be sanitized in a specific format.',\n template: '{{ item.label }}',\n data: {\n values: [{\n value: 'plain',\n label: 'Plain'\n }, {\n value: 'html',\n label: 'HTML'\n }, {\n value: 'raw',\n label: 'Raw (Insecure)'\n }]\n },\n defaultValue: 'plain',\n input: true\n}, {\n weight: 200,\n type: 'radio',\n label: 'Text Case',\n key: 'case',\n tooltip: 'When data is entered, you can change the case of the value.',\n input: true,\n values: [{\n value: 'mixed',\n label: 'Mixed (Allow upper and lower case)'\n }, {\n value: 'uppercase',\n label: 'Uppercase'\n }, {\n value: 'lowercase',\n label: 'Lowercase'\n }]\n}, {\n weight: 205,\n type: 'checkbox',\n input: true,\n key: 'truncateMultipleSpaces',\n label: 'Truncate Multiple Spaces'\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/textfield/editForm/TextField.edit.data.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n type: 'select',\n label: 'Input Format',\n key: 'inputFormat',\n weight: 105,\n placeholder: 'Input Format',\n tooltip: 'Force the output of this field to be sanitized in a specific format.',\n template: '{{ item.label }}',\n data: {\n values: [{\n value: 'plain',\n label: 'Plain'\n }, {\n value: 'html',\n label: 'HTML'\n }, {\n value: 'raw',\n label: 'Raw (Insecure)'\n }]\n },\n defaultValue: 'plain',\n input: true\n}, {\n weight: 200,\n type: 'radio',\n label: 'Text Case',\n key: 'case',\n tooltip: 'When data is entered, you can change the case of the value.',\n input: true,\n values: [{\n value: 'mixed',\n label: 'Mixed (Allow upper and lower case)'\n }, {\n value: 'uppercase',\n label: 'Uppercase'\n }, {\n value: 'lowercase',\n label: 'Lowercase'\n }]\n}, {\n weight: 205,\n type: 'checkbox',\n input: true,\n key: 'truncateMultipleSpaces',\n label: 'Truncate Multiple Spaces'\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/textfield/editForm/TextField.edit.data.js?"); /***/ }), @@ -2103,7 +2136,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _widgets = _interopRequireDefault(__webpack_require__(/*! ../../../widgets */ \"./lib/widgets/index.js\"));\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = [{\n weight: 400,\n type: 'select',\n input: true,\n key: 'widget.type',\n label: 'Widget',\n placeholder: 'Select a widget',\n tooltip: 'The widget is the display UI used to input the value of the field.',\n defaultValue: 'input',\n onChange: function onChange(context) {\n context.data.widget = _lodash.default.pick(context.data.widget, 'type');\n },\n dataSrc: 'values',\n data: {\n values: [{\n label: 'Input Field',\n value: 'input'\n }, {\n label: 'Calendar Picker',\n value: 'calendar'\n }]\n },\n conditional: {\n json: {\n '===': [{\n var: 'data.type'\n }, 'textfield']\n }\n }\n}, {\n weight: 405,\n type: 'textarea',\n key: 'widget',\n label: 'Widget Settings',\n refreshOn: 'wiget.type',\n clearOnHide: false,\n // Deleted clearOnHide and refreshOn to make possible to change exist widget settings.\n calculateValue: function calculateValue(context) {\n var calculatedValue = context.instance.calculatedValue;\n var type = context.data.widget.type;\n\n if (_lodash.default.isEmpty(_lodash.default.omit(context.data.widget, 'type')) || _lodash.default.isEmpty(_lodash.default.omit(calculatedValue, 'type'))) {\n if (calculatedValue && !calculatedValue.type) {\n return context.data.widget;\n }\n\n var existWidget = context.instance._currentForm.options.editComponent.widget;\n\n if (existWidget && !_lodash.default.isEmpty(_lodash.default.omit(existWidget, 'type')) && type === existWidget.type) {\n return _lodash.default.omit(existWidget, 'language');\n } else if (type) {\n return _lodash.default.omit(_widgets.default[type].defaultSettings, 'language');\n }\n }\n\n return context.data.widget;\n },\n input: true,\n rows: 5,\n editor: 'ace',\n as: 'json',\n conditional: {\n json: {\n '!==': [{\n var: 'data.widget.type'\n }, 'input']\n }\n }\n}, {\n weight: 410,\n type: 'textfield',\n input: true,\n key: 'inputMask',\n label: 'Input Mask',\n tooltip: 'An input mask helps the user with input by ensuring a predefined format.

9: numeric
a: alphabetical
*: alphanumeric

Example telephone mask: (999) 999-9999

See the jquery.inputmask documentation for more information.',\n customConditional: function customConditional(context) {\n return !context.data.allowMultipleMasks;\n }\n}, {\n weight: 410,\n type: 'textfield',\n input: true,\n key: 'displayMask',\n label: 'Display Mask',\n tooltip: 'A display mask helps to display the input in a readable way, this won\\'t affect the value which will be saved (to affect both view and saved value, delete Display Mask and use Input Mask).

9: numeric
a: alphabetical
*: alphanumeric

Example telephone mask: (999) 999-9999

See the jquery.inputmask documentation for more information.',\n customConditional: function customConditional(context) {\n return !context.data.allowMultipleMasks;\n }\n}, {\n weight: 411,\n type: 'textfield',\n input: true,\n key: 'inputMaskPlaceholderChar',\n label: 'Input Mask Placeholder Char',\n tooltip: \"You can specify a char which will be used as a placeholder in the field.
E.g., \\u02CD
Make note that placeholder char will be replaced by a space if it is used inside the mask\",\n validation: {\n maxLength: 1\n },\n customConditional: function customConditional(context) {\n return context.data.inputMask || context.data.displayMask;\n }\n}, {\n weight: 413,\n type: 'checkbox',\n input: true,\n key: 'allowMultipleMasks',\n label: 'Allow Multiple Masks'\n}, {\n weight: 1350,\n type: 'checkbox',\n input: true,\n key: 'spellcheck',\n defaultValue: true,\n label: 'Allow Spellcheck'\n}, {\n weight: 417,\n type: 'datagrid',\n input: true,\n key: 'inputMasks',\n label: 'Input Masks',\n customConditional: function customConditional(context) {\n return context.data.allowMultipleMasks === true;\n },\n reorder: true,\n components: [{\n type: 'textfield',\n key: 'label',\n label: 'Label',\n input: true\n }, {\n type: 'textfield',\n key: 'mask',\n label: 'Mask',\n input: true\n }]\n}, {\n weight: 320,\n type: 'textfield',\n input: true,\n key: 'prefix',\n label: 'Prefix'\n}, {\n weight: 330,\n type: 'textfield',\n input: true,\n key: 'suffix',\n label: 'Suffix'\n}, {\n weight: 700,\n type: 'textfield',\n input: true,\n key: 'autocomplete',\n label: 'Autocomplete',\n placeholder: 'on',\n tooltip: 'Indicates whether input elements can by default have their values automatically completed by the browser. See the MDN documentation on autocomplete for more information.'\n}, {\n weight: 1300,\n type: 'checkbox',\n label: 'Hide Input',\n tooltip: 'Hide the input in the browser. This does not encrypt on the server. Do not use for passwords.',\n key: 'mask',\n input: true\n}, {\n weight: 1200,\n type: 'checkbox',\n label: 'Show Word Counter',\n tooltip: 'Show a live count of the number of words.',\n key: 'showWordCount',\n input: true\n}, {\n weight: 1201,\n type: 'checkbox',\n label: 'Show Character Counter',\n tooltip: 'Show a live count of the number of characters.',\n key: 'showCharCount',\n input: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/textfield/editForm/TextField.edit.display.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _widgets = _interopRequireDefault(__webpack_require__(/*! ../../../widgets */ \"./lib/widgets/index.js\"));\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = [{\n weight: 400,\n type: 'select',\n input: true,\n key: 'widget.type',\n label: 'Widget',\n placeholder: 'Select a widget',\n tooltip: 'The widget is the display UI used to input the value of the field.',\n defaultValue: 'input',\n onChange: function onChange(context) {\n context.data.widget = _lodash[\"default\"].pick(context.data.widget, 'type');\n },\n dataSrc: 'values',\n data: {\n values: [{\n label: 'Input Field',\n value: 'input'\n }, {\n label: 'Calendar Picker',\n value: 'calendar'\n }]\n },\n conditional: {\n json: {\n '===': [{\n \"var\": 'data.type'\n }, 'textfield']\n }\n }\n}, {\n weight: 405,\n type: 'textarea',\n key: 'widget',\n label: 'Widget Settings',\n refreshOn: 'wiget.type',\n clearOnHide: false,\n // Deleted clearOnHide and refreshOn to make possible to change exist widget settings.\n calculateValue: function calculateValue(context) {\n var calculatedValue = context.instance.calculatedValue;\n var type = context.data.widget.type;\n if (_lodash[\"default\"].isEmpty(_lodash[\"default\"].omit(context.data.widget, 'type')) || _lodash[\"default\"].isEmpty(_lodash[\"default\"].omit(calculatedValue, 'type'))) {\n if (calculatedValue && !calculatedValue.type) {\n return context.data.widget;\n }\n var existWidget = context.instance._currentForm.options.editComponent.widget;\n if (existWidget && !_lodash[\"default\"].isEmpty(_lodash[\"default\"].omit(existWidget, 'type')) && type === existWidget.type) {\n return _lodash[\"default\"].omit(existWidget, 'language');\n } else if (type) {\n return _lodash[\"default\"].omit(_widgets[\"default\"][type].defaultSettings, 'language');\n }\n }\n return context.data.widget;\n },\n input: true,\n rows: 5,\n editor: 'ace',\n as: 'json',\n conditional: {\n json: {\n '!==': [{\n \"var\": 'data.widget.type'\n }, 'input']\n }\n }\n}, {\n weight: 410,\n type: 'textfield',\n input: true,\n key: 'inputMask',\n label: 'Input Mask',\n tooltip: 'An input mask helps the user with input by ensuring a predefined format.

9: numeric
a: alphabetical
*: alphanumeric

Example telephone mask: (999) 999-9999

See the jquery.inputmask documentation for more information.',\n customConditional: function customConditional(context) {\n return !context.data.allowMultipleMasks;\n }\n}, {\n weight: 410,\n type: 'textfield',\n input: true,\n key: 'displayMask',\n label: 'Display Mask',\n tooltip: 'A display mask helps to display the input in a readable way, this won\\'t affect the value which will be saved (to affect both view and saved value, delete Display Mask and use Input Mask).

9: numeric
a: alphabetical
*: alphanumeric

Example telephone mask: (999) 999-9999

See the jquery.inputmask documentation for more information.',\n customConditional: function customConditional(context) {\n return !context.data.allowMultipleMasks;\n }\n}, {\n weight: 410,\n type: 'select',\n input: true,\n key: 'applyMaskOn',\n label: 'Apply Mask On',\n tooltip: 'Select the type of applying mask.',\n defaultValue: 'change',\n dataSrc: 'values',\n data: {\n values: [{\n label: 'Change',\n value: 'change'\n }, {\n label: 'Blur',\n value: 'blur'\n }]\n },\n customConditional: function customConditional(context) {\n return !context.data.allowMultipleMasks;\n }\n}, {\n weight: 411,\n type: 'textfield',\n input: true,\n key: 'inputMaskPlaceholderChar',\n label: 'Input Mask Placeholder Char',\n tooltip: \"You can specify a char which will be used as a placeholder in the field.
E.g., \\u02CD
Make note that placeholder char will be replaced by a space if it is used inside the mask\",\n validation: {\n maxLength: 1\n },\n customConditional: function customConditional(context) {\n return context.data.inputMask || context.data.displayMask;\n }\n}, {\n weight: 413,\n type: 'checkbox',\n input: true,\n key: 'allowMultipleMasks',\n label: 'Allow Multiple Masks'\n}, {\n weight: 1350,\n type: 'checkbox',\n input: true,\n key: 'spellcheck',\n defaultValue: true,\n label: 'Allow Spellcheck'\n}, {\n weight: 417,\n type: 'datagrid',\n input: true,\n key: 'inputMasks',\n label: 'Input Masks',\n customConditional: function customConditional(context) {\n return context.data.allowMultipleMasks === true;\n },\n reorder: true,\n components: [{\n type: 'textfield',\n key: 'label',\n label: 'Label',\n input: true\n }, {\n type: 'textfield',\n key: 'mask',\n label: 'Mask',\n input: true\n }]\n}, {\n weight: 320,\n type: 'textfield',\n input: true,\n key: 'prefix',\n label: 'Prefix'\n}, {\n weight: 330,\n type: 'textfield',\n input: true,\n key: 'suffix',\n label: 'Suffix'\n}, {\n weight: 700,\n type: 'textfield',\n input: true,\n key: 'autocomplete',\n label: 'Autocomplete',\n placeholder: 'on',\n tooltip: 'Indicates whether input elements can by default have their values automatically completed by the browser. See the MDN documentation on autocomplete for more information.'\n}, {\n weight: 1300,\n type: 'checkbox',\n label: 'Hide Input',\n tooltip: 'Hide the input in the browser. This does not encrypt on the server. Do not use for passwords.',\n key: 'mask',\n input: true\n}, {\n weight: 1200,\n type: 'checkbox',\n label: 'Show Word Counter',\n tooltip: 'Show a live count of the number of words.',\n key: 'showWordCount',\n input: true\n}, {\n weight: 1201,\n type: 'checkbox',\n label: 'Show Character Counter',\n tooltip: 'Show a live count of the number of characters.',\n key: 'showCharCount',\n input: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/textfield/editForm/TextField.edit.display.js?"); /***/ }), @@ -2111,10 +2144,10 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /*!************************************************************************!*\ !*** ./lib/components/textfield/editForm/TextField.edit.validation.js ***! \************************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n weight: 110,\n key: 'validate.minLength',\n label: 'Minimum Length',\n placeholder: 'Minimum Length',\n type: 'number',\n tooltip: 'The minimum length requirement this field must meet.',\n input: true\n}, {\n weight: 120,\n key: 'validate.maxLength',\n label: 'Maximum Length',\n placeholder: 'Maximum Length',\n type: 'number',\n tooltip: 'The maximum length requirement this field must meet.',\n input: true\n}, {\n weight: 125,\n key: 'validate.minWords',\n label: 'Minimum Word Length',\n placeholder: 'Minimum Word Length',\n type: 'number',\n tooltip: 'The minimum amount of words that can be added to this field.',\n input: true\n}, {\n weight: 126,\n key: 'validate.maxWords',\n label: 'Maximum Word Length',\n placeholder: 'Maximum Word Length',\n type: 'number',\n tooltip: 'The maximum amount of words that can be added to this field.',\n input: true\n}, {\n weight: 130,\n key: 'validate.pattern',\n label: 'Regular Expression Pattern',\n placeholder: 'Regular Expression Pattern',\n type: 'textfield',\n tooltip: 'The regular expression pattern test that the field value must pass before the form can be submitted.',\n input: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/textfield/editForm/TextField.edit.validation.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n weight: 110,\n key: 'validate.minLength',\n label: 'Minimum Length',\n placeholder: 'Minimum Length',\n type: 'number',\n tooltip: 'The minimum length requirement this field must meet.',\n input: true\n}, {\n weight: 120,\n key: 'validate.maxLength',\n label: 'Maximum Length',\n placeholder: 'Maximum Length',\n type: 'number',\n tooltip: 'The maximum length requirement this field must meet.',\n input: true\n}, {\n weight: 125,\n key: 'validate.minWords',\n label: 'Minimum Word Length',\n placeholder: 'Minimum Word Length',\n type: 'number',\n tooltip: 'The minimum amount of words that can be added to this field.',\n input: true\n}, {\n weight: 126,\n key: 'validate.maxWords',\n label: 'Maximum Word Length',\n placeholder: 'Maximum Word Length',\n type: 'number',\n tooltip: 'The maximum amount of words that can be added to this field.',\n input: true\n}, {\n weight: 130,\n key: 'validate.pattern',\n label: 'Regular Expression Pattern',\n placeholder: 'Regular Expression Pattern',\n type: 'textfield',\n tooltip: 'The regular expression pattern test that the field value must pass before the form can be submitted.',\n input: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/textfield/editForm/TextField.edit.validation.js?"); /***/ }), @@ -2125,7 +2158,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\nvar _Component = _interopRequireDefault(__webpack_require__(/*! ../_classes/component/Component.form */ \"./lib/components/_classes/component/Component.form.js\"));\n\nvar _TimeEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/Time.edit.data */ \"./lib/components/time/editForm/Time.edit.data.js\"));\n\nvar _TimeEdit2 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Time.edit.display */ \"./lib/components/time/editForm/Time.edit.display.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _Component.default.apply(void 0, [[{\n key: 'data',\n components: _TimeEdit.default\n }, {\n key: 'display',\n components: _TimeEdit2.default\n }, {\n key: 'addons',\n ignore: true\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/time/Time.form.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\nvar _Component = _interopRequireDefault(__webpack_require__(/*! ../_classes/component/Component.form */ \"./lib/components/_classes/component/Component.form.js\"));\nvar _TimeEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/Time.edit.data */ \"./lib/components/time/editForm/Time.edit.data.js\"));\nvar _TimeEdit2 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Time.edit.display */ \"./lib/components/time/editForm/Time.edit.display.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _Component[\"default\"].apply(void 0, [[{\n key: 'data',\n components: _TimeEdit[\"default\"]\n }, {\n key: 'display',\n components: _TimeEdit2[\"default\"]\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/time/Time.form.js?"); /***/ }), @@ -2136,7 +2169,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.from.js */ \"./node_modules/core-js/modules/es.array.from.js\");\n\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.includes.js */ \"./node_modules/core-js/modules/es.array.includes.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.includes.js */ \"./node_modules/core-js/modules/es.string.includes.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.slice.js */ \"./node_modules/core-js/modules/es.array.slice.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\nvar _moment = _interopRequireDefault(__webpack_require__(/*! moment */ \"./node_modules/moment/moment.js\"));\n\nvar _TextField = _interopRequireDefault(__webpack_require__(/*! ../textfield/TextField */ \"./lib/components/textfield/TextField.js\"));\n\nvar _utils = __webpack_require__(/*! ../../utils/utils */ \"./lib/utils/utils.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar defaultDataFormat = 'HH:mm:ss';\n\nvar TimeComponent = /*#__PURE__*/function (_TextFieldComponent) {\n _inherits(TimeComponent, _TextFieldComponent);\n\n var _super = _createSuper(TimeComponent);\n\n function TimeComponent(component, options, data) {\n var _this;\n\n _classCallCheck(this, TimeComponent);\n\n _this = _super.call(this, component, options, data);\n\n var _getBrowserInfo = (0, _utils.getBrowserInfo)(),\n isEdgeBrowser = _getBrowserInfo.edge,\n edgeVersion = _getBrowserInfo.version;\n\n _this.component.inputMask = _this.getInputMaskFromFormat(_this.component.format);\n _this.component.inputType = isEdgeBrowser && edgeVersion <= 18 ? 'text' : _this.component.inputType || 'time';\n _this.rawData = _this.component.multiple ? [] : _this.emptyValue;\n return _this;\n }\n\n _createClass(TimeComponent, [{\n key: \"init\",\n value: function init() {\n _get(_getPrototypeOf(TimeComponent.prototype), \"init\", this).call(this);\n\n if (this.component.inputType === 'text') {\n this.validators.push('time');\n }\n }\n }, {\n key: \"dataFormat\",\n get: function get() {\n return this.component.dataFormat || defaultDataFormat;\n }\n }, {\n key: \"defaultSchema\",\n get: function get() {\n return TimeComponent.schema();\n }\n }, {\n key: \"defaultValue\",\n get: function get() {\n var _this2 = this;\n\n var value = _get(_getPrototypeOf(TimeComponent.prototype), \"defaultValue\", this);\n\n if (this.component.multiple && Array.isArray(value)) {\n value = value.map(function (item) {\n return item ? _this2.getStringAsValue(item) : item;\n });\n } else {\n if (value) {\n value = this.getStringAsValue(value);\n }\n }\n\n return value;\n }\n }, {\n key: \"validationValue\",\n get: function get() {\n if (Array.isArray(this.rawData) && !this.rawData.length || !this.rawData) {\n return this.dataValue;\n }\n\n return this.rawData;\n }\n }, {\n key: \"inputInfo\",\n get: function get() {\n var info = _get(_getPrototypeOf(TimeComponent.prototype), \"inputInfo\", this);\n\n info.attr.type = this.component.inputType;\n return info;\n }\n }, {\n key: \"skipMaskValidation\",\n get: function get() {\n return true;\n }\n }, {\n key: \"isNotCompleteInput\",\n value: function isNotCompleteInput(value) {\n return value.includes('_');\n }\n }, {\n key: \"removeValue\",\n value: function removeValue(index) {\n this.rawData = Array.isArray(this.rawData) ? [].concat(_toConsumableArray(this.rawData.slice(0, index)), _toConsumableArray(this.rawData.slice(index + 1))) : this.emptyValue;\n\n _get(_getPrototypeOf(TimeComponent.prototype), \"removeValue\", this).call(this, index);\n }\n }, {\n key: \"resetRawData\",\n value: function resetRawData(index) {\n if (index) {\n this.setRawValue(this.emptyValue, index);\n } else {\n this.rawData = [];\n }\n }\n }, {\n key: \"setRawValue\",\n value: function setRawValue(value, index) {\n if (Array.isArray(this.rawData)) {\n this.rawData[index] = value;\n } else {\n this.rawData = value;\n }\n }\n }, {\n key: \"getRawValue\",\n value: function getRawValue(index) {\n if (index && Array.isArray(this.rawData)) {\n return this.rawData[index] || this.emptyValue;\n } else {\n return this.rawData;\n }\n }\n }, {\n key: \"getValueAt\",\n value: function getValueAt(index) {\n if (!this.refs.input.length || !this.refs.input[index]) {\n return this.emptyValue;\n }\n\n var value = this.refs.input[index].value;\n\n if (!value) {\n this.resetRawData(index);\n return this.emptyValue;\n }\n\n this.setRawValue(value, index);\n return this.getStringAsValue(value);\n }\n }, {\n key: \"setValueAt\",\n value: function setValueAt(index, value) {\n this.setRawValue(value ? this.getValueAsString(value) : value, index);\n this.refs.input[index].value = this.getRawValue(index);\n }\n }, {\n key: \"getStringAsValue\",\n value: function getStringAsValue(view) {\n return view ? (0, _moment.default)(view, this.component.format).format(this.component.dataFormat) : view;\n }\n }, {\n key: \"getValueAsString\",\n value: function getValueAsString(value) {\n return (value ? (0, _moment.default)(value, this.component.dataFormat).format(this.component.format) : value) || '';\n }\n }, {\n key: \"getInputMaskFromFormat\",\n value: function getInputMaskFromFormat(format) {\n if (format === 'LT') {\n return '99:99 AA';\n }\n\n if (format === 'LTS') {\n return '99:99:99 AA';\n }\n\n return format.replace(/[hHmMsSk]/g, '9').replace(/[aA]/, 'AA');\n }\n }, {\n key: \"addFocusBlurEvents\",\n value: function addFocusBlurEvents(element) {\n var _this3 = this;\n\n _get(_getPrototypeOf(TimeComponent.prototype), \"addFocusBlurEvents\", this).call(this, element);\n\n this.addEventListener(element, 'blur', function () {\n element.value = _this3.getValueAsString(element.value);\n });\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _TextField.default.schema.apply(_TextField.default, [{\n type: 'time',\n label: 'Time',\n key: 'time',\n inputType: 'time',\n format: 'HH:mm',\n dataFormat: defaultDataFormat\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Time',\n icon: 'clock-o',\n group: 'advanced',\n documentation: '/userguide/forms/form-components#time',\n weight: 55,\n schema: TimeComponent.schema()\n };\n }\n }]);\n\n return TimeComponent;\n}(_TextField.default);\n\nexports[\"default\"] = TimeComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/time/Time.js?"); +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.from.js */ \"./node_modules/core-js/modules/es.array.from.js\");\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.array.is-array.js */ \"./node_modules/core-js/modules/es.array.is-array.js\");\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n__webpack_require__(/*! core-js/modules/es.array.includes.js */ \"./node_modules/core-js/modules/es.array.includes.js\");\n__webpack_require__(/*! core-js/modules/es.string.includes.js */ \"./node_modules/core-js/modules/es.string.includes.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.array.slice.js */ \"./node_modules/core-js/modules/es.array.slice.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _moment = _interopRequireDefault(__webpack_require__(/*! moment */ \"./node_modules/moment/moment.js\"));\nvar _TextField = _interopRequireDefault(__webpack_require__(/*! ../textfield/TextField */ \"./lib/components/textfield/TextField.js\"));\nvar _utils = __webpack_require__(/*! ../../utils/utils */ \"./lib/utils/utils.js\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar defaultDataFormat = 'HH:mm:ss';\nvar TimeComponent = /*#__PURE__*/function (_TextFieldComponent) {\n _inherits(TimeComponent, _TextFieldComponent);\n var _super = _createSuper(TimeComponent);\n function TimeComponent(component, options, data) {\n var _this;\n _classCallCheck(this, TimeComponent);\n _this = _super.call(this, component, options, data);\n var _getBrowserInfo = (0, _utils.getBrowserInfo)(),\n isEdgeBrowser = _getBrowserInfo.edge,\n edgeVersion = _getBrowserInfo.version;\n _this.component.inputMask = _this.getInputMaskFromFormat(_this.component.format);\n _this.component.inputType = isEdgeBrowser && edgeVersion <= 18 ? 'text' : _this.component.inputType || 'time';\n _this.rawData = _this.component.multiple ? [] : _this.emptyValue;\n return _this;\n }\n _createClass(TimeComponent, [{\n key: \"init\",\n value: function init() {\n _get(_getPrototypeOf(TimeComponent.prototype), \"init\", this).call(this);\n if (this.component.inputType === 'text') {\n this.validators.push('time');\n }\n }\n }, {\n key: \"dataFormat\",\n get: function get() {\n return this.component.dataFormat || defaultDataFormat;\n }\n }, {\n key: \"defaultSchema\",\n get: function get() {\n return TimeComponent.schema();\n }\n }, {\n key: \"defaultValue\",\n get: function get() {\n var _this2 = this;\n var value = _get(_getPrototypeOf(TimeComponent.prototype), \"defaultValue\", this);\n if (this.component.multiple && Array.isArray(value)) {\n value = value.map(function (item) {\n return item ? _this2.getStringAsValue(item) : item;\n });\n } else {\n if (value) {\n value = this.getStringAsValue(value);\n }\n }\n return value;\n }\n }, {\n key: \"validationValue\",\n get: function get() {\n if (Array.isArray(this.rawData) && !this.rawData.length || !this.rawData) {\n return this.dataValue;\n }\n return this.rawData;\n }\n }, {\n key: \"inputInfo\",\n get: function get() {\n var info = _get(_getPrototypeOf(TimeComponent.prototype), \"inputInfo\", this);\n info.attr.type = this.component.inputType;\n return info;\n }\n }, {\n key: \"skipMaskValidation\",\n get: function get() {\n return true;\n }\n }, {\n key: \"isNotCompleteInput\",\n value: function isNotCompleteInput(value) {\n return value.includes('_');\n }\n }, {\n key: \"removeValue\",\n value: function removeValue(index) {\n this.rawData = Array.isArray(this.rawData) ? [].concat(_toConsumableArray(this.rawData.slice(0, index)), _toConsumableArray(this.rawData.slice(index + 1))) : this.emptyValue;\n _get(_getPrototypeOf(TimeComponent.prototype), \"removeValue\", this).call(this, index);\n }\n }, {\n key: \"resetRawData\",\n value: function resetRawData(index) {\n if (index) {\n this.setRawValue(this.emptyValue, index);\n } else {\n this.rawData = [];\n }\n }\n }, {\n key: \"setRawValue\",\n value: function setRawValue(value, index) {\n if (Array.isArray(this.rawData)) {\n this.rawData[index] = value;\n } else {\n this.rawData = value;\n }\n }\n }, {\n key: \"getRawValue\",\n value: function getRawValue(index) {\n if (index && Array.isArray(this.rawData)) {\n return this.rawData[index] || this.emptyValue;\n } else {\n return this.rawData;\n }\n }\n }, {\n key: \"getValueAt\",\n value: function getValueAt(index) {\n if (!this.refs.input.length || !this.refs.input[index]) {\n return this.emptyValue;\n }\n var value = this.refs.input[index].value;\n if (!value) {\n this.resetRawData(index);\n return this.emptyValue;\n }\n this.setRawValue(value, index);\n return this.getStringAsValue(value);\n }\n }, {\n key: \"setValueAt\",\n value: function setValueAt(index, value) {\n this.setRawValue(value ? this.getValueAsString(value) : value, index);\n this.refs.input[index].value = this.getRawValue(index);\n }\n }, {\n key: \"getStringAsValue\",\n value: function getStringAsValue(view) {\n return view ? (0, _moment[\"default\"])(view, this.component.format).format(this.component.dataFormat) : view;\n }\n }, {\n key: \"getValueAsString\",\n value: function getValueAsString(value) {\n return (value ? (0, _moment[\"default\"])(value, this.component.dataFormat).format(this.component.format) : value) || '';\n }\n }, {\n key: \"getInputMaskFromFormat\",\n value: function getInputMaskFromFormat(format) {\n if (format === 'LT') {\n return '99:99 AA';\n }\n if (format === 'LTS') {\n return '99:99:99 AA';\n }\n return format.replace(/[hHmMsSk]/g, '9').replace(/[aA]/, 'AA');\n }\n }, {\n key: \"addFocusBlurEvents\",\n value: function addFocusBlurEvents(element) {\n var _this3 = this;\n _get(_getPrototypeOf(TimeComponent.prototype), \"addFocusBlurEvents\", this).call(this, element);\n this.addEventListener(element, 'blur', function () {\n element.value = _this3.getValueAsString(element.value);\n });\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _TextField[\"default\"].schema.apply(_TextField[\"default\"], [{\n type: 'time',\n label: 'Time',\n key: 'time',\n inputType: 'time',\n format: 'HH:mm',\n dataFormat: defaultDataFormat\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Time',\n icon: 'clock-o',\n group: 'advanced',\n documentation: '/userguide/form-building/advanced-components#time',\n weight: 55,\n schema: TimeComponent.schema()\n };\n }\n }]);\n return TimeComponent;\n}(_TextField[\"default\"]);\nexports[\"default\"] = TimeComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/time/Time.js?"); /***/ }), @@ -2144,10 +2177,10 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /*!********************************************************!*\ !*** ./lib/components/time/editForm/Time.edit.data.js ***! \********************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n type: 'textfield',\n input: true,\n key: 'dataFormat',\n label: 'Data Format',\n placeholder: 'HH:mm:ss',\n tooltip: 'The moment.js format for saving the value of this field.',\n weight: 25\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/time/editForm/Time.edit.data.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n type: 'textfield',\n input: true,\n key: 'dataFormat',\n label: 'Data Format',\n placeholder: 'HH:mm:ss',\n tooltip: 'The moment.js format for saving the value of this field.',\n weight: 25\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/time/editForm/Time.edit.data.js?"); /***/ }), @@ -2155,10 +2188,10 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /*!***********************************************************!*\ !*** ./lib/components/time/editForm/Time.edit.display.js ***! \***********************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n type: 'select',\n input: true,\n weight: 40,\n tooltip: 'Select the type of widget you\\'d like to use.',\n key: 'inputType',\n defaultValue: 'time',\n label: 'Input Type',\n dataSrc: 'values',\n data: {\n values: [{\n label: 'HTML5 Time Input',\n value: 'time'\n }, {\n label: 'Text Input with Mask',\n value: 'text'\n }]\n }\n}, {\n type: 'textfield',\n input: true,\n key: 'format',\n label: 'Format',\n placeholder: 'Format',\n tooltip: 'The moment.js format for showing the value of this field.',\n weight: 50,\n defaultValue: 'HH:mm',\n conditional: {\n json: {\n '===': [{\n var: 'data.inputType'\n }, 'text']\n }\n }\n}, {\n key: 'placeholder',\n ignore: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/time/editForm/Time.edit.display.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n type: 'select',\n input: true,\n weight: 40,\n tooltip: 'Select the type of widget you\\'d like to use.',\n key: 'inputType',\n defaultValue: 'time',\n label: 'Input Type',\n dataSrc: 'values',\n data: {\n values: [{\n label: 'HTML5 Time Input',\n value: 'time'\n }, {\n label: 'Text Input with Mask',\n value: 'text'\n }]\n }\n}, {\n type: 'textfield',\n input: true,\n key: 'format',\n label: 'Format',\n placeholder: 'Format',\n tooltip: 'The moment.js format for showing the value of this field.',\n weight: 50,\n defaultValue: 'HH:mm',\n conditional: {\n json: {\n '===': [{\n \"var\": 'data.inputType'\n }, 'text']\n }\n }\n}, {\n key: 'placeholder',\n ignore: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/time/editForm/Time.edit.display.js?"); /***/ }), @@ -2169,7 +2202,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nvar Node = /*#__PURE__*/function () {\n function Node(parent) {\n var _this = this;\n\n var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n _ref$data = _ref.data,\n data = _ref$data === void 0 ? {} : _ref$data,\n _ref$children = _ref.children,\n children = _ref$children === void 0 ? [] : _ref$children;\n\n var _ref2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\n checkNode = _ref2.checkNode,\n createComponents = _ref2.createComponents,\n _ref2$isNew = _ref2.isNew,\n isNew = _ref2$isNew === void 0 ? true : _ref2$isNew,\n removeComponents = _ref2.removeComponents,\n _ref2$parentPath = _ref2.parentPath,\n parentPath = _ref2$parentPath === void 0 ? '' : _ref2$parentPath;\n\n _classCallCheck(this, Node);\n\n this.parent = parent;\n this.previousData = {};\n this.persistentData = _lodash.default.cloneDeep(data);\n this.new = isNew;\n this.createComponents = createComponents;\n this.checkNode = checkNode;\n this.removeComponents = removeComponents;\n this.revertAvailable = false;\n this.editing = false;\n this.collapsed = false;\n this.components = [];\n this.children = [];\n this.parentPath = parentPath;\n this.resetData();\n this.children = children.map(function (child, index) {\n return new Node(_this, child, {\n checkNode: checkNode,\n createComponents: createComponents,\n isNew: false,\n removeComponents: removeComponents,\n parentPath: _this.getChildrenPath(index)\n });\n });\n }\n\n _createClass(Node, [{\n key: \"value\",\n get: function get() {\n return this.new ? null // Check the special case for empty root node.\n : {\n data: _lodash.default.cloneDeep(this.persistentData),\n children: this.children.filter(function (child) {\n return !child.new;\n }).map(function (child) {\n return child.value;\n })\n };\n }\n }, {\n key: \"isRoot\",\n get: function get() {\n return this.parent === null;\n }\n }, {\n key: \"changing\",\n get: function get() {\n return this.new || this.editing;\n }\n }, {\n key: \"hasChangingChildren\",\n get: function get() {\n return this.changin || this.children.some(function (child) {\n return child.hasChangingChildren;\n });\n }\n }, {\n key: \"hasData\",\n get: function get() {\n return !_lodash.default.isEmpty(this.persistentData);\n }\n }, {\n key: \"hasChildren\",\n get: function get() {\n return Array.isArray(this.children) && this.children.length > 0;\n }\n }, {\n key: \"getChildrenPath\",\n value: function getChildrenPath(index) {\n return this.parentPath ? \"\".concat(this.parentPath, \".children[\").concat(index, \"]\") : '';\n }\n }, {\n key: \"eachChild\",\n value: function eachChild(iteratee) {\n iteratee(this);\n this.children.forEach(function (child) {\n return child.eachChild(iteratee);\n });\n return this;\n }\n }, {\n key: \"getComponents\",\n value: function getComponents() {\n return this.children.reduce(function (components, child) {\n return components.concat(child.getComponents());\n }, this.components);\n }\n }, {\n key: \"validateNode\",\n value: function validateNode() {\n var _this2 = this;\n\n var valid = true;\n this.getComponents().forEach(function (comp) {\n comp.setPristine(false);\n valid &= comp.checkValidity(null, false, _this2.persistentData);\n });\n return valid;\n }\n }, {\n key: \"addChild\",\n value: function addChild() {\n if (this.new) {\n return null;\n }\n\n var child = new Node(this, {}, {\n checkNode: this.checkNode,\n createComponents: this.createComponents,\n isNew: true,\n removeComponents: this.removeComponents,\n parentPath: this.getChildrenPath(this.children.length)\n });\n this.children = this.children.concat(child);\n return child;\n }\n }, {\n key: \"removeChild\",\n value: function removeChild(childToRemove) {\n if (!this.new) {\n this.children = this.children.filter(function (child) {\n return child !== childToRemove;\n });\n }\n\n return this;\n }\n }, {\n key: \"edit\",\n value: function edit() {\n if (this.new) {\n return this;\n }\n\n this.editing = true;\n return this.resetData();\n }\n }, {\n key: \"save\",\n value: function save() {\n var isValid = this.validateNode();\n\n if (this.changing && isValid) {\n if (this.new) {\n this.new = false;\n } else {\n this.editing = false;\n this.revertAvailable = true;\n }\n\n this.commitData();\n }\n\n return isValid;\n }\n }, {\n key: \"cancel\",\n value: function cancel() {\n if (this.new) {\n this.remove();\n } else if (this.editing) {\n this.editing = false;\n this.resetData();\n }\n\n return this;\n }\n }, {\n key: \"remove\",\n value: function remove() {\n this.parent.removeChild(this);\n this.parent = null;\n this.clearComponents();\n return this;\n }\n }, {\n key: \"revert\",\n value: function revert() {\n if (!this.revertAvailable) {\n return this;\n }\n\n this.data = this.previousData;\n return this.commitData();\n }\n }, {\n key: \"commitData\",\n value: function commitData() {\n this.previousData = this.persistentData;\n this.persistentData = _lodash.default.cloneDeep(this.data);\n this.clearComponents();\n return this;\n }\n }, {\n key: \"resetData\",\n value: function resetData() {\n this.data = _lodash.default.cloneDeep(this.persistentData);\n this.updateComponentsContext();\n return this;\n }\n }, {\n key: \"updateComponentsContext\",\n value: function updateComponentsContext() {\n if (this.changing) {\n this.instantiateComponents();\n } else {\n this.clearComponents();\n }\n\n return this;\n }\n }, {\n key: \"instantiateComponents\",\n value: function instantiateComponents() {\n var _this3 = this;\n\n this.components = this.createComponents(this.data, this);\n this.components.forEach(function (component) {\n if (_this3.parentPath) {\n var path = _this3.calculateComponentPath(component);\n\n component.path = path;\n }\n });\n this.checkNode(this);\n }\n }, {\n key: \"clearComponents\",\n value: function clearComponents() {\n this.removeComponents(this.components);\n this.components = [];\n }\n /**\n * Return a path of component's value.\n *\n * @param {Object} component - The component instance.\n * @return {string} - The component's value path.\n */\n\n }, {\n key: \"calculateComponentPath\",\n value: function calculateComponentPath(component) {\n var path = '';\n\n if (component.component.key) {\n path = \"\".concat(this.parentPath, \".data.\").concat(component.component.key);\n }\n\n return path;\n }\n }]);\n\n return Node;\n}();\n\nexports[\"default\"] = Node;\n\n//# sourceURL=webpack://Formio/./lib/components/tree/Node.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.array.some.js */ \"./node_modules/core-js/modules/es.array.some.js\");\n__webpack_require__(/*! core-js/modules/es.array.is-array.js */ \"./node_modules/core-js/modules/es.array.is-array.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.array.reduce.js */ \"./node_modules/core-js/modules/es.array.reduce.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar Node = /*#__PURE__*/function () {\n function Node(parent) {\n var _this = this;\n var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n _ref$data = _ref.data,\n data = _ref$data === void 0 ? {} : _ref$data,\n _ref$children = _ref.children,\n children = _ref$children === void 0 ? [] : _ref$children;\n var _ref2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},\n checkNode = _ref2.checkNode,\n createComponents = _ref2.createComponents,\n _ref2$isNew = _ref2.isNew,\n isNew = _ref2$isNew === void 0 ? true : _ref2$isNew,\n removeComponents = _ref2.removeComponents,\n _ref2$parentPath = _ref2.parentPath,\n parentPath = _ref2$parentPath === void 0 ? '' : _ref2$parentPath;\n _classCallCheck(this, Node);\n this.parent = parent;\n this.previousData = {};\n this.persistentData = _lodash[\"default\"].cloneDeep(data);\n this[\"new\"] = isNew;\n this.createComponents = createComponents;\n this.checkNode = checkNode;\n this.removeComponents = removeComponents;\n this.revertAvailable = false;\n this.editing = false;\n this.collapsed = false;\n this.components = [];\n this.children = [];\n this.parentPath = parentPath;\n this.resetData();\n this.children = children.map(function (child, index) {\n return new Node(_this, child, {\n checkNode: checkNode,\n createComponents: createComponents,\n isNew: false,\n removeComponents: removeComponents,\n parentPath: _this.getChildrenPath(index)\n });\n });\n }\n _createClass(Node, [{\n key: \"value\",\n get: function get() {\n return this[\"new\"] ? null // Check the special case for empty root node.\n : {\n data: _lodash[\"default\"].cloneDeep(this.persistentData),\n children: this.children.filter(function (child) {\n return !child[\"new\"];\n }).map(function (child) {\n return child.value;\n })\n };\n }\n }, {\n key: \"isRoot\",\n get: function get() {\n return this.parent === null;\n }\n }, {\n key: \"changing\",\n get: function get() {\n return this[\"new\"] || this.editing;\n }\n }, {\n key: \"hasChangingChildren\",\n get: function get() {\n return this.changin || this.children.some(function (child) {\n return child.hasChangingChildren;\n });\n }\n }, {\n key: \"hasData\",\n get: function get() {\n return !_lodash[\"default\"].isEmpty(this.persistentData);\n }\n }, {\n key: \"hasChildren\",\n get: function get() {\n return Array.isArray(this.children) && this.children.length > 0;\n }\n }, {\n key: \"getChildrenPath\",\n value: function getChildrenPath(index) {\n return this.parentPath ? \"\".concat(this.parentPath, \".children[\").concat(index, \"]\") : '';\n }\n }, {\n key: \"eachChild\",\n value: function eachChild(iteratee) {\n iteratee(this);\n this.children.forEach(function (child) {\n return child.eachChild(iteratee);\n });\n return this;\n }\n }, {\n key: \"getComponents\",\n value: function getComponents() {\n return this.children.reduce(function (components, child) {\n return components.concat(child.getComponents());\n }, this.components);\n }\n }, {\n key: \"validateNode\",\n value: function validateNode() {\n var _this2 = this;\n var valid = true;\n this.getComponents().forEach(function (comp) {\n comp.setPristine(false);\n valid &= comp.checkValidity(null, false, _this2.persistentData);\n });\n return valid;\n }\n }, {\n key: \"addChild\",\n value: function addChild() {\n if (this[\"new\"]) {\n return null;\n }\n var child = new Node(this, {}, {\n checkNode: this.checkNode,\n createComponents: this.createComponents,\n isNew: true,\n removeComponents: this.removeComponents,\n parentPath: this.getChildrenPath(this.children.length)\n });\n this.children = this.children.concat(child);\n return child;\n }\n }, {\n key: \"removeChild\",\n value: function removeChild(childToRemove) {\n if (!this[\"new\"]) {\n this.children = this.children.filter(function (child) {\n return child !== childToRemove;\n });\n }\n return this;\n }\n }, {\n key: \"edit\",\n value: function edit() {\n if (this[\"new\"]) {\n return this;\n }\n this.editing = true;\n return this.resetData();\n }\n }, {\n key: \"save\",\n value: function save() {\n var isValid = this.validateNode();\n if (this.changing && isValid) {\n if (this[\"new\"]) {\n this[\"new\"] = false;\n } else {\n this.editing = false;\n this.revertAvailable = true;\n }\n this.commitData();\n }\n return isValid;\n }\n }, {\n key: \"cancel\",\n value: function cancel() {\n if (this[\"new\"]) {\n this.remove();\n } else if (this.editing) {\n this.editing = false;\n this.resetData();\n }\n return this;\n }\n }, {\n key: \"remove\",\n value: function remove() {\n this.parent.removeChild(this);\n this.parent = null;\n this.clearComponents();\n return this;\n }\n }, {\n key: \"revert\",\n value: function revert() {\n if (!this.revertAvailable) {\n return this;\n }\n this.data = this.previousData;\n return this.commitData();\n }\n }, {\n key: \"commitData\",\n value: function commitData() {\n this.previousData = this.persistentData;\n this.persistentData = _lodash[\"default\"].cloneDeep(this.data);\n this.clearComponents();\n return this;\n }\n }, {\n key: \"resetData\",\n value: function resetData() {\n this.data = _lodash[\"default\"].cloneDeep(this.persistentData);\n this.updateComponentsContext();\n return this;\n }\n }, {\n key: \"updateComponentsContext\",\n value: function updateComponentsContext() {\n if (this.changing) {\n this.instantiateComponents();\n } else {\n this.clearComponents();\n }\n return this;\n }\n }, {\n key: \"instantiateComponents\",\n value: function instantiateComponents() {\n var _this3 = this;\n this.components = this.createComponents(this.data, this);\n this.components.forEach(function (component) {\n if (_this3.parentPath) {\n var path = _this3.calculateComponentPath(component);\n component.path = path;\n }\n });\n this.checkNode(this);\n }\n }, {\n key: \"clearComponents\",\n value: function clearComponents() {\n this.removeComponents(this.components);\n this.components = [];\n }\n\n /**\n * Return a path of component's value.\n *\n * @param {Object} component - The component instance.\n * @return {string} - The component's value path.\n */\n }, {\n key: \"calculateComponentPath\",\n value: function calculateComponentPath(component) {\n var path = '';\n if (component.component.key) {\n path = \"\".concat(this.parentPath, \".data.\").concat(component.component.key);\n }\n return path;\n }\n }]);\n return Node;\n}();\nexports[\"default\"] = Node;\n\n//# sourceURL=webpack://Formio/./lib/components/tree/Node.js?"); /***/ }), @@ -2180,7 +2213,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\nvar _Component = _interopRequireDefault(__webpack_require__(/*! ../_classes/component/Component.form */ \"./lib/components/_classes/component/Component.form.js\"));\n\nvar _TreeEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/Tree.edit.data */ \"./lib/components/tree/editForm/Tree.edit.data.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _Component.default.apply(void 0, [[{\n key: 'data',\n components: _TreeEdit.default\n }, {\n key: 'addons',\n ignore: true\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/tree/Tree.form.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\nvar _Component = _interopRequireDefault(__webpack_require__(/*! ../_classes/component/Component.form */ \"./lib/components/_classes/component/Component.form.js\"));\nvar _TreeEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/Tree.edit.data */ \"./lib/components/tree/editForm/Tree.edit.data.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _Component[\"default\"].apply(void 0, [[{\n key: 'data',\n components: _TreeEdit[\"default\"]\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/tree/Tree.form.js?"); /***/ }), @@ -2191,7 +2224,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.set.js */ \"./node_modules/core-js/modules/es.reflect.set.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptors.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nvar _Component = _interopRequireDefault(__webpack_require__(/*! ../_classes/component/Component */ \"./lib/components/_classes/component/Component.js\"));\n\nvar _Components = _interopRequireDefault(__webpack_require__(/*! ../Components */ \"./lib/components/Components.js\"));\n\nvar _NestedDataComponent2 = _interopRequireDefault(__webpack_require__(/*! ../_classes/nesteddata/NestedDataComponent */ \"./lib/components/_classes/nesteddata/NestedDataComponent.js\"));\n\nvar _Node = _interopRequireDefault(__webpack_require__(/*! ./Node */ \"./lib/components/tree/Node.js\"));\n\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction set(target, property, value, receiver) { if (typeof Reflect !== \"undefined\" && Reflect.set) { set = Reflect.set; } else { set = function set(target, property, value, receiver) { var base = _superPropBase(target, property); var desc; if (base) { desc = Object.getOwnPropertyDescriptor(base, property); if (desc.set) { desc.set.call(receiver, value); return true; } else if (!desc.writable) { return false; } } desc = Object.getOwnPropertyDescriptor(receiver, property); if (desc) { if (!desc.writable) { return false; } desc.value = value; Object.defineProperty(receiver, property, desc); } else { _defineProperty(receiver, property, value); } return true; }; } return set(target, property, value, receiver); }\n\nfunction _set(target, property, value, receiver, isStrict) { var s = set(target, property, value, receiver || target); if (!s && isStrict) { throw new Error('failed to set property'); } return value; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar TreeComponent = /*#__PURE__*/function (_NestedDataComponent) {\n _inherits(TreeComponent, _NestedDataComponent);\n\n var _super = _createSuper(TreeComponent);\n\n function TreeComponent() {\n var _this;\n\n _classCallCheck(this, TreeComponent);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n _this.type = 'tree';\n return _this;\n }\n\n _createClass(TreeComponent, [{\n key: \"emptyValue\",\n get: function get() {\n return {};\n }\n }, {\n key: \"viewComponents\",\n get: function get() {\n if (!this.viewComponentsInstantiated) {\n this.viewComponentsInstantiated = true;\n this._viewComponents = this.createComponents({});\n }\n\n return this._viewComponents;\n }\n }, {\n key: \"init\",\n value: function init() {\n if (this.builderMode) {\n return _get(_getPrototypeOf(TreeComponent.prototype), \"init\", this).call(this);\n }\n\n this.components = [];\n this.componentOptions = _objectSpread(_objectSpread({}, this.options), {}, {\n parent: this,\n root: this.root || this\n });\n this.disabled = this.shouldDisabled;\n this.setRoot();\n this.viewComponentsInstantiated = false;\n this._viewComponents = [];\n }\n }, {\n key: \"disabled\",\n get: function get() {\n return _get(_getPrototypeOf(TreeComponent.prototype), \"disabled\", this);\n },\n set: function set(disabled) {\n _set(_getPrototypeOf(TreeComponent.prototype), \"disabled\", disabled, this, true);\n\n this.viewComponents.forEach(function (component) {\n return component.parentDisabled = disabled;\n });\n }\n }, {\n key: \"isDefaultValueComponent\",\n get: function get() {\n return !!this.options.editComponent && !!this.options.editForm && this.component.key === 'defaultValue';\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n _get(_getPrototypeOf(TreeComponent.prototype), \"destroy\", this).call(this);\n\n if (!this.builderMode) {\n this.removeComponents(this._viewComponents);\n }\n }\n }, {\n key: \"createComponents\",\n value: function createComponents(data, node) {\n var _this2 = this;\n\n var components = this.componentComponents.map(function (component) {\n var componentInstance = _Components.default.create(component, _this2.componentOptions, data);\n\n componentInstance.init();\n componentInstance.parentDisabled = _this2.disabled;\n return componentInstance;\n });\n\n if (node) {\n this.checkNode(this.data, node);\n }\n\n return components;\n }\n }, {\n key: \"removeComponents\",\n value: function removeComponents(components) {\n return components.map(function (component) {\n return component.destroy();\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n if (this.builderMode) {\n return _get(_getPrototypeOf(TreeComponent.prototype), \"render\", this).call(this);\n }\n\n return _get(_getPrototypeOf(TreeComponent.prototype), \"render\", this).call(this, this.renderTree(this.treeRoot));\n }\n }, {\n key: \"renderTree\",\n value: function renderTree() {\n var node = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var odd = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n var childNodes = node.hasChildren && !node.collapsed ? this.renderChildNodes(node.children, !odd) : [];\n var content = node.changing ? this.renderEdit(node) : this.renderView(node);\n return this.renderTemplate('tree', {\n odd: odd,\n childNodes: childNodes,\n content: content,\n node: node\n });\n }\n }, {\n key: \"renderChildNodes\",\n value: function renderChildNodes() {\n var _this3 = this;\n\n var nodes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n var odd = arguments.length > 1 ? arguments[1] : undefined;\n return nodes.map(function (node) {\n return _this3.renderTree(node, odd);\n });\n }\n }, {\n key: \"renderEdit\",\n value: function renderEdit() {\n var node = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n return this.renderTemplate('treeEdit', {\n children: this.renderComponents(node.components),\n node: node\n });\n }\n }, {\n key: \"renderView\",\n value: function renderView() {\n var node = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n return this.renderTemplate('treeView', {\n values: this.viewComponents.map(function (component) {\n component.data = node.data;\n component.checkComponentConditions(node.data);\n return component.getView(component.dataValue);\n }),\n nodeData: node.data,\n node: node\n });\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n if (this.builderMode) {\n return _get(_getPrototypeOf(TreeComponent.prototype), \"attach\", this).call(this, element);\n }\n\n this.loadRefs(element, {\n root: 'single'\n });\n return _nativePromiseOnly.default.all([_get(_getPrototypeOf(TreeComponent.prototype), \"attach\", this).call(this, element), this.attachNode(this.refs.root, this.treeRoot)]);\n }\n }, {\n key: \"attachNode\",\n value: function attachNode(element, node) {\n if (!element) {\n return _nativePromiseOnly.default.resolve();\n }\n\n var componentsPromise = _nativePromiseOnly.default.resolve();\n\n var childrenPromise = _nativePromiseOnly.default.resolve();\n\n node.refs = _lodash.default.reduce(element.children, function (refs, child) {\n return child.hasAttribute('ref') ? _objectSpread(_objectSpread({}, refs), {}, _defineProperty({}, child.getAttribute('ref'), child)) : refs;\n }, {});\n\n if (node.refs.content) {\n this.attachActions(node);\n componentsPromise = this.attachComponents(node);\n }\n\n if (node.refs.childNodes) {\n childrenPromise = this.attachChildren(node);\n }\n\n return _nativePromiseOnly.default.all([componentsPromise, childrenPromise]);\n }\n }, {\n key: \"attachActions\",\n value: function attachActions(node) {\n var _node$refs$content$ch,\n _this4 = this;\n\n if (!node.editing) {\n this.loadRefs.call(node, node.refs.content, {\n addChild: 'single',\n editNode: 'single',\n removeNode: 'single',\n revertNode: 'single',\n toggleNode: 'single'\n });\n } //load refs correctly (if there is nested tree)\n\n\n this.loadRefs.call(node, ((_node$refs$content$ch = node.refs.content.children[0]) === null || _node$refs$content$ch === void 0 ? void 0 : _node$refs$content$ch.children[1]) || node.refs.content, {\n cancelNode: 'single',\n saveNode: 'single'\n });\n\n if (node.refs.addChild) {\n this.addEventListener(node.refs.addChild, 'click', function () {\n _this4.addChild(node);\n });\n }\n\n if (node.refs.cancelNode) {\n this.addEventListener(node.refs.cancelNode, 'click', function () {\n _this4.cancelNode(node);\n });\n }\n\n if (node.refs.editNode) {\n this.addEventListener(node.refs.editNode, 'click', function () {\n _this4.editNode(node);\n });\n }\n\n if (node.refs.removeNode) {\n this.addEventListener(node.refs.removeNode, 'click', function () {\n _this4.removeNode(node);\n });\n }\n\n if (node.refs.revertNode) {\n this.addEventListener(node.refs.revertNode, 'click', function () {\n _this4.revertNode(node);\n });\n }\n\n if (node.refs.saveNode) {\n this.addEventListener(node.refs.saveNode, 'click', function () {\n _this4.saveNode(node);\n });\n }\n\n if (node.refs.toggleNode) {\n this.addEventListener(node.refs.toggleNode, 'click', function () {\n _this4.toggleNode(node);\n });\n }\n }\n }, {\n key: \"attachComponents\",\n value: function attachComponents(node) {\n if (this.builderMode) {\n var _get2;\n\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n return (_get2 = _get(_getPrototypeOf(TreeComponent.prototype), \"attachComponents\", this)).call.apply(_get2, [this, node].concat(args));\n }\n\n this.loadRefs.call(node, node.refs.content, {\n nodeEdit: 'single'\n });\n return node.refs.nodeEdit ? _get(_getPrototypeOf(TreeComponent.prototype), \"attachComponents\", this).call(this, node.refs.nodeEdit, node.components) : _nativePromiseOnly.default.resolve();\n }\n }, {\n key: \"attachChildren\",\n value: function attachChildren(node) {\n var _this5 = this;\n\n var childElements = node.refs.childNodes.children;\n return _nativePromiseOnly.default.all(_lodash.default.map(childElements, function (childElement, index) {\n return _this5.attachNode(childElement, node.children[index]);\n }));\n }\n }, {\n key: \"setValue\",\n value: function setValue(value) {\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var changed = this.updateValue(value, flags);\n this.setRoot();\n return changed;\n }\n }, {\n key: \"addChild\",\n value: function addChild(parent) {\n var _this6 = this;\n\n if (this.options.readOnly || parent.new) {\n return;\n }\n\n this.hook('tree.addChild', {\n parent: parent,\n component: this\n }, function () {\n var child = parent.addChild();\n\n _this6.redraw();\n\n return child;\n });\n }\n }, {\n key: \"cancelNode\",\n value: function cancelNode(node) {\n var _this7 = this;\n\n if (this.options.readOnly) {\n return;\n }\n\n this.hook('tree.cancelNode', {\n node: node,\n component: this\n }, function () {\n if (node.isRoot) {\n if (node.persistentData && !_lodash.default.isEmpty(node.persistentData)) {\n node.cancel();\n\n _this7.redraw();\n } else {\n _this7.removeRoot();\n }\n } else {\n node.cancel();\n\n _this7.redraw();\n }\n\n return node;\n });\n }\n }, {\n key: \"editNode\",\n value: function editNode(node) {\n var _this8 = this;\n\n if (this.options.readOnly || node.new) {\n return;\n }\n\n this.hook('tree.editNode', {\n node: node,\n component: this\n }, function () {\n node.edit();\n\n _this8.redraw();\n\n return node;\n });\n }\n }, {\n key: \"removeNode\",\n value: function removeNode(node) {\n var _this9 = this;\n\n if (this.options.readOnly || node.new) {\n return;\n }\n\n this.hook('tree.removeNode', {\n node: node,\n component: this\n }, function () {\n if (node.isRoot) {\n _this9.removeRoot();\n } else {\n node.remove();\n\n _this9.updateTree();\n }\n\n return node;\n });\n }\n }, {\n key: \"revertNode\",\n value: function revertNode(node) {\n var _this10 = this;\n\n if (this.options.readOnly || !node.revertAvailable) {\n return;\n }\n\n this.hook('tree.revertNode', {\n node: node,\n component: this\n }, function () {\n node.revert();\n\n _this10.updateTree();\n\n return node;\n });\n }\n }, {\n key: \"saveNode\",\n value: function saveNode(node) {\n var _this11 = this;\n\n if (this.options.readOnly) {\n return;\n }\n\n this.hook('tree.saveNode', {\n node: node,\n component: this\n }, function () {\n var isSaved = node.save();\n\n if (isSaved) {\n _this11.updateTree();\n }\n\n return node;\n });\n }\n }, {\n key: \"toggleNode\",\n value: function toggleNode(node) {\n var _this12 = this;\n\n this.hook('tree.toggleNode', {\n node: node,\n component: this\n }, function () {\n node.collapsed = !node.collapsed;\n\n _this12.redraw();\n\n return node;\n });\n }\n }, {\n key: \"removeRoot\",\n value: function removeRoot() {\n if (this.options.readOnly) {\n return;\n }\n\n this.dataValue = this.defaultValue;\n this.setRoot();\n this.redraw();\n }\n }, {\n key: \"setRoot\",\n value: function setRoot() {\n var value = this.getValue();\n this.treeRoot = new _Node.default(null, value, {\n isNew: this.builderMode ? true : !value.data,\n createComponents: this.createComponents.bind(this),\n checkNode: this.checkNode.bind(this, this.data),\n removeComponents: this.removeComponents,\n parentPath: this.isDefaultValueComponent ? this.path || this.component.key : null\n });\n this.hook('tree.setRoot', {\n root: this.treeRoot,\n component: this\n });\n this.redraw();\n }\n }, {\n key: \"getValue\",\n value: function getValue() {\n return this.dataValue || {};\n }\n }, {\n key: \"updateTree\",\n value: function updateTree() {\n this.updateValue(this.treeRoot.value);\n this.redraw();\n }\n }, {\n key: \"checkData\",\n value: function checkData(data, flags, row) {\n return this.checkNode(data, this.treeRoot, flags, row);\n }\n }, {\n key: \"checkNode\",\n value: function checkNode(data, node, flags, row) {\n var _this13 = this;\n\n return node.children.reduce(function (result, child) {\n return _this13.checkNode(data, child, flags, row) && result;\n }, _get(_getPrototypeOf(TreeComponent.prototype), \"checkData\", this).call(this, data, flags, node.data, node.components) && !node.editing && !node.new);\n }\n }, {\n key: \"getComponents\",\n value: function getComponents() {\n return this.treeRoot && (this.isDefaultValueComponent || !this.isDefaultValueComponent && !this.builderMode) ? this.treeRoot.getComponents() : _get(_getPrototypeOf(TreeComponent.prototype), \"getComponents\", this).call(this);\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len3 = arguments.length, extend = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n extend[_key3] = arguments[_key3];\n }\n\n return _NestedDataComponent2.default.schema.apply(_NestedDataComponent2.default, [{\n label: 'Tree',\n key: 'tree',\n type: 'tree',\n clearOnHide: true,\n input: true,\n tree: true,\n components: [],\n multiple: false\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Tree',\n icon: 'indent',\n group: 'data',\n weight: 40,\n documentation: '/userguide/forms/data-components#tree',\n schema: TreeComponent.schema()\n };\n }\n }]);\n\n return TreeComponent;\n}(_NestedDataComponent2.default);\n\nexports[\"default\"] = TreeComponent;\nTreeComponent.prototype.hasChanged = _Component.default.prototype.hasChanged;\n\n//# sourceURL=webpack://Formio/./lib/components/tree/Tree.js?"); +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.set.js */ \"./node_modules/core-js/modules/es.reflect.set.js\");\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptors.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-properties.js */ \"./node_modules/core-js/modules/es.object.define-properties.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n__webpack_require__(/*! core-js/modules/es.array.reduce.js */ \"./node_modules/core-js/modules/es.array.reduce.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nvar _Component = _interopRequireDefault(__webpack_require__(/*! ../_classes/component/Component */ \"./lib/components/_classes/component/Component.js\"));\nvar _Components = _interopRequireDefault(__webpack_require__(/*! ../Components */ \"./lib/components/Components.js\"));\nvar _NestedDataComponent2 = _interopRequireDefault(__webpack_require__(/*! ../_classes/nesteddata/NestedDataComponent */ \"./lib/components/_classes/nesteddata/NestedDataComponent.js\"));\nvar _Node = _interopRequireDefault(__webpack_require__(/*! ./Node */ \"./lib/components/tree/Node.js\"));\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction set(target, property, value, receiver) { if (typeof Reflect !== \"undefined\" && Reflect.set) { set = Reflect.set; } else { set = function set(target, property, value, receiver) { var base = _superPropBase(target, property); var desc; if (base) { desc = Object.getOwnPropertyDescriptor(base, property); if (desc.set) { desc.set.call(receiver, value); return true; } else if (!desc.writable) { return false; } } desc = Object.getOwnPropertyDescriptor(receiver, property); if (desc) { if (!desc.writable) { return false; } desc.value = value; Object.defineProperty(receiver, property, desc); } else { _defineProperty(receiver, property, value); } return true; }; } return set(target, property, value, receiver); }\nfunction _set(target, property, value, receiver, isStrict) { var s = set(target, property, value, receiver || target); if (!s && isStrict) { throw new Error('failed to set property'); } return value; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar TreeComponent = /*#__PURE__*/function (_NestedDataComponent) {\n _inherits(TreeComponent, _NestedDataComponent);\n var _super = _createSuper(TreeComponent);\n function TreeComponent() {\n var _this;\n _classCallCheck(this, TreeComponent);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _this.type = 'tree';\n return _this;\n }\n _createClass(TreeComponent, [{\n key: \"emptyValue\",\n get: function get() {\n return {};\n }\n }, {\n key: \"viewComponents\",\n get: function get() {\n if (!this.viewComponentsInstantiated) {\n this.viewComponentsInstantiated = true;\n this._viewComponents = this.createComponents({});\n }\n return this._viewComponents;\n }\n }, {\n key: \"init\",\n value: function init() {\n if (this.builderMode) {\n return _get(_getPrototypeOf(TreeComponent.prototype), \"init\", this).call(this);\n }\n this.components = [];\n this.componentOptions = _objectSpread(_objectSpread({}, this.options), {}, {\n parent: this,\n root: this.root || this\n });\n this.disabled = this.shouldDisabled;\n this.setRoot();\n this.viewComponentsInstantiated = false;\n this._viewComponents = [];\n }\n }, {\n key: \"disabled\",\n get: function get() {\n return _get(_getPrototypeOf(TreeComponent.prototype), \"disabled\", this);\n },\n set: function set(disabled) {\n _set(_getPrototypeOf(TreeComponent.prototype), \"disabled\", disabled, this, true);\n this.viewComponents.forEach(function (component) {\n return component.parentDisabled = disabled;\n });\n }\n }, {\n key: \"isDefaultValueComponent\",\n get: function get() {\n return !!this.options.editComponent && !!this.options.editForm && this.component.key === 'defaultValue';\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n _get(_getPrototypeOf(TreeComponent.prototype), \"destroy\", this).call(this);\n if (!this.builderMode) {\n this.removeComponents(this._viewComponents);\n }\n }\n }, {\n key: \"createComponents\",\n value: function createComponents(data, node) {\n var _this2 = this;\n var components = this.componentComponents.map(function (component) {\n var componentInstance = _Components[\"default\"].create(component, _this2.componentOptions, data);\n componentInstance.init();\n componentInstance.parentDisabled = _this2.disabled;\n return componentInstance;\n });\n if (node) {\n this.checkNode(this.data, node);\n }\n return components;\n }\n }, {\n key: \"removeComponents\",\n value: function removeComponents(components) {\n return components.map(function (component) {\n return component.destroy();\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n if (this.builderMode) {\n return _get(_getPrototypeOf(TreeComponent.prototype), \"render\", this).call(this);\n }\n return _get(_getPrototypeOf(TreeComponent.prototype), \"render\", this).call(this, this.renderTree(this.treeRoot));\n }\n }, {\n key: \"renderTree\",\n value: function renderTree() {\n var node = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var odd = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n var childNodes = node.hasChildren && !node.collapsed ? this.renderChildNodes(node.children, !odd) : [];\n var content = node.changing ? this.renderEdit(node) : this.renderView(node);\n return this.renderTemplate('tree', {\n odd: odd,\n childNodes: childNodes,\n content: content,\n node: node\n });\n }\n }, {\n key: \"renderChildNodes\",\n value: function renderChildNodes() {\n var _this3 = this;\n var nodes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n var odd = arguments.length > 1 ? arguments[1] : undefined;\n return nodes.map(function (node) {\n return _this3.renderTree(node, odd);\n });\n }\n }, {\n key: \"renderEdit\",\n value: function renderEdit() {\n var node = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n return this.renderTemplate('treeEdit', {\n children: this.renderComponents(node.components),\n node: node\n });\n }\n }, {\n key: \"renderView\",\n value: function renderView() {\n var node = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n return this.renderTemplate('treeView', {\n values: this.viewComponents.map(function (component) {\n component.data = node.data;\n component.checkComponentConditions(node.data);\n return component.getView(component.dataValue);\n }),\n nodeData: node.data,\n node: node\n });\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n if (this.builderMode) {\n return _get(_getPrototypeOf(TreeComponent.prototype), \"attach\", this).call(this, element);\n }\n this.loadRefs(element, {\n root: 'single'\n });\n return _nativePromiseOnly[\"default\"].all([_get(_getPrototypeOf(TreeComponent.prototype), \"attach\", this).call(this, element), this.attachNode(this.refs.root, this.treeRoot)]);\n }\n }, {\n key: \"attachNode\",\n value: function attachNode(element, node) {\n if (!element) {\n return _nativePromiseOnly[\"default\"].resolve();\n }\n var componentsPromise = _nativePromiseOnly[\"default\"].resolve();\n var childrenPromise = _nativePromiseOnly[\"default\"].resolve();\n node.refs = _lodash[\"default\"].reduce(element.children, function (refs, child) {\n return child.hasAttribute('ref') ? _objectSpread(_objectSpread({}, refs), {}, _defineProperty({}, child.getAttribute('ref'), child)) : refs;\n }, {});\n if (node.refs.content) {\n this.attachActions(node);\n componentsPromise = this.attachComponents(node);\n }\n if (node.refs.childNodes) {\n childrenPromise = this.attachChildren(node);\n }\n return _nativePromiseOnly[\"default\"].all([componentsPromise, childrenPromise]);\n }\n }, {\n key: \"attachActions\",\n value: function attachActions(node) {\n var _node$refs$content$ch,\n _this4 = this;\n if (!node.editing) {\n this.loadRefs.call(node, node.refs.content, {\n addChild: 'single',\n editNode: 'single',\n removeNode: 'single',\n revertNode: 'single',\n toggleNode: 'single'\n });\n }\n\n //load refs correctly (if there is nested tree)\n this.loadRefs.call(node, ((_node$refs$content$ch = node.refs.content.children[0]) === null || _node$refs$content$ch === void 0 ? void 0 : _node$refs$content$ch.children[1]) || node.refs.content, {\n cancelNode: 'single',\n saveNode: 'single'\n });\n if (node.refs.addChild) {\n this.addEventListener(node.refs.addChild, 'click', function () {\n _this4.addChild(node);\n });\n }\n if (node.refs.cancelNode) {\n this.addEventListener(node.refs.cancelNode, 'click', function () {\n _this4.cancelNode(node);\n });\n }\n if (node.refs.editNode) {\n this.addEventListener(node.refs.editNode, 'click', function () {\n _this4.editNode(node);\n });\n }\n if (node.refs.removeNode) {\n this.addEventListener(node.refs.removeNode, 'click', function () {\n _this4.removeNode(node);\n });\n }\n if (node.refs.revertNode) {\n this.addEventListener(node.refs.revertNode, 'click', function () {\n _this4.revertNode(node);\n });\n }\n if (node.refs.saveNode) {\n this.addEventListener(node.refs.saveNode, 'click', function () {\n _this4.saveNode(node);\n });\n }\n if (node.refs.toggleNode) {\n this.addEventListener(node.refs.toggleNode, 'click', function () {\n _this4.toggleNode(node);\n });\n }\n }\n }, {\n key: \"attachComponents\",\n value: function attachComponents(node) {\n if (this.builderMode) {\n var _get2;\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n return (_get2 = _get(_getPrototypeOf(TreeComponent.prototype), \"attachComponents\", this)).call.apply(_get2, [this, node].concat(args));\n }\n this.loadRefs.call(node, node.refs.content, {\n nodeEdit: 'single'\n });\n return node.refs.nodeEdit ? _get(_getPrototypeOf(TreeComponent.prototype), \"attachComponents\", this).call(this, node.refs.nodeEdit, node.components) : _nativePromiseOnly[\"default\"].resolve();\n }\n }, {\n key: \"attachChildren\",\n value: function attachChildren(node) {\n var _this5 = this;\n var childElements = node.refs.childNodes.children;\n return _nativePromiseOnly[\"default\"].all(_lodash[\"default\"].map(childElements, function (childElement, index) {\n return _this5.attachNode(childElement, node.children[index]);\n }));\n }\n }, {\n key: \"setValue\",\n value: function setValue(value) {\n var flags = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var changed = this.updateValue(value, flags);\n this.setRoot();\n return changed;\n }\n }, {\n key: \"addChild\",\n value: function addChild(parent) {\n var _this6 = this;\n if (this.options.readOnly || parent[\"new\"]) {\n return;\n }\n this.hook('tree.addChild', {\n parent: parent,\n component: this\n }, function () {\n var child = parent.addChild();\n _this6.redraw();\n return child;\n });\n }\n }, {\n key: \"cancelNode\",\n value: function cancelNode(node) {\n var _this7 = this;\n if (this.options.readOnly) {\n return;\n }\n this.hook('tree.cancelNode', {\n node: node,\n component: this\n }, function () {\n if (node.isRoot) {\n if (node.persistentData && !_lodash[\"default\"].isEmpty(node.persistentData)) {\n node.cancel();\n _this7.redraw();\n } else {\n _this7.removeRoot();\n }\n } else {\n node.cancel();\n _this7.redraw();\n }\n return node;\n });\n }\n }, {\n key: \"editNode\",\n value: function editNode(node) {\n var _this8 = this;\n if (this.options.readOnly || node[\"new\"]) {\n return;\n }\n this.hook('tree.editNode', {\n node: node,\n component: this\n }, function () {\n node.edit();\n _this8.redraw();\n return node;\n });\n }\n }, {\n key: \"removeNode\",\n value: function removeNode(node) {\n var _this9 = this;\n if (this.options.readOnly || node[\"new\"]) {\n return;\n }\n this.hook('tree.removeNode', {\n node: node,\n component: this\n }, function () {\n if (node.isRoot) {\n _this9.removeRoot();\n } else {\n node.remove();\n _this9.updateTree();\n }\n return node;\n });\n }\n }, {\n key: \"revertNode\",\n value: function revertNode(node) {\n var _this10 = this;\n if (this.options.readOnly || !node.revertAvailable) {\n return;\n }\n this.hook('tree.revertNode', {\n node: node,\n component: this\n }, function () {\n node.revert();\n _this10.updateTree();\n return node;\n });\n }\n }, {\n key: \"saveNode\",\n value: function saveNode(node) {\n var _this11 = this;\n if (this.options.readOnly) {\n return;\n }\n this.hook('tree.saveNode', {\n node: node,\n component: this\n }, function () {\n var isSaved = node.save();\n if (isSaved) {\n _this11.updateTree();\n }\n return node;\n });\n }\n }, {\n key: \"toggleNode\",\n value: function toggleNode(node) {\n var _this12 = this;\n this.hook('tree.toggleNode', {\n node: node,\n component: this\n }, function () {\n node.collapsed = !node.collapsed;\n _this12.redraw();\n return node;\n });\n }\n }, {\n key: \"removeRoot\",\n value: function removeRoot() {\n if (this.options.readOnly) {\n return;\n }\n this.dataValue = this.defaultValue;\n this.setRoot();\n this.redraw();\n }\n }, {\n key: \"setRoot\",\n value: function setRoot() {\n var value = this.getValue();\n this.treeRoot = new _Node[\"default\"](null, value, {\n isNew: this.builderMode ? true : !value.data,\n createComponents: this.createComponents.bind(this),\n checkNode: this.checkNode.bind(this, this.data),\n removeComponents: this.removeComponents,\n parentPath: this.isDefaultValueComponent ? this.path || this.component.key : null\n });\n this.hook('tree.setRoot', {\n root: this.treeRoot,\n component: this\n });\n this.redraw();\n }\n }, {\n key: \"getValue\",\n value: function getValue() {\n return this.dataValue || {};\n }\n }, {\n key: \"updateTree\",\n value: function updateTree() {\n this.updateValue(this.treeRoot.value);\n this.redraw();\n }\n }, {\n key: \"checkData\",\n value: function checkData(data, flags, row) {\n return this.checkNode(data, this.treeRoot, flags, row);\n }\n }, {\n key: \"checkNode\",\n value: function checkNode(data, node, flags, row) {\n var _this13 = this;\n return node.children.reduce(function (result, child) {\n return _this13.checkNode(data, child, flags, row) && result;\n }, _get(_getPrototypeOf(TreeComponent.prototype), \"checkData\", this).call(this, data, flags, node.data, node.components) && !node.editing && !node[\"new\"]);\n }\n }, {\n key: \"getComponents\",\n value: function getComponents() {\n return this.treeRoot && (this.isDefaultValueComponent || !this.isDefaultValueComponent && !this.builderMode) ? this.treeRoot.getComponents() : _get(_getPrototypeOf(TreeComponent.prototype), \"getComponents\", this).call(this);\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len3 = arguments.length, extend = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n extend[_key3] = arguments[_key3];\n }\n return _NestedDataComponent2[\"default\"].schema.apply(_NestedDataComponent2[\"default\"], [{\n label: 'Tree',\n key: 'tree',\n type: 'tree',\n clearOnHide: true,\n input: true,\n tree: true,\n components: [],\n multiple: false\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Tree',\n icon: 'indent',\n group: 'data',\n weight: 40,\n documentation: '/userguide/form-building/data-components#tree',\n schema: TreeComponent.schema()\n };\n }\n }]);\n return TreeComponent;\n}(_NestedDataComponent2[\"default\"]);\nexports[\"default\"] = TreeComponent;\nTreeComponent.prototype.hasChanged = _Component[\"default\"].prototype.hasChanged;\n\n//# sourceURL=webpack://Formio/./lib/components/tree/Tree.js?"); /***/ }), @@ -2199,10 +2232,10 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /*!********************************************************!*\ !*** ./lib/components/tree/editForm/Tree.edit.data.js ***! \********************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'multiple',\n ignore: true\n}];\n/* eslint-enable max-len */\n\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/tree/editForm/Tree.edit.data.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'multiple',\n ignore: true\n}];\n/* eslint-enable max-len */\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/tree/editForm/Tree.edit.data.js?"); /***/ }), @@ -2213,7 +2246,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n\nvar _UnknownEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/Unknown.edit.display */ \"./lib/components/unknown/editForm/Unknown.edit.display.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _default() {\n return {\n components: [{\n type: 'tabs',\n key: 'tabs',\n components: [{\n label: 'Custom',\n key: 'display',\n weight: 0,\n components: _UnknownEdit.default\n }]\n }]\n };\n}\n\n//# sourceURL=webpack://Formio/./lib/components/unknown/Unknown.form.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\nvar _UnknownEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/Unknown.edit.display */ \"./lib/components/unknown/editForm/Unknown.edit.display.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _default() {\n return {\n components: [{\n type: 'tabs',\n key: 'tabs',\n components: [{\n label: 'Custom',\n key: 'display',\n weight: 0,\n components: _UnknownEdit[\"default\"]\n }]\n }]\n };\n}\n\n//# sourceURL=webpack://Formio/./lib/components/unknown/Unknown.form.js?"); /***/ }), @@ -2224,7 +2257,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\nvar _Component2 = _interopRequireDefault(__webpack_require__(/*! ../_classes/component/Component */ \"./lib/components/_classes/component/Component.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar UnknownComponent = /*#__PURE__*/function (_Component) {\n _inherits(UnknownComponent, _Component);\n\n var _super = _createSuper(UnknownComponent);\n\n function UnknownComponent() {\n _classCallCheck(this, UnknownComponent);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(UnknownComponent, [{\n key: \"defaultSchema\",\n get: function get() {\n return UnknownComponent.schema();\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n return {\n type: 'custom',\n key: 'custom',\n protected: false,\n persistent: true\n };\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Custom',\n icon: 'cubes',\n group: 'premium',\n documentation: '/userguide/forms/premium-components#custom',\n weight: 120,\n schema: UnknownComponent.schema()\n };\n }\n }]);\n\n return UnknownComponent;\n}(_Component2.default);\n\nexports[\"default\"] = UnknownComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/unknown/Unknown.js?"); +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _Component2 = _interopRequireDefault(__webpack_require__(/*! ../_classes/component/Component */ \"./lib/components/_classes/component/Component.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar UnknownComponent = /*#__PURE__*/function (_Component) {\n _inherits(UnknownComponent, _Component);\n var _super = _createSuper(UnknownComponent);\n function UnknownComponent() {\n _classCallCheck(this, UnknownComponent);\n return _super.apply(this, arguments);\n }\n _createClass(UnknownComponent, [{\n key: \"defaultSchema\",\n get: function get() {\n return UnknownComponent.schema();\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n return {\n type: 'custom',\n key: 'custom',\n \"protected\": false,\n persistent: true\n };\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Custom',\n icon: 'cubes',\n group: 'premium',\n documentation: '/userguide/form-building/premium-components#custom',\n weight: 120,\n schema: UnknownComponent.schema()\n };\n }\n }]);\n return UnknownComponent;\n}(_Component2[\"default\"]);\nexports[\"default\"] = UnknownComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/unknown/Unknown.js?"); /***/ }), @@ -2232,10 +2265,10 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /*!*****************************************************************!*\ !*** ./lib/components/unknown/editForm/Unknown.edit.display.js ***! \*****************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'customComponentDescription',\n label: 'Custom component description',\n input: false,\n tag: 'p',\n content: 'Custom components can be used to render special fields or widgets inside your app. ' + 'For information on how to display in an app, see ' + '' + 'custom component documentation' + '.',\n type: 'htmlelement',\n weight: 5\n}, {\n type: 'textarea',\n as: 'json',\n editor: 'ace',\n weight: 10,\n input: true,\n key: 'componentJson',\n label: 'Custom Element JSON',\n tooltip: 'Enter the JSON for this custom element.'\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/unknown/editForm/Unknown.edit.display.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'customComponentDescription',\n label: 'Custom component description',\n input: false,\n tag: 'p',\n content: 'Custom components can be used to render special fields or widgets inside your app. ' + 'For information on how to display in an app, see ' + '' + 'custom component documentation' + '.',\n type: 'htmlelement',\n weight: 5\n}, {\n type: 'textarea',\n as: 'json',\n editor: 'ace',\n weight: 10,\n input: true,\n key: 'componentJson',\n label: 'Custom Element JSON',\n tooltip: 'Enter the JSON for this custom element.'\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/unknown/editForm/Unknown.edit.display.js?"); /***/ }), @@ -2246,7 +2279,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\nvar _TextField = _interopRequireDefault(__webpack_require__(/*! ../textfield/TextField.form */ \"./lib/components/textfield/TextField.form.js\"));\n\nvar _UrlEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/Url.edit.display */ \"./lib/components/url/editForm/Url.edit.display.js\"));\n\nvar _UrlEdit2 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Url.edit.data */ \"./lib/components/url/editForm/Url.edit.data.js\"));\n\nvar _UrlEdit3 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Url.edit.validation */ \"./lib/components/url/editForm/Url.edit.validation.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _TextField.default.apply(void 0, [[{\n key: 'display',\n components: _UrlEdit.default\n }, {\n key: 'data',\n components: _UrlEdit2.default\n }, {\n key: 'validation',\n components: _UrlEdit3.default\n }, {\n key: 'addons',\n ignore: true\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/url/Url.form.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\nvar _TextField = _interopRequireDefault(__webpack_require__(/*! ../textfield/TextField.form */ \"./lib/components/textfield/TextField.form.js\"));\nvar _UrlEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/Url.edit.display */ \"./lib/components/url/editForm/Url.edit.display.js\"));\nvar _UrlEdit2 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Url.edit.data */ \"./lib/components/url/editForm/Url.edit.data.js\"));\nvar _UrlEdit3 = _interopRequireDefault(__webpack_require__(/*! ./editForm/Url.edit.validation */ \"./lib/components/url/editForm/Url.edit.validation.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _TextField[\"default\"].apply(void 0, [[{\n key: 'display',\n components: _UrlEdit[\"default\"]\n }, {\n key: 'data',\n components: _UrlEdit2[\"default\"]\n }, {\n key: 'validation',\n components: _UrlEdit3[\"default\"]\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/url/Url.form.js?"); /***/ }), @@ -2257,7 +2290,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\nvar _TextField = _interopRequireDefault(__webpack_require__(/*! ../textfield/TextField */ \"./lib/components/textfield/TextField.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar UrlComponent = /*#__PURE__*/function (_TextFieldComponent) {\n _inherits(UrlComponent, _TextFieldComponent);\n\n var _super = _createSuper(UrlComponent);\n\n function UrlComponent(component, options, data) {\n var _this;\n\n _classCallCheck(this, UrlComponent);\n\n _this = _super.call(this, component, options, data);\n\n _this.validators.push('url');\n\n return _this;\n }\n\n _createClass(UrlComponent, [{\n key: \"defaultSchema\",\n get: function get() {\n return UrlComponent.schema();\n }\n }, {\n key: \"elementInfo\",\n value: function elementInfo() {\n var info = _get(_getPrototypeOf(UrlComponent.prototype), \"elementInfo\", this).call(this);\n\n info.attr.type = this.component.mask ? 'password' : 'url';\n return info;\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _TextField.default.schema.apply(_TextField.default, [{\n type: 'url',\n label: 'Url',\n key: 'url',\n inputType: 'url'\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Url',\n group: 'advanced',\n icon: 'link',\n documentation: '/userguide/forms/form-components#url',\n weight: 20,\n schema: UrlComponent.schema()\n };\n }\n }]);\n\n return UrlComponent;\n}(_TextField.default);\n\nexports[\"default\"] = UrlComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/url/Url.js?"); +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _TextField = _interopRequireDefault(__webpack_require__(/*! ../textfield/TextField */ \"./lib/components/textfield/TextField.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar UrlComponent = /*#__PURE__*/function (_TextFieldComponent) {\n _inherits(UrlComponent, _TextFieldComponent);\n var _super = _createSuper(UrlComponent);\n function UrlComponent(component, options, data) {\n var _this;\n _classCallCheck(this, UrlComponent);\n _this = _super.call(this, component, options, data);\n _this.validators.push('url');\n return _this;\n }\n _createClass(UrlComponent, [{\n key: \"defaultSchema\",\n get: function get() {\n return UrlComponent.schema();\n }\n }, {\n key: \"elementInfo\",\n value: function elementInfo() {\n var info = _get(_getPrototypeOf(UrlComponent.prototype), \"elementInfo\", this).call(this);\n info.attr.type = this.component.mask ? 'password' : 'url';\n return info;\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _TextField[\"default\"].schema.apply(_TextField[\"default\"], [{\n type: 'url',\n label: 'Url',\n key: 'url',\n inputType: 'url'\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Url',\n group: 'advanced',\n icon: 'link',\n documentation: '/userguide/form-building/advanced-components#url',\n weight: 20,\n schema: UrlComponent.schema()\n };\n }\n }]);\n return UrlComponent;\n}(_TextField[\"default\"]);\nexports[\"default\"] = UrlComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/url/Url.js?"); /***/ }), @@ -2265,10 +2298,10 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /*!******************************************************!*\ !*** ./lib/components/url/editForm/Url.edit.data.js ***! \******************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'case',\n ignore: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/url/editForm/Url.edit.data.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'case',\n ignore: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/url/editForm/Url.edit.data.js?"); /***/ }), @@ -2276,10 +2309,10 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /*!*********************************************************!*\ !*** ./lib/components/url/editForm/Url.edit.display.js ***! \*********************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'inputMask',\n ignore: true\n}, {\n key: 'allowMultipleMasks',\n ignore: true\n}, {\n key: 'showWordCount',\n ignore: true\n}, {\n key: 'showCharCount',\n ignore: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/url/editForm/Url.edit.display.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'inputMask',\n ignore: true\n}, {\n key: 'allowMultipleMasks',\n ignore: true\n}, {\n key: 'showWordCount',\n ignore: true\n}, {\n key: 'showCharCount',\n ignore: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/url/editForm/Url.edit.display.js?"); /***/ }), @@ -2287,10 +2320,10 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /*!************************************************************!*\ !*** ./lib/components/url/editForm/Url.edit.validation.js ***! \************************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'validate.minWords',\n ignore: true\n}, {\n key: 'validate.maxWords',\n ignore: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/url/editForm/Url.edit.validation.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'validate.minWords',\n ignore: true\n}, {\n key: 'validate.maxWords',\n ignore: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/url/editForm/Url.edit.validation.js?"); /***/ }), @@ -2301,7 +2334,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\nvar _NestedComponent = _interopRequireDefault(__webpack_require__(/*! ../_classes/nested/NestedComponent.form */ \"./lib/components/_classes/nested/NestedComponent.form.js\"));\n\nvar _WellEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/Well.edit.display */ \"./lib/components/well/editForm/Well.edit.display.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n\n return _NestedComponent.default.apply(void 0, [[{\n key: 'display',\n components: _WellEdit.default\n }, {\n key: 'addons',\n ignore: true\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/well/Well.form.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = _default;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\nvar _NestedComponent = _interopRequireDefault(__webpack_require__(/*! ../_classes/nested/NestedComponent.form */ \"./lib/components/_classes/nested/NestedComponent.form.js\"));\nvar _WellEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/Well.edit.display */ \"./lib/components/well/editForm/Well.edit.display.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _default() {\n for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {\n extend[_key] = arguments[_key];\n }\n return _NestedComponent[\"default\"].apply(void 0, [[{\n key: 'display',\n components: _WellEdit[\"default\"]\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/components/well/Well.form.js?"); /***/ }), @@ -2312,7 +2345,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\nvar _NestedComponent2 = _interopRequireDefault(__webpack_require__(/*! ../_classes/nested/NestedComponent */ \"./lib/components/_classes/nested/NestedComponent.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar WellComponent = /*#__PURE__*/function (_NestedComponent) {\n _inherits(WellComponent, _NestedComponent);\n\n var _super = _createSuper(WellComponent);\n\n function WellComponent() {\n var _this;\n\n _classCallCheck(this, WellComponent);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n _this.noField = true;\n return _this;\n }\n\n _createClass(WellComponent, [{\n key: \"defaultSchema\",\n get: function get() {\n return WellComponent.schema();\n }\n }, {\n key: \"className\",\n get: function get() {\n return \"\".concat(this.component.customClass);\n }\n }, {\n key: \"templateName\",\n get: function get() {\n return 'well';\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len2 = arguments.length, extend = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n extend[_key2] = arguments[_key2];\n }\n\n return _NestedComponent2.default.schema.apply(_NestedComponent2.default, [{\n type: 'well',\n key: 'well',\n input: false,\n persistent: false,\n components: []\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Well',\n icon: 'square-o',\n group: 'layout',\n documentation: '/userguide/forms/layout-components#well',\n weight: 60,\n schema: WellComponent.schema()\n };\n }\n }]);\n\n return WellComponent;\n}(_NestedComponent2.default);\n\nexports[\"default\"] = WellComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/well/Well.js?"); +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _NestedComponent2 = _interopRequireDefault(__webpack_require__(/*! ../_classes/nested/NestedComponent */ \"./lib/components/_classes/nested/NestedComponent.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar WellComponent = /*#__PURE__*/function (_NestedComponent) {\n _inherits(WellComponent, _NestedComponent);\n var _super = _createSuper(WellComponent);\n function WellComponent() {\n var _this;\n _classCallCheck(this, WellComponent);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _this.noField = true;\n return _this;\n }\n _createClass(WellComponent, [{\n key: \"defaultSchema\",\n get: function get() {\n return WellComponent.schema();\n }\n }, {\n key: \"className\",\n get: function get() {\n return \"\".concat(this.component.customClass);\n }\n }, {\n key: \"templateName\",\n get: function get() {\n return 'well';\n }\n }], [{\n key: \"schema\",\n value: function schema() {\n for (var _len2 = arguments.length, extend = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n extend[_key2] = arguments[_key2];\n }\n return _NestedComponent2[\"default\"].schema.apply(_NestedComponent2[\"default\"], [{\n type: 'well',\n key: 'well',\n input: false,\n persistent: false,\n components: []\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Well',\n icon: 'square-o',\n group: 'layout',\n documentation: '/userguide/form-building/layout-components#well',\n weight: 60,\n schema: WellComponent.schema()\n };\n }\n }]);\n return WellComponent;\n}(_NestedComponent2[\"default\"]);\nexports[\"default\"] = WellComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/well/Well.js?"); /***/ }), @@ -2320,10 +2353,10 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /*!***********************************************************!*\ !*** ./lib/components/well/editForm/Well.edit.display.js ***! \***********************************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'labelPosition',\n ignore: true\n}, {\n key: 'placeholder',\n ignore: true\n}, {\n key: 'description',\n ignore: true\n}, {\n key: 'autofocus',\n ignore: true\n}, {\n key: 'tooltip',\n ignore: true\n}, {\n key: 'tabindex',\n ignore: true\n}, {\n key: 'tableView',\n ignore: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/well/editForm/Well.edit.display.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'labelPosition',\n ignore: true\n}, {\n key: 'placeholder',\n ignore: true\n}, {\n key: 'description',\n ignore: true\n}, {\n key: 'autofocus',\n ignore: true\n}, {\n key: 'tooltip',\n ignore: true\n}, {\n key: 'tabindex',\n ignore: true\n}, {\n key: 'tableView',\n ignore: true\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/components/well/editForm/Well.edit.display.js?"); /***/ }), @@ -2334,7 +2367,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nvar _PDF = _interopRequireDefault(__webpack_require__(/*! ../PDF */ \"./lib/PDF.js\"));\n\nvar _Webform = _interopRequireDefault(__webpack_require__(/*! ../Webform */ \"./lib/Webform.js\"));\n\nvar _Wizard = _interopRequireDefault(__webpack_require__(/*! ../Wizard */ \"./lib/Wizard.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar Displays = /*#__PURE__*/function () {\n function Displays() {\n _classCallCheck(this, Displays);\n }\n\n _createClass(Displays, null, [{\n key: \"addDisplay\",\n value: function addDisplay(name, display) {\n Displays.displays[name] = display;\n }\n }, {\n key: \"addDisplays\",\n value: function addDisplays(displays) {\n Displays.displays = _lodash.default.merge(Displays.displays, displays);\n }\n }, {\n key: \"getDisplay\",\n value: function getDisplay(name) {\n return Displays.displays[name];\n }\n }, {\n key: \"getDisplays\",\n value: function getDisplays() {\n return Displays.displays;\n }\n }]);\n\n return Displays;\n}();\n\nexports[\"default\"] = Displays;\n\n_defineProperty(Displays, \"displays\", {\n pdf: _PDF.default,\n webform: _Webform.default,\n wizard: _Wizard.default\n});\n\n//# sourceURL=webpack://Formio/./lib/displays/Displays.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nvar _PDF = _interopRequireDefault(__webpack_require__(/*! ../PDF */ \"./lib/PDF.js\"));\nvar _Webform = _interopRequireDefault(__webpack_require__(/*! ../Webform */ \"./lib/Webform.js\"));\nvar _Wizard = _interopRequireDefault(__webpack_require__(/*! ../Wizard */ \"./lib/Wizard.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar Displays = /*#__PURE__*/function () {\n function Displays() {\n _classCallCheck(this, Displays);\n }\n _createClass(Displays, null, [{\n key: \"addDisplay\",\n value: function addDisplay(name, display) {\n Displays.displays[name] = display;\n }\n }, {\n key: \"addDisplays\",\n value: function addDisplays(displays) {\n Displays.displays = _lodash[\"default\"].merge(Displays.displays, displays);\n }\n }, {\n key: \"getDisplay\",\n value: function getDisplay(name) {\n return Displays.displays[name];\n }\n }, {\n key: \"getDisplays\",\n value: function getDisplays() {\n return Displays.displays;\n }\n }]);\n return Displays;\n}();\nexports[\"default\"] = Displays;\n_defineProperty(Displays, \"displays\", {\n pdf: _PDF[\"default\"],\n webform: _Webform[\"default\"],\n wizard: _Wizard[\"default\"]\n});\n\n//# sourceURL=webpack://Formio/./lib/displays/Displays.js?"); /***/ }), @@ -2345,7 +2378,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _Displays = _interopRequireDefault(__webpack_require__(/*! ./Displays */ \"./lib/displays/Displays.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = _Displays.default;\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/displays/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _Displays = _interopRequireDefault(__webpack_require__(/*! ./Displays */ \"./lib/displays/Displays.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = _Displays[\"default\"];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/displays/index.js?"); /***/ }), @@ -2356,7 +2389,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"Builders\", ({\n enumerable: true,\n get: function get() {\n return _Builders.default;\n }\n}));\nObject.defineProperty(exports, \"Components\", ({\n enumerable: true,\n get: function get() {\n return _Components.default;\n }\n}));\nObject.defineProperty(exports, \"Conjunctions\", ({\n enumerable: true,\n get: function get() {\n return _conjunctions.default;\n }\n}));\nObject.defineProperty(exports, \"Displays\", ({\n enumerable: true,\n get: function get() {\n return _Displays.default;\n }\n}));\nObject.defineProperty(exports, \"Form\", ({\n enumerable: true,\n get: function get() {\n return _Form.default;\n }\n}));\nObject.defineProperty(exports, \"Formio\", ({\n enumerable: true,\n get: function get() {\n return _Formio.default;\n }\n}));\nObject.defineProperty(exports, \"Operators\", ({\n enumerable: true,\n get: function get() {\n return _operators.default;\n }\n}));\nObject.defineProperty(exports, \"Providers\", ({\n enumerable: true,\n get: function get() {\n return _providers.default;\n }\n}));\nObject.defineProperty(exports, \"QuickRules\", ({\n enumerable: true,\n get: function get() {\n return _quickRules.default;\n }\n}));\nObject.defineProperty(exports, \"Rules\", ({\n enumerable: true,\n get: function get() {\n return _Rules.default;\n }\n}));\nObject.defineProperty(exports, \"Templates\", ({\n enumerable: true,\n get: function get() {\n return _Templates.default;\n }\n}));\nObject.defineProperty(exports, \"Transformers\", ({\n enumerable: true,\n get: function get() {\n return _transformers.default;\n }\n}));\nObject.defineProperty(exports, \"Utils\", ({\n enumerable: true,\n get: function get() {\n return _utils.default;\n }\n}));\nObject.defineProperty(exports, \"ValueSources\", ({\n enumerable: true,\n get: function get() {\n return _valueSources.default;\n }\n}));\nObject.defineProperty(exports, \"Widgets\", ({\n enumerable: true,\n get: function get() {\n return _widgets.default;\n }\n}));\n\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nvar _Formio = _interopRequireDefault(__webpack_require__(/*! ./Formio */ \"./lib/Formio.js\"));\n\nvar _components = _interopRequireDefault(__webpack_require__(/*! ./components */ \"./lib/components/index.js\"));\n\nvar _Builders = _interopRequireDefault(__webpack_require__(/*! ./builders/Builders */ \"./lib/builders/Builders.js\"));\n\nvar _Components = _interopRequireDefault(__webpack_require__(/*! ./components/Components */ \"./lib/components/Components.js\"));\n\nvar _Displays = _interopRequireDefault(__webpack_require__(/*! ./displays/Displays */ \"./lib/displays/Displays.js\"));\n\nvar _Templates = _interopRequireDefault(__webpack_require__(/*! ./templates/Templates */ \"./lib/templates/Templates.js\"));\n\nvar _providers = _interopRequireDefault(__webpack_require__(/*! ./providers */ \"./lib/providers/index.js\"));\n\nvar _Rules = _interopRequireDefault(__webpack_require__(/*! ./validator/Rules */ \"./lib/validator/Rules.js\"));\n\nvar _conjunctions = _interopRequireDefault(__webpack_require__(/*! ./validator/conjunctions */ \"./lib/validator/conjunctions/index.js\"));\n\nvar _operators = _interopRequireDefault(__webpack_require__(/*! ./validator/operators */ \"./lib/validator/operators/index.js\"));\n\nvar _quickRules = _interopRequireDefault(__webpack_require__(/*! ./validator/quickRules */ \"./lib/validator/quickRules/index.js\"));\n\nvar _transformers = _interopRequireDefault(__webpack_require__(/*! ./validator/transformers */ \"./lib/validator/transformers/index.js\"));\n\nvar _valueSources = _interopRequireDefault(__webpack_require__(/*! ./validator/valueSources */ \"./lib/validator/valueSources/index.js\"));\n\nvar _widgets = _interopRequireDefault(__webpack_require__(/*! ./widgets */ \"./lib/widgets/index.js\"));\n\nvar _Form = _interopRequireDefault(__webpack_require__(/*! ./Form */ \"./lib/Form.js\"));\n\nvar _utils = _interopRequireDefault(__webpack_require__(/*! ./utils */ \"./lib/utils/index.js\"));\n\nvar _Evaluator = _interopRequireDefault(__webpack_require__(/*! ./utils/Evaluator */ \"./lib/utils/Evaluator.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n_Formio.default.loadModules = function () {\n var path = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"\".concat(_Formio.default.getApiUrl(), \"/externalModules.js\");\n var name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'externalModules';\n\n _Formio.default.requireLibrary(name, name, path, true).then(function (modules) {\n _Formio.default.use(modules);\n });\n}; // This is needed to maintain correct imports using the \"dist\" file.\n\n\n_Formio.default.Components = _Components.default;\n_Formio.default.Templates = _Templates.default;\n_Formio.default.Builders = _Builders.default;\n_Formio.default.Utils = _utils.default;\n_Formio.default.Form = _Form.default;\n_Formio.default.Displays = _Displays.default;\n_Formio.default.Providers = _providers.default;\n_Formio.default.Rules = _Rules.default;\n_Formio.default.Widgets = _widgets.default;\n_Formio.default.Evaluator = _Evaluator.default;\n_Formio.default.Conjunctions = _conjunctions.default;\n_Formio.default.Operators = _operators.default;\n_Formio.default.QuickRules = _quickRules.default;\n_Formio.default.Transformers = _transformers.default;\n_Formio.default.ValueSources = _valueSources.default;\n_Formio.default.AllComponents = _components.default; // This is strange, but is needed for \"premium\" components to import correctly.\n\n_Formio.default.Formio = _Formio.default;\n\n_Formio.default.Components.setComponents(_components.default);\n\nvar registerPlugin = function registerPlugin(plugin) {\n // Sanity check.\n if (_typeof(plugin) !== 'object') {\n return;\n }\n\n for (var _i = 0, _Object$keys = Object.keys(plugin); _i < _Object$keys.length; _i++) {\n var key = _Object$keys[_i];\n var current = plugin.framework || _Formio.default.Templates.framework || 'bootstrap';\n\n switch (key) {\n case 'options':\n _Formio.default.options = _lodash.default.merge(_Formio.default.options, plugin.options);\n break;\n\n case 'templates':\n for (var _i2 = 0, _Object$keys2 = Object.keys(plugin.templates); _i2 < _Object$keys2.length; _i2++) {\n var framework = _Object$keys2[_i2];\n\n _Formio.default.Templates.extendTemplate(framework, plugin.templates[framework]);\n }\n\n if (plugin.templates[current]) {\n _Formio.default.Templates.current = plugin.templates[current];\n }\n\n break;\n\n case 'components':\n _Formio.default.Components.setComponents(plugin.components);\n\n break;\n\n case 'framework':\n _Formio.default.Templates.framework = plugin.framework;\n break;\n\n case 'fetch':\n for (var _i3 = 0, _Object$keys3 = Object.keys(plugin.fetch); _i3 < _Object$keys3.length; _i3++) {\n var name = _Object$keys3[_i3];\n\n _Formio.default.registerPlugin(plugin.fetch[name], name);\n }\n\n break;\n\n case 'providers':\n for (var _i4 = 0, _Object$keys4 = Object.keys(plugin.providers); _i4 < _Object$keys4.length; _i4++) {\n var type = _Object$keys4[_i4];\n\n _Formio.default.Providers.addProviders(type, plugin.providers[type]);\n }\n\n break;\n\n case 'displays':\n _Formio.default.Displays.addDisplays(plugin.displays);\n\n break;\n\n case 'builders':\n _Formio.default.Builders.addBuilders(plugin.builders);\n\n break;\n\n case 'rules':\n _Formio.default.Rules.addRules(plugin.rules);\n\n break;\n\n case 'evaluator':\n _Formio.default.Evaluator.registerEvaluator(plugin.evaluator);\n\n break;\n\n case 'conjunctions':\n _Formio.default.Conjunctions.addConjunctions(plugin.conjunctions);\n\n break;\n\n case 'operators':\n _Formio.default.Operators.addOperators(plugin.operators);\n\n break;\n\n case 'quickRules':\n _Formio.default.QuickRules.addQuickRules(plugin.quickRules);\n\n break;\n\n case 'transformers':\n _Formio.default.Transformers.addTransformers(plugin.transformers);\n\n break;\n\n case 'valueSources':\n _Formio.default.ValueSources.addValueSources(plugin.valueSources);\n\n break;\n\n default:\n console.log('Unknown plugin option', key);\n }\n }\n};\n/**\n * Allows passing in plugins as multiple arguments or an array of plugins.\n *\n * Formio.plugins(plugin1, plugin2, etc);\n * Formio.plugins([plugin1, plugin2, etc]);\n */\n\n\n_Formio.default.use = function () {\n for (var _len = arguments.length, plugins = new Array(_len), _key = 0; _key < _len; _key++) {\n plugins[_key] = arguments[_key];\n }\n\n plugins.forEach(function (plugin) {\n if (Array.isArray(plugin)) {\n plugin.forEach(function (p) {\n return registerPlugin(p);\n });\n } else {\n registerPlugin(plugin);\n }\n });\n}; // Export the components.\n\n//# sourceURL=webpack://Formio/./lib/formio.form.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"Builders\", ({\n enumerable: true,\n get: function get() {\n return _Builders[\"default\"];\n }\n}));\nObject.defineProperty(exports, \"Components\", ({\n enumerable: true,\n get: function get() {\n return _Components[\"default\"];\n }\n}));\nObject.defineProperty(exports, \"Conjunctions\", ({\n enumerable: true,\n get: function get() {\n return _conjunctions[\"default\"];\n }\n}));\nObject.defineProperty(exports, \"Displays\", ({\n enumerable: true,\n get: function get() {\n return _Displays[\"default\"];\n }\n}));\nObject.defineProperty(exports, \"Form\", ({\n enumerable: true,\n get: function get() {\n return _Form[\"default\"];\n }\n}));\nObject.defineProperty(exports, \"Formio\", ({\n enumerable: true,\n get: function get() {\n return _Formio[\"default\"];\n }\n}));\nObject.defineProperty(exports, \"Operators\", ({\n enumerable: true,\n get: function get() {\n return _operators[\"default\"];\n }\n}));\nObject.defineProperty(exports, \"Providers\", ({\n enumerable: true,\n get: function get() {\n return _providers[\"default\"];\n }\n}));\nObject.defineProperty(exports, \"QuickRules\", ({\n enumerable: true,\n get: function get() {\n return _quickRules[\"default\"];\n }\n}));\nObject.defineProperty(exports, \"Rules\", ({\n enumerable: true,\n get: function get() {\n return _Rules[\"default\"];\n }\n}));\nObject.defineProperty(exports, \"Templates\", ({\n enumerable: true,\n get: function get() {\n return _Templates[\"default\"];\n }\n}));\nObject.defineProperty(exports, \"Transformers\", ({\n enumerable: true,\n get: function get() {\n return _transformers[\"default\"];\n }\n}));\nObject.defineProperty(exports, \"Utils\", ({\n enumerable: true,\n get: function get() {\n return _utils[\"default\"];\n }\n}));\nObject.defineProperty(exports, \"ValueSources\", ({\n enumerable: true,\n get: function get() {\n return _valueSources[\"default\"];\n }\n}));\nObject.defineProperty(exports, \"Widgets\", ({\n enumerable: true,\n get: function get() {\n return _widgets[\"default\"];\n }\n}));\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.array.is-array.js */ \"./node_modules/core-js/modules/es.array.is-array.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nvar _Formio = _interopRequireDefault(__webpack_require__(/*! ./Formio */ \"./lib/Formio.js\"));\nvar _components = _interopRequireDefault(__webpack_require__(/*! ./components */ \"./lib/components/index.js\"));\nvar _Builders = _interopRequireDefault(__webpack_require__(/*! ./builders/Builders */ \"./lib/builders/Builders.js\"));\nvar _Components = _interopRequireDefault(__webpack_require__(/*! ./components/Components */ \"./lib/components/Components.js\"));\nvar _Displays = _interopRequireDefault(__webpack_require__(/*! ./displays/Displays */ \"./lib/displays/Displays.js\"));\nvar _Templates = _interopRequireDefault(__webpack_require__(/*! ./templates/Templates */ \"./lib/templates/Templates.js\"));\nvar _providers = _interopRequireDefault(__webpack_require__(/*! ./providers */ \"./lib/providers/index.js\"));\nvar _Rules = _interopRequireDefault(__webpack_require__(/*! ./validator/Rules */ \"./lib/validator/Rules.js\"));\nvar _conjunctions = _interopRequireDefault(__webpack_require__(/*! ./validator/conjunctions */ \"./lib/validator/conjunctions/index.js\"));\nvar _operators = _interopRequireDefault(__webpack_require__(/*! ./validator/operators */ \"./lib/validator/operators/index.js\"));\nvar _quickRules = _interopRequireDefault(__webpack_require__(/*! ./validator/quickRules */ \"./lib/validator/quickRules/index.js\"));\nvar _transformers = _interopRequireDefault(__webpack_require__(/*! ./validator/transformers */ \"./lib/validator/transformers/index.js\"));\nvar _valueSources = _interopRequireDefault(__webpack_require__(/*! ./validator/valueSources */ \"./lib/validator/valueSources/index.js\"));\nvar _widgets = _interopRequireDefault(__webpack_require__(/*! ./widgets */ \"./lib/widgets/index.js\"));\nvar _Form = _interopRequireDefault(__webpack_require__(/*! ./Form */ \"./lib/Form.js\"));\nvar _utils = _interopRequireDefault(__webpack_require__(/*! ./utils */ \"./lib/utils/index.js\"));\nvar _Evaluator = _interopRequireDefault(__webpack_require__(/*! ./utils/Evaluator */ \"./lib/utils/Evaluator.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n_Formio[\"default\"].loadModules = function () {\n var path = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"\".concat(_Formio[\"default\"].getApiUrl(), \"/externalModules.js\");\n var name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'externalModules';\n _Formio[\"default\"].requireLibrary(name, name, path, true).then(function (modules) {\n _Formio[\"default\"].use(modules);\n });\n};\n\n// This is needed to maintain correct imports using the \"dist\" file.\n_Formio[\"default\"].Components = _Components[\"default\"];\n_Formio[\"default\"].Templates = _Templates[\"default\"];\n_Formio[\"default\"].Builders = _Builders[\"default\"];\n_Formio[\"default\"].Utils = _utils[\"default\"];\n_Formio[\"default\"].Form = _Form[\"default\"];\n_Formio[\"default\"].Displays = _Displays[\"default\"];\n_Formio[\"default\"].Providers = _providers[\"default\"];\n_Formio[\"default\"].Rules = _Rules[\"default\"];\n_Formio[\"default\"].Widgets = _widgets[\"default\"];\n_Formio[\"default\"].Evaluator = _Evaluator[\"default\"];\n_Formio[\"default\"].Conjunctions = _conjunctions[\"default\"];\n_Formio[\"default\"].Operators = _operators[\"default\"];\n_Formio[\"default\"].QuickRules = _quickRules[\"default\"];\n_Formio[\"default\"].Transformers = _transformers[\"default\"];\n_Formio[\"default\"].ValueSources = _valueSources[\"default\"];\n_Formio[\"default\"].AllComponents = _components[\"default\"];\n\n// This is strange, but is needed for \"premium\" components to import correctly.\n_Formio[\"default\"].Formio = _Formio[\"default\"];\n_Formio[\"default\"].Components.setComponents(_components[\"default\"]);\nvar registerPlugin = function registerPlugin(plugin) {\n // Sanity check.\n if (_typeof(plugin) !== 'object') {\n return;\n }\n for (var _i = 0, _Object$keys = Object.keys(plugin); _i < _Object$keys.length; _i++) {\n var key = _Object$keys[_i];\n var current = plugin.framework || _Formio[\"default\"].Templates.framework || 'bootstrap';\n switch (key) {\n case 'options':\n _Formio[\"default\"].options = _lodash[\"default\"].merge(_Formio[\"default\"].options, plugin.options);\n break;\n case 'templates':\n for (var _i2 = 0, _Object$keys2 = Object.keys(plugin.templates); _i2 < _Object$keys2.length; _i2++) {\n var framework = _Object$keys2[_i2];\n _Formio[\"default\"].Templates.extendTemplate(framework, plugin.templates[framework]);\n }\n if (plugin.templates[current]) {\n _Formio[\"default\"].Templates.current = plugin.templates[current];\n }\n break;\n case 'components':\n _Formio[\"default\"].Components.setComponents(plugin.components);\n break;\n case 'framework':\n _Formio[\"default\"].Templates.framework = plugin.framework;\n break;\n case 'fetch':\n for (var _i3 = 0, _Object$keys3 = Object.keys(plugin.fetch); _i3 < _Object$keys3.length; _i3++) {\n var name = _Object$keys3[_i3];\n _Formio[\"default\"].registerPlugin(plugin.fetch[name], name);\n }\n break;\n case 'providers':\n for (var _i4 = 0, _Object$keys4 = Object.keys(plugin.providers); _i4 < _Object$keys4.length; _i4++) {\n var type = _Object$keys4[_i4];\n _Formio[\"default\"].Providers.addProviders(type, plugin.providers[type]);\n }\n break;\n case 'displays':\n _Formio[\"default\"].Displays.addDisplays(plugin.displays);\n break;\n case 'builders':\n _Formio[\"default\"].Builders.addBuilders(plugin.builders);\n break;\n case 'rules':\n _Formio[\"default\"].Rules.addRules(plugin.rules);\n break;\n case 'evaluator':\n _Formio[\"default\"].Evaluator.registerEvaluator(plugin.evaluator);\n break;\n case 'conjunctions':\n _Formio[\"default\"].Conjunctions.addConjunctions(plugin.conjunctions);\n break;\n case 'operators':\n _Formio[\"default\"].Operators.addOperators(plugin.operators);\n break;\n case 'quickRules':\n _Formio[\"default\"].QuickRules.addQuickRules(plugin.quickRules);\n break;\n case 'transformers':\n _Formio[\"default\"].Transformers.addTransformers(plugin.transformers);\n break;\n case 'valueSources':\n _Formio[\"default\"].ValueSources.addValueSources(plugin.valueSources);\n break;\n default:\n console.log('Unknown plugin option', key);\n }\n }\n};\n\n/**\n * Allows passing in plugins as multiple arguments or an array of plugins.\n *\n * Formio.plugins(plugin1, plugin2, etc);\n * Formio.plugins([plugin1, plugin2, etc]);\n */\n_Formio[\"default\"].use = function () {\n for (var _len = arguments.length, plugins = new Array(_len), _key = 0; _key < _len; _key++) {\n plugins[_key] = arguments[_key];\n }\n plugins.forEach(function (plugin) {\n if (Array.isArray(plugin)) {\n plugin.forEach(function (p) {\n return registerPlugin(p);\n });\n } else {\n registerPlugin(plugin);\n }\n });\n};\n\n// Export the components.\n\n//# sourceURL=webpack://Formio/./lib/formio.form.js?"); /***/ }), @@ -2367,7 +2400,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _en = _interopRequireDefault(__webpack_require__(/*! ./translations/en */ \"./lib/translations/en.js\"));\n\nvar _utils = __webpack_require__(/*! ./utils/utils */ \"./lib/utils/utils.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n lng: 'en',\n nsSeparator: '::',\n keySeparator: '.|.',\n pluralSeparator: '._.',\n contextSeparator: '._.',\n resources: {\n en: {\n translation: (0, _utils.fastCloneDeep)(_en.default)\n }\n }\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/i18n.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _en = _interopRequireDefault(__webpack_require__(/*! ./translations/en */ \"./lib/translations/en.js\"));\nvar _utils = __webpack_require__(/*! ./utils/utils */ \"./lib/utils/utils.js\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n lng: 'en',\n nsSeparator: '::',\n keySeparator: '.|.',\n pluralSeparator: '._.',\n contextSeparator: '._.',\n resources: {\n en: {\n translation: (0, _utils.fastCloneDeep)(_en[\"default\"])\n }\n }\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/i18n.js?"); /***/ }), @@ -2378,7 +2411,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"Builders\", ({\n enumerable: true,\n get: function get() {\n return _formio.Builders;\n }\n}));\nObject.defineProperty(exports, \"Components\", ({\n enumerable: true,\n get: function get() {\n return _formio.Components;\n }\n}));\nObject.defineProperty(exports, \"Conjunctions\", ({\n enumerable: true,\n get: function get() {\n return _formio.Conjunctions;\n }\n}));\nObject.defineProperty(exports, \"Displays\", ({\n enumerable: true,\n get: function get() {\n return _formio.Displays;\n }\n}));\nObject.defineProperty(exports, \"Form\", ({\n enumerable: true,\n get: function get() {\n return _formio.Form;\n }\n}));\nObject.defineProperty(exports, \"FormBuilder\", ({\n enumerable: true,\n get: function get() {\n return _FormBuilder.default;\n }\n}));\nObject.defineProperty(exports, \"Formio\", ({\n enumerable: true,\n get: function get() {\n return _formio.Formio;\n }\n}));\nObject.defineProperty(exports, \"Operators\", ({\n enumerable: true,\n get: function get() {\n return _formio.Operators;\n }\n}));\nObject.defineProperty(exports, \"Providers\", ({\n enumerable: true,\n get: function get() {\n return _formio.Providers;\n }\n}));\nObject.defineProperty(exports, \"QuickRules\", ({\n enumerable: true,\n get: function get() {\n return _formio.QuickRules;\n }\n}));\nObject.defineProperty(exports, \"Rules\", ({\n enumerable: true,\n get: function get() {\n return _formio.Rules;\n }\n}));\nObject.defineProperty(exports, \"Templates\", ({\n enumerable: true,\n get: function get() {\n return _formio.Templates;\n }\n}));\nObject.defineProperty(exports, \"Transformers\", ({\n enumerable: true,\n get: function get() {\n return _formio.Transformers;\n }\n}));\nObject.defineProperty(exports, \"Utils\", ({\n enumerable: true,\n get: function get() {\n return _formio.Utils;\n }\n}));\nObject.defineProperty(exports, \"ValueSources\", ({\n enumerable: true,\n get: function get() {\n return _formio.ValueSources;\n }\n}));\nObject.defineProperty(exports, \"Widgets\", ({\n enumerable: true,\n get: function get() {\n return _formio.Widgets;\n }\n}));\n\nvar _formio = __webpack_require__(/*! ./formio.form */ \"./lib/formio.form.js\");\n\nvar _FormBuilder = _interopRequireDefault(__webpack_require__(/*! ./FormBuilder */ \"./lib/FormBuilder.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n//# sourceURL=webpack://Formio/./lib/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nObject.defineProperty(exports, \"Builders\", ({\n enumerable: true,\n get: function get() {\n return _formio.Builders;\n }\n}));\nObject.defineProperty(exports, \"Components\", ({\n enumerable: true,\n get: function get() {\n return _formio.Components;\n }\n}));\nObject.defineProperty(exports, \"Conjunctions\", ({\n enumerable: true,\n get: function get() {\n return _formio.Conjunctions;\n }\n}));\nObject.defineProperty(exports, \"Displays\", ({\n enumerable: true,\n get: function get() {\n return _formio.Displays;\n }\n}));\nObject.defineProperty(exports, \"Form\", ({\n enumerable: true,\n get: function get() {\n return _formio.Form;\n }\n}));\nObject.defineProperty(exports, \"FormBuilder\", ({\n enumerable: true,\n get: function get() {\n return _FormBuilder[\"default\"];\n }\n}));\nObject.defineProperty(exports, \"Formio\", ({\n enumerable: true,\n get: function get() {\n return _formio.Formio;\n }\n}));\nObject.defineProperty(exports, \"Operators\", ({\n enumerable: true,\n get: function get() {\n return _formio.Operators;\n }\n}));\nObject.defineProperty(exports, \"Providers\", ({\n enumerable: true,\n get: function get() {\n return _formio.Providers;\n }\n}));\nObject.defineProperty(exports, \"QuickRules\", ({\n enumerable: true,\n get: function get() {\n return _formio.QuickRules;\n }\n}));\nObject.defineProperty(exports, \"Rules\", ({\n enumerable: true,\n get: function get() {\n return _formio.Rules;\n }\n}));\nObject.defineProperty(exports, \"Templates\", ({\n enumerable: true,\n get: function get() {\n return _formio.Templates;\n }\n}));\nObject.defineProperty(exports, \"Transformers\", ({\n enumerable: true,\n get: function get() {\n return _formio.Transformers;\n }\n}));\nObject.defineProperty(exports, \"Utils\", ({\n enumerable: true,\n get: function get() {\n return _formio.Utils;\n }\n}));\nObject.defineProperty(exports, \"ValueSources\", ({\n enumerable: true,\n get: function get() {\n return _formio.ValueSources;\n }\n}));\nObject.defineProperty(exports, \"Widgets\", ({\n enumerable: true,\n get: function get() {\n return _formio.Widgets;\n }\n}));\nvar _formio = __webpack_require__(/*! ./formio.form */ \"./lib/formio.form.js\");\nvar _FormBuilder = _interopRequireDefault(__webpack_require__(/*! ./FormBuilder */ \"./lib/FormBuilder.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\n//# sourceURL=webpack://Formio/./lib/index.js?"); /***/ }), @@ -2389,7 +2422,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; -eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-getter.js */ \"./node_modules/core-js/modules/es.object.define-getter.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.define-setter.js */ \"./node_modules/core-js/modules/es.object.define-setter.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.split.js */ \"./node_modules/core-js/modules/es.string.split.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.join.js */ \"./node_modules/core-js/modules/es.array.join.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n// Using polyfill from https://developer.mozilla.org/en-US/docs/Web/API/Element/closest\n\n/* eslint-disable */\nif (typeof window !== 'undefined' && typeof window.document !== 'undefined') {\n if (!Element.prototype.matches) {\n Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;\n }\n\n if (!Element.prototype.closest) {\n Element.prototype.closest = function (s) {\n var el = this;\n\n do {\n if (el.matches(s)) return el;\n el = el.parentElement || el.parentNode;\n } while (el !== null && el.nodeType === 1);\n\n return null;\n };\n }\n} // Generated by https://polyfill.io/v3/\n\n/* Polyfill service v3.52.1\n * For detailed credits and licence information see https://github.com/financial-times/polyfill-service.\n *\n * Features requested: DOMTokenList\n *\n * - Object.defineProperty, License: CC0 (required by \"_DOMTokenList\", \"DOMTokenList\")\n * - _DOMTokenList, License: ISC (required by \"DOMTokenList\")\n * - DOMTokenList, License: CC0 */\n\n\n(function (self, undefined) {\n // Don't try to do polyfills outside of browser context.\n if (typeof document === 'undefined') {\n return;\n }\n\n if (!(\"defineProperty\" in Object && function () {\n try {\n var e = {};\n return Object.defineProperty(e, \"test\", {\n value: 42\n }), !0;\n } catch (t) {\n return !1;\n }\n }())) {\n // Object.defineProperty\n (function (nativeDefineProperty) {\n var supportsAccessors = Object.prototype.hasOwnProperty.call(Object.prototype, '__defineGetter__');\n var ERR_ACCESSORS_NOT_SUPPORTED = 'Getters & setters cannot be defined on this javascript engine';\n var ERR_VALUE_ACCESSORS = 'A property cannot both have accessors and be writable or have a value'; // Polyfill.io - This does not use CreateMethodProperty because our CreateMethodProperty function uses Object.defineProperty.\n\n Object.defineProperty = function defineProperty(object, property, descriptor) {\n // Where native support exists, assume it\n if (nativeDefineProperty && (object === window || object === document || object === Element.prototype || object instanceof Element)) {\n return nativeDefineProperty(object, property, descriptor);\n }\n\n if (object === null || !(object instanceof Object || _typeof(object) === 'object')) {\n throw new TypeError('Object.defineProperty called on non-object');\n }\n\n if (!(descriptor instanceof Object)) {\n throw new TypeError('Property description must be an object');\n }\n\n var propertyString = String(property);\n var hasValueOrWritable = 'value' in descriptor || 'writable' in descriptor;\n\n var getterType = 'get' in descriptor && _typeof(descriptor.get);\n\n var setterType = 'set' in descriptor && _typeof(descriptor.set); // handle descriptor.get\n\n\n if (getterType) {\n if (getterType !== 'function') {\n throw new TypeError('Getter must be a function');\n }\n\n if (!supportsAccessors) {\n throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);\n }\n\n if (hasValueOrWritable) {\n throw new TypeError(ERR_VALUE_ACCESSORS);\n }\n\n Object.__defineGetter__.call(object, propertyString, descriptor.get);\n } else {\n object[propertyString] = descriptor.value;\n } // handle descriptor.set\n\n\n if (setterType) {\n if (setterType !== 'function') {\n throw new TypeError('Setter must be a function');\n }\n\n if (!supportsAccessors) {\n throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);\n }\n\n if (hasValueOrWritable) {\n throw new TypeError(ERR_VALUE_ACCESSORS);\n }\n\n Object.__defineSetter__.call(object, propertyString, descriptor.set);\n } // OK to define value unconditionally - if a getter has been specified as well, an error would be thrown above\n\n\n if ('value' in descriptor) {\n object[propertyString] = descriptor.value;\n }\n\n return object;\n };\n })(Object.defineProperty);\n } // _DOMTokenList\n\n /*\n Copyright (c) 2016, John Gardner\n Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.\n THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n */\n\n\n var _DOMTokenList = function () {\n // eslint-disable-line no-unused-vars\n var dpSupport = true;\n\n var defineGetter = function defineGetter(object, name, fn, configurable) {\n if (Object.defineProperty) Object.defineProperty(object, name, {\n configurable: false === dpSupport ? true : !!configurable,\n get: fn\n });else object.__defineGetter__(name, fn);\n };\n /** Ensure the browser allows Object.defineProperty to be used on native JavaScript objects. */\n\n\n try {\n defineGetter({}, \"support\");\n } catch (e) {\n dpSupport = false;\n }\n\n var _DOMTokenList = function _DOMTokenList(el, prop) {\n var that = this;\n var tokens = [];\n var tokenMap = {};\n var length = 0;\n var maxLength = 0;\n\n var addIndexGetter = function addIndexGetter(i) {\n defineGetter(that, i, function () {\n preop();\n return tokens[i];\n }, false);\n };\n\n var reindex = function reindex() {\n /** Define getter functions for array-like access to the tokenList's contents. */\n if (length >= maxLength) for (; maxLength < length; ++maxLength) {\n addIndexGetter(maxLength);\n }\n };\n /** Helper function called at the start of each class method. Internal use only. */\n\n\n var preop = function preop() {\n var error;\n var i;\n var args = arguments;\n var rSpace = /\\s+/;\n /** Validate the token/s passed to an instance method, if any. */\n\n if (args.length) for (i = 0; i < args.length; ++i) {\n if (rSpace.test(args[i])) {\n error = new SyntaxError('String \"' + args[i] + '\" ' + \"contains\" + ' an invalid character');\n error.code = 5;\n error.name = \"InvalidCharacterError\";\n throw error;\n }\n }\n /** Split the new value apart by whitespace*/\n\n if (_typeof(el[prop]) === \"object\") {\n tokens = (\"\" + el[prop].baseVal).replace(/^\\s+|\\s+$/g, \"\").split(rSpace);\n } else {\n tokens = (\"\" + el[prop]).replace(/^\\s+|\\s+$/g, \"\").split(rSpace);\n }\n /** Avoid treating blank strings as single-item token lists */\n\n\n if (\"\" === tokens[0]) tokens = [];\n /** Repopulate the internal token lists */\n\n tokenMap = {};\n\n for (i = 0; i < tokens.length; ++i) {\n tokenMap[tokens[i]] = true;\n }\n\n length = tokens.length;\n reindex();\n };\n /** Populate our internal token list if the targeted attribute of the subject element isn't empty. */\n\n\n preop();\n /** Return the number of tokens in the underlying string. Read-only. */\n\n defineGetter(that, \"length\", function () {\n preop();\n return length;\n });\n /** Override the default toString/toLocaleString methods to return a space-delimited list of tokens when typecast. */\n\n that.toLocaleString = that.toString = function () {\n preop();\n return tokens.join(\" \");\n };\n\n that.item = function (idx) {\n preop();\n return tokens[idx];\n };\n\n that.contains = function (token) {\n preop();\n return !!tokenMap[token];\n };\n\n that.add = function () {\n preop.apply(that, args = arguments);\n\n for (var args, token, i = 0, l = args.length; i < l; ++i) {\n token = args[i];\n\n if (!tokenMap[token]) {\n tokens.push(token);\n tokenMap[token] = true;\n }\n }\n /** Update the targeted attribute of the attached element if the token list's changed. */\n\n\n if (length !== tokens.length) {\n length = tokens.length >>> 0;\n\n if (_typeof(el[prop]) === \"object\") {\n el[prop].baseVal = tokens.join(\" \");\n } else {\n el[prop] = tokens.join(\" \");\n }\n\n reindex();\n }\n };\n\n that.remove = function () {\n preop.apply(that, args = arguments);\n /** Build a hash of token names to compare against when recollecting our token list. */\n\n for (var args, ignore = {}, i = 0, t = []; i < args.length; ++i) {\n ignore[args[i]] = true;\n delete tokenMap[args[i]];\n }\n /** Run through our tokens list and reassign only those that aren't defined in the hash declared above. */\n\n\n for (i = 0; i < tokens.length; ++i) {\n if (!ignore[tokens[i]]) t.push(tokens[i]);\n }\n\n tokens = t;\n length = t.length >>> 0;\n /** Update the targeted attribute of the attached element. */\n\n if (_typeof(el[prop]) === \"object\") {\n el[prop].baseVal = tokens.join(\" \");\n } else {\n el[prop] = tokens.join(\" \");\n }\n\n reindex();\n };\n\n that.toggle = function (token, force) {\n preop.apply(that, [token]);\n /** Token state's being forced. */\n\n if (undefined !== force) {\n if (force) {\n that.add(token);\n return true;\n } else {\n that.remove(token);\n return false;\n }\n }\n /** Token already exists in tokenList. Remove it, and return FALSE. */\n\n\n if (tokenMap[token]) {\n that.remove(token);\n return false;\n }\n /** Otherwise, add the token and return TRUE. */\n\n\n that.add(token);\n return true;\n };\n\n return that;\n };\n\n return _DOMTokenList;\n }();\n\n if (!(\"DOMTokenList\" in self && function (e) {\n return !(\"classList\" in e) || !e.classList.toggle(\"x\", !1) && !e.className;\n }(document.createElement(\"x\")))) {\n // DOMTokenList\n\n /* global _DOMTokenList */\n (function (global) {\n var nativeImpl = \"DOMTokenList\" in global && global.DOMTokenList;\n\n if (!nativeImpl || !!document.createElementNS && !!document.createElementNS('http://www.w3.org/2000/svg', 'svg') && !(document.createElementNS(\"http://www.w3.org/2000/svg\", \"svg\").classList instanceof DOMTokenList)) {\n global.DOMTokenList = _DOMTokenList;\n } // Add second argument to native DOMTokenList.toggle() if necessary\n\n\n (function () {\n var e = document.createElement('span');\n if (!('classList' in e)) return;\n e.classList.toggle('x', false);\n if (!e.classList.contains('x')) return;\n\n e.classList.constructor.prototype.toggle = function toggle(token\n /*, force*/\n ) {\n var force = arguments[1];\n\n if (force === undefined) {\n var add = !this.contains(token);\n this[add ? 'add' : 'remove'](token);\n return add;\n }\n\n force = !!force;\n this[force ? 'add' : 'remove'](token);\n return force;\n };\n })(); // Add multiple arguments to native DOMTokenList.add() if necessary\n\n\n (function () {\n var e = document.createElement('span');\n if (!('classList' in e)) return;\n e.classList.add('a', 'b');\n if (e.classList.contains('b')) return;\n var native = e.classList.constructor.prototype.add;\n\n e.classList.constructor.prototype.add = function () {\n var args = arguments;\n var l = arguments.length;\n\n for (var i = 0; i < l; i++) {\n native.call(this, args[i]);\n }\n };\n })(); // Add multiple arguments to native DOMTokenList.remove() if necessary\n\n\n (function () {\n var e = document.createElement('span');\n if (!('classList' in e)) return;\n e.classList.add('a');\n e.classList.add('b');\n e.classList.remove('a', 'b');\n if (!e.classList.contains('b')) return;\n var native = e.classList.constructor.prototype.remove;\n\n e.classList.constructor.prototype.remove = function () {\n var args = arguments;\n var l = arguments.length;\n\n for (var i = 0; i < l; i++) {\n native.call(this, args[i]);\n }\n };\n })();\n })(self);\n }\n})('object' === (typeof window === \"undefined\" ? \"undefined\" : _typeof(window)) && window || 'object' === (typeof self === \"undefined\" ? \"undefined\" : _typeof(self)) && self || 'object' === (typeof __webpack_require__.g === \"undefined\" ? \"undefined\" : _typeof(__webpack_require__.g)) && __webpack_require__.g || {});\n\n//# sourceURL=webpack://Formio/./lib/polyfills/ElementPolyfill.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-getter.js */ \"./node_modules/core-js/modules/es.object.define-getter.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-setter.js */ \"./node_modules/core-js/modules/es.object.define-setter.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n__webpack_require__(/*! core-js/modules/es.string.split.js */ \"./node_modules/core-js/modules/es.string.split.js\");\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-string.js */ \"./node_modules/core-js/modules/es.date.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.array.join.js */ \"./node_modules/core-js/modules/es.array.join.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n// Using polyfill from https://developer.mozilla.org/en-US/docs/Web/API/Element/closest\n/* eslint-disable */\nif (typeof window !== 'undefined' && typeof window.document !== 'undefined') {\n if (!Element.prototype.matches) {\n Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;\n }\n if (!Element.prototype.closest) {\n Element.prototype.closest = function (s) {\n var el = this;\n do {\n if (el.matches(s)) return el;\n el = el.parentElement || el.parentNode;\n } while (el !== null && el.nodeType === 1);\n return null;\n };\n }\n}\n\n// Generated by https://polyfill.io/v3/\n/* Polyfill service v3.52.1\n * For detailed credits and licence information see https://github.com/financial-times/polyfill-service.\n *\n * Features requested: DOMTokenList\n *\n * - Object.defineProperty, License: CC0 (required by \"_DOMTokenList\", \"DOMTokenList\")\n * - _DOMTokenList, License: ISC (required by \"DOMTokenList\")\n * - DOMTokenList, License: CC0 */\n\n(function (self, undefined) {\n // Don't try to do polyfills outside of browser context.\n if (typeof document === 'undefined') {\n return;\n }\n if (!(\"defineProperty\" in Object && function () {\n try {\n var e = {};\n return Object.defineProperty(e, \"test\", {\n value: 42\n }), !0;\n } catch (t) {\n return !1;\n }\n }())) {\n // Object.defineProperty\n (function (nativeDefineProperty) {\n var supportsAccessors = Object.prototype.hasOwnProperty.call(Object.prototype, '__defineGetter__');\n var ERR_ACCESSORS_NOT_SUPPORTED = 'Getters & setters cannot be defined on this javascript engine';\n var ERR_VALUE_ACCESSORS = 'A property cannot both have accessors and be writable or have a value';\n\n // Polyfill.io - This does not use CreateMethodProperty because our CreateMethodProperty function uses Object.defineProperty.\n Object.defineProperty = function defineProperty(object, property, descriptor) {\n // Where native support exists, assume it\n if (nativeDefineProperty && (object === window || object === document || object === Element.prototype || object instanceof Element)) {\n return nativeDefineProperty(object, property, descriptor);\n }\n if (object === null || !(object instanceof Object || _typeof(object) === 'object')) {\n throw new TypeError('Object.defineProperty called on non-object');\n }\n if (!(descriptor instanceof Object)) {\n throw new TypeError('Property description must be an object');\n }\n var propertyString = String(property);\n var hasValueOrWritable = 'value' in descriptor || 'writable' in descriptor;\n var getterType = 'get' in descriptor && _typeof(descriptor.get);\n var setterType = 'set' in descriptor && _typeof(descriptor.set);\n\n // handle descriptor.get\n if (getterType) {\n if (getterType !== 'function') {\n throw new TypeError('Getter must be a function');\n }\n if (!supportsAccessors) {\n throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);\n }\n if (hasValueOrWritable) {\n throw new TypeError(ERR_VALUE_ACCESSORS);\n }\n Object.__defineGetter__.call(object, propertyString, descriptor.get);\n } else {\n object[propertyString] = descriptor.value;\n }\n\n // handle descriptor.set\n if (setterType) {\n if (setterType !== 'function') {\n throw new TypeError('Setter must be a function');\n }\n if (!supportsAccessors) {\n throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);\n }\n if (hasValueOrWritable) {\n throw new TypeError(ERR_VALUE_ACCESSORS);\n }\n Object.__defineSetter__.call(object, propertyString, descriptor.set);\n }\n\n // OK to define value unconditionally - if a getter has been specified as well, an error would be thrown above\n if ('value' in descriptor) {\n object[propertyString] = descriptor.value;\n }\n return object;\n };\n })(Object.defineProperty);\n }\n\n // _DOMTokenList\n /*\n Copyright (c) 2016, John Gardner\n Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.\n THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n */\n var _DOMTokenList = function () {\n // eslint-disable-line no-unused-vars\n var dpSupport = true;\n var defineGetter = function defineGetter(object, name, fn, configurable) {\n if (Object.defineProperty) Object.defineProperty(object, name, {\n configurable: false === dpSupport ? true : !!configurable,\n get: fn\n });else object.__defineGetter__(name, fn);\n };\n\n /** Ensure the browser allows Object.defineProperty to be used on native JavaScript objects. */\n try {\n defineGetter({}, \"support\");\n } catch (e) {\n dpSupport = false;\n }\n var _DOMTokenList = function _DOMTokenList(el, prop) {\n var that = this;\n var tokens = [];\n var tokenMap = {};\n var length = 0;\n var maxLength = 0;\n var addIndexGetter = function addIndexGetter(i) {\n defineGetter(that, i, function () {\n preop();\n return tokens[i];\n }, false);\n };\n var reindex = function reindex() {\n /** Define getter functions for array-like access to the tokenList's contents. */\n if (length >= maxLength) for (; maxLength < length; ++maxLength) {\n addIndexGetter(maxLength);\n }\n };\n\n /** Helper function called at the start of each class method. Internal use only. */\n var preop = function preop() {\n var error;\n var i;\n var args = arguments;\n var rSpace = /\\s+/;\n\n /** Validate the token/s passed to an instance method, if any. */\n if (args.length) for (i = 0; i < args.length; ++i) {\n if (rSpace.test(args[i])) {\n error = new SyntaxError('String \"' + args[i] + '\" ' + \"contains\" + ' an invalid character');\n error.code = 5;\n error.name = \"InvalidCharacterError\";\n throw error;\n }\n }\n\n /** Split the new value apart by whitespace*/\n if (_typeof(el[prop]) === \"object\") {\n tokens = (\"\" + el[prop].baseVal).replace(/^\\s+|\\s+$/g, \"\").split(rSpace);\n } else {\n tokens = (\"\" + el[prop]).replace(/^\\s+|\\s+$/g, \"\").split(rSpace);\n }\n\n /** Avoid treating blank strings as single-item token lists */\n if (\"\" === tokens[0]) tokens = [];\n\n /** Repopulate the internal token lists */\n tokenMap = {};\n for (i = 0; i < tokens.length; ++i) {\n tokenMap[tokens[i]] = true;\n }\n length = tokens.length;\n reindex();\n };\n\n /** Populate our internal token list if the targeted attribute of the subject element isn't empty. */\n preop();\n\n /** Return the number of tokens in the underlying string. Read-only. */\n defineGetter(that, \"length\", function () {\n preop();\n return length;\n });\n\n /** Override the default toString/toLocaleString methods to return a space-delimited list of tokens when typecast. */\n that.toLocaleString = that.toString = function () {\n preop();\n return tokens.join(\" \");\n };\n that.item = function (idx) {\n preop();\n return tokens[idx];\n };\n that.contains = function (token) {\n preop();\n return !!tokenMap[token];\n };\n that.add = function () {\n preop.apply(that, args = arguments);\n for (var args, token, i = 0, l = args.length; i < l; ++i) {\n token = args[i];\n if (!tokenMap[token]) {\n tokens.push(token);\n tokenMap[token] = true;\n }\n }\n\n /** Update the targeted attribute of the attached element if the token list's changed. */\n if (length !== tokens.length) {\n length = tokens.length >>> 0;\n if (_typeof(el[prop]) === \"object\") {\n el[prop].baseVal = tokens.join(\" \");\n } else {\n el[prop] = tokens.join(\" \");\n }\n reindex();\n }\n };\n that.remove = function () {\n preop.apply(that, args = arguments);\n\n /** Build a hash of token names to compare against when recollecting our token list. */\n for (var args, ignore = {}, i = 0, t = []; i < args.length; ++i) {\n ignore[args[i]] = true;\n delete tokenMap[args[i]];\n }\n\n /** Run through our tokens list and reassign only those that aren't defined in the hash declared above. */\n for (i = 0; i < tokens.length; ++i) {\n if (!ignore[tokens[i]]) t.push(tokens[i]);\n }\n tokens = t;\n length = t.length >>> 0;\n\n /** Update the targeted attribute of the attached element. */\n if (_typeof(el[prop]) === \"object\") {\n el[prop].baseVal = tokens.join(\" \");\n } else {\n el[prop] = tokens.join(\" \");\n }\n reindex();\n };\n that.toggle = function (token, force) {\n preop.apply(that, [token]);\n\n /** Token state's being forced. */\n if (undefined !== force) {\n if (force) {\n that.add(token);\n return true;\n } else {\n that.remove(token);\n return false;\n }\n }\n\n /** Token already exists in tokenList. Remove it, and return FALSE. */\n if (tokenMap[token]) {\n that.remove(token);\n return false;\n }\n\n /** Otherwise, add the token and return TRUE. */\n that.add(token);\n return true;\n };\n return that;\n };\n return _DOMTokenList;\n }();\n if (!(\"DOMTokenList\" in self && function (e) {\n return !(\"classList\" in e) || !e.classList.toggle(\"x\", !1) && !e.className;\n }(document.createElement(\"x\")))) {\n // DOMTokenList\n /* global _DOMTokenList */\n (function (global) {\n var nativeImpl = \"DOMTokenList\" in global && global.DOMTokenList;\n if (!nativeImpl || !!document.createElementNS && !!document.createElementNS('http://www.w3.org/2000/svg', 'svg') && !(document.createElementNS(\"http://www.w3.org/2000/svg\", \"svg\").classList instanceof DOMTokenList)) {\n global.DOMTokenList = _DOMTokenList;\n }\n\n // Add second argument to native DOMTokenList.toggle() if necessary\n (function () {\n var e = document.createElement('span');\n if (!('classList' in e)) return;\n e.classList.toggle('x', false);\n if (!e.classList.contains('x')) return;\n e.classList.constructor.prototype.toggle = function toggle(token /*, force*/) {\n var force = arguments[1];\n if (force === undefined) {\n var add = !this.contains(token);\n this[add ? 'add' : 'remove'](token);\n return add;\n }\n force = !!force;\n this[force ? 'add' : 'remove'](token);\n return force;\n };\n })();\n\n // Add multiple arguments to native DOMTokenList.add() if necessary\n (function () {\n var e = document.createElement('span');\n if (!('classList' in e)) return;\n e.classList.add('a', 'b');\n if (e.classList.contains('b')) return;\n var _native = e.classList.constructor.prototype.add;\n e.classList.constructor.prototype.add = function () {\n var args = arguments;\n var l = arguments.length;\n for (var i = 0; i < l; i++) {\n _native.call(this, args[i]);\n }\n };\n })();\n\n // Add multiple arguments to native DOMTokenList.remove() if necessary\n (function () {\n var e = document.createElement('span');\n if (!('classList' in e)) return;\n e.classList.add('a');\n e.classList.add('b');\n e.classList.remove('a', 'b');\n if (!e.classList.contains('b')) return;\n var _native2 = e.classList.constructor.prototype.remove;\n e.classList.constructor.prototype.remove = function () {\n var args = arguments;\n var l = arguments.length;\n for (var i = 0; i < l; i++) {\n _native2.call(this, args[i]);\n }\n };\n })();\n })(self);\n }\n})('object' === (typeof window === \"undefined\" ? \"undefined\" : _typeof(window)) && window || 'object' === (typeof self === \"undefined\" ? \"undefined\" : _typeof(self)) && self || 'object' === (typeof __webpack_require__.g === \"undefined\" ? \"undefined\" : _typeof(__webpack_require__.g)) && __webpack_require__.g || {});\n\n//# sourceURL=webpack://Formio/./lib/polyfills/ElementPolyfill.js?"); /***/ }), @@ -2400,7 +2433,7 @@ eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-getter.js */ /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; -eval("\n\n__webpack_require__(/*! custom-event-polyfill */ \"./node_modules/custom-event-polyfill/polyfill.js\");\n\n__webpack_require__(/*! ./ElementPolyfill */ \"./lib/polyfills/ElementPolyfill.js\");\n\n//# sourceURL=webpack://Formio/./lib/polyfills/index.js?"); +eval("\n\n__webpack_require__(/*! custom-event-polyfill */ \"./node_modules/custom-event-polyfill/polyfill.js\");\n__webpack_require__(/*! ./ElementPolyfill */ \"./lib/polyfills/ElementPolyfill.js\");\n\n//# sourceURL=webpack://Formio/./lib/polyfills/index.js?"); /***/ }), @@ -2411,7 +2444,7 @@ eval("\n\n__webpack_require__(/*! custom-event-polyfill */ \"./node_modules/cust /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nvar _address = _interopRequireDefault(__webpack_require__(/*! ./address */ \"./lib/providers/address/index.js\"));\n\nvar _auth = _interopRequireDefault(__webpack_require__(/*! ./auth */ \"./lib/providers/auth/index.js\"));\n\nvar _storage = _interopRequireDefault(__webpack_require__(/*! ./storage */ \"./lib/providers/storage/index.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar Providers = /*#__PURE__*/function () {\n function Providers() {\n _classCallCheck(this, Providers);\n }\n\n _createClass(Providers, null, [{\n key: \"addProvider\",\n value: function addProvider(type, name, provider) {\n Providers.providers[type] = Providers.providers[type] || {};\n Providers.providers[type][name] = provider;\n }\n }, {\n key: \"addProviders\",\n value: function addProviders(type, providers) {\n Providers.providers[type] = _lodash.default.merge(Providers.providers[type], providers);\n }\n }, {\n key: \"getProvider\",\n value: function getProvider(type, name) {\n if (Providers.providers[type] && Providers.providers[type][name]) {\n return Providers.providers[type][name];\n }\n }\n }, {\n key: \"getProviders\",\n value: function getProviders(type) {\n if (Providers.providers[type]) {\n return Providers.providers[type];\n }\n }\n }]);\n\n return Providers;\n}();\n\nexports[\"default\"] = Providers;\n\n_defineProperty(Providers, \"providers\", {\n address: _address.default,\n auth: _auth.default,\n storage: _storage.default\n});\n\n//# sourceURL=webpack://Formio/./lib/providers/Providers.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nvar _address = _interopRequireDefault(__webpack_require__(/*! ./address */ \"./lib/providers/address/index.js\"));\nvar _auth = _interopRequireDefault(__webpack_require__(/*! ./auth */ \"./lib/providers/auth/index.js\"));\nvar _storage = _interopRequireDefault(__webpack_require__(/*! ./storage */ \"./lib/providers/storage/index.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar Providers = /*#__PURE__*/function () {\n function Providers() {\n _classCallCheck(this, Providers);\n }\n _createClass(Providers, null, [{\n key: \"addProvider\",\n value: function addProvider(type, name, provider) {\n Providers.providers[type] = Providers.providers[type] || {};\n Providers.providers[type][name] = provider;\n }\n }, {\n key: \"addProviders\",\n value: function addProviders(type, providers) {\n Providers.providers[type] = _lodash[\"default\"].merge(Providers.providers[type], providers);\n }\n }, {\n key: \"getProvider\",\n value: function getProvider(type, name) {\n if (Providers.providers[type] && Providers.providers[type][name]) {\n return Providers.providers[type][name];\n }\n }\n }, {\n key: \"getProviders\",\n value: function getProviders(type) {\n if (Providers.providers[type]) {\n return Providers.providers[type];\n }\n }\n }]);\n return Providers;\n}();\nexports[\"default\"] = Providers;\n_defineProperty(Providers, \"providers\", {\n address: _address[\"default\"],\n auth: _auth[\"default\"],\n storage: _storage[\"default\"]\n});\n\n//# sourceURL=webpack://Formio/./lib/providers/Providers.js?"); /***/ }), @@ -2422,7 +2455,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.slice.js */ \"./node_modules/core-js/modules/es.array.slice.js\");\n\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.from.js */ \"./node_modules/core-js/modules/es.array.from.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.AddressProvider = void 0;\n\n__webpack_require__(/*! core-js/modules/es.array.join.js */ \"./node_modules/core-js/modules/es.array.join.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nvar _Formio = __webpack_require__(/*! ../../Formio */ \"./lib/Formio.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { 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\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nvar AddressProvider = /*#__PURE__*/function () {\n function AddressProvider() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n _classCallCheck(this, AddressProvider);\n\n this.beforeMergeOptions(options);\n this.options = _lodash.default.merge({}, this.defaultOptions, options);\n }\n\n _createClass(AddressProvider, [{\n key: \"beforeMergeOptions\",\n value: function beforeMergeOptions() {\n return;\n }\n }, {\n key: \"defaultOptions\",\n get: function get() {\n return {};\n }\n }, {\n key: \"queryProperty\",\n get: function get() {\n return 'query';\n }\n }, {\n key: \"responseProperty\",\n get: function get() {\n return null;\n }\n }, {\n key: \"displayValueProperty\",\n get: function get() {\n return null;\n }\n }, {\n key: \"serialize\",\n value: function serialize(params) {\n return _lodash.default.toPairs(params).map(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n key = _ref2[0],\n value = _ref2[1];\n\n return \"\".concat(encodeURIComponent(key), \"=\").concat(encodeURIComponent(value));\n }).join('&');\n }\n }, {\n key: \"getRequestOptions\",\n value: function getRequestOptions() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n return _lodash.default.merge({}, this.options, options);\n } // eslint-disable-next-line no-unused-vars\n\n }, {\n key: \"getRequestUrl\",\n value: function getRequestUrl() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n throw new Error('Method AddressProvider#getRequestUrl(options) is abstract.');\n }\n }, {\n key: \"makeRequest\",\n value: function makeRequest() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n return _Formio.GlobalFormio.makeStaticRequest(this.getRequestUrl(options), 'GET', null, {\n noToken: true\n });\n }\n }, {\n key: \"search\",\n value: function search(query) {\n var _this = this;\n\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var requestOptions = this.getRequestOptions(options);\n var params = requestOptions.params = requestOptions.params || {};\n params[this.queryProperty] = query;\n return this.makeRequest(requestOptions).then(function (result) {\n return _this.responseProperty ? _lodash.default.get(result, _this.responseProperty, []) : result;\n });\n }\n }, {\n key: \"getDisplayValue\",\n value: function getDisplayValue(address) {\n return this.displayValueProperty ? _lodash.default.get(address, this.displayValueProperty, '') : String(address);\n }\n }], [{\n key: \"name\",\n get: function get() {\n return 'address';\n }\n }, {\n key: \"displayName\",\n get: function get() {\n return 'Address';\n }\n }]);\n\n return AddressProvider;\n}();\n\nexports.AddressProvider = AddressProvider;\n\n//# sourceURL=webpack://Formio/./lib/providers/address/AddressProvider.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.array.is-array.js */ \"./node_modules/core-js/modules/es.array.is-array.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.slice.js */ \"./node_modules/core-js/modules/es.array.slice.js\");\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n__webpack_require__(/*! core-js/modules/es.array.from.js */ \"./node_modules/core-js/modules/es.array.from.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.AddressProvider = void 0;\n__webpack_require__(/*! core-js/modules/es.array.join.js */ \"./node_modules/core-js/modules/es.array.join.js\");\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nvar _Formio = __webpack_require__(/*! ../../Formio */ \"./lib/Formio.js\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\nfunction _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : \"undefined\" != typeof Symbol && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) { ; } } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i[\"return\"] && (_r = _i[\"return\"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar AddressProvider = /*#__PURE__*/function () {\n function AddressProvider() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n _classCallCheck(this, AddressProvider);\n this.beforeMergeOptions(options);\n this.options = _lodash[\"default\"].merge({}, this.defaultOptions, options);\n }\n _createClass(AddressProvider, [{\n key: \"beforeMergeOptions\",\n value: function beforeMergeOptions() {\n return;\n }\n }, {\n key: \"defaultOptions\",\n get: function get() {\n return {};\n }\n }, {\n key: \"queryProperty\",\n get: function get() {\n return 'query';\n }\n }, {\n key: \"responseProperty\",\n get: function get() {\n return null;\n }\n }, {\n key: \"displayValueProperty\",\n get: function get() {\n return null;\n }\n }, {\n key: \"serialize\",\n value: function serialize(params) {\n return _lodash[\"default\"].toPairs(params).map(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n key = _ref2[0],\n value = _ref2[1];\n return \"\".concat(encodeURIComponent(key), \"=\").concat(encodeURIComponent(value));\n }).join('&');\n }\n }, {\n key: \"getRequestOptions\",\n value: function getRequestOptions() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n return _lodash[\"default\"].merge({}, this.options, options);\n }\n\n // eslint-disable-next-line no-unused-vars\n }, {\n key: \"getRequestUrl\",\n value: function getRequestUrl() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n throw new Error('Method AddressProvider#getRequestUrl(options) is abstract.');\n }\n }, {\n key: \"makeRequest\",\n value: function makeRequest() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n return _Formio.GlobalFormio.makeStaticRequest(this.getRequestUrl(options), 'GET', null, {\n noToken: true\n });\n }\n }, {\n key: \"search\",\n value: function search(query) {\n var _this = this;\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var requestOptions = this.getRequestOptions(options);\n var params = requestOptions.params = requestOptions.params || {};\n params[this.queryProperty] = query;\n return this.makeRequest(requestOptions).then(function (result) {\n return _this.responseProperty ? _lodash[\"default\"].get(result, _this.responseProperty, []) : result;\n });\n }\n }, {\n key: \"getDisplayValue\",\n value: function getDisplayValue(address) {\n return this.displayValueProperty ? _lodash[\"default\"].get(address, this.displayValueProperty, '') : String(address);\n }\n }], [{\n key: \"name\",\n get: function get() {\n return 'address';\n }\n }, {\n key: \"displayName\",\n get: function get() {\n return 'Address';\n }\n }]);\n return AddressProvider;\n}();\nexports.AddressProvider = AddressProvider;\n\n//# sourceURL=webpack://Formio/./lib/providers/address/AddressProvider.js?"); /***/ }), @@ -2433,7 +2466,7 @@ eval("\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modul /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.AzureAddressProvider = void 0;\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\nvar _AddressProvider2 = __webpack_require__(/*! ./AddressProvider */ \"./lib/providers/address/AddressProvider.js\");\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar AzureAddressProvider = /*#__PURE__*/function (_AddressProvider) {\n _inherits(AzureAddressProvider, _AddressProvider);\n\n var _super = _createSuper(AzureAddressProvider);\n\n function AzureAddressProvider() {\n _classCallCheck(this, AzureAddressProvider);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(AzureAddressProvider, [{\n key: \"defaultOptions\",\n get: function get() {\n return {\n params: {\n 'api-version': '1.0',\n typeahead: 'true'\n }\n };\n }\n }, {\n key: \"responseProperty\",\n get: function get() {\n return 'results';\n }\n }, {\n key: \"displayValueProperty\",\n get: function get() {\n return 'address.freeformAddress';\n }\n }, {\n key: \"getRequestUrl\",\n value: function getRequestUrl() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var params = options.params;\n return \"https://atlas.microsoft.com/search/address/json?\".concat(this.serialize(params));\n }\n }], [{\n key: \"name\",\n get: function get() {\n return 'azure';\n }\n }, {\n key: \"displayName\",\n get: function get() {\n return 'Azure Maps';\n }\n }]);\n\n return AzureAddressProvider;\n}(_AddressProvider2.AddressProvider);\n\nexports.AzureAddressProvider = AzureAddressProvider;\n\n//# sourceURL=webpack://Formio/./lib/providers/address/AzureAddressProvider.js?"); +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.AzureAddressProvider = void 0;\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _AddressProvider2 = __webpack_require__(/*! ./AddressProvider */ \"./lib/providers/address/AddressProvider.js\");\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar AzureAddressProvider = /*#__PURE__*/function (_AddressProvider) {\n _inherits(AzureAddressProvider, _AddressProvider);\n var _super = _createSuper(AzureAddressProvider);\n function AzureAddressProvider() {\n _classCallCheck(this, AzureAddressProvider);\n return _super.apply(this, arguments);\n }\n _createClass(AzureAddressProvider, [{\n key: \"defaultOptions\",\n get: function get() {\n return {\n params: {\n 'api-version': '1.0',\n typeahead: 'true'\n }\n };\n }\n }, {\n key: \"responseProperty\",\n get: function get() {\n return 'results';\n }\n }, {\n key: \"displayValueProperty\",\n get: function get() {\n return 'address.freeformAddress';\n }\n }, {\n key: \"getRequestUrl\",\n value: function getRequestUrl() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var params = options.params;\n return \"https://atlas.microsoft.com/search/address/json?\".concat(this.serialize(params));\n }\n }], [{\n key: \"name\",\n get: function get() {\n return 'azure';\n }\n }, {\n key: \"displayName\",\n get: function get() {\n return 'Azure Maps';\n }\n }]);\n return AzureAddressProvider;\n}(_AddressProvider2.AddressProvider);\nexports.AzureAddressProvider = AzureAddressProvider;\n\n//# sourceURL=webpack://Formio/./lib/providers/address/AzureAddressProvider.js?"); /***/ }), @@ -2444,7 +2477,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.CustomAddressProvider = void 0;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\nvar _AddressProvider2 = __webpack_require__(/*! ./AddressProvider */ \"./lib/providers/address/AddressProvider.js\");\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar CustomAddressProvider = /*#__PURE__*/function (_AddressProvider) {\n _inherits(CustomAddressProvider, _AddressProvider);\n\n var _super = _createSuper(CustomAddressProvider);\n\n function CustomAddressProvider() {\n _classCallCheck(this, CustomAddressProvider);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(CustomAddressProvider, [{\n key: \"queryProperty\",\n get: function get() {\n return this.options.queryProperty || _get(_getPrototypeOf(CustomAddressProvider.prototype), \"queryProperty\", this);\n }\n }, {\n key: \"responseProperty\",\n get: function get() {\n return this.options.responseProperty || _get(_getPrototypeOf(CustomAddressProvider.prototype), \"responseProperty\", this);\n }\n }, {\n key: \"displayValueProperty\",\n get: function get() {\n return this.options.displayValueProperty || _get(_getPrototypeOf(CustomAddressProvider.prototype), \"displayValueProperty\", this);\n }\n }, {\n key: \"getRequestUrl\",\n value: function getRequestUrl() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var params = options.params,\n url = options.url;\n return \"\".concat(url, \"?\").concat(this.serialize(params));\n }\n }], [{\n key: \"name\",\n get: function get() {\n return 'custom';\n }\n }, {\n key: \"displayName\",\n get: function get() {\n return 'Custom';\n }\n }]);\n\n return CustomAddressProvider;\n}(_AddressProvider2.AddressProvider);\n\nexports.CustomAddressProvider = CustomAddressProvider;\n\n//# sourceURL=webpack://Formio/./lib/providers/address/CustomAddressProvider.js?"); +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.CustomAddressProvider = void 0;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _AddressProvider2 = __webpack_require__(/*! ./AddressProvider */ \"./lib/providers/address/AddressProvider.js\");\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar CustomAddressProvider = /*#__PURE__*/function (_AddressProvider) {\n _inherits(CustomAddressProvider, _AddressProvider);\n var _super = _createSuper(CustomAddressProvider);\n function CustomAddressProvider() {\n _classCallCheck(this, CustomAddressProvider);\n return _super.apply(this, arguments);\n }\n _createClass(CustomAddressProvider, [{\n key: \"queryProperty\",\n get: function get() {\n return this.options.queryProperty || _get(_getPrototypeOf(CustomAddressProvider.prototype), \"queryProperty\", this);\n }\n }, {\n key: \"responseProperty\",\n get: function get() {\n return this.options.responseProperty || _get(_getPrototypeOf(CustomAddressProvider.prototype), \"responseProperty\", this);\n }\n }, {\n key: \"displayValueProperty\",\n get: function get() {\n return this.options.displayValueProperty || _get(_getPrototypeOf(CustomAddressProvider.prototype), \"displayValueProperty\", this);\n }\n }, {\n key: \"getRequestUrl\",\n value: function getRequestUrl() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var params = options.params,\n url = options.url;\n return \"\".concat(url, \"?\").concat(this.serialize(params));\n }\n }], [{\n key: \"name\",\n get: function get() {\n return 'custom';\n }\n }, {\n key: \"displayName\",\n get: function get() {\n return 'Custom';\n }\n }]);\n return CustomAddressProvider;\n}(_AddressProvider2.AddressProvider);\nexports.CustomAddressProvider = CustomAddressProvider;\n\n//# sourceURL=webpack://Formio/./lib/providers/address/CustomAddressProvider.js?"); /***/ }), @@ -2455,7 +2488,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.GoogleAddressProvider = void 0;\n\n__webpack_require__(/*! core-js/modules/es.string.trim.js */ \"./node_modules/core-js/modules/es.string.trim.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\nvar _Formio = __webpack_require__(/*! ../../Formio */ \"./lib/Formio.js\");\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nvar _AddressProvider2 = __webpack_require__(/*! ./AddressProvider */ \"./lib/providers/address/AddressProvider.js\");\n\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar GoogleAddressProvider = /*#__PURE__*/function (_AddressProvider) {\n _inherits(GoogleAddressProvider, _AddressProvider);\n\n var _super = _createSuper(GoogleAddressProvider);\n\n function GoogleAddressProvider() {\n var _options$params;\n\n var _this;\n\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n _classCallCheck(this, GoogleAddressProvider);\n\n _this = _super.call(this, options);\n\n _this.setAutocompleteOptions();\n\n var src = 'https://maps.googleapis.com/maps/api/js?v=quarterly&libraries=places&callback=googleMapsCallback';\n\n if ((_options$params = options.params) !== null && _options$params !== void 0 && _options$params.key) {\n src += \"&key=\".concat(options.params.key);\n }\n\n _Formio.GlobalFormio.requireLibrary(_this.getLibraryName(), 'google.maps.places', src);\n\n return _this;\n }\n\n _createClass(GoogleAddressProvider, [{\n key: \"displayValueProperty\",\n get: function get() {\n return 'formattedPlace';\n }\n }, {\n key: \"alternativeDisplayValueProperty\",\n get: function get() {\n return 'formatted_address';\n }\n }, {\n key: \"autocompleteOptions\",\n get: function get() {\n return this._autocompleteOptions;\n },\n set: function set(options) {\n this._autocompleteOptions = options;\n }\n }, {\n key: \"setAutocompleteOptions\",\n value: function setAutocompleteOptions() {\n var options = _lodash.default.get(this.options, 'params.autocompleteOptions', {});\n\n if (!_lodash.default.isObject(options)) {\n options = {};\n }\n\n this.addRequiredProviderOptions(options);\n this.autocompleteOptions = options;\n }\n }, {\n key: \"beforeMergeOptions\",\n value: function beforeMergeOptions(options) {\n // providing support of old Google Provider option\n this.convertRegionToAutocompleteOption(options);\n }\n }, {\n key: \"getLibraryName\",\n value: function getLibraryName() {\n return 'googleMaps';\n }\n }, {\n key: \"convertRegionToAutocompleteOption\",\n value: function convertRegionToAutocompleteOption(options) {\n var providerOptions = options;\n\n var region = _lodash.default.get(providerOptions, 'params.region', '');\n\n if (region && !_lodash.default.has(options, 'params.autocompleteOptions')) {\n region = region.toUpperCase().trim(); // providing compatibility with ISO 3166-1 Alpha-2 county codes (for checking compatibility https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes)\n\n var countryCodes = {\n 'UK': 'GB'\n };\n\n if (countryCodes[region]) {\n region = countryCodes[region];\n }\n\n _lodash.default.set(providerOptions, 'params.autocompleteOptions.componentRestrictions.country', [region]);\n }\n }\n }, {\n key: \"getRequiredAddressProperties\",\n value: function getRequiredAddressProperties() {\n return ['address_components', 'formatted_address', 'geometry', 'place_id', 'plus_code', 'types'];\n }\n }, {\n key: \"addRequiredProviderOptions\",\n value: function addRequiredProviderOptions(options) {\n var addressProperties = this.getRequiredAddressProperties();\n\n if (_lodash.default.isArray(options.fields) && options.fields.length > 0) {\n options.fields.forEach(function (optionalField) {\n if (!addressProperties.some(function (addressProp) {\n return optionalField === addressProp;\n })) {\n addressProperties.push(optionalField);\n }\n });\n }\n\n options.fields = addressProperties;\n }\n }, {\n key: \"filterPlace\",\n value: function filterPlace(place) {\n place = place || {};\n var filteredPlace = {};\n\n if (this.autocompleteOptions) {\n this.autocompleteOptions.fields.forEach(function (field) {\n if (place[field]) {\n filteredPlace[field] = place[field];\n }\n });\n }\n\n return filteredPlace;\n }\n }, {\n key: \"attachAutocomplete\",\n value: function attachAutocomplete(elem, index, onSelectAddress) {\n var _this2 = this;\n\n _Formio.GlobalFormio.libraryReady(this.getLibraryName()).then(function () {\n var autocomplete = new google.maps.places.Autocomplete(elem, _this2.autocompleteOptions);\n autocomplete.addListener('place_changed', function () {\n var place = _this2.filterPlace(autocomplete.getPlace());\n\n place.formattedPlace = _lodash.default.get(autocomplete, 'gm_accessors_.place.se.formattedPrediction', place[_this2.alternativeDisplayValueProperty]);\n onSelectAddress(place, elem, index);\n });\n });\n }\n }, {\n key: \"search\",\n value: function search() {\n return _nativePromiseOnly.default.resolve();\n }\n }, {\n key: \"makeRequest\",\n value: function makeRequest() {\n return _nativePromiseOnly.default.resolve();\n }\n }, {\n key: \"getDisplayValue\",\n value: function getDisplayValue(address) {\n var displayedProperty = _lodash.default.has(address, this.displayValueProperty) ? this.displayValueProperty : this.alternativeDisplayValueProperty;\n return _lodash.default.get(address, displayedProperty, '');\n }\n }], [{\n key: \"name\",\n get: function get() {\n return 'google';\n }\n }, {\n key: \"displayName\",\n get: function get() {\n return 'Google Maps';\n }\n }]);\n\n return GoogleAddressProvider;\n}(_AddressProvider2.AddressProvider);\n\nexports.GoogleAddressProvider = GoogleAddressProvider;\n\n//# sourceURL=webpack://Formio/./lib/providers/address/GoogleAddressProvider.js?"); +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.GoogleAddressProvider = void 0;\n__webpack_require__(/*! core-js/modules/es.string.trim.js */ \"./node_modules/core-js/modules/es.string.trim.js\");\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.array.some.js */ \"./node_modules/core-js/modules/es.array.some.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _Formio = __webpack_require__(/*! ../../Formio */ \"./lib/Formio.js\");\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nvar _AddressProvider2 = __webpack_require__(/*! ./AddressProvider */ \"./lib/providers/address/AddressProvider.js\");\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar GoogleAddressProvider = /*#__PURE__*/function (_AddressProvider) {\n _inherits(GoogleAddressProvider, _AddressProvider);\n var _super = _createSuper(GoogleAddressProvider);\n function GoogleAddressProvider() {\n var _options$params;\n var _this;\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n _classCallCheck(this, GoogleAddressProvider);\n _this = _super.call(this, options);\n _this.setAutocompleteOptions();\n var src = 'https://maps.googleapis.com/maps/api/js?v=quarterly&libraries=places&callback=googleMapsCallback';\n if ((_options$params = options.params) !== null && _options$params !== void 0 && _options$params.key) {\n src += \"&key=\".concat(options.params.key);\n }\n _Formio.GlobalFormio.requireLibrary(_this.getLibraryName(), 'google.maps.places', src);\n return _this;\n }\n _createClass(GoogleAddressProvider, [{\n key: \"displayValueProperty\",\n get: function get() {\n return 'formattedPlace';\n }\n }, {\n key: \"alternativeDisplayValueProperty\",\n get: function get() {\n return 'formatted_address';\n }\n }, {\n key: \"autocompleteOptions\",\n get: function get() {\n return this._autocompleteOptions;\n },\n set: function set(options) {\n this._autocompleteOptions = options;\n }\n }, {\n key: \"setAutocompleteOptions\",\n value: function setAutocompleteOptions() {\n var options = _lodash[\"default\"].get(this.options, 'params.autocompleteOptions', {});\n if (!_lodash[\"default\"].isObject(options)) {\n options = {};\n }\n this.addRequiredProviderOptions(options);\n this.autocompleteOptions = options;\n }\n }, {\n key: \"beforeMergeOptions\",\n value: function beforeMergeOptions(options) {\n // providing support of old Google Provider option\n this.convertRegionToAutocompleteOption(options);\n }\n }, {\n key: \"getLibraryName\",\n value: function getLibraryName() {\n return 'googleMaps';\n }\n }, {\n key: \"convertRegionToAutocompleteOption\",\n value: function convertRegionToAutocompleteOption(options) {\n var providerOptions = options;\n var region = _lodash[\"default\"].get(providerOptions, 'params.region', '');\n if (region && !_lodash[\"default\"].has(options, 'params.autocompleteOptions')) {\n region = region.toUpperCase().trim();\n // providing compatibility with ISO 3166-1 Alpha-2 county codes (for checking compatibility https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes)\n var countryCodes = {\n 'UK': 'GB'\n };\n if (countryCodes[region]) {\n region = countryCodes[region];\n }\n _lodash[\"default\"].set(providerOptions, 'params.autocompleteOptions.componentRestrictions.country', [region]);\n }\n }\n }, {\n key: \"getRequiredAddressProperties\",\n value: function getRequiredAddressProperties() {\n return ['address_components', 'formatted_address', 'geometry', 'place_id', 'plus_code', 'types'];\n }\n }, {\n key: \"addRequiredProviderOptions\",\n value: function addRequiredProviderOptions(options) {\n var addressProperties = this.getRequiredAddressProperties();\n if (_lodash[\"default\"].isArray(options.fields) && options.fields.length > 0) {\n options.fields.forEach(function (optionalField) {\n if (!addressProperties.some(function (addressProp) {\n return optionalField === addressProp;\n })) {\n addressProperties.push(optionalField);\n }\n });\n }\n options.fields = addressProperties;\n }\n }, {\n key: \"filterPlace\",\n value: function filterPlace(place) {\n place = place || {};\n var filteredPlace = {};\n if (this.autocompleteOptions) {\n this.autocompleteOptions.fields.forEach(function (field) {\n if (place[field]) {\n filteredPlace[field] = place[field];\n }\n });\n }\n return filteredPlace;\n }\n }, {\n key: \"attachAutocomplete\",\n value: function attachAutocomplete(elem, index, onSelectAddress) {\n var _this2 = this;\n _Formio.GlobalFormio.libraryReady(this.getLibraryName()).then(function () {\n var autocomplete = new google.maps.places.Autocomplete(elem, _this2.autocompleteOptions);\n autocomplete.addListener('place_changed', function () {\n var place = _this2.filterPlace(autocomplete.getPlace());\n place.formattedPlace = _lodash[\"default\"].get(autocomplete, 'gm_accessors_.place.se.formattedPrediction', place[_this2.alternativeDisplayValueProperty]);\n onSelectAddress(place, elem, index);\n });\n });\n }\n }, {\n key: \"search\",\n value: function search() {\n return _nativePromiseOnly[\"default\"].resolve();\n }\n }, {\n key: \"makeRequest\",\n value: function makeRequest() {\n return _nativePromiseOnly[\"default\"].resolve();\n }\n }, {\n key: \"getDisplayValue\",\n value: function getDisplayValue(address) {\n var displayedProperty = _lodash[\"default\"].has(address, this.displayValueProperty) ? this.displayValueProperty : this.alternativeDisplayValueProperty;\n return _lodash[\"default\"].get(address, displayedProperty, '');\n }\n }], [{\n key: \"name\",\n get: function get() {\n return 'google';\n }\n }, {\n key: \"displayName\",\n get: function get() {\n return 'Google Maps';\n }\n }]);\n return GoogleAddressProvider;\n}(_AddressProvider2.AddressProvider);\nexports.GoogleAddressProvider = GoogleAddressProvider;\n\n//# sourceURL=webpack://Formio/./lib/providers/address/GoogleAddressProvider.js?"); /***/ }), @@ -2466,7 +2499,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.NominatimAddressProvider = void 0;\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\nvar _AddressProvider2 = __webpack_require__(/*! ./AddressProvider */ \"./lib/providers/address/AddressProvider.js\");\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar NominatimAddressProvider = /*#__PURE__*/function (_AddressProvider) {\n _inherits(NominatimAddressProvider, _AddressProvider);\n\n var _super = _createSuper(NominatimAddressProvider);\n\n function NominatimAddressProvider() {\n _classCallCheck(this, NominatimAddressProvider);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(NominatimAddressProvider, [{\n key: \"defaultOptions\",\n get: function get() {\n return {\n params: {\n addressdetails: '1',\n format: 'json'\n }\n };\n }\n }, {\n key: \"queryProperty\",\n get: function get() {\n return 'q';\n }\n }, {\n key: \"displayValueProperty\",\n get: function get() {\n return 'display_name';\n }\n }, {\n key: \"getRequestUrl\",\n value: function getRequestUrl() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var params = options.params;\n return \"https://nominatim.openstreetmap.org/search?\".concat(this.serialize(params));\n }\n }], [{\n key: \"name\",\n get: function get() {\n return 'nominatim';\n }\n }, {\n key: \"displayName\",\n get: function get() {\n return 'OpenStreetMap Nominatim';\n }\n }]);\n\n return NominatimAddressProvider;\n}(_AddressProvider2.AddressProvider);\n\nexports.NominatimAddressProvider = NominatimAddressProvider;\n\n//# sourceURL=webpack://Formio/./lib/providers/address/NominatimAddressProvider.js?"); +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.NominatimAddressProvider = void 0;\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _AddressProvider2 = __webpack_require__(/*! ./AddressProvider */ \"./lib/providers/address/AddressProvider.js\");\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar NominatimAddressProvider = /*#__PURE__*/function (_AddressProvider) {\n _inherits(NominatimAddressProvider, _AddressProvider);\n var _super = _createSuper(NominatimAddressProvider);\n function NominatimAddressProvider() {\n _classCallCheck(this, NominatimAddressProvider);\n return _super.apply(this, arguments);\n }\n _createClass(NominatimAddressProvider, [{\n key: \"defaultOptions\",\n get: function get() {\n return {\n params: {\n addressdetails: '1',\n format: 'json'\n }\n };\n }\n }, {\n key: \"queryProperty\",\n get: function get() {\n return 'q';\n }\n }, {\n key: \"displayValueProperty\",\n get: function get() {\n return 'display_name';\n }\n }, {\n key: \"getRequestUrl\",\n value: function getRequestUrl() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var params = options.params;\n return \"https://nominatim.openstreetmap.org/search?\".concat(this.serialize(params));\n }\n }], [{\n key: \"name\",\n get: function get() {\n return 'nominatim';\n }\n }, {\n key: \"displayName\",\n get: function get() {\n return 'OpenStreetMap Nominatim';\n }\n }]);\n return NominatimAddressProvider;\n}(_AddressProvider2.AddressProvider);\nexports.NominatimAddressProvider = NominatimAddressProvider;\n\n//# sourceURL=webpack://Formio/./lib/providers/address/NominatimAddressProvider.js?"); /***/ }), @@ -2477,7 +2510,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n\nvar _AzureAddressProvider2 = __webpack_require__(/*! ./AzureAddressProvider */ \"./lib/providers/address/AzureAddressProvider.js\");\n\nvar _CustomAddressProvider = __webpack_require__(/*! ./CustomAddressProvider */ \"./lib/providers/address/CustomAddressProvider.js\");\n\nvar _GoogleAddressProvider = __webpack_require__(/*! ./GoogleAddressProvider */ \"./lib/providers/address/GoogleAddressProvider.js\");\n\nvar _NominatimAddressProvider = __webpack_require__(/*! ./NominatimAddressProvider */ \"./lib/providers/address/NominatimAddressProvider.js\");\n\nvar _AzureAddressProvider;\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar _default = (_AzureAddressProvider = {}, _defineProperty(_AzureAddressProvider, _AzureAddressProvider2.AzureAddressProvider.name, _AzureAddressProvider2.AzureAddressProvider), _defineProperty(_AzureAddressProvider, _CustomAddressProvider.CustomAddressProvider.name, _CustomAddressProvider.CustomAddressProvider), _defineProperty(_AzureAddressProvider, _GoogleAddressProvider.GoogleAddressProvider.name, _GoogleAddressProvider.GoogleAddressProvider), _defineProperty(_AzureAddressProvider, _NominatimAddressProvider.NominatimAddressProvider.name, _NominatimAddressProvider.NominatimAddressProvider), _AzureAddressProvider);\n\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/providers/address/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\nvar _AzureAddressProvider2 = __webpack_require__(/*! ./AzureAddressProvider */ \"./lib/providers/address/AzureAddressProvider.js\");\nvar _CustomAddressProvider = __webpack_require__(/*! ./CustomAddressProvider */ \"./lib/providers/address/CustomAddressProvider.js\");\nvar _GoogleAddressProvider = __webpack_require__(/*! ./GoogleAddressProvider */ \"./lib/providers/address/GoogleAddressProvider.js\");\nvar _NominatimAddressProvider = __webpack_require__(/*! ./NominatimAddressProvider */ \"./lib/providers/address/NominatimAddressProvider.js\");\nvar _AzureAddressProvider;\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar _default = (_AzureAddressProvider = {}, _defineProperty(_AzureAddressProvider, _AzureAddressProvider2.AzureAddressProvider.name, _AzureAddressProvider2.AzureAddressProvider), _defineProperty(_AzureAddressProvider, _CustomAddressProvider.CustomAddressProvider.name, _CustomAddressProvider.CustomAddressProvider), _defineProperty(_AzureAddressProvider, _GoogleAddressProvider.GoogleAddressProvider.name, _GoogleAddressProvider.GoogleAddressProvider), _defineProperty(_AzureAddressProvider, _NominatimAddressProvider.NominatimAddressProvider.name, _NominatimAddressProvider.NominatimAddressProvider), _AzureAddressProvider);\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/providers/address/index.js?"); /***/ }), @@ -2485,10 +2518,10 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /*!*************************************!*\ !*** ./lib/providers/auth/index.js ***! \*************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = {};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/providers/auth/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = {};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/providers/auth/index.js?"); /***/ }), @@ -2499,7 +2532,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _Providers = _interopRequireDefault(__webpack_require__(/*! ./Providers */ \"./lib/providers/Providers.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = _Providers.default;\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/providers/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _Providers = _interopRequireDefault(__webpack_require__(/*! ./Providers */ \"./lib/providers/Providers.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = _Providers[\"default\"];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/providers/index.js?"); /***/ }), @@ -2510,7 +2543,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar fileProcessor = function fileProcessor(formio, config) {\n return function (file, options) {\n return new _nativePromiseOnly.default(function (resolve, reject) {\n var xhr = new XMLHttpRequest(); // Fire on network error.\n\n xhr.onerror = function (err) {\n err.networkError = true;\n reject(err);\n }; // Fire on network abort.\n\n\n xhr.onabort = function (err) {\n err.networkError = true;\n reject(err);\n }; // Fired when the response has made it back from the server.\n\n\n xhr.onload = function () {\n if (xhr.status >= 200 && xhr.status < 300) {\n var mimetype = xhr.getResponseHeader('Content-Type') || file.type;\n resolve(new File([xhr.response], file.name, {\n type: mimetype\n }));\n } else {\n reject(xhr.response || 'Unable to process file');\n }\n }; // Set the onabort error callback.\n\n\n xhr.onabort = reject;\n xhr.open('POST', config.url);\n var token = formio.getToken();\n\n if (token) {\n xhr.setRequestHeader('x-jwt-token', token);\n }\n\n xhr.responseType = 'arraybuffer';\n var data = new FormData();\n data.append('file', file);\n data.append('processorOptions', JSON.stringify(config.options || {}));\n data.append('options', JSON.stringify(options || {})); // Get the request and send it to the server.\n\n xhr.send(data);\n });\n };\n};\n\nvar _default = fileProcessor;\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/providers/processor/fileProcessor.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar fileProcessor = function fileProcessor(formio, config) {\n return function (file, options) {\n return new _nativePromiseOnly[\"default\"](function (resolve, reject) {\n var xhr = new XMLHttpRequest();\n\n // Fire on network error.\n xhr.onerror = function (err) {\n err.networkError = true;\n reject(err);\n };\n\n // Fire on network abort.\n xhr.onabort = function (err) {\n err.networkError = true;\n reject(err);\n };\n\n // Fired when the response has made it back from the server.\n xhr.onload = function () {\n if (xhr.status >= 200 && xhr.status < 300) {\n var mimetype = xhr.getResponseHeader('Content-Type') || file.type;\n resolve(new File([xhr.response], file.name, {\n type: mimetype\n }));\n } else {\n reject(xhr.response || 'Unable to process file');\n }\n };\n\n // Set the onabort error callback.\n xhr.onabort = reject;\n xhr.open('POST', config.url);\n var token = formio.getToken();\n if (token) {\n xhr.setRequestHeader('x-jwt-token', token);\n }\n xhr.responseType = 'arraybuffer';\n var data = new FormData();\n data.append('file', file);\n data.append('processorOptions', JSON.stringify(config.options || {}));\n data.append('options', JSON.stringify(options || {}));\n\n // Get the request and send it to the server.\n xhr.send(data);\n });\n };\n};\nvar _default = fileProcessor;\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/providers/processor/fileProcessor.js?"); /***/ }), @@ -2521,7 +2554,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.trim.js */ \"./node_modules/core-js/modules/es.string.trim.js\");\n\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n\nvar _xhr = _interopRequireDefault(__webpack_require__(/*! ./xhr */ \"./lib/providers/storage/xhr.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar azure = function azure(formio) {\n return {\n uploadFile: function uploadFile(file, fileName, dir, progressCallback, url, options, fileKey, groupPermissions, groupId, abortCallback) {\n return _xhr.default.upload(formio, 'azure', function (xhr, response) {\n xhr.openAndSetHeaders('PUT', response.url);\n xhr.setRequestHeader('Content-Type', file.type);\n xhr.setRequestHeader('x-ms-blob-type', 'BlockBlob');\n return file;\n }, file, fileName, dir, progressCallback, groupPermissions, groupId, abortCallback).then(function () {\n return {\n storage: 'azure',\n name: _xhr.default.path([dir, fileName]),\n size: file.size,\n type: file.type,\n groupPermissions: groupPermissions,\n groupId: groupId\n };\n });\n },\n downloadFile: function downloadFile(file) {\n return formio.makeRequest('file', \"\".concat(formio.formUrl, \"/storage/azure?name=\").concat(_xhr.default.trim(file.name)), 'GET');\n }\n };\n};\n\nazure.title = 'Azure File Services';\nvar _default = azure;\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/providers/storage/azure.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.string.trim.js */ \"./node_modules/core-js/modules/es.string.trim.js\");\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\nvar _xhr = _interopRequireDefault(__webpack_require__(/*! ./xhr */ \"./lib/providers/storage/xhr.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar azure = function azure(formio) {\n return {\n uploadFile: function uploadFile(file, fileName, dir, progressCallback, url, options, fileKey, groupPermissions, groupId, abortCallback) {\n return _xhr[\"default\"].upload(formio, 'azure', function (xhr, response) {\n xhr.openAndSetHeaders('PUT', response.url);\n xhr.setRequestHeader('Content-Type', file.type);\n xhr.setRequestHeader('x-ms-blob-type', 'BlockBlob');\n return file;\n }, file, fileName, dir, progressCallback, groupPermissions, groupId, abortCallback).then(function () {\n return {\n storage: 'azure',\n name: _xhr[\"default\"].path([dir, fileName]),\n size: file.size,\n type: file.type,\n groupPermissions: groupPermissions,\n groupId: groupId\n };\n });\n },\n downloadFile: function downloadFile(file) {\n return formio.makeRequest('file', \"\".concat(formio.formUrl, \"/storage/azure?name=\").concat(_xhr[\"default\"].trim(file.name)), 'GET');\n }\n };\n};\nazure.title = 'Azure File Services';\nvar _default = azure;\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/providers/storage/azure.js?"); /***/ }), @@ -2532,7 +2565,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar base64 = function base64() {\n return {\n title: 'Base64',\n name: 'base64',\n uploadFile: function uploadFile(file, fileName) {\n var _this = this;\n\n var reader = new FileReader();\n return new _nativePromiseOnly.default(function (resolve, reject) {\n reader.onload = function (event) {\n var url = event.target.result;\n resolve({\n storage: 'base64',\n name: fileName,\n url: url,\n size: file.size,\n type: file.type\n });\n };\n\n reader.onerror = function () {\n return reject(_this);\n };\n\n reader.readAsDataURL(file);\n });\n },\n downloadFile: function downloadFile(file) {\n // Return the original as there is nothing to do.\n return _nativePromiseOnly.default.resolve(file);\n }\n };\n};\n\nbase64.title = 'Base64';\nvar _default = base64;\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/providers/storage/base64.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar base64 = function base64() {\n return {\n title: 'Base64',\n name: 'base64',\n uploadFile: function uploadFile(file, fileName) {\n var _this = this;\n var reader = new FileReader();\n return new _nativePromiseOnly[\"default\"](function (resolve, reject) {\n reader.onload = function (event) {\n var url = event.target.result;\n resolve({\n storage: 'base64',\n name: fileName,\n url: url,\n size: file.size,\n type: file.type\n });\n };\n reader.onerror = function () {\n return reject(_this);\n };\n reader.readAsDataURL(file);\n });\n },\n downloadFile: function downloadFile(file) {\n // Return the original as there is nothing to do.\n return _nativePromiseOnly[\"default\"].resolve(file);\n }\n };\n};\nbase64.title = 'Base64';\nvar _default = base64;\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/providers/storage/base64.js?"); /***/ }), @@ -2543,7 +2576,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\n\nvar _xhr = __webpack_require__(/*! ./xhr */ \"./lib/providers/storage/xhr.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar googledrive = function googledrive(formio) {\n return {\n uploadFile: function uploadFile(file, fileName, dir, progressCallback, url, options, fileKey, groupPermissions, groupId, abortCallback) {\n return new _nativePromiseOnly.default(function (resolve, reject) {\n // Send the file with data.\n var xhr = new XMLHttpRequest();\n\n if (typeof progressCallback === 'function') {\n xhr.upload.onprogress = progressCallback;\n }\n\n if (typeof abortCallback === 'function') {\n abortCallback(function () {\n return xhr.abort();\n });\n }\n\n var fd = new FormData();\n fd.append('name', fileName);\n fd.append('dir', dir);\n fd.append('file', file); // Fire on network error.\n\n xhr.onerror = function (err) {\n err.networkError = true;\n reject(err);\n };\n\n xhr.onload = function () {\n if (xhr.status >= 200 && xhr.status < 300) {\n var response = JSON.parse(xhr.response);\n response.storage = 'googledrive';\n response.size = file.size;\n response.type = file.type;\n response.groupId = groupId;\n response.groupPermissions = groupPermissions;\n resolve(response);\n } else {\n reject(xhr.response || 'Unable to upload file');\n }\n };\n\n xhr.onabort = reject;\n xhr.open('POST', \"\".concat(formio.formUrl, \"/storage/gdrive\"));\n (0, _xhr.setXhrHeaders)(formio, xhr);\n var token = formio.getToken();\n\n if (token) {\n xhr.setRequestHeader('x-jwt-token', token);\n }\n\n xhr.send(fd);\n });\n },\n downloadFile: function downloadFile(file) {\n var token = formio.getToken();\n file.url = \"\".concat(formio.formUrl, \"/storage/gdrive?fileId=\").concat(file.id, \"&fileName=\").concat(file.originalName).concat(token ? \"&x-jwt-token=\".concat(token) : '');\n return _nativePromiseOnly.default.resolve(file);\n }\n };\n};\n\ngoogledrive.title = 'Google Drive';\nvar _default = googledrive;\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/providers/storage/googleDrive.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\nvar _xhr = __webpack_require__(/*! ./xhr */ \"./lib/providers/storage/xhr.js\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar googledrive = function googledrive(formio) {\n return {\n uploadFile: function uploadFile(file, fileName, dir, progressCallback, url, options, fileKey, groupPermissions, groupId, abortCallback) {\n return new _nativePromiseOnly[\"default\"](function (resolve, reject) {\n // Send the file with data.\n var xhr = new XMLHttpRequest();\n if (typeof progressCallback === 'function') {\n xhr.upload.onprogress = progressCallback;\n }\n if (typeof abortCallback === 'function') {\n abortCallback(function () {\n return xhr.abort();\n });\n }\n var fd = new FormData();\n fd.append('name', fileName);\n fd.append('dir', dir);\n fd.append('file', file);\n\n // Fire on network error.\n xhr.onerror = function (err) {\n err.networkError = true;\n reject(err);\n };\n xhr.onload = function () {\n if (xhr.status >= 200 && xhr.status < 300) {\n var response = JSON.parse(xhr.response);\n response.storage = 'googledrive';\n response.size = file.size;\n response.type = file.type;\n response.groupId = groupId;\n response.groupPermissions = groupPermissions;\n resolve(response);\n } else {\n reject(xhr.response || 'Unable to upload file');\n }\n };\n xhr.onabort = reject;\n xhr.open('POST', \"\".concat(formio.formUrl, \"/storage/gdrive\"));\n (0, _xhr.setXhrHeaders)(formio, xhr);\n var token = formio.getToken();\n if (token) {\n xhr.setRequestHeader('x-jwt-token', token);\n }\n xhr.send(fd);\n });\n },\n downloadFile: function downloadFile(file) {\n var token = formio.getToken();\n file.url = \"\".concat(formio.formUrl, \"/storage/gdrive?fileId=\").concat(file.id, \"&fileName=\").concat(file.originalName).concat(token ? \"&x-jwt-token=\".concat(token) : '');\n return _nativePromiseOnly[\"default\"].resolve(file);\n }\n };\n};\ngoogledrive.title = 'Google Drive';\nvar _default = googledrive;\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/providers/storage/googleDrive.js?"); /***/ }), @@ -2554,7 +2587,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _base = _interopRequireDefault(__webpack_require__(/*! ./base64 */ \"./lib/providers/storage/base64.js\"));\n\nvar _s = _interopRequireDefault(__webpack_require__(/*! ./s3 */ \"./lib/providers/storage/s3.js\"));\n\nvar _azure = _interopRequireDefault(__webpack_require__(/*! ./azure */ \"./lib/providers/storage/azure.js\"));\n\nvar _url = _interopRequireDefault(__webpack_require__(/*! ./url */ \"./lib/providers/storage/url.js\"));\n\nvar _indexeddb = _interopRequireDefault(__webpack_require__(/*! ./indexeddb */ \"./lib/providers/storage/indexeddb.js\"));\n\nvar _googleDrive = _interopRequireDefault(__webpack_require__(/*! ./googleDrive */ \"./lib/providers/storage/googleDrive.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n base64: _base.default,\n s3: _s.default,\n url: _url.default,\n azure: _azure.default,\n indexeddb: _indexeddb.default,\n googledrive: _googleDrive.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/providers/storage/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _base = _interopRequireDefault(__webpack_require__(/*! ./base64 */ \"./lib/providers/storage/base64.js\"));\nvar _s = _interopRequireDefault(__webpack_require__(/*! ./s3 */ \"./lib/providers/storage/s3.js\"));\nvar _azure = _interopRequireDefault(__webpack_require__(/*! ./azure */ \"./lib/providers/storage/azure.js\"));\nvar _url = _interopRequireDefault(__webpack_require__(/*! ./url */ \"./lib/providers/storage/url.js\"));\nvar _indexeddb = _interopRequireDefault(__webpack_require__(/*! ./indexeddb */ \"./lib/providers/storage/indexeddb.js\"));\nvar _googleDrive = _interopRequireDefault(__webpack_require__(/*! ./googleDrive */ \"./lib/providers/storage/googleDrive.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n base64: _base[\"default\"],\n s3: _s[\"default\"],\n url: _url[\"default\"],\n azure: _azure[\"default\"],\n indexeddb: _indexeddb[\"default\"],\n googledrive: _googleDrive[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/providers/storage/index.js?"); /***/ }), @@ -2565,7 +2598,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n\nvar _uuid = __webpack_require__(/*! uuid */ \"./node_modules/uuid/dist/esm-browser/index.js\");\n\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar indexeddb = function indexeddb() {\n return {\n title: 'indexedDB',\n name: 'indexeddb',\n uploadFile: function uploadFile(file, fileName, dir, progressCallback, url, options) {\n var _this = this;\n\n if (!('indexedDB' in window)) {\n console.log('This browser doesn\\'t support IndexedDB');\n return;\n }\n\n return new _nativePromiseOnly.default(function (resolve) {\n var request = indexedDB.open(options.indexeddb, 3);\n\n request.onsuccess = function (event) {\n var db = event.target.result;\n resolve(db);\n };\n\n request.onupgradeneeded = function (e) {\n var db = e.target.result;\n db.createObjectStore(options.indexeddbTable);\n };\n }).then(function (db) {\n var reader = new FileReader();\n return new _nativePromiseOnly.default(function (resolve, reject) {\n reader.onload = function () {\n var blobObject = new Blob([file], {\n type: file.type\n });\n var id = (0, _uuid.v4)(blobObject);\n var data = {\n id: id,\n data: blobObject,\n name: file.name,\n size: file.size,\n type: file.type,\n url: url\n };\n var trans = db.transaction([options.indexeddbTable], 'readwrite');\n var addReq = trans.objectStore(options.indexeddbTable).put(data, id);\n\n addReq.onerror = function (e) {\n console.log('error storing data');\n console.error(e);\n };\n\n trans.oncomplete = function () {\n resolve({\n storage: 'indexeddb',\n name: file.name,\n size: file.size,\n type: file.type,\n url: url,\n id: id\n });\n };\n };\n\n reader.onerror = function () {\n return reject(_this);\n };\n\n reader.readAsDataURL(file);\n });\n });\n },\n downloadFile: function downloadFile(file, options) {\n var _this2 = this;\n\n return new _nativePromiseOnly.default(function (resolve) {\n var request = indexedDB.open(options.indexeddb, 3);\n\n request.onsuccess = function (event) {\n var db = event.target.result;\n resolve(db);\n };\n }).then(function (db) {\n return new _nativePromiseOnly.default(function (resolve, reject) {\n var trans = db.transaction([options.indexeddbTable], 'readonly');\n var store = trans.objectStore(options.indexeddbTable).get(file.id);\n\n store.onsuccess = function () {\n trans.oncomplete = function () {\n var result = store.result;\n var dbFile = new File([store.result.data], file.name, {\n type: store.result.type\n });\n var reader = new FileReader();\n\n reader.onload = function (event) {\n result.url = event.target.result;\n result.storage = file.storage;\n resolve(result);\n };\n\n reader.onerror = function () {\n return reject(_this2);\n };\n\n reader.readAsDataURL(dbFile);\n };\n };\n\n store.onerror = function () {\n return reject(_this2);\n };\n });\n });\n },\n deleteFile: function deleteFile(file, options) {\n var _this3 = this;\n\n return new _nativePromiseOnly.default(function (resolve) {\n var request = indexedDB.open(options.indexeddb, 3);\n\n request.onsuccess = function (event) {\n var db = event.target.result;\n resolve(db);\n };\n }).then(function (db) {\n return new _nativePromiseOnly.default(function (resolve, reject) {\n var trans = db.transaction([options.indexeddbTable], 'readwrite');\n var store = trans.objectStore(options.indexeddbTable).delete(file.id);\n\n store.onsuccess = function () {\n trans.oncomplete = function () {\n var result = store.result;\n resolve(result);\n };\n };\n\n store.onerror = function () {\n return reject(_this3);\n };\n });\n });\n }\n };\n};\n\nindexeddb.title = 'IndexedDB';\nvar _default = indexeddb;\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/providers/storage/indexeddb.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\nvar _uuid = __webpack_require__(/*! uuid */ \"./node_modules/uuid/dist/commonjs-browser/index.js\");\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar indexeddb = function indexeddb() {\n return {\n title: 'indexedDB',\n name: 'indexeddb',\n uploadFile: function uploadFile(file, fileName, dir, progressCallback, url, options) {\n var _this = this;\n if (!('indexedDB' in window)) {\n console.log('This browser doesn\\'t support IndexedDB');\n return;\n }\n return new _nativePromiseOnly[\"default\"](function (resolve) {\n var request = indexedDB.open(options.indexeddb, 3);\n request.onsuccess = function (event) {\n var db = event.target.result;\n resolve(db);\n };\n request.onupgradeneeded = function (e) {\n var db = e.target.result;\n db.createObjectStore(options.indexeddbTable);\n };\n }).then(function (db) {\n var reader = new FileReader();\n return new _nativePromiseOnly[\"default\"](function (resolve, reject) {\n reader.onload = function () {\n var blobObject = new Blob([file], {\n type: file.type\n });\n var id = (0, _uuid.v4)(blobObject);\n var data = {\n id: id,\n data: blobObject,\n name: file.name,\n size: file.size,\n type: file.type,\n url: url\n };\n var trans = db.transaction([options.indexeddbTable], 'readwrite');\n var addReq = trans.objectStore(options.indexeddbTable).put(data, id);\n addReq.onerror = function (e) {\n console.log('error storing data');\n console.error(e);\n };\n trans.oncomplete = function () {\n resolve({\n storage: 'indexeddb',\n name: file.name,\n size: file.size,\n type: file.type,\n url: url,\n id: id\n });\n };\n };\n reader.onerror = function () {\n return reject(_this);\n };\n reader.readAsDataURL(file);\n });\n });\n },\n downloadFile: function downloadFile(file, options) {\n var _this2 = this;\n return new _nativePromiseOnly[\"default\"](function (resolve) {\n var request = indexedDB.open(options.indexeddb, 3);\n request.onsuccess = function (event) {\n var db = event.target.result;\n resolve(db);\n };\n }).then(function (db) {\n return new _nativePromiseOnly[\"default\"](function (resolve, reject) {\n var trans = db.transaction([options.indexeddbTable], 'readonly');\n var store = trans.objectStore(options.indexeddbTable).get(file.id);\n store.onsuccess = function () {\n trans.oncomplete = function () {\n var result = store.result;\n var dbFile = new File([store.result.data], file.name, {\n type: store.result.type\n });\n var reader = new FileReader();\n reader.onload = function (event) {\n result.url = event.target.result;\n result.storage = file.storage;\n resolve(result);\n };\n reader.onerror = function () {\n return reject(_this2);\n };\n reader.readAsDataURL(dbFile);\n };\n };\n store.onerror = function () {\n return reject(_this2);\n };\n });\n });\n },\n deleteFile: function deleteFile(file, options) {\n var _this3 = this;\n return new _nativePromiseOnly[\"default\"](function (resolve) {\n var request = indexedDB.open(options.indexeddb, 3);\n request.onsuccess = function (event) {\n var db = event.target.result;\n resolve(db);\n };\n }).then(function (db) {\n return new _nativePromiseOnly[\"default\"](function (resolve, reject) {\n var trans = db.transaction([options.indexeddbTable], 'readwrite');\n var store = trans.objectStore(options.indexeddbTable)[\"delete\"](file.id);\n store.onsuccess = function () {\n trans.oncomplete = function () {\n var result = store.result;\n resolve(result);\n };\n };\n store.onerror = function () {\n return reject(_this3);\n };\n });\n });\n }\n };\n};\nindexeddb.title = 'IndexedDB';\nvar _default = indexeddb;\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/providers/storage/indexeddb.js?"); /***/ }), @@ -2576,7 +2609,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.trim.js */ \"./node_modules/core-js/modules/es.string.trim.js\");\n\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\n\nvar _xhr = _interopRequireDefault(__webpack_require__(/*! ./xhr */ \"./lib/providers/storage/xhr.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar s3 = function s3(formio) {\n return {\n uploadFile: function uploadFile(file, fileName, dir, progressCallback, url, options, fileKey, groupPermissions, groupId, abortCallback) {\n return _xhr.default.upload(formio, 's3', function (xhr, response) {\n response.data.fileName = fileName;\n response.data.key = _xhr.default.path([response.data.key, dir, fileName]);\n\n if (response.signed) {\n xhr.openAndSetHeaders('PUT', response.signed);\n xhr.setRequestHeader('Content-Type', file.type);\n return file;\n } else {\n var fd = new FormData();\n\n for (var key in response.data) {\n fd.append(key, response.data[key]);\n }\n\n fd.append('file', file);\n xhr.openAndSetHeaders('POST', response.url);\n return fd;\n }\n }, file, fileName, dir, progressCallback, groupPermissions, groupId, abortCallback).then(function (response) {\n return {\n storage: 's3',\n name: fileName,\n bucket: response.bucket,\n key: response.data.key,\n url: _xhr.default.path([response.url, response.data.key]),\n acl: response.data.acl,\n size: file.size,\n type: file.type\n };\n });\n },\n downloadFile: function downloadFile(file) {\n if (file.acl !== 'public-read') {\n return formio.makeRequest('file', \"\".concat(formio.formUrl, \"/storage/s3?bucket=\").concat(_xhr.default.trim(file.bucket), \"&key=\").concat(_xhr.default.trim(file.key)), 'GET');\n } else {\n return _nativePromiseOnly.default.resolve(file);\n }\n }\n };\n};\n\ns3.title = 'S3';\nvar _default = s3;\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/providers/storage/s3.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.string.trim.js */ \"./node_modules/core-js/modules/es.string.trim.js\");\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\nvar _xhr = _interopRequireDefault(__webpack_require__(/*! ./xhr */ \"./lib/providers/storage/xhr.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar s3 = function s3(formio) {\n return {\n uploadFile: function uploadFile(file, fileName, dir, progressCallback, url, options, fileKey, groupPermissions, groupId, abortCallback) {\n return _xhr[\"default\"].upload(formio, 's3', function (xhr, response) {\n response.data.fileName = fileName;\n response.data.key = _xhr[\"default\"].path([response.data.key, dir, fileName]);\n if (response.signed) {\n xhr.openAndSetHeaders('PUT', response.signed);\n xhr.setRequestHeader('Content-Type', file.type);\n return file;\n } else {\n var fd = new FormData();\n for (var key in response.data) {\n fd.append(key, response.data[key]);\n }\n fd.append('file', file);\n xhr.openAndSetHeaders('POST', response.url);\n return fd;\n }\n }, file, fileName, dir, progressCallback, groupPermissions, groupId, abortCallback).then(function (response) {\n return {\n storage: 's3',\n name: fileName,\n bucket: response.bucket,\n key: response.data.key,\n url: _xhr[\"default\"].path([response.url, response.data.key]),\n acl: response.data.acl,\n size: file.size,\n type: file.type\n };\n });\n },\n downloadFile: function downloadFile(file) {\n if (file.acl !== 'public-read') {\n return formio.makeRequest('file', \"\".concat(formio.formUrl, \"/storage/s3?bucket=\").concat(_xhr[\"default\"].trim(file.bucket), \"&key=\").concat(_xhr[\"default\"].trim(file.key)), 'GET');\n } else {\n return _nativePromiseOnly[\"default\"].resolve(file);\n }\n }\n };\n};\ns3.title = 'S3';\nvar _default = s3;\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/providers/storage/s3.js?"); /***/ }), @@ -2587,7 +2620,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.getFormioUploadAdapterPlugin = void 0;\n\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.promise.js */ \"./node_modules/core-js/modules/es.promise.js\");\n\n__webpack_require__(/*! core-js/modules/es.promise.finally.js */ \"./node_modules/core-js/modules/es.promise.finally.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\nvar _utils = __webpack_require__(/*! ../../utils/utils */ \"./lib/utils/utils.js\");\n\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\n/**\n * UploadAdapter for CKEditor https://ckeditor.com/docs/ckeditor5/latest/framework/guides/deep-dive/upload-adapter.html\n */\nvar FormioUploadAdapter = /*#__PURE__*/function () {\n function FormioUploadAdapter(loader, fileService, component) {\n _classCallCheck(this, FormioUploadAdapter);\n\n this.loader = loader;\n this.fileService = fileService;\n this.component = component;\n }\n\n _createClass(FormioUploadAdapter, [{\n key: \"upload\",\n value: function upload() {\n var _this = this;\n\n return this.loader.file.then(function (file) {\n return new _nativePromiseOnly.default(function (resolve, reject) {\n var _this$fileService;\n\n var _this$component$compo = _this.component.component,\n uploadStorage = _this$component$compo.uploadStorage,\n uploadUrl = _this$component$compo.uploadUrl,\n uploadOptions = _this$component$compo.uploadOptions,\n uploadDir = _this$component$compo.uploadDir,\n fileKey = _this$component$compo.fileKey;\n var uploadParams = [uploadStorage, file, (0, _utils.uniqueName)(file.name), uploadDir || '', //should pass empty string if undefined\n function (evt) {\n return _this.onUploadProgress(evt);\n }, uploadUrl, uploadOptions, fileKey, null, null];\n\n var uploadPromise = (_this$fileService = _this.fileService).uploadFile.apply(_this$fileService, uploadParams.concat([function () {\n return _this.component.emit('fileUploadingStart', uploadPromise);\n }])).then(function (result) {\n return _this.fileService.downloadFile(result);\n }).then(function (result) {\n return resolve({\n default: result.url\n });\n }).catch(function (err) {\n console.warn('An Error occured while uploading file', err);\n reject(err);\n }).finally(function () {\n _this.component.emit('fileUploadingEnd', uploadPromise);\n });\n });\n });\n }\n }, {\n key: \"abort\",\n value: function abort() {}\n }, {\n key: \"onUploadProgress\",\n value: function onUploadProgress(evt) {\n if (evt.lengthComputable) {\n this.loader.uploadTotal = evt.total;\n this.loader.uploaded = evt.loaded;\n }\n }\n }]);\n\n return FormioUploadAdapter;\n}();\n\nvar getFormioUploadAdapterPlugin = function getFormioUploadAdapterPlugin(fileService, component) {\n return function (editor) {\n editor.plugins.get('FileRepository').createUploadAdapter = function (loader) {\n return new FormioUploadAdapter(loader, fileService, component);\n };\n };\n};\n\nexports.getFormioUploadAdapterPlugin = getFormioUploadAdapterPlugin;\n\n//# sourceURL=webpack://Formio/./lib/providers/storage/uploadAdapter.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.getFormioUploadAdapterPlugin = void 0;\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.promise.js */ \"./node_modules/core-js/modules/es.promise.js\");\n__webpack_require__(/*! core-js/modules/es.promise.finally.js */ \"./node_modules/core-js/modules/es.promise.finally.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\nvar _utils = __webpack_require__(/*! ../../utils/utils */ \"./lib/utils/utils.js\");\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\n/**\n * UploadAdapter for CKEditor https://ckeditor.com/docs/ckeditor5/latest/framework/guides/deep-dive/upload-adapter.html\n */\nvar FormioUploadAdapter = /*#__PURE__*/function () {\n function FormioUploadAdapter(loader, fileService, component) {\n _classCallCheck(this, FormioUploadAdapter);\n this.loader = loader;\n this.fileService = fileService;\n this.component = component;\n }\n _createClass(FormioUploadAdapter, [{\n key: \"upload\",\n value: function upload() {\n var _this = this;\n return this.loader.file.then(function (file) {\n return new _nativePromiseOnly[\"default\"](function (resolve, reject) {\n var _this$fileService;\n var _this$component$compo = _this.component.component,\n uploadStorage = _this$component$compo.uploadStorage,\n uploadUrl = _this$component$compo.uploadUrl,\n uploadOptions = _this$component$compo.uploadOptions,\n uploadDir = _this$component$compo.uploadDir,\n fileKey = _this$component$compo.fileKey;\n var uploadParams = [uploadStorage, file, (0, _utils.uniqueName)(file.name), uploadDir || '',\n //should pass empty string if undefined\n function (evt) {\n return _this.onUploadProgress(evt);\n }, uploadUrl, uploadOptions, fileKey, null, null];\n var uploadPromise = (_this$fileService = _this.fileService).uploadFile.apply(_this$fileService, uploadParams.concat([function () {\n return _this.component.emit('fileUploadingStart', uploadPromise);\n }])).then(function (result) {\n return _this.fileService.downloadFile(result);\n }).then(function (result) {\n return resolve({\n \"default\": result.url\n });\n })[\"catch\"](function (err) {\n console.warn('An Error occured while uploading file', err);\n reject(err);\n })[\"finally\"](function () {\n _this.component.emit('fileUploadingEnd', uploadPromise);\n });\n });\n });\n }\n }, {\n key: \"abort\",\n value: function abort() {}\n }, {\n key: \"onUploadProgress\",\n value: function onUploadProgress(evt) {\n if (evt.lengthComputable) {\n this.loader.uploadTotal = evt.total;\n this.loader.uploaded = evt.loaded;\n }\n }\n }]);\n return FormioUploadAdapter;\n}();\nvar getFormioUploadAdapterPlugin = function getFormioUploadAdapterPlugin(fileService, component) {\n return function (editor) {\n editor.plugins.get('FileRepository').createUploadAdapter = function (loader) {\n return new FormioUploadAdapter(loader, fileService, component);\n };\n };\n};\nexports.getFormioUploadAdapterPlugin = getFormioUploadAdapterPlugin;\n\n//# sourceURL=webpack://Formio/./lib/providers/storage/uploadAdapter.js?"); /***/ }), @@ -2598,7 +2631,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar url = function url(formio) {\n var xhrRequest = function xhrRequest(url, name, query, data, options, progressCallback, abortCallback) {\n return new _nativePromiseOnly.default(function (resolve, reject) {\n var xhr = new XMLHttpRequest();\n var json = typeof data === 'string';\n var fd = new FormData();\n\n if (typeof progressCallback === 'function') {\n xhr.upload.onprogress = progressCallback;\n }\n\n if (typeof abortCallback === 'function') {\n abortCallback(function () {\n return xhr.abort();\n });\n }\n\n if (!json) {\n for (var key in data) {\n fd.append(key, data[key]);\n }\n }\n\n xhr.onload = function () {\n if (xhr.status >= 200 && xhr.status < 300) {\n // Need to test if xhr.response is decoded or not.\n var respData = {};\n\n try {\n respData = typeof xhr.response === 'string' ? JSON.parse(xhr.response) : {};\n respData = respData && respData.data ? respData.data : respData;\n } catch (err) {\n respData = {};\n } // Get the url of the file.\n\n\n var respUrl = respData.hasOwnProperty('url') ? respData.url : \"\".concat(xhr.responseURL, \"/\").concat(name); // If they provide relative url, then prepend the url.\n\n if (respUrl && respUrl[0] === '/') {\n respUrl = \"\".concat(url).concat(respUrl);\n }\n\n resolve({\n url: respUrl,\n data: respData\n });\n } else {\n reject(xhr.response || 'Unable to upload file');\n }\n };\n\n xhr.onerror = function () {\n return reject(xhr);\n };\n\n xhr.onabort = function () {\n return reject(xhr);\n };\n\n var requestUrl = url + (url.indexOf('?') > -1 ? '&' : '?');\n\n for (var _key in query) {\n requestUrl += \"\".concat(_key, \"=\").concat(query[_key], \"&\");\n }\n\n if (requestUrl[requestUrl.length - 1] === '&') {\n requestUrl = requestUrl.substr(0, requestUrl.length - 1);\n }\n\n xhr.open('POST', requestUrl);\n\n if (json) {\n xhr.setRequestHeader('Content-Type', 'application/json');\n }\n\n var token = formio.getToken();\n\n if (token) {\n xhr.setRequestHeader('x-jwt-token', token);\n } //Overrides previous request props\n\n\n if (options) {\n var parsedOptions = typeof options === 'string' ? JSON.parse(options) : options;\n\n for (var prop in parsedOptions) {\n xhr[prop] = parsedOptions[prop];\n }\n }\n\n xhr.send(json ? data : fd);\n });\n };\n\n return {\n title: 'Url',\n name: 'url',\n uploadFile: function uploadFile(file, name, dir, progressCallback, url, options, fileKey, groupPermissions, groupId, abortCallback) {\n var uploadRequest = function uploadRequest(form) {\n var _xhrRequest;\n\n return xhrRequest(url, name, {\n baseUrl: encodeURIComponent(formio.projectUrl),\n project: form ? form.project : '',\n form: form ? form._id : ''\n }, (_xhrRequest = {}, _defineProperty(_xhrRequest, fileKey, file), _defineProperty(_xhrRequest, \"name\", name), _defineProperty(_xhrRequest, \"dir\", dir), _xhrRequest), options, progressCallback, abortCallback).then(function (response) {\n // Store the project and form url along with the metadata.\n response.data = response.data || {};\n response.data.baseUrl = formio.projectUrl;\n response.data.project = form ? form.project : '';\n response.data.form = form ? form._id : '';\n return {\n storage: 'url',\n name: name,\n url: response.url,\n size: file.size,\n type: file.type,\n data: response.data\n };\n });\n };\n\n if (file.private && formio.formId) {\n return formio.loadForm().then(function (form) {\n return uploadRequest(form);\n });\n } else {\n return uploadRequest();\n }\n },\n deleteFile: function deleteFile(fileInfo) {\n return new _nativePromiseOnly.default(function (resolve, reject) {\n var xhr = new XMLHttpRequest();\n xhr.open('DELETE', fileInfo.url, true);\n\n xhr.onload = function () {\n if (xhr.status >= 200 && xhr.status < 300) {\n resolve('File deleted');\n } else {\n reject(xhr.response || 'Unable to delete file');\n }\n };\n\n xhr.send(null);\n });\n },\n downloadFile: function downloadFile(file) {\n if (file.private) {\n if (formio.submissionId && file.data) {\n file.data.submission = formio.submissionId;\n }\n\n return xhrRequest(file.url, file.name, {}, JSON.stringify(file)).then(function (response) {\n return response.data;\n });\n } // Return the original as there is nothing to do.\n\n\n return _nativePromiseOnly.default.resolve(file);\n }\n };\n};\n\nurl.title = 'Url';\nvar _default = url;\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/providers/storage/url.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.array.index-of.js */ \"./node_modules/core-js/modules/es.array.index-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar url = function url(formio) {\n var xhrRequest = function xhrRequest(url, name, query, data, options, progressCallback, abortCallback) {\n return new _nativePromiseOnly[\"default\"](function (resolve, reject) {\n var xhr = new XMLHttpRequest();\n var json = typeof data === 'string';\n var fd = new FormData();\n if (typeof progressCallback === 'function') {\n xhr.upload.onprogress = progressCallback;\n }\n if (typeof abortCallback === 'function') {\n abortCallback(function () {\n return xhr.abort();\n });\n }\n if (!json) {\n for (var key in data) {\n fd.append(key, data[key]);\n }\n }\n xhr.onload = function () {\n if (xhr.status >= 200 && xhr.status < 300) {\n // Need to test if xhr.response is decoded or not.\n var respData = {};\n try {\n respData = typeof xhr.response === 'string' ? JSON.parse(xhr.response) : {};\n respData = respData && respData.data ? respData.data : respData;\n } catch (err) {\n respData = {};\n }\n\n // Get the url of the file.\n var respUrl = respData.hasOwnProperty('url') ? respData.url : \"\".concat(xhr.responseURL, \"/\").concat(name);\n\n // If they provide relative url, then prepend the url.\n if (respUrl && respUrl[0] === '/') {\n respUrl = \"\".concat(url).concat(respUrl);\n }\n resolve({\n url: respUrl,\n data: respData\n });\n } else {\n reject(xhr.response || 'Unable to upload file');\n }\n };\n xhr.onerror = function () {\n return reject(xhr);\n };\n xhr.onabort = function () {\n return reject(xhr);\n };\n var requestUrl = url + (url.indexOf('?') > -1 ? '&' : '?');\n for (var _key in query) {\n requestUrl += \"\".concat(_key, \"=\").concat(query[_key], \"&\");\n }\n if (requestUrl[requestUrl.length - 1] === '&') {\n requestUrl = requestUrl.substr(0, requestUrl.length - 1);\n }\n xhr.open('POST', requestUrl);\n if (json) {\n xhr.setRequestHeader('Content-Type', 'application/json');\n }\n var token = formio.getToken();\n if (token) {\n xhr.setRequestHeader('x-jwt-token', token);\n }\n\n //Overrides previous request props\n if (options) {\n var parsedOptions = typeof options === 'string' ? JSON.parse(options) : options;\n for (var prop in parsedOptions) {\n if (prop === 'headers') {\n var headers = parsedOptions['headers'];\n for (var header in headers) {\n xhr.setRequestHeader(header, headers[header]);\n }\n } else {\n xhr[prop] = parsedOptions[prop];\n }\n }\n }\n xhr.send(json ? data : fd);\n });\n };\n return {\n title: 'Url',\n name: 'url',\n uploadFile: function uploadFile(file, name, dir, progressCallback, url, options, fileKey, groupPermissions, groupId, abortCallback) {\n var uploadRequest = function uploadRequest(form) {\n var _xhrRequest;\n return xhrRequest(url, name, {\n baseUrl: encodeURIComponent(formio.projectUrl),\n project: form ? form.project : '',\n form: form ? form._id : ''\n }, (_xhrRequest = {}, _defineProperty(_xhrRequest, fileKey, file), _defineProperty(_xhrRequest, \"name\", name), _defineProperty(_xhrRequest, \"dir\", dir), _xhrRequest), options, progressCallback, abortCallback).then(function (response) {\n // Store the project and form url along with the metadata.\n response.data = response.data || {};\n response.data.baseUrl = formio.projectUrl;\n response.data.project = form ? form.project : '';\n response.data.form = form ? form._id : '';\n return {\n storage: 'url',\n name: name,\n url: response.url,\n size: file.size,\n type: file.type,\n data: response.data\n };\n });\n };\n if (file[\"private\"] && formio.formId) {\n return formio.loadForm().then(function (form) {\n return uploadRequest(form);\n });\n } else {\n return uploadRequest();\n }\n },\n deleteFile: function deleteFile(fileInfo) {\n return new _nativePromiseOnly[\"default\"](function (resolve, reject) {\n var xhr = new XMLHttpRequest();\n xhr.open('DELETE', fileInfo.url, true);\n xhr.onload = function () {\n if (xhr.status >= 200 && xhr.status < 300) {\n resolve('File deleted');\n } else {\n reject(xhr.response || 'Unable to delete file');\n }\n };\n xhr.send(null);\n });\n },\n downloadFile: function downloadFile(file) {\n if (file[\"private\"]) {\n if (formio.submissionId && file.data) {\n file.data.submission = formio.submissionId;\n }\n return xhrRequest(file.url, file.name, {}, JSON.stringify(file)).then(function (response) {\n return response.data;\n });\n }\n\n // Return the original as there is nothing to do.\n return _nativePromiseOnly[\"default\"].resolve(file);\n }\n };\n};\nurl.title = 'Url';\nvar _default = url;\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/providers/storage/url.js?"); /***/ }), @@ -2609,7 +2642,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.setXhrHeaders = exports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.array.join.js */ \"./node_modules/core-js/modules/es.array.join.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.trim.js */ \"./node_modules/core-js/modules/es.string.trim.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\n\nvar _trim2 = _interopRequireDefault(__webpack_require__(/*! lodash/trim */ \"./node_modules/lodash/trim.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar setXhrHeaders = function setXhrHeaders(formio, xhr) {\n var headers = formio.options.headers;\n\n if (headers) {\n var ValidHeaders = {\n 'Content-Disposition': true,\n 'Authorization': true\n };\n\n for (var header in headers) {\n if (ValidHeaders[header]) {\n xhr.setRequestHeader(header, headers[header]);\n }\n }\n }\n};\n\nexports.setXhrHeaders = setXhrHeaders;\nvar XHR = {\n trim: function trim(text) {\n return (0, _trim2.default)(text, '/');\n },\n path: function path(items) {\n return items.filter(function (item) {\n return !!item;\n }).map(XHR.trim).join('/');\n },\n upload: function upload(formio, type, xhrCb, file, fileName, dir, progressCallback, groupPermissions, groupId, abortCallback) {\n return new _nativePromiseOnly.default(function (resolve, reject) {\n // Send the pre response to sign the upload.\n var pre = new XMLHttpRequest(); // This only fires on a network error.\n\n pre.onerror = function (err) {\n err.networkError = true;\n reject(err);\n };\n\n pre.onabort = reject;\n\n pre.onload = function () {\n if (pre.status >= 200 && pre.status < 300) {\n var response = JSON.parse(pre.response); // Send the file with data.\n\n var xhr = new XMLHttpRequest();\n\n if (typeof progressCallback === 'function') {\n xhr.upload.onprogress = progressCallback;\n }\n\n if (typeof abortCallback === 'function') {\n abortCallback(function () {\n return xhr.abort();\n });\n }\n\n xhr.openAndSetHeaders = function () {\n xhr.open.apply(xhr, arguments);\n setXhrHeaders(formio, xhr);\n }; // Fire on network error.\n\n\n xhr.onerror = function (err) {\n err.networkError = true;\n reject(err);\n }; // Fire on network abort.\n\n\n xhr.onabort = function (err) {\n err.networkError = true;\n reject(err);\n }; // Fired when the response has made it back from the server.\n\n\n xhr.onload = function () {\n if (xhr.status >= 200 && xhr.status < 300) {\n resolve(response);\n } else {\n reject(xhr.response || 'Unable to upload file');\n }\n }; // Set the onabort error callback.\n\n\n xhr.onabort = reject; // Get the request and send it to the server.\n\n xhr.send(xhrCb(xhr, response));\n } else {\n reject(pre.response || 'Unable to sign file');\n }\n };\n\n pre.open('POST', \"\".concat(formio.formUrl, \"/storage/\").concat(type));\n pre.setRequestHeader('Accept', 'application/json');\n pre.setRequestHeader('Content-Type', 'application/json; charset=UTF-8');\n var token = formio.getToken();\n\n if (token) {\n pre.setRequestHeader('x-jwt-token', token);\n }\n\n pre.send(JSON.stringify({\n name: XHR.path([dir, fileName]),\n size: file.size,\n type: file.type,\n groupPermissions: groupPermissions,\n groupId: groupId\n }));\n });\n }\n};\nvar _default = XHR;\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/providers/storage/xhr.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.setXhrHeaders = exports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.array.join.js */ \"./node_modules/core-js/modules/es.array.join.js\");\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.string.trim.js */ \"./node_modules/core-js/modules/es.string.trim.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\nvar _trim2 = _interopRequireDefault(__webpack_require__(/*! lodash/trim */ \"./node_modules/lodash/trim.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar setXhrHeaders = function setXhrHeaders(formio, xhr) {\n var headers = formio.options.headers;\n if (headers) {\n var ValidHeaders = {\n 'Content-Disposition': true,\n 'Authorization': true\n };\n for (var header in headers) {\n if (ValidHeaders[header]) {\n xhr.setRequestHeader(header, headers[header]);\n }\n }\n }\n};\nexports.setXhrHeaders = setXhrHeaders;\nvar XHR = {\n trim: function trim(text) {\n return (0, _trim2[\"default\"])(text, '/');\n },\n path: function path(items) {\n return items.filter(function (item) {\n return !!item;\n }).map(XHR.trim).join('/');\n },\n upload: function upload(formio, type, xhrCb, file, fileName, dir, progressCallback, groupPermissions, groupId, abortCallback) {\n return new _nativePromiseOnly[\"default\"](function (resolve, reject) {\n // Send the pre response to sign the upload.\n var pre = new XMLHttpRequest();\n\n // This only fires on a network error.\n pre.onerror = function (err) {\n err.networkError = true;\n reject(err);\n };\n pre.onabort = reject;\n pre.onload = function () {\n if (pre.status >= 200 && pre.status < 300) {\n var response = JSON.parse(pre.response);\n\n // Send the file with data.\n var xhr = new XMLHttpRequest();\n if (typeof progressCallback === 'function') {\n xhr.upload.onprogress = progressCallback;\n }\n if (typeof abortCallback === 'function') {\n abortCallback(function () {\n return xhr.abort();\n });\n }\n xhr.openAndSetHeaders = function () {\n xhr.open.apply(xhr, arguments);\n setXhrHeaders(formio, xhr);\n };\n\n // Fire on network error.\n xhr.onerror = function (err) {\n err.networkError = true;\n reject(err);\n };\n\n // Fire on network abort.\n xhr.onabort = function (err) {\n err.networkError = true;\n reject(err);\n };\n\n // Fired when the response has made it back from the server.\n xhr.onload = function () {\n if (xhr.status >= 200 && xhr.status < 300) {\n resolve(response);\n } else {\n reject(xhr.response || 'Unable to upload file');\n }\n };\n\n // Set the onabort error callback.\n xhr.onabort = reject;\n\n // Get the request and send it to the server.\n xhr.send(xhrCb(xhr, response));\n } else {\n reject(pre.response || 'Unable to sign file');\n }\n };\n pre.open('POST', \"\".concat(formio.formUrl, \"/storage/\").concat(type));\n pre.setRequestHeader('Accept', 'application/json');\n pre.setRequestHeader('Content-Type', 'application/json; charset=UTF-8');\n var token = formio.getToken();\n if (token) {\n pre.setRequestHeader('x-jwt-token', token);\n }\n pre.send(JSON.stringify({\n name: XHR.path([dir, fileName]),\n size: file.size,\n type: file.type,\n groupPermissions: groupPermissions,\n groupId: groupId\n }));\n });\n }\n};\nvar _default = XHR;\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/providers/storage/xhr.js?"); /***/ }), @@ -2620,7 +2653,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _index = _interopRequireDefault(__webpack_require__(/*! ./index */ \"./lib/templates/index.js\"));\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nvar Templates = /*#__PURE__*/function () {\n function Templates() {\n _classCallCheck(this, Templates);\n }\n\n _createClass(Templates, null, [{\n key: \"templates\",\n get: function get() {\n if (!Templates._templates) {\n Templates._templates = _index.default;\n }\n\n return Templates._templates;\n }\n }, {\n key: \"addTemplate\",\n value: function addTemplate(name, template) {\n Templates.templates[name] = template;\n }\n }, {\n key: \"extendTemplate\",\n value: function extendTemplate(name, template) {\n Templates.templates[name] = _lodash.default.merge({}, Templates.templates[name], template);\n }\n }, {\n key: \"setTemplate\",\n value: function setTemplate(name, template) {\n Templates.addTemplate(name, template);\n }\n }, {\n key: \"current\",\n get: function get() {\n if (Templates._current) {\n return Templates._current;\n }\n\n return Templates.defaultTemplates;\n },\n set: function set(templates) {\n var defaultTemplates = Templates.current;\n Templates._current = _lodash.default.merge({}, defaultTemplates, templates);\n }\n }, {\n key: \"defaultTemplates\",\n get: function get() {\n return Templates.templates.bootstrap;\n }\n }, {\n key: \"framework\",\n get: function get() {\n return Templates._framework;\n },\n set: function set(framework) {\n if (Templates.templates.hasOwnProperty(framework)) {\n Templates._framework = framework;\n Templates._current = Templates.templates[framework];\n }\n }\n }]);\n\n return Templates;\n}();\n\nexports[\"default\"] = Templates;\n\n//# sourceURL=webpack://Formio/./lib/templates/Templates.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\nvar _index = _interopRequireDefault(__webpack_require__(/*! ./index */ \"./lib/templates/index.js\"));\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar Templates = /*#__PURE__*/function () {\n function Templates() {\n _classCallCheck(this, Templates);\n }\n _createClass(Templates, null, [{\n key: \"templates\",\n get: function get() {\n if (!Templates._templates) {\n Templates._templates = _index[\"default\"];\n }\n return Templates._templates;\n }\n }, {\n key: \"addTemplate\",\n value: function addTemplate(name, template) {\n Templates.templates[name] = template;\n }\n }, {\n key: \"extendTemplate\",\n value: function extendTemplate(name, template) {\n Templates.templates[name] = _lodash[\"default\"].merge({}, Templates.templates[name], template);\n }\n }, {\n key: \"setTemplate\",\n value: function setTemplate(name, template) {\n Templates.addTemplate(name, template);\n }\n }, {\n key: \"current\",\n get: function get() {\n if (Templates._current) {\n return Templates._current;\n }\n return Templates.defaultTemplates;\n },\n set: function set(templates) {\n var defaultTemplates = Templates.current;\n Templates._current = _lodash[\"default\"].merge({}, defaultTemplates, templates);\n }\n }, {\n key: \"defaultTemplates\",\n get: function get() {\n return Templates.templates.bootstrap;\n }\n }, {\n key: \"framework\",\n get: function get() {\n return Templates._framework;\n },\n set: function set(framework) {\n if (Templates.templates.hasOwnProperty(framework)) {\n Templates._framework = framework;\n Templates._current = Templates.templates[framework];\n }\n }\n }]);\n return Templates;\n}();\nexports[\"default\"] = Templates;\n\n//# sourceURL=webpack://Formio/./lib/templates/Templates.js?"); /***/ }), @@ -2651,7 +2684,7 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/address/form.ejs.js\"));\n\nvar _html = _interopRequireDefault(__webpack_require__(/*! ./html.ejs */ \"./lib/templates/bootstrap/address/html.ejs.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n form: _form.default,\n html: _html.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/address/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/address/form.ejs.js\"));\nvar _html = _interopRequireDefault(__webpack_require__(/*! ./html.ejs */ \"./lib/templates/bootstrap/address/html.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"],\n html: _html[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/address/index.js?"); /***/ }), @@ -2672,7 +2705,7 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/alert/form.ejs.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n form: _form.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/alert/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/alert/form.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/alert/index.js?"); /***/ }), @@ -2693,7 +2726,7 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/builder/form.ejs.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n form: _form.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/builder/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/builder/form.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/builder/index.js?"); /***/ }), @@ -2703,7 +2736,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); \**************************************************************/ /***/ (function(__unused_webpack_module, exports) { -eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"]=function(ctx) {\nvar __t, __p = '', __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n__p += '
\\n ';\n if (!ctx.disableBuilderActions) { ;\n__p += '\\n
\\n \\n \\n
\\n \\n \\n
\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n ';\n } ;\n__p += '\\n ' +\n((__t = (ctx.html)) == null ? '' : __t) +\n'\\n\\n';\nreturn __p\n}\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/builderComponent/form.ejs.js?"); +eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"]=function(ctx) {\nvar __t, __p = '', __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n__p += '
\\n ';\n if (!ctx.disableBuilderActions) { ;\n__p += '\\n
\\n \\n \\n
\\n \\n \\n
\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n ';\n } ;\n__p += '\\n ' +\n((__t = (ctx.html)) == null ? '' : __t) +\n'\\n\\n';\nreturn __p\n}\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/builderComponent/form.ejs.js?"); /***/ }), @@ -2714,7 +2747,7 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/builderComponent/form.ejs.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n form: _form.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/builderComponent/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/builderComponent/form.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/builderComponent/index.js?"); /***/ }), @@ -2735,7 +2768,7 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/builderComponents/form.ejs.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n form: _form.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/builderComponents/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/builderComponents/form.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/builderComponents/index.js?"); /***/ }), @@ -2745,7 +2778,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); \*************************************************************/ /***/ (function(__unused_webpack_module, exports) { -eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"]=function(ctx) {\nvar __t, __p = '', __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n__p += '
\\n
\\n

' +\n((__t = (ctx.t(ctx.componentInfo.title, { _userInput: true }))) == null ? '' : __t) +\n' ' +\n((__t = (ctx.t('Component'))) == null ? '' : __t) +\n'

\\n
\\n ';\n if (ctx.helplinks) { ;\n__p += '\\n \\n ';\n } ;\n__p += '\\n
\\n
\\n
\\n ';\n if (!ctx.preview) { ;\n__p += '\\n
\\n \\n \\n \\n
\\n ';\n } ;\n__p += '\\n
\\n ';\n if (ctx.preview) { ;\n__p += '\\n
\\n
\\n
\\n

' +\n((__t = (ctx.t('Preview'))) == null ? '' : __t) +\n'

\\n
\\n
\\n
\\n ' +\n((__t = (ctx.preview)) == null ? '' : __t) +\n'\\n
\\n
\\n
\\n ';\n if (ctx.componentInfo.help) { ;\n__p += '\\n
\\n ' +\n((__t = ( ctx.t(ctx.componentInfo.help) )) == null ? '' : __t) +\n'\\n
\\n ';\n } ;\n__p += '\\n
\\n \\n \\n \\n
\\n
\\n ';\n } ;\n__p += '\\n
\\n';\nreturn __p\n}\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/builderEditForm/form.ejs.js?"); +eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"]=function(ctx) {\nvar __t, __p = '', __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n__p += '
\\n
\\n

' +\n((__t = (ctx.t(ctx.componentInfo.title, { _userInput: true }))) == null ? '' : __t) +\n' ' +\n((__t = (ctx.t('Component'))) == null ? '' : __t) +\n'

\\n
\\n ';\n if (ctx.helplinks) { ;\n__p += '\\n \\n ';\n } ;\n__p += '\\n
\\n
\\n
\\n ';\n if (!ctx.preview) { ;\n__p += '\\n
\\n \\n \\n \\n
\\n ';\n } ;\n__p += '\\n
\\n ';\n if (ctx.preview) { ;\n__p += '\\n
\\n
\\n
\\n

' +\n((__t = (ctx.t('Preview'))) == null ? '' : __t) +\n'

\\n
\\n
\\n
\\n ' +\n((__t = (ctx.preview)) == null ? '' : __t) +\n'\\n
\\n
\\n
\\n ';\n if (ctx.componentInfo.help) { ;\n__p += '\\n
\\n ' +\n((__t = ( ctx.t(ctx.componentInfo.help) )) == null ? '' : __t) +\n'\\n
\\n ';\n } ;\n__p += '\\n
\\n \\n \\n \\n
\\n
\\n ';\n } ;\n__p += '\\n
\\n';\nreturn __p\n}\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/builderEditForm/form.ejs.js?"); /***/ }), @@ -2756,7 +2789,7 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/builderEditForm/form.ejs.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n form: _form.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/builderEditForm/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/builderEditForm/form.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/builderEditForm/index.js?"); /***/ }), @@ -2777,7 +2810,7 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/builderPlaceholder/form.ejs.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n form: _form.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/builderPlaceholder/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/builderPlaceholder/form.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/builderPlaceholder/index.js?"); /***/ }), @@ -2798,7 +2831,7 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/builderSidebar/form.ejs.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n form: _form.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/builderSidebar/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/builderSidebar/form.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/builderSidebar/index.js?"); /***/ }), @@ -2808,7 +2841,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); \*****************************************************************/ /***/ (function(__unused_webpack_module, exports) { -eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"]=function(ctx) {\nvar __t, __p = '', __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n__p += '
\\n
\\n
\\n \\n ' +\n((__t = (ctx.t(ctx.group.title, { _userInput: true }))) == null ? '' : __t) +\n'\\n \\n
\\n
\\n \\n
\\n ';\n if (ctx.group.componentOrder.length || ctx.subgroups.length) { ;\n__p += '\\n ';\n !ctx.group.componentOrder || ctx.group.componentOrder.forEach(function(componentKey) { ;\n__p += '\\n \\n ';\n if (ctx.group.components[componentKey].icon) { ;\n__p += '\\n \\n ';\n } ;\n__p += '\\n ' +\n((__t = (ctx.t(ctx.group.components[componentKey].title, { _userInput: true }))) == null ? '' : __t) +\n'\\n \\n ';\n }) ;\n__p += '\\n ' +\n((__t = (ctx.subgroups.join(''))) == null ? '' : __t) +\n'\\n ';\n } else { ;\n__p += '\\n
' +\n((__t = (ctx.t('No Matches Found'))) == null ? '' : __t) +\n'
\\n ';\n } ;\n__p += '\\n
\\n
\\n\\n';\nreturn __p\n}\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/builderSidebarGroup/form.ejs.js?"); +eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"]=function(ctx) {\nvar __t, __p = '', __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n__p += '
\\n
\\n
\\n \\n ' +\n((__t = (ctx.t(ctx.group.title, { _userInput: true }))) == null ? '' : __t) +\n'\\n \\n
\\n
\\n \\n
\\n ';\n if (ctx.group.componentOrder.length || ctx.subgroups.length) { ;\n__p += '\\n ';\n !ctx.group.componentOrder || ctx.group.componentOrder.forEach(function(componentKey) { ;\n__p += '\\n \\n ';\n if (ctx.group.components[componentKey].icon) { ;\n__p += '\\n \\n ';\n } ;\n__p += '\\n ' +\n((__t = (ctx.t(ctx.group.components[componentKey].title, { _userInput: true }))) == null ? '' : __t) +\n'\\n \\n ';\n }) ;\n__p += '\\n ' +\n((__t = (ctx.subgroups.join(''))) == null ? '' : __t) +\n'\\n ';\n } else { ;\n__p += '\\n
' +\n((__t = (ctx.t('No Matches Found'))) == null ? '' : __t) +\n'
\\n ';\n } ;\n__p += '\\n
\\n
\\n\\n';\nreturn __p\n}\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/builderSidebarGroup/form.ejs.js?"); /***/ }), @@ -2819,7 +2852,7 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/builderSidebarGroup/form.ejs.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n form: _form.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/builderSidebarGroup/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/builderSidebarGroup/form.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/builderSidebarGroup/index.js?"); /***/ }), @@ -2829,7 +2862,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); \***********************************************************/ /***/ (function(__unused_webpack_module, exports) { -eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"]=function(ctx) {\nvar __t, __p = '', __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n__p += '
\\n
\\n ' +\n((__t = (ctx.sidebar)) == null ? '' : __t) +\n'\\n
\\n
\\n
    \\n ';\n ctx.pages.forEach(function(page, pageIndex) { ;\n__p += '\\n
  1. \\n \\n
  2. \\n ';\n }) ;\n__p += '\\n
  3. \\n \\n ' +\n((__t = (ctx.t('Page'))) == null ? '' : __t) +\n'\\n \\n
  4. \\n
\\n
\\n ' +\n((__t = (ctx.form)) == null ? '' : __t) +\n'\\n
\\n
\\n
\\n';\nreturn __p\n}\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/builderWizard/form.ejs.js?"); +eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"]=function(ctx) {\nvar __t, __p = '', __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n__p += '
\\n
\\n ' +\n((__t = (ctx.sidebar)) == null ? '' : __t) +\n'\\n
\\n
\\n
    \\n ';\n ctx.pages.forEach(function(page, pageIndex) { ;\n__p += '\\n
  1. \\n \\n
  2. \\n ';\n }) ;\n__p += '\\n
  3. \\n \\n ' +\n((__t = (ctx.t('Page'))) == null ? '' : __t) +\n'\\n \\n
  4. \\n
\\n
\\n ' +\n((__t = (ctx.form)) == null ? '' : __t) +\n'\\n
\\n
\\n
\\n';\nreturn __p\n}\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/builderWizard/form.ejs.js?"); /***/ }), @@ -2840,7 +2873,7 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/builderWizard/form.ejs.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n form: _form.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/builderWizard/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/builderWizard/form.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/builderWizard/index.js?"); /***/ }), @@ -2871,7 +2904,7 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/button/form.ejs.js\"));\n\nvar _html = _interopRequireDefault(__webpack_require__(/*! ./html.ejs */ \"./lib/templates/bootstrap/button/html.ejs.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n form: _form.default,\n html: _html.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/button/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/button/form.ejs.js\"));\nvar _html = _interopRequireDefault(__webpack_require__(/*! ./html.ejs */ \"./lib/templates/bootstrap/button/html.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"],\n html: _html[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/button/index.js?"); /***/ }), @@ -2881,7 +2914,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); \******************************************************/ /***/ (function(__unused_webpack_module, exports) { -eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"]=function(ctx) {\nvar __t, __p = '', __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n__p += '
\\n \\n
\\n';\nreturn __p\n}\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/checkbox/form.ejs.js?"); +eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"]=function(ctx) {\nvar __t, __p = '', __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n__p += '
\\n \\n ';\n if (ctx.component.tooltip) { ;\n__p += '\\n \\n ';\n } ;\n__p += '\\n
\\n';\nreturn __p\n}\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/checkbox/form.ejs.js?"); /***/ }), @@ -2902,7 +2935,7 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/checkbox/form.ejs.js\"));\n\nvar _html = _interopRequireDefault(__webpack_require__(/*! ./html.ejs */ \"./lib/templates/bootstrap/checkbox/html.ejs.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n form: _form.default,\n html: _html.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/checkbox/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/checkbox/form.ejs.js\"));\nvar _html = _interopRequireDefault(__webpack_require__(/*! ./html.ejs */ \"./lib/templates/bootstrap/checkbox/html.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"],\n html: _html[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/checkbox/index.js?"); /***/ }), @@ -2923,7 +2956,7 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/columns/form.ejs.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n form: _form.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/columns/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/columns/form.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/columns/index.js?"); /***/ }), @@ -2944,7 +2977,7 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/component/form.ejs.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n form: _form.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/component/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/component/form.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/component/index.js?"); /***/ }), @@ -2965,7 +2998,7 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/componentModal/form.ejs.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n form: _form.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/componentModal/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/componentModal/form.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/componentModal/index.js?"); /***/ }), @@ -2986,7 +3019,7 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/components/form.ejs.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n form: _form.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/components/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/components/form.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/components/index.js?"); /***/ }), @@ -3007,7 +3040,7 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/container/form.ejs.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n form: _form.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/container/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/container/form.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/container/index.js?"); /***/ }), @@ -3015,10 +3048,10 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /*!***********************************************!*\ !*** ./lib/templates/bootstrap/cssClasses.js ***! \***********************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = {\n 'border-default': '',\n 'formio-tab-panel-active': 'active',\n 'formio-tab-link-active': 'active',\n 'formio-tab-link-container-active': 'active',\n 'formio-form-error': 'formio-error-wrapper has-message',\n 'formio-form-alert': 'alert alert-danger',\n 'formio-label-error': '',\n 'formio-input-error': '',\n 'formio-alert-danger': 'alert alert-danger',\n 'formio-alert-success': 'alert alert-success',\n 'formio-alert-warning': 'alert alert-warning',\n 'formio-modal-cancel-button': 'btn btn-danger formio-dialog-button',\n 'formio-modal-confirm-button': 'btn btn-primary formio-dialog-button'\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/cssClasses.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = {\n 'border-default': '',\n 'formio-tab-panel-active': 'active',\n 'formio-tab-link-active': 'active',\n 'formio-tab-link-container-active': 'active',\n 'formio-form-error': 'formio-error-wrapper has-message',\n 'formio-form-alert': 'alert alert-danger',\n 'formio-label-error': '',\n 'formio-input-error': '',\n 'formio-alert-danger': 'alert alert-danger',\n 'formio-alert-success': 'alert alert-success',\n 'formio-alert-warning': 'alert alert-warning',\n 'formio-modal-cancel-button': 'btn btn-danger formio-dialog-button',\n 'formio-modal-confirm-button': 'btn btn-primary formio-dialog-button'\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/cssClasses.js?"); /***/ }), @@ -3028,7 +3061,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); \******************************************************/ /***/ (function(__unused_webpack_module, exports) { -eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"]=function(ctx) {\nvar __t, __p = '', __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n__p += '\\n ' +\n((__t = ( col.hideLabel ? '' : ctx.t(col.label || col.title, { _userInput: true }) )) == null ? '' : __t) +\n'\\n ';\n if (col.tooltip) { ;\n__p += ' ';\n } ;\n__p += '\\n \\n ';\n }) ;\n__p += '\\n ';\n if (ctx.hasExtraColumn) { ;\n__p += '\\n \\n ';\n } ;\n__p += '\\n \\n \\n ';\n } ;\n__p += '\\n \\n ';\n ctx.rows.forEach(function(row, index) { ;\n__p += '\\n ';\n if (ctx.hasGroups && ctx.groups[index]) { ;\n__p += '\\n \\n ' +\n((__t = (ctx.groups[index].label)) == null ? '' : __t) +\n'\\n \\n ';\n } ;\n__p += '\\n \\n ';\n if (ctx.component.reorder) { ;\n__p += '\\n \\n ';\n } ;\n__p += '\\n ';\n ctx.columns.forEach(function(col) { ;\n__p += '\\n \\n ';\n } ;\n__p += '\\n ';\n if (ctx.canAddColumn) { ;\n__p += '\\n \\n ';\n } ;\n__p += '\\n ';\n } ;\n__p += '\\n \\n ';\n }) ;\n__p += '\\n \\n ';\n if (!ctx.builder && ctx.hasAddButton && ctx.hasBottomSubmit) { ;\n__p += '\\n \\n \\n \\n \\n \\n ';\n } ;\n__p += '\\n
\\n ' +\n((__t = ( ctx.t('Add/Remove') )) == null ? '' : __t) +\n'\\n ';\n if (!ctx.builder && ctx.hasAddButton && ctx.hasTopSubmit) { ;\n__p += '\\n \\n ';\n } ;\n__p += '\\n
\\n \\n \\n ';\n }) ;\n__p += '\\n ';\n if (ctx.hasExtraColumn) { ;\n__p += '\\n ';\n if (ctx.hasRemoveButtons) { ;\n__p += '\\n \\n \\n \\n ' +\n((__t = (ctx.placeholder)) == null ? '' : __t) +\n'\\n
\\n \\n
\\n';\nreturn __p\n}\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/datagrid/form.ejs.js?"); +eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"]=function(ctx) {\nvar __t, __p = '', __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n__p += '\\n ' +\n((__t = ( col.hideLabel ? '' : ctx.t(col.label || col.title, { _userInput: true }) )) == null ? '' : __t) +\n'\\n ';\n if (col.tooltip) { ;\n__p += ' ';\n } ;\n__p += '\\n \\n ';\n }) ;\n__p += '\\n ';\n if (ctx.hasExtraColumn) { ;\n__p += '\\n \\n ';\n } ;\n__p += '\\n \\n \\n ';\n } ;\n__p += '\\n \\n ';\n ctx.rows.forEach(function(row, index) { ;\n__p += '\\n ';\n if (ctx.hasGroups && ctx.groups[index]) { ;\n__p += '\\n \\n ' +\n((__t = (ctx.groups[index].label)) == null ? '' : __t) +\n'\\n \\n ';\n } ;\n__p += '\\n \\n ';\n if (ctx.component.reorder) { ;\n__p += '\\n \\n ';\n } ;\n__p += '\\n ';\n ctx.columns.forEach(function(col) { ;\n__p += '\\n \\n ';\n } ;\n__p += '\\n ';\n if (ctx.canAddColumn) { ;\n__p += '\\n \\n ';\n } ;\n__p += '\\n ';\n } ;\n__p += '\\n \\n ';\n }) ;\n__p += '\\n \\n ';\n if (!ctx.builder && ctx.hasAddButton && ctx.hasBottomSubmit) { ;\n__p += '\\n \\n \\n \\n \\n \\n ';\n } ;\n__p += '\\n
\\n ' +\n((__t = ( ctx.t('Add/Remove') )) == null ? '' : __t) +\n'\\n ';\n if (!ctx.builder && ctx.hasAddButton && ctx.hasTopSubmit) { ;\n__p += '\\n \\n ';\n } ;\n__p += '\\n
\\n \\n \\n ';\n }) ;\n__p += '\\n ';\n if (ctx.hasExtraColumn) { ;\n__p += '\\n ';\n if (ctx.hasRemoveButtons) { ;\n__p += '\\n \\n \\n \\n ' +\n((__t = (ctx.placeholder)) == null ? '' : __t) +\n'\\n
\\n \\n
\\n';\nreturn __p\n}\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/datagrid/form.ejs.js?"); /***/ }), @@ -3049,7 +3082,7 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/datagrid/form.ejs.js\"));\n\nvar _html = _interopRequireDefault(__webpack_require__(/*! ./html.ejs */ \"./lib/templates/bootstrap/datagrid/html.ejs.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n form: _form.default,\n html: _html.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/datagrid/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/datagrid/form.ejs.js\"));\nvar _html = _interopRequireDefault(__webpack_require__(/*! ./html.ejs */ \"./lib/templates/bootstrap/datagrid/html.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"],\n html: _html[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/datagrid/index.js?"); /***/ }), @@ -3070,7 +3103,7 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/day/form.ejs.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n form: _form.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/day/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/day/form.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/day/index.js?"); /***/ }), @@ -3091,7 +3124,7 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/dialog/form.ejs.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n form: _form.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/dialog/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/dialog/form.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/dialog/index.js?"); /***/ }), @@ -3122,7 +3155,7 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/editgrid/form.ejs.js\"));\n\nvar _html = _interopRequireDefault(__webpack_require__(/*! ./html.ejs */ \"./lib/templates/bootstrap/editgrid/html.ejs.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n form: _form.default,\n html: _html.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/editgrid/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/editgrid/form.ejs.js\"));\nvar _html = _interopRequireDefault(__webpack_require__(/*! ./html.ejs */ \"./lib/templates/bootstrap/editgrid/html.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"],\n html: _html[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/editgrid/index.js?"); /***/ }), @@ -3153,7 +3186,7 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/editgridTable/form.ejs.js\"));\n\nvar _html = _interopRequireDefault(__webpack_require__(/*! ./html.ejs */ \"./lib/templates/bootstrap/editgridTable/html.ejs.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n form: _form.default,\n html: _html.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/editgridTable/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/editgridTable/form.ejs.js\"));\nvar _html = _interopRequireDefault(__webpack_require__(/*! ./html.ejs */ \"./lib/templates/bootstrap/editgridTable/html.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"],\n html: _html[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/editgridTable/index.js?"); /***/ }), @@ -3174,7 +3207,7 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/errorsList/form.ejs.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n form: _form.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/errorsList/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/errorsList/form.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/errorsList/index.js?"); /***/ }), @@ -3205,7 +3238,7 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/field/form.ejs.js\"));\n\nvar _align = _interopRequireDefault(__webpack_require__(/*! ./align.ejs */ \"./lib/templates/bootstrap/field/align.ejs.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n form: _form.default,\n align: _align.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/field/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/field/form.ejs.js\"));\nvar _align = _interopRequireDefault(__webpack_require__(/*! ./align.ejs */ \"./lib/templates/bootstrap/field/align.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"],\n align: _align[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/field/index.js?"); /***/ }), @@ -3226,7 +3259,7 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/fieldset/form.ejs.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n form: _form.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/fieldset/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/fieldset/form.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/fieldset/index.js?"); /***/ }), @@ -3247,7 +3280,7 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/file/form.ejs.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n form: _form.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/file/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/file/form.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/file/index.js?"); /***/ }), @@ -3268,7 +3301,7 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/html/form.ejs.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n form: _form.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/html/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/html/form.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/html/index.js?"); /***/ }), @@ -3289,7 +3322,7 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/icon/form.ejs.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n form: _form.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/icon/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/icon/form.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/icon/index.js?"); /***/ }), @@ -3300,7 +3333,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\nvar _default = function _default(iconset, name, spinning) {\n if (iconset === 'fa') {\n switch (name) {\n case 'save':\n name = 'download';\n break;\n\n case 'zoom-in':\n name = 'search-plus';\n break;\n\n case 'zoom-out':\n name = 'search-minus';\n break;\n\n case 'question-sign':\n name = 'question-circle';\n break;\n\n case 'remove-circle':\n name = 'times-circle-o';\n break;\n\n case 'new-window':\n name = 'window-restore';\n break;\n\n case 'move':\n name = 'arrows';\n break;\n\n case 'time':\n name = 'clock-o';\n break;\n }\n }\n\n return spinning ? \"\".concat(iconset, \" \").concat(iconset, \"-\").concat(name, \" \").concat(iconset, \"-spin\") : \"\".concat(iconset, \" \").concat(iconset, \"-\").concat(name);\n};\n\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/iconClass.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\nvar _default = function _default(iconset, name, spinning) {\n if (iconset === 'fa') {\n switch (name) {\n case 'save':\n name = 'download';\n break;\n case 'zoom-in':\n name = 'search-plus';\n break;\n case 'zoom-out':\n name = 'search-minus';\n break;\n case 'question-sign':\n name = 'question-circle';\n break;\n case 'remove-circle':\n name = 'times-circle-o';\n break;\n case 'new-window':\n name = 'window-restore';\n break;\n case 'move':\n name = 'arrows';\n break;\n case 'time':\n name = 'clock-o';\n break;\n }\n }\n return spinning ? \"\".concat(iconset, \" \").concat(iconset, \"-\").concat(name, \" \").concat(iconset, \"-spin\") : \"\".concat(iconset, \" \").concat(iconset, \"-\").concat(name);\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/iconClass.js?"); /***/ }), @@ -3311,7 +3344,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptors.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n\nvar _address = _interopRequireDefault(__webpack_require__(/*! ./address */ \"./lib/templates/bootstrap/address/index.js\"));\n\nvar _builder = _interopRequireDefault(__webpack_require__(/*! ./builder */ \"./lib/templates/bootstrap/builder/index.js\"));\n\nvar _builderComponent = _interopRequireDefault(__webpack_require__(/*! ./builderComponent */ \"./lib/templates/bootstrap/builderComponent/index.js\"));\n\nvar _builderComponents = _interopRequireDefault(__webpack_require__(/*! ./builderComponents */ \"./lib/templates/bootstrap/builderComponents/index.js\"));\n\nvar _builderEditForm = _interopRequireDefault(__webpack_require__(/*! ./builderEditForm */ \"./lib/templates/bootstrap/builderEditForm/index.js\"));\n\nvar _builderPlaceholder = _interopRequireDefault(__webpack_require__(/*! ./builderPlaceholder */ \"./lib/templates/bootstrap/builderPlaceholder/index.js\"));\n\nvar _builderSidebar = _interopRequireDefault(__webpack_require__(/*! ./builderSidebar */ \"./lib/templates/bootstrap/builderSidebar/index.js\"));\n\nvar _builderSidebarGroup = _interopRequireDefault(__webpack_require__(/*! ./builderSidebarGroup */ \"./lib/templates/bootstrap/builderSidebarGroup/index.js\"));\n\nvar _builderWizard = _interopRequireDefault(__webpack_require__(/*! ./builderWizard */ \"./lib/templates/bootstrap/builderWizard/index.js\"));\n\nvar _button = _interopRequireDefault(__webpack_require__(/*! ./button */ \"./lib/templates/bootstrap/button/index.js\"));\n\nvar _checkbox = _interopRequireDefault(__webpack_require__(/*! ./checkbox */ \"./lib/templates/bootstrap/checkbox/index.js\"));\n\nvar _columns = _interopRequireDefault(__webpack_require__(/*! ./columns */ \"./lib/templates/bootstrap/columns/index.js\"));\n\nvar _component = _interopRequireDefault(__webpack_require__(/*! ./component */ \"./lib/templates/bootstrap/component/index.js\"));\n\nvar _componentModal = _interopRequireDefault(__webpack_require__(/*! ./componentModal */ \"./lib/templates/bootstrap/componentModal/index.js\"));\n\nvar _components = _interopRequireDefault(__webpack_require__(/*! ./components */ \"./lib/templates/bootstrap/components/index.js\"));\n\nvar _tableComponents = _interopRequireDefault(__webpack_require__(/*! ./tableComponents */ \"./lib/templates/bootstrap/tableComponents/index.js\"));\n\nvar _container = _interopRequireDefault(__webpack_require__(/*! ./container */ \"./lib/templates/bootstrap/container/index.js\"));\n\nvar _datagrid = _interopRequireDefault(__webpack_require__(/*! ./datagrid */ \"./lib/templates/bootstrap/datagrid/index.js\"));\n\nvar _day = _interopRequireDefault(__webpack_require__(/*! ./day */ \"./lib/templates/bootstrap/day/index.js\"));\n\nvar _dialog = _interopRequireDefault(__webpack_require__(/*! ./dialog */ \"./lib/templates/bootstrap/dialog/index.js\"));\n\nvar _editgrid = _interopRequireDefault(__webpack_require__(/*! ./editgrid */ \"./lib/templates/bootstrap/editgrid/index.js\"));\n\nvar _editgridTable = _interopRequireDefault(__webpack_require__(/*! ./editgridTable */ \"./lib/templates/bootstrap/editgridTable/index.js\"));\n\nvar _field = _interopRequireDefault(__webpack_require__(/*! ./field */ \"./lib/templates/bootstrap/field/index.js\"));\n\nvar _fieldset = _interopRequireDefault(__webpack_require__(/*! ./fieldset */ \"./lib/templates/bootstrap/fieldset/index.js\"));\n\nvar _file = _interopRequireDefault(__webpack_require__(/*! ./file */ \"./lib/templates/bootstrap/file/index.js\"));\n\nvar _html = _interopRequireDefault(__webpack_require__(/*! ./html */ \"./lib/templates/bootstrap/html/index.js\"));\n\nvar _icon = _interopRequireDefault(__webpack_require__(/*! ./icon */ \"./lib/templates/bootstrap/icon/index.js\"));\n\nvar _iconClass = _interopRequireDefault(__webpack_require__(/*! ./iconClass */ \"./lib/templates/bootstrap/iconClass.js\"));\n\nvar _input = _interopRequireDefault(__webpack_require__(/*! ./input */ \"./lib/templates/bootstrap/input/index.js\"));\n\nvar _label = _interopRequireDefault(__webpack_require__(/*! ./label */ \"./lib/templates/bootstrap/label/index.js\"));\n\nvar _loader = _interopRequireDefault(__webpack_require__(/*! ./loader */ \"./lib/templates/bootstrap/loader/index.js\"));\n\nvar _loading = _interopRequireDefault(__webpack_require__(/*! ./loading */ \"./lib/templates/bootstrap/loading/index.js\"));\n\nvar _map = _interopRequireDefault(__webpack_require__(/*! ./map */ \"./lib/templates/bootstrap/map/index.js\"));\n\nvar _message = _interopRequireDefault(__webpack_require__(/*! ./message */ \"./lib/templates/bootstrap/message/index.js\"));\n\nvar _modaldialog = _interopRequireDefault(__webpack_require__(/*! ./modaldialog */ \"./lib/templates/bootstrap/modaldialog/index.js\"));\n\nvar _modaledit = _interopRequireDefault(__webpack_require__(/*! ./modaledit */ \"./lib/templates/bootstrap/modaledit/index.js\"));\n\nvar _modalPreview = _interopRequireDefault(__webpack_require__(/*! ./modalPreview */ \"./lib/templates/bootstrap/modalPreview/index.js\"));\n\nvar _multipleMasksInput = _interopRequireDefault(__webpack_require__(/*! ./multipleMasksInput */ \"./lib/templates/bootstrap/multipleMasksInput/index.js\"));\n\nvar _multiValueRow = _interopRequireDefault(__webpack_require__(/*! ./multiValueRow */ \"./lib/templates/bootstrap/multiValueRow/index.js\"));\n\nvar _multiValueTable = _interopRequireDefault(__webpack_require__(/*! ./multiValueTable */ \"./lib/templates/bootstrap/multiValueTable/index.js\"));\n\nvar _panel = _interopRequireDefault(__webpack_require__(/*! ./panel */ \"./lib/templates/bootstrap/panel/index.js\"));\n\nvar _pdf = _interopRequireDefault(__webpack_require__(/*! ./pdf */ \"./lib/templates/bootstrap/pdf/index.js\"));\n\nvar _pdfBuilder = _interopRequireDefault(__webpack_require__(/*! ./pdfBuilder */ \"./lib/templates/bootstrap/pdfBuilder/index.js\"));\n\nvar _pdfBuilderUpload = _interopRequireDefault(__webpack_require__(/*! ./pdfBuilderUpload */ \"./lib/templates/bootstrap/pdfBuilderUpload/index.js\"));\n\nvar _radio = _interopRequireDefault(__webpack_require__(/*! ./radio */ \"./lib/templates/bootstrap/radio/index.js\"));\n\nvar _resourceAdd = _interopRequireDefault(__webpack_require__(/*! ./resourceAdd */ \"./lib/templates/bootstrap/resourceAdd/index.js\"));\n\nvar _select = _interopRequireDefault(__webpack_require__(/*! ./select */ \"./lib/templates/bootstrap/select/index.js\"));\n\nvar _selectOption = _interopRequireDefault(__webpack_require__(/*! ./selectOption */ \"./lib/templates/bootstrap/selectOption/index.js\"));\n\nvar _signature = _interopRequireDefault(__webpack_require__(/*! ./signature */ \"./lib/templates/bootstrap/signature/index.js\"));\n\nvar _survey = _interopRequireDefault(__webpack_require__(/*! ./survey */ \"./lib/templates/bootstrap/survey/index.js\"));\n\nvar _tab = _interopRequireDefault(__webpack_require__(/*! ./tab */ \"./lib/templates/bootstrap/tab/index.js\"));\n\nvar _table = _interopRequireDefault(__webpack_require__(/*! ./table */ \"./lib/templates/bootstrap/table/index.js\"));\n\nvar _tree = _interopRequireDefault(__webpack_require__(/*! ./tree */ \"./lib/templates/bootstrap/tree/index.js\"));\n\nvar _partials = _interopRequireDefault(__webpack_require__(/*! ./tree/partials */ \"./lib/templates/bootstrap/tree/partials/index.js\"));\n\nvar _webform = _interopRequireDefault(__webpack_require__(/*! ./webform */ \"./lib/templates/bootstrap/webform/index.js\"));\n\nvar _well = _interopRequireDefault(__webpack_require__(/*! ./well */ \"./lib/templates/bootstrap/well/index.js\"));\n\nvar _wizard = _interopRequireDefault(__webpack_require__(/*! ./wizard */ \"./lib/templates/bootstrap/wizard/index.js\"));\n\nvar _wizardHeader = _interopRequireDefault(__webpack_require__(/*! ./wizardHeader */ \"./lib/templates/bootstrap/wizardHeader/index.js\"));\n\nvar _wizardHeaderClassic = _interopRequireDefault(__webpack_require__(/*! ./wizardHeaderClassic */ \"./lib/templates/bootstrap/wizardHeaderClassic/index.js\"));\n\nvar _wizardHeaderVertical = _interopRequireDefault(__webpack_require__(/*! ./wizardHeaderVertical */ \"./lib/templates/bootstrap/wizardHeaderVertical/index.js\"));\n\nvar _wizardNav = _interopRequireDefault(__webpack_require__(/*! ./wizardNav */ \"./lib/templates/bootstrap/wizardNav/index.js\"));\n\nvar _cssClasses = _interopRequireDefault(__webpack_require__(/*! ./cssClasses */ \"./lib/templates/bootstrap/cssClasses.js\"));\n\nvar _errorsList = _interopRequireDefault(__webpack_require__(/*! ./errorsList */ \"./lib/templates/bootstrap/errorsList/index.js\"));\n\nvar _alert = _interopRequireDefault(__webpack_require__(/*! ./alert */ \"./lib/templates/bootstrap/alert/index.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar _default = _objectSpread(_objectSpread({\n transform: function transform(type, text) {\n if (!text) {\n return text;\n }\n\n switch (type) {\n case 'class':\n return this.cssClasses.hasOwnProperty(text.toString()) ? this.cssClasses[text.toString()] : text;\n }\n\n return text;\n },\n defaultIconset: 'fa',\n iconClass: _iconClass.default,\n cssClasses: _cssClasses.default,\n address: _address.default,\n builder: _builder.default,\n builderComponent: _builderComponent.default,\n builderComponents: _builderComponents.default,\n builderEditForm: _builderEditForm.default,\n builderPlaceholder: _builderPlaceholder.default,\n builderSidebar: _builderSidebar.default,\n builderSidebarGroup: _builderSidebarGroup.default,\n builderWizard: _builderWizard.default,\n button: _button.default,\n checkbox: _checkbox.default,\n columns: _columns.default,\n component: _component.default,\n componentModal: _componentModal.default,\n components: _components.default,\n tableComponents: _tableComponents.default,\n container: _container.default,\n datagrid: _datagrid.default,\n day: _day.default,\n dialog: _dialog.default,\n editgrid: _editgrid.default,\n editgridTable: _editgridTable.default,\n field: _field.default,\n fieldset: _fieldset.default,\n file: _file.default,\n html: _html.default,\n icon: _icon.default,\n input: _input.default,\n label: _label.default,\n loader: _loader.default,\n loading: _loading.default,\n map: _map.default,\n message: _message.default,\n modaledit: _modaledit.default,\n modaldialog: _modaldialog.default,\n modalPreview: _modalPreview.default,\n multipleMasksInput: _multipleMasksInput.default,\n multiValueRow: _multiValueRow.default,\n multiValueTable: _multiValueTable.default,\n panel: _panel.default,\n pdf: _pdf.default,\n pdfBuilder: _pdfBuilder.default,\n pdfBuilderUpload: _pdfBuilderUpload.default,\n radio: _radio.default,\n resourceAdd: _resourceAdd.default,\n select: _select.default,\n selectOption: _selectOption.default,\n signature: _signature.default,\n survey: _survey.default,\n tab: _tab.default,\n table: _table.default,\n tree: _tree.default\n}, _partials.default), {}, {\n webform: _webform.default,\n well: _well.default,\n wizard: _wizard.default,\n wizardHeader: _wizardHeader.default,\n wizardHeaderClassic: _wizardHeaderClassic.default,\n wizardHeaderVertical: _wizardHeaderVertical.default,\n wizardNav: _wizardNav.default,\n errorsList: _errorsList.default,\n alert: _alert.default\n});\n\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptors.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-properties.js */ \"./node_modules/core-js/modules/es.object.define-properties.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.date.to-string.js */ \"./node_modules/core-js/modules/es.date.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\nvar _address = _interopRequireDefault(__webpack_require__(/*! ./address */ \"./lib/templates/bootstrap/address/index.js\"));\nvar _builder = _interopRequireDefault(__webpack_require__(/*! ./builder */ \"./lib/templates/bootstrap/builder/index.js\"));\nvar _builderComponent = _interopRequireDefault(__webpack_require__(/*! ./builderComponent */ \"./lib/templates/bootstrap/builderComponent/index.js\"));\nvar _builderComponents = _interopRequireDefault(__webpack_require__(/*! ./builderComponents */ \"./lib/templates/bootstrap/builderComponents/index.js\"));\nvar _builderEditForm = _interopRequireDefault(__webpack_require__(/*! ./builderEditForm */ \"./lib/templates/bootstrap/builderEditForm/index.js\"));\nvar _builderPlaceholder = _interopRequireDefault(__webpack_require__(/*! ./builderPlaceholder */ \"./lib/templates/bootstrap/builderPlaceholder/index.js\"));\nvar _builderSidebar = _interopRequireDefault(__webpack_require__(/*! ./builderSidebar */ \"./lib/templates/bootstrap/builderSidebar/index.js\"));\nvar _builderSidebarGroup = _interopRequireDefault(__webpack_require__(/*! ./builderSidebarGroup */ \"./lib/templates/bootstrap/builderSidebarGroup/index.js\"));\nvar _builderWizard = _interopRequireDefault(__webpack_require__(/*! ./builderWizard */ \"./lib/templates/bootstrap/builderWizard/index.js\"));\nvar _button = _interopRequireDefault(__webpack_require__(/*! ./button */ \"./lib/templates/bootstrap/button/index.js\"));\nvar _checkbox = _interopRequireDefault(__webpack_require__(/*! ./checkbox */ \"./lib/templates/bootstrap/checkbox/index.js\"));\nvar _columns = _interopRequireDefault(__webpack_require__(/*! ./columns */ \"./lib/templates/bootstrap/columns/index.js\"));\nvar _component = _interopRequireDefault(__webpack_require__(/*! ./component */ \"./lib/templates/bootstrap/component/index.js\"));\nvar _componentModal = _interopRequireDefault(__webpack_require__(/*! ./componentModal */ \"./lib/templates/bootstrap/componentModal/index.js\"));\nvar _components = _interopRequireDefault(__webpack_require__(/*! ./components */ \"./lib/templates/bootstrap/components/index.js\"));\nvar _tableComponents = _interopRequireDefault(__webpack_require__(/*! ./tableComponents */ \"./lib/templates/bootstrap/tableComponents/index.js\"));\nvar _container = _interopRequireDefault(__webpack_require__(/*! ./container */ \"./lib/templates/bootstrap/container/index.js\"));\nvar _datagrid = _interopRequireDefault(__webpack_require__(/*! ./datagrid */ \"./lib/templates/bootstrap/datagrid/index.js\"));\nvar _day = _interopRequireDefault(__webpack_require__(/*! ./day */ \"./lib/templates/bootstrap/day/index.js\"));\nvar _dialog = _interopRequireDefault(__webpack_require__(/*! ./dialog */ \"./lib/templates/bootstrap/dialog/index.js\"));\nvar _editgrid = _interopRequireDefault(__webpack_require__(/*! ./editgrid */ \"./lib/templates/bootstrap/editgrid/index.js\"));\nvar _editgridTable = _interopRequireDefault(__webpack_require__(/*! ./editgridTable */ \"./lib/templates/bootstrap/editgridTable/index.js\"));\nvar _field = _interopRequireDefault(__webpack_require__(/*! ./field */ \"./lib/templates/bootstrap/field/index.js\"));\nvar _fieldset = _interopRequireDefault(__webpack_require__(/*! ./fieldset */ \"./lib/templates/bootstrap/fieldset/index.js\"));\nvar _file = _interopRequireDefault(__webpack_require__(/*! ./file */ \"./lib/templates/bootstrap/file/index.js\"));\nvar _html = _interopRequireDefault(__webpack_require__(/*! ./html */ \"./lib/templates/bootstrap/html/index.js\"));\nvar _icon = _interopRequireDefault(__webpack_require__(/*! ./icon */ \"./lib/templates/bootstrap/icon/index.js\"));\nvar _iconClass = _interopRequireDefault(__webpack_require__(/*! ./iconClass */ \"./lib/templates/bootstrap/iconClass.js\"));\nvar _input = _interopRequireDefault(__webpack_require__(/*! ./input */ \"./lib/templates/bootstrap/input/index.js\"));\nvar _label = _interopRequireDefault(__webpack_require__(/*! ./label */ \"./lib/templates/bootstrap/label/index.js\"));\nvar _loader = _interopRequireDefault(__webpack_require__(/*! ./loader */ \"./lib/templates/bootstrap/loader/index.js\"));\nvar _loading = _interopRequireDefault(__webpack_require__(/*! ./loading */ \"./lib/templates/bootstrap/loading/index.js\"));\nvar _map = _interopRequireDefault(__webpack_require__(/*! ./map */ \"./lib/templates/bootstrap/map/index.js\"));\nvar _message = _interopRequireDefault(__webpack_require__(/*! ./message */ \"./lib/templates/bootstrap/message/index.js\"));\nvar _modaldialog = _interopRequireDefault(__webpack_require__(/*! ./modaldialog */ \"./lib/templates/bootstrap/modaldialog/index.js\"));\nvar _modaledit = _interopRequireDefault(__webpack_require__(/*! ./modaledit */ \"./lib/templates/bootstrap/modaledit/index.js\"));\nvar _modalPreview = _interopRequireDefault(__webpack_require__(/*! ./modalPreview */ \"./lib/templates/bootstrap/modalPreview/index.js\"));\nvar _multipleMasksInput = _interopRequireDefault(__webpack_require__(/*! ./multipleMasksInput */ \"./lib/templates/bootstrap/multipleMasksInput/index.js\"));\nvar _multiValueRow = _interopRequireDefault(__webpack_require__(/*! ./multiValueRow */ \"./lib/templates/bootstrap/multiValueRow/index.js\"));\nvar _multiValueTable = _interopRequireDefault(__webpack_require__(/*! ./multiValueTable */ \"./lib/templates/bootstrap/multiValueTable/index.js\"));\nvar _panel = _interopRequireDefault(__webpack_require__(/*! ./panel */ \"./lib/templates/bootstrap/panel/index.js\"));\nvar _pdf = _interopRequireDefault(__webpack_require__(/*! ./pdf */ \"./lib/templates/bootstrap/pdf/index.js\"));\nvar _pdfBuilder = _interopRequireDefault(__webpack_require__(/*! ./pdfBuilder */ \"./lib/templates/bootstrap/pdfBuilder/index.js\"));\nvar _pdfBuilderUpload = _interopRequireDefault(__webpack_require__(/*! ./pdfBuilderUpload */ \"./lib/templates/bootstrap/pdfBuilderUpload/index.js\"));\nvar _radio = _interopRequireDefault(__webpack_require__(/*! ./radio */ \"./lib/templates/bootstrap/radio/index.js\"));\nvar _resourceAdd = _interopRequireDefault(__webpack_require__(/*! ./resourceAdd */ \"./lib/templates/bootstrap/resourceAdd/index.js\"));\nvar _select = _interopRequireDefault(__webpack_require__(/*! ./select */ \"./lib/templates/bootstrap/select/index.js\"));\nvar _selectOption = _interopRequireDefault(__webpack_require__(/*! ./selectOption */ \"./lib/templates/bootstrap/selectOption/index.js\"));\nvar _signature = _interopRequireDefault(__webpack_require__(/*! ./signature */ \"./lib/templates/bootstrap/signature/index.js\"));\nvar _survey = _interopRequireDefault(__webpack_require__(/*! ./survey */ \"./lib/templates/bootstrap/survey/index.js\"));\nvar _tab = _interopRequireDefault(__webpack_require__(/*! ./tab */ \"./lib/templates/bootstrap/tab/index.js\"));\nvar _table = _interopRequireDefault(__webpack_require__(/*! ./table */ \"./lib/templates/bootstrap/table/index.js\"));\nvar _tree = _interopRequireDefault(__webpack_require__(/*! ./tree */ \"./lib/templates/bootstrap/tree/index.js\"));\nvar _partials = _interopRequireDefault(__webpack_require__(/*! ./tree/partials */ \"./lib/templates/bootstrap/tree/partials/index.js\"));\nvar _webform = _interopRequireDefault(__webpack_require__(/*! ./webform */ \"./lib/templates/bootstrap/webform/index.js\"));\nvar _well = _interopRequireDefault(__webpack_require__(/*! ./well */ \"./lib/templates/bootstrap/well/index.js\"));\nvar _wizard = _interopRequireDefault(__webpack_require__(/*! ./wizard */ \"./lib/templates/bootstrap/wizard/index.js\"));\nvar _wizardHeader = _interopRequireDefault(__webpack_require__(/*! ./wizardHeader */ \"./lib/templates/bootstrap/wizardHeader/index.js\"));\nvar _wizardHeaderClassic = _interopRequireDefault(__webpack_require__(/*! ./wizardHeaderClassic */ \"./lib/templates/bootstrap/wizardHeaderClassic/index.js\"));\nvar _wizardHeaderVertical = _interopRequireDefault(__webpack_require__(/*! ./wizardHeaderVertical */ \"./lib/templates/bootstrap/wizardHeaderVertical/index.js\"));\nvar _wizardNav = _interopRequireDefault(__webpack_require__(/*! ./wizardNav */ \"./lib/templates/bootstrap/wizardNav/index.js\"));\nvar _cssClasses = _interopRequireDefault(__webpack_require__(/*! ./cssClasses */ \"./lib/templates/bootstrap/cssClasses.js\"));\nvar _errorsList = _interopRequireDefault(__webpack_require__(/*! ./errorsList */ \"./lib/templates/bootstrap/errorsList/index.js\"));\nvar _alert = _interopRequireDefault(__webpack_require__(/*! ./alert */ \"./lib/templates/bootstrap/alert/index.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar _default = _objectSpread(_objectSpread({\n transform: function transform(type, text) {\n if (!text) {\n return text;\n }\n switch (type) {\n case 'class':\n return this.cssClasses.hasOwnProperty(text.toString()) ? this.cssClasses[text.toString()] : text;\n }\n return text;\n },\n defaultIconset: 'fa',\n iconClass: _iconClass[\"default\"],\n cssClasses: _cssClasses[\"default\"],\n address: _address[\"default\"],\n builder: _builder[\"default\"],\n builderComponent: _builderComponent[\"default\"],\n builderComponents: _builderComponents[\"default\"],\n builderEditForm: _builderEditForm[\"default\"],\n builderPlaceholder: _builderPlaceholder[\"default\"],\n builderSidebar: _builderSidebar[\"default\"],\n builderSidebarGroup: _builderSidebarGroup[\"default\"],\n builderWizard: _builderWizard[\"default\"],\n button: _button[\"default\"],\n checkbox: _checkbox[\"default\"],\n columns: _columns[\"default\"],\n component: _component[\"default\"],\n componentModal: _componentModal[\"default\"],\n components: _components[\"default\"],\n tableComponents: _tableComponents[\"default\"],\n container: _container[\"default\"],\n datagrid: _datagrid[\"default\"],\n day: _day[\"default\"],\n dialog: _dialog[\"default\"],\n editgrid: _editgrid[\"default\"],\n editgridTable: _editgridTable[\"default\"],\n field: _field[\"default\"],\n fieldset: _fieldset[\"default\"],\n file: _file[\"default\"],\n html: _html[\"default\"],\n icon: _icon[\"default\"],\n input: _input[\"default\"],\n label: _label[\"default\"],\n loader: _loader[\"default\"],\n loading: _loading[\"default\"],\n map: _map[\"default\"],\n message: _message[\"default\"],\n modaledit: _modaledit[\"default\"],\n modaldialog: _modaldialog[\"default\"],\n modalPreview: _modalPreview[\"default\"],\n multipleMasksInput: _multipleMasksInput[\"default\"],\n multiValueRow: _multiValueRow[\"default\"],\n multiValueTable: _multiValueTable[\"default\"],\n panel: _panel[\"default\"],\n pdf: _pdf[\"default\"],\n pdfBuilder: _pdfBuilder[\"default\"],\n pdfBuilderUpload: _pdfBuilderUpload[\"default\"],\n radio: _radio[\"default\"],\n resourceAdd: _resourceAdd[\"default\"],\n select: _select[\"default\"],\n selectOption: _selectOption[\"default\"],\n signature: _signature[\"default\"],\n survey: _survey[\"default\"],\n tab: _tab[\"default\"],\n table: _table[\"default\"],\n tree: _tree[\"default\"]\n}, _partials[\"default\"]), {}, {\n webform: _webform[\"default\"],\n well: _well[\"default\"],\n wizard: _wizard[\"default\"],\n wizardHeader: _wizardHeader[\"default\"],\n wizardHeaderClassic: _wizardHeaderClassic[\"default\"],\n wizardHeaderVertical: _wizardHeaderVertical[\"default\"],\n wizardNav: _wizardNav[\"default\"],\n errorsList: _errorsList[\"default\"],\n alert: _alert[\"default\"]\n});\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/index.js?"); /***/ }), @@ -3321,7 +3354,7 @@ eval("\n\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_ \***************************************************/ /***/ (function(__unused_webpack_module, exports) { -eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"]=function(ctx) {\nvar __t, __p = '', __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n\n if (ctx.prefix || ctx.suffix) { ;\n__p += '\\n
\\n ';\n } ;\n__p += '\\n ';\n if (ctx.prefix) { ;\n__p += '\\n
\\n \\n ';\n if(ctx.prefix instanceof HTMLElement){ ;\n__p += '\\n ' +\n((__t = ( ctx.t(ctx.prefix.outerHTML, { _userInput: true }) )) == null ? '' : __t) +\n'\\n ';\n } else{ ;\n__p += '\\n ' +\n((__t = ( ctx.t(ctx.prefix, { _userInput: true }) )) == null ? '' : __t) +\n'\\n ';\n } ;\n__p += '\\n \\n
\\n ';\n } ;\n__p += '\\n ';\n if (!ctx.component.editor && !ctx.component.wysiwyg) { ;\n__p += '\\n <' +\n((__t = (ctx.input.type)) == null ? '' : __t) +\n'\\n ref=\"' +\n((__t = (ctx.input.ref ? ctx.input.ref : 'input')) == null ? '' : __t) +\n'\"\\n ';\n for (var attr in ctx.input.attr) { ;\n__p += '\\n ' +\n((__t = (attr)) == null ? '' : __t) +\n'=\"' +\n((__t = (ctx.input.attr[attr])) == null ? '' : __t) +\n'\"\\n ';\n } ;\n__p += '\\n id=\"' +\n((__t = (ctx.instance.id)) == null ? '' : __t) +\n'-' +\n((__t = (ctx.component.key)) == null ? '' : __t) +\n'\"\\n aria-labelledby=\"l-' +\n((__t = (ctx.instance.id)) == null ? '' : __t) +\n'-' +\n((__t = (ctx.component.key)) == null ? '' : __t) +\n' ';\n if (ctx.component.description) { ;\n__p += 'd-' +\n((__t = (ctx.instance.id)) == null ? '' : __t) +\n'-' +\n((__t = (ctx.component.key)) == null ? '' : __t);\n } ;\n__p += '\"\\n aria-required=\"' +\n((__t = (ctx.input.ref === 'input' || !ctx.input.ref ? ctx.component.validate.required :\n ctx.component.fields && ctx.component.fields[ctx.input.ref] && ctx.component.fields[ctx.input.ref].required || false)) == null ? '' : __t) +\n'\"\\n >' +\n((__t = (ctx.input.content)) == null ? '' : __t) +\n'\\n ';\n if (ctx.hasValueMaskInput) { ;\n__p += '\\n \\n ';\n } ;\n__p += '\\n';\n } ;\n__p += '\\n';\n if (ctx.component.editor || ctx.component.wysiwyg) { ;\n__p += '\\n
\\n';\n } ;\n__p += '\\n';\n if (ctx.component.type === 'datetime') { ;\n__p += '\\n\\n';\n } ;\n__p += '\\n';\n if (ctx.suffix) { ;\n__p += '\\n
\\n \\n ';\n if(ctx.suffix instanceof HTMLElement){ ;\n__p += '\\n ' +\n((__t = ( ctx.t(ctx.suffix.outerHTML, { _userInput: true }) )) == null ? '' : __t) +\n'\\n ';\n } else{ ;\n__p += '\\n ' +\n((__t = ( ctx.t(ctx.suffix, { _userInput: true }) )) == null ? '' : __t) +\n'\\n ';\n } ;\n__p += '\\n \\n
\\n';\n } ;\n__p += '\\n';\n if (ctx.prefix || ctx.suffix) { ;\n__p += '\\n
\\n';\n } ;\n__p += '\\n';\n if (ctx.component.showCharCount || ctx.component.showWordCount) { ;\n__p += '\\n
\\n ';\n if (ctx.component.showCharCount) { ;\n__p += '\\n \\n ';\n } ;\n__p += '\\n ';\n if (ctx.component.showWordCount) { ;\n__p += '\\n \\n ';\n } ;\n__p += '\\n
\\n';\n } ;\n__p += '\\n';\nreturn __p\n}\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/input/form.ejs.js?"); +eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"]=function(ctx) {\nvar __t, __p = '', __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n\n if (ctx.prefix || ctx.suffix) { ;\n__p += '\\n
\\n ';\n } ;\n__p += '\\n ';\n if (ctx.prefix) { ;\n__p += '\\n
\\n \\n ';\n if(ctx.prefix instanceof HTMLElement){ ;\n__p += '\\n ' +\n((__t = ( ctx.t(ctx.prefix.outerHTML, { _userInput: true }) )) == null ? '' : __t) +\n'\\n ';\n } else{ ;\n__p += '\\n ' +\n((__t = ( ctx.t(ctx.prefix, { _userInput: true }) )) == null ? '' : __t) +\n'\\n ';\n } ;\n__p += '\\n \\n
\\n ';\n } ;\n__p += '\\n ';\n if (!ctx.component.editor && !ctx.component.wysiwyg) { ;\n__p += '\\n <' +\n((__t = (ctx.input.type)) == null ? '' : __t) +\n'\\n ref=\"' +\n((__t = (ctx.input.ref ? ctx.input.ref : 'input')) == null ? '' : __t) +\n'\"\\n ';\n for (var attr in ctx.input.attr) { ;\n__p += '\\n ' +\n((__t = (attr)) == null ? '' : __t) +\n'=\"' +\n((__t = (ctx.input.attr[attr])) == null ? '' : __t) +\n'\"\\n ';\n } ;\n__p += '\\n id=\"' +\n((__t = (ctx.instance.id)) == null ? '' : __t) +\n'-' +\n((__t = (ctx.component.key)) == null ? '' : __t) +\n'\"\\n aria-labelledby=\"l-' +\n((__t = (ctx.instance.id)) == null ? '' : __t) +\n'-' +\n((__t = (ctx.component.key)) == null ? '' : __t) +\n' ';\n if (ctx.component.description) { ;\n__p += 'd-' +\n((__t = (ctx.instance.id)) == null ? '' : __t) +\n'-' +\n((__t = (ctx.component.key)) == null ? '' : __t);\n } ;\n__p += '\"\\n aria-required=\"' +\n((__t = (ctx.input.ref === 'input' || !ctx.input.ref ? ctx.component.validate.required :\n ctx.component.fields && ctx.component.fields[ctx.input.ref] && ctx.component.fields[ctx.input.ref].required || false)) == null ? '' : __t) +\n'\"\\n >' +\n((__t = (ctx.input.content)) == null ? '' : __t) +\n'\\n ';\n if (ctx.hasValueMaskInput) { ;\n__p += '\\n \\n ';\n } ;\n__p += '\\n';\n } ;\n__p += '\\n';\n if (ctx.component.editor || ctx.component.wysiwyg) { ;\n__p += '\\n
\\n';\n } ;\n__p += '\\n';\n if (ctx.component.type === 'datetime') { ;\n__p += '\\n\\n';\n } ;\n__p += '\\n';\n if (ctx.suffix) { ;\n__p += '\\n
\\n \\n ';\n if(ctx.suffix instanceof HTMLElement){ ;\n__p += '\\n ' +\n((__t = ( ctx.t(ctx.suffix.outerHTML, { _userInput: true }) )) == null ? '' : __t) +\n'\\n ';\n } else{ ;\n__p += '\\n ' +\n((__t = ( ctx.t(ctx.suffix, { _userInput: true }) )) == null ? '' : __t) +\n'\\n ';\n } ;\n__p += '\\n \\n
\\n';\n } ;\n__p += '\\n';\n if (ctx.prefix || ctx.suffix) { ;\n__p += '\\n
\\n';\n } ;\n__p += '\\n';\n if (ctx.component.showCharCount || ctx.component.showWordCount) { ;\n__p += '\\n
\\n ';\n if (ctx.component.showCharCount) { ;\n__p += '\\n \\n ';\n } ;\n__p += '\\n ';\n if (ctx.component.showWordCount) { ;\n__p += '\\n \\n ';\n } ;\n__p += '\\n
\\n';\n } ;\n__p += '\\n';\nreturn __p\n}\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/input/form.ejs.js?"); /***/ }), @@ -3342,7 +3375,7 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/input/form.ejs.js\"));\n\nvar _html = _interopRequireDefault(__webpack_require__(/*! ./html.ejs */ \"./lib/templates/bootstrap/input/html.ejs.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n form: _form.default,\n html: _html.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/input/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/input/form.ejs.js\"));\nvar _html = _interopRequireDefault(__webpack_require__(/*! ./html.ejs */ \"./lib/templates/bootstrap/input/html.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"],\n html: _html[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/input/index.js?"); /***/ }), @@ -3352,7 +3385,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); \***************************************************/ /***/ (function(__unused_webpack_module, exports) { -eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"]=function(ctx) {\nvar __t, __p = '', __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n__p += '\\n ' +\n((__t = ( ctx.t(ctx.component.label, { _userInput: true }) )) == null ? '' : __t) +\n'\\n ';\n if (ctx.component.type === 'number' || ctx.component.type === 'phoneNumber' || ctx.component.type === 'currency') { ;\n__p += '\\n , ' +\n((__t = (ctx.t('numeric only'))) == null ? '' : __t) +\n',\\n ';\n } ;\n__p += '\\n ';\n if (ctx.component.tooltip) { ;\n__p += '\\n \\n ';\n } ;\n__p += '\\n\\n';\nreturn __p\n}\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/label/form.ejs.js?"); +eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"]=function(ctx) {\nvar __t, __p = '', __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n__p += '\\n ' +\n((__t = ( ctx.t(ctx.component.label, { _userInput: true }) )) == null ? '' : __t) +\n'\\n ';\n if (ctx.component.type === 'number' || ctx.component.type === 'phoneNumber' || ctx.component.type === 'currency') { ;\n__p += '\\n , ' +\n((__t = (ctx.t('numeric only'))) == null ? '' : __t) +\n',\\n ';\n } ;\n__p += '\\n ';\n if (ctx.component.tooltip) { ;\n__p += '\\n \\n ';\n } ;\n__p += '\\n\\n';\nreturn __p\n}\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/label/form.ejs.js?"); /***/ }), @@ -3363,7 +3396,7 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/label/form.ejs.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n form: _form.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/label/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/label/form.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/label/index.js?"); /***/ }), @@ -3384,7 +3417,7 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/loader/form.ejs.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n form: _form.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/loader/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/loader/form.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/loader/index.js?"); /***/ }), @@ -3405,7 +3438,7 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/loading/form.ejs.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n form: _form.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/loading/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/loading/form.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/loading/index.js?"); /***/ }), @@ -3426,7 +3459,7 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/map/form.ejs.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n form: _form.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/map/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/map/form.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/map/index.js?"); /***/ }), @@ -3447,7 +3480,7 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/message/form.ejs.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n form: _form.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/message/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/message/form.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/message/index.js?"); /***/ }), @@ -3468,7 +3501,7 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/modalPreview/form.ejs.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n form: _form.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/modalPreview/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/modalPreview/form.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/modalPreview/index.js?"); /***/ }), @@ -3489,7 +3522,7 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/modaldialog/form.ejs.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n form: _form.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/modaldialog/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/modaldialog/form.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/modaldialog/index.js?"); /***/ }), @@ -3510,7 +3543,7 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/modaledit/form.ejs.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n form: _form.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/modaledit/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/modaledit/form.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/modaledit/index.js?"); /***/ }), @@ -3531,7 +3564,7 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/multiValueRow/form.ejs.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n form: _form.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/multiValueRow/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/multiValueRow/form.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/multiValueRow/index.js?"); /***/ }), @@ -3552,7 +3585,7 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/multiValueTable/form.ejs.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n form: _form.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/multiValueTable/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/multiValueTable/form.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/multiValueTable/index.js?"); /***/ }), @@ -3573,7 +3606,7 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/multipleMasksInput/form.ejs.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n form: _form.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/multipleMasksInput/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/multipleMasksInput/form.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/multipleMasksInput/index.js?"); /***/ }), @@ -3594,7 +3627,7 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/panel/form.ejs.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n form: _form.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/panel/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/panel/form.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/panel/index.js?"); /***/ }), @@ -3615,7 +3648,7 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/pdf/form.ejs.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n form: _form.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/pdf/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/pdf/form.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/pdf/index.js?"); /***/ }), @@ -3636,7 +3669,7 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/pdfBuilder/form.ejs.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n form: _form.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/pdfBuilder/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/pdfBuilder/form.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/pdfBuilder/index.js?"); /***/ }), @@ -3657,7 +3690,7 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/pdfBuilderUpload/form.ejs.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n form: _form.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/pdfBuilderUpload/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/pdfBuilderUpload/form.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/pdfBuilderUpload/index.js?"); /***/ }), @@ -3688,7 +3721,7 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/radio/form.ejs.js\"));\n\nvar _html = _interopRequireDefault(__webpack_require__(/*! ./html.ejs */ \"./lib/templates/bootstrap/radio/html.ejs.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n form: _form.default,\n html: _html.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/radio/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/radio/form.ejs.js\"));\nvar _html = _interopRequireDefault(__webpack_require__(/*! ./html.ejs */ \"./lib/templates/bootstrap/radio/html.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"],\n html: _html[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/radio/index.js?"); /***/ }), @@ -3709,7 +3742,7 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/resourceAdd/form.ejs.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n form: _form.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/resourceAdd/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/resourceAdd/form.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/resourceAdd/index.js?"); /***/ }), @@ -3740,7 +3773,7 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/select/form.ejs.js\"));\n\nvar _html = _interopRequireDefault(__webpack_require__(/*! ./html.ejs */ \"./lib/templates/bootstrap/select/html.ejs.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n form: _form.default,\n html: _html.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/select/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/select/form.ejs.js\"));\nvar _html = _interopRequireDefault(__webpack_require__(/*! ./html.ejs */ \"./lib/templates/bootstrap/select/html.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"],\n html: _html[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/select/index.js?"); /***/ }), @@ -3771,7 +3804,7 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/selectOption/form.ejs.js\"));\n\nvar _html = _interopRequireDefault(__webpack_require__(/*! ./html.ejs */ \"./lib/templates/bootstrap/selectOption/html.ejs.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n form: _form.default,\n html: _html.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/selectOption/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/selectOption/form.ejs.js\"));\nvar _html = _interopRequireDefault(__webpack_require__(/*! ./html.ejs */ \"./lib/templates/bootstrap/selectOption/html.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"],\n html: _html[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/selectOption/index.js?"); /***/ }), @@ -3781,7 +3814,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); \*******************************************************/ /***/ (function(__unused_webpack_module, exports) { -eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"]=function(ctx) {\nvar __t, __p = '', __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n__p +=\n((__t = (ctx.element)) == null ? '' : __t) +\n'\\n\\n \\n \\n \\n \\n ';\n if (ctx.required) { ;\n__p += '\\n \\n ';\n } ;\n__p += '\\n \\n\\n';\n if (ctx.component.footer) { ;\n__p += '\\n
\\n ' +\n((__t = (ctx.t(ctx.component.footer, { _userInput: true }))) == null ? '' : __t) +\n'\\n
\\n';\n } ;\n__p += '\\n';\nreturn __p\n}\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/signature/form.ejs.js?"); +eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"]=function(ctx) {\nvar __t, __p = '', __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n__p +=\n((__t = (ctx.element)) == null ? '' : __t) +\n'\\n\\n \\n \\n \\n \\n ';\n if (ctx.required) { ;\n__p += '\\n \\n ';\n } ;\n__p += '\\n \\n\\n';\n if (ctx.component.footer) { ;\n__p += '\\n
\\n ' +\n((__t = (ctx.t(ctx.component.footer, { _userInput: true }))) == null ? '' : __t) +\n'\\n
\\n';\n } ;\n__p += '\\n';\nreturn __p\n}\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/signature/form.ejs.js?"); /***/ }), @@ -3802,7 +3835,7 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/signature/form.ejs.js\"));\n\nvar _html = _interopRequireDefault(__webpack_require__(/*! ./html.ejs */ \"./lib/templates/bootstrap/signature/html.ejs.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n form: _form.default,\n html: _html.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/signature/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/signature/form.ejs.js\"));\nvar _html = _interopRequireDefault(__webpack_require__(/*! ./html.ejs */ \"./lib/templates/bootstrap/signature/html.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"],\n html: _html[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/signature/index.js?"); /***/ }), @@ -3833,7 +3866,7 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/survey/form.ejs.js\"));\n\nvar _html = _interopRequireDefault(__webpack_require__(/*! ./html.ejs */ \"./lib/templates/bootstrap/survey/html.ejs.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n form: _form.default,\n html: _html.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/survey/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/survey/form.ejs.js\"));\nvar _html = _interopRequireDefault(__webpack_require__(/*! ./html.ejs */ \"./lib/templates/bootstrap/survey/html.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"],\n html: _html[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/survey/index.js?"); /***/ }), @@ -3864,7 +3897,7 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _flat = _interopRequireDefault(__webpack_require__(/*! ./flat.ejs */ \"./lib/templates/bootstrap/tab/flat.ejs.js\"));\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/tab/form.ejs.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n flat: _flat.default,\n form: _form.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/tab/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _flat = _interopRequireDefault(__webpack_require__(/*! ./flat.ejs */ \"./lib/templates/bootstrap/tab/flat.ejs.js\"));\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/tab/form.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n flat: _flat[\"default\"],\n form: _form[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/tab/index.js?"); /***/ }), @@ -3885,7 +3918,7 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/table/form.ejs.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n form: _form.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/table/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/table/form.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/table/index.js?"); /***/ }), @@ -3906,7 +3939,7 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/tableComponents/form.ejs.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n form: _form.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/tableComponents/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/tableComponents/form.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/tableComponents/index.js?"); /***/ }), @@ -3927,7 +3960,7 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/tree/form.ejs.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n form: _form.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/tree/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/tree/form.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/tree/index.js?"); /***/ }), @@ -3948,7 +3981,7 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _edit = _interopRequireDefault(__webpack_require__(/*! ./edit.ejs */ \"./lib/templates/bootstrap/tree/partials/edit.ejs.js\"));\n\nvar _view = _interopRequireDefault(__webpack_require__(/*! ./view.ejs */ \"./lib/templates/bootstrap/tree/partials/view.ejs.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n treeView: {\n form: _view.default\n },\n treeEdit: {\n form: _edit.default\n }\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/tree/partials/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _edit = _interopRequireDefault(__webpack_require__(/*! ./edit.ejs */ \"./lib/templates/bootstrap/tree/partials/edit.ejs.js\"));\nvar _view = _interopRequireDefault(__webpack_require__(/*! ./view.ejs */ \"./lib/templates/bootstrap/tree/partials/view.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n treeView: {\n form: _view[\"default\"]\n },\n treeEdit: {\n form: _edit[\"default\"]\n }\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/tree/partials/index.js?"); /***/ }), @@ -3989,7 +4022,7 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/webform/form.ejs.js\"));\n\nvar _builder = _interopRequireDefault(__webpack_require__(/*! ./builder.ejs */ \"./lib/templates/bootstrap/webform/builder.ejs.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n form: _form.default,\n builder: _builder.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/webform/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/webform/form.ejs.js\"));\nvar _builder = _interopRequireDefault(__webpack_require__(/*! ./builder.ejs */ \"./lib/templates/bootstrap/webform/builder.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"],\n builder: _builder[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/webform/index.js?"); /***/ }), @@ -4010,7 +4043,7 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/well/form.ejs.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n form: _form.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/well/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/well/form.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/well/index.js?"); /***/ }), @@ -4041,7 +4074,7 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/wizard/form.ejs.js\"));\n\nvar _builder = _interopRequireDefault(__webpack_require__(/*! ./builder.ejs */ \"./lib/templates/bootstrap/wizard/builder.ejs.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n form: _form.default,\n builder: _builder.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/wizard/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/wizard/form.ejs.js\"));\nvar _builder = _interopRequireDefault(__webpack_require__(/*! ./builder.ejs */ \"./lib/templates/bootstrap/wizard/builder.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"],\n builder: _builder[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/wizard/index.js?"); /***/ }), @@ -4062,7 +4095,7 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/wizardHeader/form.ejs.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n form: _form.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/wizardHeader/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/wizardHeader/form.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/wizardHeader/index.js?"); /***/ }), @@ -4083,7 +4116,7 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/wizardHeaderClassic/form.ejs.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n form: _form.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/wizardHeaderClassic/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/wizardHeaderClassic/form.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/wizardHeaderClassic/index.js?"); /***/ }), @@ -4104,7 +4137,7 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/wizardHeaderVertical/form.ejs.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n form: _form.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/wizardHeaderVertical/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/wizardHeaderVertical/form.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/wizardHeaderVertical/index.js?"); /***/ }), @@ -4114,7 +4147,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); \*******************************************************/ /***/ (function(__unused_webpack_module, exports) { -eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"]=function(ctx) {\nvar __t, __p = '', __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n__p += '
    \\n ';\n ctx.buttonOrder.forEach(function(button) { ;\n__p += '\\n ';\n if (button === 'cancel' && ctx.buttons.cancel) { ;\n__p += '\\n
  • \\n \\n
  • \\n ';\n } ;\n__p += '\\n ';\n if (button === 'previous' && ctx.buttons.previous) { ;\n__p += '\\n
  • \\n \\n
  • \\n ';\n } ;\n__p += '\\n ';\n if (button === 'next' && ctx.buttons.next) { ;\n__p += '\\n
  • \\n \\n
  • \\n ';\n } ;\n__p += '\\n ';\n if (button === 'submit' && ctx.buttons.submit) { ;\n__p += '\\n
  • \\n ';\n if (ctx.disableWizardSubmit){ ;\n__p += '\\n \\n ';\n } else { ;\n__p += '\\n \\n ';\n } ;\n__p += '\\n
  • \\n ';\n } ;\n__p += '\\n ';\n }) ;\n__p += '\\n
\\n';\nreturn __p\n}\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/wizardNav/form.ejs.js?"); +eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"]=function(ctx) {\nvar __t, __p = '', __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n__p += '
    \\n ';\n ctx.buttonOrder.forEach(function(button) { ;\n__p += '\\n ';\n if (button === 'cancel' && ctx.buttons.cancel) { ;\n__p += '\\n
  • \\n \\n
  • \\n ';\n } ;\n__p += '\\n ';\n if (button === 'previous' && ctx.buttons.previous) { ;\n__p += '\\n
  • \\n \\n
  • \\n ';\n } ;\n__p += '\\n ';\n if (button === 'next' && ctx.buttons.next) { ;\n__p += '\\n
  • \\n \\n
  • \\n ';\n } ;\n__p += '\\n ';\n if (button === 'submit' && ctx.buttons.submit) { ;\n__p += '\\n
  • \\n ';\n if (ctx.disableWizardSubmit){ ;\n__p += '\\n \\n ';\n } else { ;\n__p += '\\n \\n ';\n } ;\n__p += '\\n
  • \\n ';\n } ;\n__p += '\\n ';\n }) ;\n__p += '\\n
\\n';\nreturn __p\n}\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/wizardNav/form.ejs.js?"); /***/ }), @@ -4125,106 +4158,610 @@ eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nex /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/wizardNav/form.ejs.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n form: _form.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/wizardNav/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap/wizardNav/form.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap/wizardNav/index.js?"); /***/ }), -/***/ "./lib/templates/index.js": -/*!********************************!*\ - !*** ./lib/templates/index.js ***! - \********************************/ +/***/ "./lib/templates/bootstrap5/builderSidebar/form.ejs.js": +/*!*************************************************************!*\ + !*** ./lib/templates/bootstrap5/builderSidebar/form.ejs.js ***! + \*************************************************************/ +/***/ (function(__unused_webpack_module, exports) { + +eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"]=function(ctx) {\nvar __t, __p = '', __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n__p += '
\\n \\n ';\n ctx.groups.forEach(function(group) { ;\n__p += '\\n ' +\n((__t = ( group )) == null ? '' : __t) +\n'\\n ';\n }) ;\n__p += '\\n
\\n';\nreturn __p\n}\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap5/builderSidebar/form.ejs.js?"); + +/***/ }), + +/***/ "./lib/templates/bootstrap5/builderSidebar/index.js": +/*!**********************************************************!*\ + !*** ./lib/templates/bootstrap5/builderSidebar/index.js ***! + \**********************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _bootstrap = _interopRequireDefault(__webpack_require__(/*! ./bootstrap */ \"./lib/templates/bootstrap/index.js\"));\n\nvar _bootstrap2 = _interopRequireDefault(__webpack_require__(/*! @formio/bootstrap3 */ \"./node_modules/@formio/bootstrap3/lib/index.js\"));\n\nvar _semantic = _interopRequireDefault(__webpack_require__(/*! @formio/semantic */ \"./node_modules/@formio/semantic/lib/index.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// Deprecated. Semantic and bootstrap3 will be removed in 5.x.\n// Use external modules instead.\nvar _default = {\n bootstrap: _bootstrap.default,\n bootstrap3: _bootstrap2.default.templates.bootstrap3,\n semantic: _semantic.default.templates.semantic\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap5/builderSidebar/form.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap5/builderSidebar/index.js?"); /***/ }), -/***/ "./lib/translations/en.js": -/*!********************************!*\ - !*** ./lib/translations/en.js ***! - \********************************/ +/***/ "./lib/templates/bootstrap5/builderSidebarGroup/form.ejs.js": +/*!******************************************************************!*\ + !*** ./lib/templates/bootstrap5/builderSidebarGroup/form.ejs.js ***! + \******************************************************************/ /***/ (function(__unused_webpack_module, exports) { -"use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = {\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 alertMessageWithLabel: '{{label}}: {{message}}',\n alertMessage: '{{message}}',\n complete: 'Submission Complete',\n error: 'Please fix the following errors before submitting.',\n errorListHotkey: 'Press Ctrl + Alt + X to go back to the error list.',\n errorsListNavigationMessage: 'Click to navigate to the field with following error.',\n submitError: 'Please check the form and correct all errors before submitting.',\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',\n // 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 minYear: '{{field}} should not contain year less than {{minYear}}',\n invalid_email: '{{field}} must be a valid email.',\n // eslint-disable-line camelcase\n invalid_url: '{{field}} must be a valid url.',\n // eslint-disable-line camelcase\n invalid_regex: '{{field}} does not match the pattern {{regex}}.',\n // eslint-disable-line camelcase\n invalid_date: '{{field}} is not a valid date.',\n // eslint-disable-line camelcase\n invalid_day: '{{field}} is not a valid day.',\n // eslint-disable-line camelcase\n mask: '{{field}} does not match the mask.',\n valueIsNotAvailable: '{{ field }} is an invalid value.',\n stripe: '{{stripe}}',\n month: 'Month',\n day: 'Day',\n year: 'Year',\n january: 'January',\n february: 'February',\n march: 'March',\n april: 'April',\n may: 'May',\n june: 'June',\n july: 'July',\n august: 'August',\n september: 'September',\n october: 'October',\n november: 'November',\n december: 'December',\n next: 'Next',\n previous: 'Previous',\n cancel: 'Cancel',\n submit: 'Submit Form',\n confirmCancel: 'Are you sure you want to cancel?',\n saveDraftInstanceError: 'Cannot save draft because there is no formio instance.',\n saveDraftAuthError: 'Cannot save draft unless a user is authenticated.',\n restoreDraftInstanceError: 'Cannot restore draft because there is no formio instance.',\n time: 'Invalid time'\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/translations/en.js?"); +eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"]=function(ctx) {\nvar __t, __p = '', __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n__p += '
\\n
\\n
\\n \\n ' +\n((__t = (ctx.t(ctx.group.title, { _userInput: true }))) == null ? '' : __t) +\n'\\n \\n
\\n
\\n \\n
\\n ';\n if (ctx.group.componentOrder.length || ctx.subgroups.length) { ;\n__p += '\\n ';\n !ctx.group.componentOrder || ctx.group.componentOrder.forEach(function(componentKey) { ;\n__p += '\\n \\n ';\n if (ctx.group.components[componentKey].icon) { ;\n__p += '\\n \\n ';\n } ;\n__p += '\\n ' +\n((__t = (ctx.t(ctx.group.components[componentKey].title, { _userInput: true }))) == null ? '' : __t) +\n'\\n \\n ';\n }) ;\n__p += '\\n ' +\n((__t = (ctx.subgroups.join(''))) == null ? '' : __t) +\n'\\n ';\n } else { ;\n__p += '\\n
' +\n((__t = (ctx.t('No Matches Found'))) == null ? '' : __t) +\n'
\\n ';\n } ;\n__p += '\\n
\\n
\\n\\n';\nreturn __p\n}\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap5/builderSidebarGroup/form.ejs.js?"); /***/ }), -/***/ "./lib/utils/ChoicesWrapper.js": -/*!*************************************!*\ - !*** ./lib/utils/ChoicesWrapper.js ***! - \*************************************/ +/***/ "./lib/templates/bootstrap5/builderSidebarGroup/index.js": +/*!***************************************************************!*\ + !*** ./lib/templates/bootstrap5/builderSidebarGroup/index.js ***! + \***************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = exports.KEY_CODES = void 0;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\nvar _choices = _interopRequireDefault(__webpack_require__(/*! @formio/choices.js */ \"./node_modules/@formio/choices.js/public/assets/scripts/choices.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n/**\n * TODO: REMOVE THIS ONCE THE PULL REQUEST HAS BEEN RESOLVED.\n *\n * https://github.com/jshjohnson/Choices/pull/788\n *\n * This is intentionally not part of the extended class, since other components use Choices and need this fix as well.\n * @type {Choices._generatePlaceholderValue}\n * @private\n */\n_choices.default.prototype._generatePlaceholderValue = function () {\n if (this._isSelectElement && this.passedElement.placeholderOption) {\n var placeholderOption = this.passedElement.placeholderOption;\n return placeholderOption ? placeholderOption.text : false;\n }\n\n var _this$config = this.config,\n placeholder = _this$config.placeholder,\n placeholderValue = _this$config.placeholderValue;\n var dataset = this.passedElement.element.dataset;\n\n if (placeholder) {\n if (placeholderValue) {\n return placeholderValue;\n }\n\n if (dataset.placeholder) {\n return dataset.placeholder;\n }\n }\n\n return false;\n};\n\nvar KEY_CODES = {\n BACK_KEY: 46,\n DELETE_KEY: 8,\n TAB_KEY: 9,\n ENTER_KEY: 13,\n A_KEY: 65,\n ESC_KEY: 27,\n UP_KEY: 38,\n DOWN_KEY: 40,\n PAGE_UP_KEY: 33,\n PAGE_DOWN_KEY: 34\n};\nexports.KEY_CODES = KEY_CODES;\n\nvar ChoicesWrapper = /*#__PURE__*/function (_Choices) {\n _inherits(ChoicesWrapper, _Choices);\n\n var _super = _createSuper(ChoicesWrapper);\n\n function ChoicesWrapper() {\n var _this;\n\n _classCallCheck(this, ChoicesWrapper);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n _this._onTabKey = _this._onTabKey.bind(_assertThisInitialized(_this));\n _this.isDirectionUsing = false;\n _this.shouldOpenDropDown = true;\n return _this;\n }\n\n _createClass(ChoicesWrapper, [{\n key: \"_handleButtonAction\",\n value: function _handleButtonAction(activeItems, element) {\n if (!this._isSelectOneElement) {\n return _get(_getPrototypeOf(ChoicesWrapper.prototype), \"_handleButtonAction\", this).call(this, activeItems, element);\n }\n\n if (!activeItems || !element || !this.config.removeItems || !this.config.removeItemButton) {\n return;\n }\n\n _get(_getPrototypeOf(ChoicesWrapper.prototype), \"_handleButtonAction\", this).call(this, activeItems, element);\n }\n }, {\n key: \"_onEnterKey\",\n value: function _onEnterKey(args) {\n // Prevent dropdown form opening when removeItemButton was pressed using 'Enter' on keyboard\n if (args.event.target.className === 'choices__button') {\n this.shouldOpenDropDown = false;\n }\n\n _get(_getPrototypeOf(ChoicesWrapper.prototype), \"_onEnterKey\", this).call(this, args);\n }\n }, {\n key: \"_onDirectionKey\",\n value: function _onDirectionKey() {\n var _get3,\n _this2 = this;\n\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n if (!this._isSelectOneElement) {\n var _get2;\n\n return (_get2 = _get(_getPrototypeOf(ChoicesWrapper.prototype), \"_onDirectionKey\", this)).call.apply(_get2, [this].concat(args));\n }\n\n this.isDirectionUsing = true;\n\n (_get3 = _get(_getPrototypeOf(ChoicesWrapper.prototype), \"_onDirectionKey\", this)).call.apply(_get3, [this].concat(args));\n\n this.onSelectValue.apply(this, args);\n clearTimeout(this.timeout);\n this.timeout = setTimeout(function () {\n _this2.isDirectionUsing = false;\n }, 250);\n }\n }, {\n key: \"_onTabKey\",\n value: function _onTabKey(_ref) {\n var activeItems = _ref.activeItems,\n hasActiveDropdown = _ref.hasActiveDropdown;\n\n if (hasActiveDropdown) {\n this._selectHighlightedChoice(activeItems);\n }\n }\n }, {\n key: \"_selectHighlightedChoice\",\n value: function _selectHighlightedChoice(activeItems) {\n var highlightedChoice = this.dropdown.getChild(\".\".concat(this.config.classNames.highlightedState));\n\n if (highlightedChoice) {\n this._handleChoiceAction(activeItems, highlightedChoice);\n }\n\n event.preventDefault();\n }\n }, {\n key: \"_onKeyDown\",\n value: function _onKeyDown(event) {\n var _keyDownActions;\n\n if (!this._isSelectOneElement) {\n return _get(_getPrototypeOf(ChoicesWrapper.prototype), \"_onKeyDown\", this).call(this, event);\n }\n\n var target = event.target,\n keyCode = event.keyCode,\n ctrlKey = event.ctrlKey,\n metaKey = event.metaKey;\n\n if (target !== this.input.element && !this.containerOuter.element.contains(target)) {\n return;\n }\n\n var activeItems = this._store.activeItems;\n var hasFocusedInput = this.input.isFocussed;\n var hasActiveDropdown = this.dropdown.isActive;\n var hasItems = this.itemList.hasChildren;\n var keyString = String.fromCharCode(keyCode);\n var BACK_KEY = KEY_CODES.BACK_KEY,\n DELETE_KEY = KEY_CODES.DELETE_KEY,\n TAB_KEY = KEY_CODES.TAB_KEY,\n ENTER_KEY = KEY_CODES.ENTER_KEY,\n A_KEY = KEY_CODES.A_KEY,\n ESC_KEY = KEY_CODES.ESC_KEY,\n UP_KEY = KEY_CODES.UP_KEY,\n DOWN_KEY = KEY_CODES.DOWN_KEY,\n PAGE_UP_KEY = KEY_CODES.PAGE_UP_KEY,\n PAGE_DOWN_KEY = KEY_CODES.PAGE_DOWN_KEY;\n var hasCtrlDownKeyPressed = ctrlKey || metaKey; // If a user is typing and the dropdown is not active\n\n if (!hasActiveDropdown && !this._isTextElement && /[a-zA-Z0-9-_ ]/.test(keyString)) {\n var currentValue = this.input.element.value;\n this.input.element.value = currentValue ? \"\".concat(currentValue).concat(keyString) : keyString;\n this.showDropdown();\n } // Map keys to key actions\n\n\n var keyDownActions = (_keyDownActions = {}, _defineProperty(_keyDownActions, A_KEY, this._onAKey), _defineProperty(_keyDownActions, TAB_KEY, this._onTabKey), _defineProperty(_keyDownActions, ENTER_KEY, this._onEnterKey), _defineProperty(_keyDownActions, ESC_KEY, this._onEscapeKey), _defineProperty(_keyDownActions, UP_KEY, this._onDirectionKey), _defineProperty(_keyDownActions, PAGE_UP_KEY, this._onDirectionKey), _defineProperty(_keyDownActions, DOWN_KEY, this._onDirectionKey), _defineProperty(_keyDownActions, PAGE_DOWN_KEY, this._onDirectionKey), _defineProperty(_keyDownActions, DELETE_KEY, this._onDeleteKey), _defineProperty(_keyDownActions, BACK_KEY, this._onDeleteKey), _keyDownActions); // If keycode has a function, run it\n\n if (keyDownActions[keyCode]) {\n keyDownActions[keyCode]({\n event: event,\n target: target,\n keyCode: keyCode,\n metaKey: metaKey,\n activeItems: activeItems,\n hasFocusedInput: hasFocusedInput,\n hasActiveDropdown: hasActiveDropdown,\n hasItems: hasItems,\n hasCtrlDownKeyPressed: hasCtrlDownKeyPressed\n });\n }\n }\n }, {\n key: \"onSelectValue\",\n value: function onSelectValue(_ref2) {\n var event = _ref2.event,\n activeItems = _ref2.activeItems,\n hasActiveDropdown = _ref2.hasActiveDropdown;\n\n if (hasActiveDropdown) {\n this._selectHighlightedChoice(activeItems);\n } else if (this._isSelectOneElement) {\n this.showDropdown();\n event.preventDefault();\n }\n }\n }, {\n key: \"showDropdown\",\n value: function showDropdown() {\n var _get4;\n\n if (!this.shouldOpenDropDown) {\n this.shouldOpenDropDown = true;\n return;\n }\n\n for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n args[_key3] = arguments[_key3];\n }\n\n (_get4 = _get(_getPrototypeOf(ChoicesWrapper.prototype), \"showDropdown\", this)).call.apply(_get4, [this].concat(args));\n }\n }, {\n key: \"hideDropdown\",\n value: function hideDropdown() {\n var _get5;\n\n if (this.isDirectionUsing) {\n return;\n }\n\n for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n args[_key4] = arguments[_key4];\n }\n\n (_get5 = _get(_getPrototypeOf(ChoicesWrapper.prototype), \"hideDropdown\", this)).call.apply(_get5, [this].concat(args));\n }\n }, {\n key: \"_onBlur\",\n value: function _onBlur() {\n var _get6;\n\n if (this._isScrollingOnIe) {\n return;\n }\n\n for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {\n args[_key5] = arguments[_key5];\n }\n\n (_get6 = _get(_getPrototypeOf(ChoicesWrapper.prototype), \"_onBlur\", this)).call.apply(_get6, [this].concat(args));\n }\n }]);\n\n return ChoicesWrapper;\n}(_choices.default);\n\nvar _default = ChoicesWrapper;\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/utils/ChoicesWrapper.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap5/builderSidebarGroup/form.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap5/builderSidebarGroup/index.js?"); /***/ }), -/***/ "./lib/utils/Evaluator.js": -/*!********************************!*\ - !*** ./lib/utils/Evaluator.js ***! - \********************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ "./lib/templates/bootstrap5/builderWizard/form.ejs.js": +/*!************************************************************!*\ + !*** ./lib/templates/bootstrap5/builderWizard/form.ejs.js ***! + \************************************************************/ +/***/ (function(__unused_webpack_module, exports) { -"use strict"; -eval("\n\n__webpack_require__(/*! core-js/modules/es.array.from.js */ \"./node_modules/core-js/modules/es.array.from.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.slice.js */ \"./node_modules/core-js/modules/es.array.slice.js\");\n\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.split.js */ \"./node_modules/core-js/modules/es.string.split.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.trim.js */ \"./node_modules/core-js/modules/es.string.trim.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nvar _stringHash = _interopRequireDefault(__webpack_require__(/*! string-hash */ \"./node_modules/string-hash/index.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct.bind(); } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nvar Evaluator = {\n noeval: false,\n protectedEval: false,\n // This property can be customized only by plugins\n cache: {},\n templateSettings: {\n evaluate: /\\{%([\\s\\S]+?)%\\}/g,\n interpolate: /\\{\\{([\\s\\S]+?)\\}\\}/g,\n escape: /\\{\\{\\{([\\s\\S]+?)\\}\\}\\}/g\n },\n evaluator: function evaluator(func) {\n for (var _len = arguments.length, params = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n params[_key - 1] = arguments[_key];\n }\n\n if (Evaluator.noeval) {\n console.warn('No evaluations allowed for this renderer.');\n return _lodash.default.noop;\n }\n\n if (_typeof(params[0]) === 'object') {\n params = _lodash.default.keys(params[0]);\n }\n\n return _construct(Function, _toConsumableArray(params).concat([func]));\n },\n template: function template(_template, hash) {\n hash = hash || (0, _stringHash.default)(_template);\n\n try {\n // Ensure we handle copied templates from the ejs files.\n _template = _template.replace(/ctx\\./g, '');\n return Evaluator.cache[hash] = _lodash.default.template(_template, Evaluator.templateSettings);\n } catch (err) {\n console.warn('Error while processing template', err, _template);\n }\n },\n interpolate: function interpolate(rawTemplate, data, _options) {\n // Ensure reverse compatability.\n var options = _lodash.default.isObject(_options) ? _options : {\n noeval: _options\n };\n\n if (typeof rawTemplate === 'function') {\n try {\n return rawTemplate(data);\n } catch (err) {\n console.warn('Error interpolating template', err, data);\n return err.message;\n }\n }\n\n rawTemplate = String(rawTemplate);\n var hash = (0, _stringHash.default)(rawTemplate);\n var template;\n\n if (Evaluator.cache[hash]) {\n template = Evaluator.cache[hash];\n } else if (Evaluator.noeval || options.noeval) {\n // No cached template methods available. Use poor-mans interpolate without eval.\n return rawTemplate.replace(/({{\\s*(.*?)\\s*}})/g, function (match, $1, $2) {\n // Allow for conditional values.\n var parts = $2.split('||').map(function (item) {\n return item.trim();\n });\n var value = '';\n var path = '';\n\n for (var i = 0; i < parts.length; i++) {\n path = parts[i];\n value = _lodash.default.get(data, path);\n\n if (value) {\n break;\n }\n }\n\n if (options.data) {\n _lodash.default.set(options.data, path, value);\n }\n\n return value;\n });\n } else {\n template = Evaluator.template(rawTemplate, hash);\n }\n\n if (typeof template === 'function') {\n try {\n return template(data);\n } catch (err) {\n console.warn('Error interpolating template', err, rawTemplate, data);\n return err.message;\n }\n }\n\n return template;\n },\n evaluate: function evaluate(func, args) {\n return Array.isArray(args) ? func.apply(void 0, _toConsumableArray(args)) : func(args);\n }\n};\n\nEvaluator.registerEvaluator = function (evaluator) {\n Object.keys(evaluator).forEach(function (key) {\n Evaluator[key] = evaluator[key];\n });\n};\n\nvar _default = Evaluator;\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/utils/Evaluator.js?"); +eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"]=function(ctx) {\nvar __t, __p = '', __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n__p += '
\\n
\\n ' +\n((__t = (ctx.sidebar)) == null ? '' : __t) +\n'\\n
\\n
\\n
    \\n ';\n ctx.pages.forEach(function(page, pageIndex) { ;\n__p += '\\n
  1. \\n \\n
  2. \\n ';\n }) ;\n__p += '\\n
  3. \\n \\n ' +\n((__t = (ctx.t('Page'))) == null ? '' : __t) +\n'\\n \\n
  4. \\n
\\n
\\n ' +\n((__t = (ctx.form)) == null ? '' : __t) +\n'\\n
\\n
\\n
\\n';\nreturn __p\n}\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap5/builderWizard/form.ejs.js?"); /***/ }), -/***/ "./lib/utils/builder.js": -/*!******************************!*\ - !*** ./lib/utils/builder.js ***! - \******************************/ +/***/ "./lib/templates/bootstrap5/builderWizard/index.js": +/*!*********************************************************!*\ + !*** ./lib/templates/bootstrap5/builderWizard/index.js ***! + \*********************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.array.includes.js */ \"./node_modules/core-js/modules/es.array.includes.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nvar _utils = __webpack_require__(/*! ./utils */ \"./lib/utils/utils.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n /**\n * Appends a number to a component.key to keep it unique\n *\n * @param {Object} form\n * The components parent form.\n * @param {Object} component\n * The component to uniquify\n */\n uniquify: function uniquify(container, component) {\n var changed = false;\n var formKeys = {};\n (0, _utils.eachComponent)(container, function (comp) {\n formKeys[comp.key] = true;\n\n if (['address', 'container', 'datagrid', 'editgrid', 'dynamicWizard', 'tree'].includes(comp.type) || comp.tree || comp.arrayTree) {\n return true;\n }\n }, true); // Recurse into all child components.\n\n (0, _utils.eachComponent)([component], function (component) {\n // Skip key uniquification if this component doesn't have a key.\n if (!component.key) {\n return;\n }\n\n var newKey = (0, _utils.uniqueKey)(formKeys, component.key);\n\n if (newKey !== component.key) {\n component.key = newKey;\n changed = true;\n }\n\n formKeys[newKey] = true;\n\n if (['address', 'container', 'datagrid', 'editgrid', 'dynamicWizard', 'tree'].includes(component.type) || component.tree || component.arrayTree) {\n return true;\n }\n }, true);\n return changed;\n },\n additionalShortcuts: {\n button: ['Enter', 'Esc']\n },\n getAlphaShortcuts: function getAlphaShortcuts() {\n return _lodash.default.range('A'.charCodeAt(), 'Z'.charCodeAt() + 1).map(function (charCode) {\n return String.fromCharCode(charCode);\n });\n },\n getAdditionalShortcuts: function getAdditionalShortcuts(type) {\n return this.additionalShortcuts[type] || [];\n },\n getBindedShortcuts: function getBindedShortcuts(components, input) {\n var result = [];\n (0, _utils.eachComponent)(components, function (component) {\n if (component === input) {\n return;\n }\n\n if (component.shortcut) {\n result.push(component.shortcut);\n }\n\n if (component.values) {\n component.values.forEach(function (value) {\n if (value.shortcut) {\n result.push(value.shortcut);\n }\n });\n }\n }, true);\n return result;\n },\n getAvailableShortcuts: function getAvailableShortcuts(form, component) {\n if (!component) {\n return [];\n }\n\n return [''].concat(_lodash.default.difference(this.getAlphaShortcuts().concat(this.getAdditionalShortcuts(component.type)), this.getBindedShortcuts(form.components, component))).map(function (shortcut) {\n return {\n label: shortcut,\n value: shortcut\n };\n });\n }\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/utils/builder.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap5/builderWizard/form.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap5/builderWizard/index.js?"); /***/ }), -/***/ "./lib/utils/calendarUtils.js": -/*!************************************!*\ - !*** ./lib/utils/calendarUtils.js ***! - \************************************/ -/***/ (function(__unused_webpack_module, exports, __webpack_require__) { +/***/ "./lib/templates/bootstrap5/componentModal/form.ejs.js": +/*!*************************************************************!*\ + !*** ./lib/templates/bootstrap5/componentModal/form.ejs.js ***! + \*************************************************************/ +/***/ (function(__unused_webpack_module, exports) { -"use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.CALENDAR_ERROR_MESSAGES = void 0;\nexports.checkInvalidDate = checkInvalidDate;\nexports.lessOrGreater = lessOrGreater;\n\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.match.js */ \"./node_modules/core-js/modules/es.string.match.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.constructor.js */ \"./node_modules/core-js/modules/es.regexp.constructor.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.join.js */ \"./node_modules/core-js/modules/es.array.join.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.split.js */ \"./node_modules/core-js/modules/es.string.split.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.find-index.js */ \"./node_modules/core-js/modules/es.array.find-index.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\nvar _moment = _interopRequireDefault(__webpack_require__(/*! moment */ \"./node_modules/moment/moment.js\"));\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar CALENDAR_ERROR_MESSAGES = {\n INVALID: 'You entered the Invalid Date',\n INCOMPLETE: 'You entered an incomplete date.',\n greater: function greater(date, format) {\n return \"The entered date is greater than \".concat(date.format(format));\n },\n less: function less(date, format) {\n return \"The entered date is less than \".concat(date.format(format));\n }\n};\n/**\n * Builds the response for checkInvalidDate.\n *\n * @param {String} message\n * The message for response.\n * @param {Boolean} result\n * The boolean flag for response.\n * * @return {{message: string, result: boolean}}\n */\n\nexports.CALENDAR_ERROR_MESSAGES = CALENDAR_ERROR_MESSAGES;\n\nfunction buildResponse(message, result) {\n return {\n message: message,\n result: result\n };\n}\n/**\n * Checks the value for a min date and max date.\n *\n * @param {moment} value\n * The value to check.\n * @param {[String]} format\n * A moment formats.\n * @param {Date} maxDate\n * The max date.\n * @param {Date} minDate\n * The min date.\n * * @return {{message: string, result: boolean}}\n */\n\n\nfunction lessOrGreater(value, format, maxDate, minDate) {\n var message = '';\n var result = true;\n\n if (maxDate && value.isValid()) {\n var maxDateMoment = (0, _moment.default)(maxDate, format);\n\n if (value > maxDateMoment) {\n message = CALENDAR_ERROR_MESSAGES.greater(maxDateMoment, format);\n result = false;\n }\n }\n\n if (minDate && value.isValid()) {\n var minDateMoment = (0, _moment.default)(minDate, format);\n\n if (value < minDateMoment) {\n message = CALENDAR_ERROR_MESSAGES.less(minDateMoment, format);\n result = false;\n }\n }\n\n return {\n message: message,\n result: result\n };\n}\n/**\n * Checks the entered date for validity.\n *\n * @param {String} value\n * The value to check.\n * @param {[String]} format\n * A moment formats.\n * @param {Date} maxDate\n * The max date.\n * @param {Date} minDate\n * The min date.\n * * @return {{message: string, result: boolean}}\n */\n\n\nfunction checkInvalidDate(value, format, minDate, maxDate) {\n var date = (0, _moment.default)(value, format, true);\n var isValidDate = date.isValid();\n\n if (!isValidDate) {\n var delimeters = value.match(/[^a-z0-9_]/gi);\n var delimetersRegEx = new RegExp(delimeters.join('|'), 'gi');\n var inputParts = value.replace(/_*/gi, '').split(delimetersRegEx);\n var formatParts = format[1] ? format[1].split(delimetersRegEx) : format[0].split(delimetersRegEx);\n\n var timeIndex = _lodash.default.findIndex(formatParts, function (part, index) {\n return part.length === 1 && index === formatParts.length - 1;\n });\n\n var yearIndex = _lodash.default.findIndex(formatParts, function (part) {\n return part.match(/yyyy/gi);\n });\n\n if (inputParts[yearIndex] / 1000 < 1) {\n return buildResponse(CALENDAR_ERROR_MESSAGES.INVALID, false);\n }\n\n if (inputParts[0].length === formatParts[0].length) {\n var modifiedParts = inputParts.map(function (part, index) {\n var partValue = part;\n\n if (!part && index === timeIndex) {\n partValue = 'AM';\n } else if (!part) {\n partValue = '01';\n }\n\n if (delimeters[index]) {\n partValue = \"\".concat(partValue).concat(delimeters[index]);\n }\n\n return partValue;\n });\n var problemDate = (0, _moment.default)(modifiedParts.join(''), format, true);\n\n if (problemDate.isValid()) {\n var checkedLessOrGreater = lessOrGreater(problemDate, format[0], maxDate, minDate);\n\n if (!checkedLessOrGreater.result) {\n var message = checkedLessOrGreater.message,\n result = checkedLessOrGreater.result;\n return buildResponse(message, result);\n }\n\n return buildResponse(CALENDAR_ERROR_MESSAGES.INCOMPLETE, false);\n } else {\n return buildResponse(CALENDAR_ERROR_MESSAGES.INVALID, false);\n }\n } else {\n return buildResponse(CALENDAR_ERROR_MESSAGES.INVALID, false);\n }\n } else if (isValidDate && value.indexOf('_') === -1) {\n var _checkedLessOrGreater = lessOrGreater(date, format[0], maxDate, minDate);\n\n if (!_checkedLessOrGreater.result) {\n var _message = _checkedLessOrGreater.message,\n _result = _checkedLessOrGreater.result;\n return buildResponse(_message, _result);\n }\n }\n\n return buildResponse('', true);\n}\n\n//# sourceURL=webpack://Formio/./lib/utils/calendarUtils.js?"); +eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"]=function(ctx) {\nvar __t, __p = '', __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n__p += '
\\n
\\n
\\n
\\n
' +\n((__t = ( ctx.t(ctx.component.label) )) == null ? '' : __t) +\n'' +\n((__t = (ctx.self.isIE() ? ', dialog' : '')) == null ? '' : __t) +\n'\\n ';\n if (ctx.options.vpat) { ;\n__p += '\\n \\n ';\n } else { ;\n__p += '\\n \\n ';\n } ;\n__p += '\\n
\\n ';\n if (ctx.visible) { ;\n__p += '\\n ' +\n((__t = (ctx.children)) == null ? '' : __t) +\n'\\n ';\n } ;\n__p += '\\n
\\n ';\n if (ctx.options.vpat) { ;\n__p += '\\n \\n ';\n } ;\n__p += '\\n \\n
\\n
\\n
\\n \\n
\\n
\\n';\nreturn __p\n}\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap5/componentModal/form.ejs.js?"); /***/ }), -/***/ "./lib/utils/formUtils.js": -/*!********************************!*\ - !*** ./lib/utils/formUtils.js ***! - \********************************/ +/***/ "./lib/templates/bootstrap5/componentModal/index.js": +/*!**********************************************************!*\ + !*** ./lib/templates/bootstrap5/componentModal/index.js ***! + \**********************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.applyFormChanges = applyFormChanges;\nexports.eachComponent = eachComponent;\nexports.escapeRegExCharacters = escapeRegExCharacters;\nexports.findComponent = findComponent;\nexports.findComponents = findComponents;\nexports.flattenComponents = flattenComponents;\nexports.formatAsCurrency = formatAsCurrency;\nexports.generateFormChange = generateFormChange;\nexports.getComponent = getComponent;\nexports.getStrings = getStrings;\nexports.getValue = getValue;\nexports.hasCondition = hasCondition;\nexports.isLayoutComponent = isLayoutComponent;\nexports.matchComponent = matchComponent;\nexports.parseFloatExt = parseFloatExt;\nexports.removeComponent = removeComponent;\nexports.searchComponents = searchComponents;\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.includes.js */ \"./node_modules/core-js/modules/es.array.includes.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.slice.js */ \"./node_modules/core-js/modules/es.array.slice.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.splice.js */ \"./node_modules/core-js/modules/es.array.splice.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.split.js */ \"./node_modules/core-js/modules/es.string.split.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.join.js */ \"./node_modules/core-js/modules/es.array.join.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.from.js */ \"./node_modules/core-js/modules/es.array.from.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\nvar _get = _interopRequireDefault(__webpack_require__(/*! lodash/get */ \"./node_modules/lodash/get.js\"));\n\nvar _set = _interopRequireDefault(__webpack_require__(/*! lodash/set */ \"./node_modules/lodash/set.js\"));\n\nvar _has = _interopRequireDefault(__webpack_require__(/*! lodash/has */ \"./node_modules/lodash/has.js\"));\n\nvar _clone = _interopRequireDefault(__webpack_require__(/*! lodash/clone */ \"./node_modules/lodash/clone.js\"));\n\nvar _forOwn = _interopRequireDefault(__webpack_require__(/*! lodash/forOwn */ \"./node_modules/lodash/forOwn.js\"));\n\nvar _isString = _interopRequireDefault(__webpack_require__(/*! lodash/isString */ \"./node_modules/lodash/isString.js\"));\n\nvar _isNaN = _interopRequireDefault(__webpack_require__(/*! lodash/isNaN */ \"./node_modules/lodash/isNaN.js\"));\n\nvar _isNil = _interopRequireDefault(__webpack_require__(/*! lodash/isNil */ \"./node_modules/lodash/isNil.js\"));\n\nvar _isPlainObject = _interopRequireDefault(__webpack_require__(/*! lodash/isPlainObject */ \"./node_modules/lodash/isPlainObject.js\"));\n\nvar _round = _interopRequireDefault(__webpack_require__(/*! lodash/round */ \"./node_modules/lodash/round.js\"));\n\nvar _chunk = _interopRequireDefault(__webpack_require__(/*! lodash/chunk */ \"./node_modules/lodash/chunk.js\"));\n\nvar _pad = _interopRequireDefault(__webpack_require__(/*! lodash/pad */ \"./node_modules/lodash/pad.js\"));\n\nvar _fastJsonPatch = __webpack_require__(/*! fast-json-patch */ \"./node_modules/fast-json-patch/index.mjs\");\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * Determine if a component is a layout component or not.\n *\n * @param {Object} component\n * The component to check.\n *\n * @returns {Boolean}\n * Whether or not the component is a layout component.\n */\nfunction isLayoutComponent(component) {\n return Boolean(component.columns && Array.isArray(component.columns) || component.rows && Array.isArray(component.rows) || component.components && Array.isArray(component.components));\n}\n/**\n * Iterate through each component within a form.\n *\n * @param {Object} components\n * The components to iterate.\n * @param {Function} fn\n * The iteration function to invoke for each component.\n * @param {Boolean} includeAll\n * Whether or not to include layout components.\n * @param {String} path\n * The current data path of the element. Example: data.user.firstName\n * @param {Object} parent\n * The parent object.\n */\n\n\nfunction eachComponent(components, fn, includeAll, path, parent, inRecursion) {\n if (!components) return;\n path = path || '';\n\n if (inRecursion) {\n if (components.noRecurse) {\n delete components.noRecurse;\n return;\n }\n\n components.noRecurse = true;\n }\n\n components.forEach(function (component) {\n if (!component) {\n return;\n }\n\n var hasColumns = component.columns && Array.isArray(component.columns);\n var hasRows = component.rows && Array.isArray(component.rows);\n var hasComps = component.components && Array.isArray(component.components);\n var noRecurse = false;\n var newPath = component.key ? path ? \"\".concat(path, \".\").concat(component.key) : component.key : ''; // Keep track of parent references.\n\n if (parent) {\n // Ensure we don't create infinite JSON structures.\n component.parent = (0, _clone.default)(parent);\n delete component.parent.components;\n delete component.parent.componentMap;\n delete component.parent.columns;\n delete component.parent.rows;\n } // there's no need to add other layout components here because we expect that those would either have columns, rows or components\n\n\n var layoutTypes = ['htmlelement', 'content'];\n var isLayoutComponent = hasColumns || hasRows || hasComps && !component.input || layoutTypes.indexOf(component.type) > -1;\n\n if (includeAll || component.tree || !isLayoutComponent) {\n noRecurse = fn(component, newPath, components);\n }\n\n var subPath = function subPath() {\n if (component.key && !['panel', 'table', 'well', 'columns', 'fieldset', 'tabs', 'form'].includes(component.type) && (['datagrid', 'container', 'editgrid', 'address', 'dynamicWizard', 'datatable'].includes(component.type) || component.tree)) {\n return newPath;\n } else if (component.key && component.type === 'form') {\n return \"\".concat(newPath, \".data\");\n }\n\n return path;\n };\n\n if (!noRecurse) {\n if (hasColumns) {\n component.columns.forEach(function (column) {\n return eachComponent(column.components, fn, includeAll, subPath(), parent ? component : null);\n }, true);\n } else if (hasRows) {\n component.rows.forEach(function (row) {\n if (Array.isArray(row)) {\n row.forEach(function (column) {\n return eachComponent(column.components, fn, includeAll, subPath(), parent ? component : null);\n }, true);\n }\n });\n } else if (hasComps) {\n eachComponent(component.components, fn, includeAll, subPath(), parent ? component : null, true);\n }\n }\n });\n\n if (components.noRecurse) {\n delete components.noRecurse;\n }\n}\n/**\n * Matches if a component matches the query.\n *\n * @param component\n * @param query\n * @return {boolean}\n */\n\n\nfunction matchComponent(component, query) {\n if ((0, _isString.default)(query)) {\n return component.key === query || component.path === query;\n } else {\n var matches = false;\n (0, _forOwn.default)(query, function (value, key) {\n matches = (0, _get.default)(component, key) === value;\n\n if (!matches) {\n return false;\n }\n });\n return matches;\n }\n}\n/**\n * Get a component by its key\n *\n * @param {Object} components\n * The components to iterate.\n * @param {String|Object} key\n * The key of the component to get, or a query of the component to search.\n *\n * @returns {Object}\n * The component that matches the given key, or undefined if not found.\n */\n\n\nfunction getComponent(components, key, includeAll) {\n var result;\n eachComponent(components, function (component, path) {\n if (path === key || component.path === key) {\n result = component;\n return true;\n }\n }, includeAll);\n return result;\n}\n/**\n * Finds a component provided a query of properties of that component.\n *\n * @param components\n * @param query\n * @return {*}\n */\n\n\nfunction searchComponents(components, query) {\n var results = [];\n eachComponent(components, function (component) {\n if (matchComponent(component, query)) {\n results.push(component);\n }\n }, true);\n return results;\n}\n/**\n * Deprecated version of findComponents. Renamed to searchComponents.\n *\n * @param components\n * @param query\n * @returns {*}\n */\n\n\nfunction findComponents(components, query) {\n console.warn('formio.js/utils findComponents is deprecated. Use searchComponents instead.');\n return searchComponents(components, query);\n}\n/**\n * This function will find a component in a form and return the component AND THE PATH to the component in the form.\n * Path to the component is stored as an array of nested components and their indexes.The Path is being filled recursively\n * when you iterating through the nested structure.\n * If the component is not found the callback won't be called and function won't return anything.\n *\n * @param components\n * @param key\n * @param fn\n * @param path\n * @returns {*}\n */\n\n\nfunction findComponent(components, key, path, fn) {\n if (!components) return;\n path = path || [];\n\n if (!key) {\n return fn(components);\n }\n\n components.forEach(function (component, index) {\n var newPath = path.slice(); // Add an index of the component it iterates through in nested structure\n\n newPath.push(index);\n if (!component) return;\n\n if (component.hasOwnProperty('columns') && Array.isArray(component.columns)) {\n newPath.push('columns');\n component.columns.forEach(function (column, index) {\n var colPath = newPath.slice();\n colPath.push(index);\n colPath.push('components');\n findComponent(column.components, key, colPath, fn);\n });\n }\n\n if (component.hasOwnProperty('rows') && Array.isArray(component.rows)) {\n newPath.push('rows');\n component.rows.forEach(function (row, index) {\n var rowPath = newPath.slice();\n rowPath.push(index);\n row.forEach(function (column, index) {\n var colPath = rowPath.slice();\n colPath.push(index);\n colPath.push('components');\n findComponent(column.components, key, colPath, fn);\n });\n });\n }\n\n if (component.hasOwnProperty('components') && Array.isArray(component.components)) {\n newPath.push('components');\n findComponent(component.components, key, newPath, fn);\n }\n\n if (component.key === key) {\n //Final callback if the component is found\n fn(component, newPath, components);\n }\n });\n}\n/**\n * Remove a component by path.\n *\n * @param components\n * @param path\n */\n\n\nfunction removeComponent(components, path) {\n // Using _.unset() leave a null value. Use Array splice instead.\n var index = path.pop();\n\n if (path.length !== 0) {\n components = (0, _get.default)(components, path);\n }\n\n components.splice(index, 1);\n}\n\nfunction generateFormChange(type, data) {\n var change;\n\n switch (type) {\n case 'add':\n change = {\n op: 'add',\n key: data.component.key,\n container: data.parent.key,\n // Parent component\n path: data.path,\n // Path to container within parent component.\n index: data.index,\n // Index of component in parent container.\n component: data.component\n };\n break;\n\n case 'edit':\n change = {\n op: 'edit',\n key: data.originalComponent.key,\n patches: (0, _fastJsonPatch.compare)(data.originalComponent, data.component)\n }; // Don't save if nothing changed.\n\n if (!change.patches.length) {\n change = null;\n }\n\n break;\n\n case 'remove':\n change = {\n op: 'remove',\n key: data.component.key\n };\n break;\n }\n\n return change;\n}\n\nfunction applyFormChanges(form, changes) {\n var failed = [];\n changes.forEach(function (change) {\n var found = false;\n\n switch (change.op) {\n case 'add':\n var newComponent = change.component; // Find the container to set the component in.\n\n findComponent(form.components, change.container, null, function (parent) {\n if (!change.container) {\n parent = form;\n } // A move will first run an add so remove any existing components with matching key before inserting.\n\n\n findComponent(form.components, change.key, null, function (component, path) {\n // If found, use the existing component. (If someone else edited it, the changes would be here)\n newComponent = component;\n removeComponent(form.components, path);\n });\n found = true;\n var container = (0, _get.default)(parent, change.path);\n container.splice(change.index, 0, newComponent);\n });\n break;\n\n case 'remove':\n findComponent(form.components, change.key, null, function (component, path) {\n found = true;\n var oldComponent = (0, _get.default)(form.components, path);\n\n if (oldComponent.key !== component.key) {\n path.pop();\n }\n\n removeComponent(form.components, path);\n });\n break;\n\n case 'edit':\n findComponent(form.components, change.key, null, function (component, path) {\n found = true;\n\n try {\n var oldComponent = (0, _get.default)(form.components, path);\n var _newComponent = (0, _fastJsonPatch.applyPatch)(component, change.patches).newDocument;\n\n if (oldComponent.key !== _newComponent.key) {\n path.pop();\n }\n\n (0, _set.default)(form.components, path, _newComponent);\n } catch (err) {\n failed.push(change);\n }\n });\n break;\n\n case 'move':\n break;\n }\n\n if (!found) {\n failed.push(change);\n }\n });\n return {\n form: form,\n failed: failed\n };\n}\n/**\n * Flatten the form components for data manipulation.\n *\n * @param {Object} components\n * The components to iterate.\n * @param {Boolean} includeAll\n * Whether or not to include layout components.\n *\n * @returns {Object}\n * The flattened components map.\n */\n\n\nfunction flattenComponents(components, includeAll) {\n var flattened = {};\n eachComponent(components, function (component, path) {\n flattened[path] = component;\n }, includeAll);\n return flattened;\n}\n/**\n * Returns if this component has a conditional statement.\n *\n * @param component - The component JSON schema.\n *\n * @returns {boolean} - TRUE - This component has a conditional, FALSE - No conditional provided.\n */\n\n\nfunction hasCondition(component) {\n return Boolean(component.customConditional || component.conditional && (component.conditional.when || component.conditional.json || component.conditional.condition));\n}\n/**\n * Extension of standard #parseFloat(value) function, that also clears input string.\n *\n * @param {any} value\n * The value to parse.\n *\n * @returns {Number}\n * Parsed value.\n */\n\n\nfunction parseFloatExt(value) {\n return parseFloat((0, _isString.default)(value) ? value.replace(/[^\\de.+-]/gi, '') : value);\n}\n/**\n * Formats provided value in way how Currency component uses it.\n *\n * @param {any} value\n * The value to format.\n *\n * @returns {String}\n * Value formatted for Currency component.\n */\n\n\nfunction formatAsCurrency(value) {\n var parsedValue = parseFloatExt(value);\n\n if ((0, _isNaN.default)(parsedValue)) {\n return '';\n }\n\n var parts = (0, _round.default)(parsedValue, 2).toString().split('.');\n parts[0] = (0, _chunk.default)(Array.from(parts[0]).reverse(), 3).reverse().map(function (part) {\n return part.reverse().join('');\n }).join(',');\n parts[1] = (0, _pad.default)(parts[1], 2, '0');\n return parts.join('.');\n}\n/**\n * Escapes RegEx characters in provided String value.\n *\n * @param {String} value\n * String for escaping RegEx characters.\n * @returns {string}\n * String with escaped RegEx characters.\n */\n\n\nfunction escapeRegExCharacters(value) {\n return value.replace(/[-[\\]/{}()*+?.\\\\^$|]/g, '\\\\$&');\n}\n/**\n * Get the value for a component key, in the given submission.\n *\n * @param {Object} submission\n * A submission object to search.\n * @param {String} key\n * A for components API key to search for.\n */\n\n\nfunction getValue(submission, key) {\n var search = function search(data) {\n if ((0, _isPlainObject.default)(data)) {\n if ((0, _has.default)(data, key)) {\n return _lodash.default.get(data, key);\n }\n\n var value = null;\n (0, _forOwn.default)(data, function (prop) {\n var result = search(prop);\n\n if (!(0, _isNil.default)(result)) {\n value = result;\n return false;\n }\n });\n return value;\n } else {\n return null;\n }\n };\n\n return search(submission.data);\n}\n/**\n * Iterate over all components in a form and get string values for translation.\n * @param form\n */\n\n\nfunction getStrings(form) {\n var properties = ['label', 'title', 'legend', 'tooltip', 'description', 'placeholder', 'prefix', 'suffix', 'errorLabel', 'content', 'html'];\n var strings = [];\n eachComponent(form.components, function (component) {\n properties.forEach(function (property) {\n if (component.hasOwnProperty(property) && component[property]) {\n strings.push({\n key: component.key,\n type: component.type,\n property: property,\n string: component[property]\n });\n }\n });\n\n if ((!component.dataSrc || component.dataSrc === 'values') && component.hasOwnProperty('values') && Array.isArray(component.values) && component.values.length) {\n component.values.forEach(function (value, index) {\n strings.push({\n key: component.key,\n property: \"value[\".concat(index, \"].label\"),\n string: component.values[index].label\n });\n });\n } // Hard coded values from Day component\n\n\n if (component.type === 'day') {\n ['day', 'month', 'year', 'Day', 'Month', 'Year', 'january', 'february', 'march', 'april', 'may', 'june', 'july', 'august', 'september', 'october', 'november', 'december'].forEach(function (string) {\n strings.push({\n key: component.key,\n property: 'day',\n string: string\n });\n });\n\n if (component.fields.day.placeholder) {\n strings.push({\n key: component.key,\n property: 'fields.day.placeholder',\n string: component.fields.day.placeholder\n });\n }\n\n if (component.fields.month.placeholder) {\n strings.push({\n key: component.key,\n property: 'fields.month.placeholder',\n string: component.fields.month.placeholder\n });\n }\n\n if (component.fields.year.placeholder) {\n strings.push({\n key: component.key,\n property: 'fields.year.placeholder',\n string: component.fields.year.placeholder\n });\n }\n }\n\n if (component.type === 'editgrid') {\n var string = component.addAnother || 'Add Another';\n\n if (component.addAnother) {\n strings.push({\n key: component.key,\n property: 'addAnother',\n string: string\n });\n }\n }\n\n if (component.type === 'select') {\n ['loading...', 'Type to search'].forEach(function (string) {\n strings.push({\n key: component.key,\n property: 'select',\n string: string\n });\n });\n }\n }, true);\n return strings;\n}\n\n//# sourceURL=webpack://Formio/./lib/utils/formUtils.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap5/componentModal/form.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap5/componentModal/index.js?"); /***/ }), -/***/ "./lib/utils/index.js": -/*!****************************!*\ - !*** ./lib/utils/index.js ***! - \****************************/ +/***/ "./lib/templates/bootstrap5/cssClasses.js": +/*!************************************************!*\ + !*** ./lib/templates/bootstrap5/cssClasses.js ***! + \************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\n__webpack_require__(/*! core-js/modules/es.weak-map.js */ \"./node_modules/core-js/modules/es.weak-map.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\nvar FormioUtils = _interopRequireWildcard(__webpack_require__(/*! ./utils */ \"./lib/utils/utils.js\"));\n\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\n\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nif ((typeof __webpack_require__.g === \"undefined\" ? \"undefined\" : _typeof(__webpack_require__.g)) === 'object') {\n __webpack_require__.g.FormioUtils = FormioUtils;\n}\n\nvar _default = FormioUtils;\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/utils/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = {\n 'form-group': 'formio-form-group'\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap5/cssClasses.js?"); /***/ }), -/***/ "./lib/utils/jsonlogic/operators.js": -/*!******************************************!*\ +/***/ "./lib/templates/bootstrap5/datagrid/form.ejs.js": +/*!*******************************************************!*\ + !*** ./lib/templates/bootstrap5/datagrid/form.ejs.js ***! + \*******************************************************/ +/***/ (function(__unused_webpack_module, exports) { + +eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"]=function(ctx) {\nvar __t, __p = '', __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n__p += '\\n ' +\n((__t = ( col.hideLabel ? '' : ctx.t(col.label || col.title, { _userInput: true }) )) == null ? '' : __t) +\n'\\n ';\n if (col.tooltip) { ;\n__p += ' ';\n } ;\n__p += '\\n \\n ';\n }) ;\n__p += '\\n ';\n if (ctx.hasExtraColumn) { ;\n__p += '\\n \\n ';\n } ;\n__p += '\\n \\n \\n ';\n } ;\n__p += '\\n \\n ';\n ctx.rows.forEach(function(row, index) { ;\n__p += '\\n ';\n if (ctx.hasGroups && ctx.groups[index]) { ;\n__p += '\\n \\n ' +\n((__t = (ctx.groups[index].label)) == null ? '' : __t) +\n'\\n \\n ';\n } ;\n__p += '\\n \\n ';\n if (ctx.component.reorder) { ;\n__p += '\\n \\n ';\n } ;\n__p += '\\n ';\n ctx.columns.forEach(function(col) { ;\n__p += '\\n \\n ';\n } ;\n__p += '\\n ';\n if (ctx.canAddColumn) { ;\n__p += '\\n \\n ';\n } ;\n__p += '\\n ';\n } ;\n__p += '\\n \\n ';\n }) ;\n__p += '\\n \\n ';\n if (!ctx.builder && ctx.hasAddButton && ctx.hasBottomSubmit) { ;\n__p += '\\n \\n \\n \\n \\n \\n ';\n } ;\n__p += '\\n
\\n ' +\n((__t = ( ctx.t('Add/Remove') )) == null ? '' : __t) +\n'\\n ';\n if (!ctx.builder && ctx.hasAddButton && ctx.hasTopSubmit) { ;\n__p += '\\n \\n ';\n } ;\n__p += '\\n
\\n \\n \\n ';\n }) ;\n__p += '\\n ';\n if (ctx.hasExtraColumn) { ;\n__p += '\\n ';\n if (ctx.hasRemoveButtons) { ;\n__p += '\\n \\n \\n \\n ' +\n((__t = (ctx.placeholder)) == null ? '' : __t) +\n'\\n
\\n \\n
\\n';\nreturn __p\n}\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap5/datagrid/form.ejs.js?"); + +/***/ }), + +/***/ "./lib/templates/bootstrap5/datagrid/index.js": +/*!****************************************************!*\ + !*** ./lib/templates/bootstrap5/datagrid/index.js ***! + \****************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap5/datagrid/form.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap5/datagrid/index.js?"); + +/***/ }), + +/***/ "./lib/templates/bootstrap5/dialog/form.ejs.js": +/*!*****************************************************!*\ + !*** ./lib/templates/bootstrap5/dialog/form.ejs.js ***! + \*****************************************************/ +/***/ (function(__unused_webpack_module, exports) { + +eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"]=function(ctx) {\nvar __t, __p = '';\n__p += '
\\n
\\n
\\n
\\n \\n
\\n
\\n';\nreturn __p\n}\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap5/dialog/form.ejs.js?"); + +/***/ }), + +/***/ "./lib/templates/bootstrap5/dialog/index.js": +/*!**************************************************!*\ + !*** ./lib/templates/bootstrap5/dialog/index.js ***! + \**************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap5/dialog/form.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap5/dialog/index.js?"); + +/***/ }), + +/***/ "./lib/templates/bootstrap5/file/form.ejs.js": +/*!***************************************************!*\ + !*** ./lib/templates/bootstrap5/file/form.ejs.js ***! + \***************************************************/ +/***/ (function(__unused_webpack_module, exports) { + +eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"]=function(ctx) {\nvar __t, __p = '', __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n\n if (ctx.options.vpat) { ;\n__p += '\\n \\n';\n } ;\n__p += '\\n';\n if (!ctx.self.imageUpload) { ;\n__p += '\\n ';\n if (ctx.options.vpat) { ;\n__p += '\\n
' +\n((__t = ((!ctx.component.filePattern || ctx.component.filePattern === '*') ? 'Any file types are allowed' : ctx.t('Allowed file types: ') + ctx.component.filePattern)) == null ? '' : __t) +\n'
\\n ';\n } ;\n__p += '\\n
    \\n
  • \\n
    \\n ';\n if (!ctx.disabled) { ;\n__p += '\\n
    \\n ';\n } ;\n__p += '\\n
    \\n
    ' +\n((__t = (ctx.t('Size'))) == null ? '' : __t) +\n'
    \\n ';\n if (ctx.self.hasTypes) { ;\n__p += '\\n
    ' +\n((__t = (ctx.t('Type'))) == null ? '' : __t) +\n'
    \\n ';\n } ;\n__p += '\\n
    \\n
  • \\n ';\n ctx.files.forEach(function(file) { ;\n__p += '\\n
  • \\n
    \\n ';\n if (!ctx.disabled) { ;\n__p += '\\n
    \\n ';\n } ;\n__p += '\\n
    \\n ' +\n((__t = (ctx.t('Press to open '))) == null ? '' : __t) +\n'' +\n((__t = (file.originalName || file.name)) == null ? '' : __t) +\n'\\n \\n ';\n } ;\n__p += '\\n
    \\n
    ' +\n((__t = (ctx.fileSize(file.size))) == null ? '' : __t) +\n'
    \\n ';\n if (ctx.self.hasTypes && !ctx.disabled) { ;\n__p += '\\n
    \\n \\n
    \\n ';\n } ;\n__p += '\\n ';\n if (ctx.self.hasTypes && ctx.disabled) { ;\n__p += '\\n
    ' +\n((__t = (file.fileType)) == null ? '' : __t) +\n'
    \\n ';\n } ;\n__p += '\\n
    \\n
  • \\n ';\n }) ;\n__p += '\\n
\\n';\n } else { ;\n__p += '\\n
\\n ';\n ctx.files.forEach(function(file) { ;\n__p += '\\n
\\n \\n \"'\\n ';\n if (!ctx.disabled) { ;\n__p += '\\n \\n ';\n } ;\n__p += '\\n \\n
\\n ';\n }) ;\n__p += '\\n
\\n';\n } ;\n__p += '\\n';\n if (!ctx.disabled && (ctx.component.multiple || !ctx.files.length)) { ;\n__p += '\\n ';\n if (ctx.self.useWebViewCamera) { ;\n__p += '\\n
\\n \\n \\n
\\n ';\n } else if (!ctx.self.cameraMode) { ;\n__p += '\\n \\n ';\n } else { ;\n__p += '\\n
\\n \\n
\\n \\n \\n ';\n } ;\n__p += '\\n';\n } ;\n__p += '\\n';\n ctx.statuses.forEach(function(status) { ;\n__p += '\\n
\\n
\\n
' +\n((__t = (status.originalName)) == null ? '' : __t) +\n'\\n \\n ' +\n((__t = (ctx.t('Remove button. Press to remove ' + status.originalName || 0))) == null ? '' : __t) +\n'\\n ' +\n((__t = (status.message ? status.message.replace(';', '.') : '')) == null ? '' : __t) +\n'\\n \\n
\\n
' +\n((__t = (ctx.fileSize(status.size))) == null ? '' : __t) +\n'
\\n
\\n
\\n
\\n ';\n if (status.status === 'progress') { ;\n__p += '\\n
\\n
\\n ' +\n((__t = (status.progress)) == null ? '' : __t) +\n'% ' +\n((__t = (ctx.t('Complete'))) == null ? '' : __t) +\n'\\n
\\n
\\n ';\n } else if (status.status === 'error') { ;\n__p += '\\n
' +\n((__t = (ctx.t(status.message))) == null ? '' : __t) +\n'
\\n ';\n } else { ;\n__p += '\\n
' +\n((__t = (ctx.t(status.message))) == null ? '' : __t) +\n'
\\n ';\n } ;\n__p += '\\n
\\n
\\n
\\n';\n }) ;\n__p += '\\n';\n if (!ctx.component.storage || ctx.support.hasWarning) { ;\n__p += '\\n
\\n ';\n if (!ctx.component.storage) { ;\n__p += '\\n

' +\n((__t = (ctx.t('No storage has been set for this field. File uploads are disabled until storage is set up.'))) == null ? '' : __t) +\n'

\\n ';\n } ;\n__p += '\\n ';\n if (!ctx.support.filereader) { ;\n__p += '\\n

' +\n((__t = (ctx.t('File API & FileReader API not supported.'))) == null ? '' : __t) +\n'

\\n ';\n } ;\n__p += '\\n ';\n if (!ctx.support.formdata) { ;\n__p += '\\n

' +\n((__t = (ctx.t(\"XHR2's FormData is not supported.\"))) == null ? '' : __t) +\n'

\\n ';\n } ;\n__p += '\\n ';\n if (!ctx.support.progress) { ;\n__p += '\\n

' +\n((__t = (ctx.t(\"XHR2's upload progress isn't supported.\"))) == null ? '' : __t) +\n'

\\n ';\n } ;\n__p += '\\n
\\n';\n } ;\n__p += '\\n';\nreturn __p\n}\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap5/file/form.ejs.js?"); + +/***/ }), + +/***/ "./lib/templates/bootstrap5/file/index.js": +/*!************************************************!*\ + !*** ./lib/templates/bootstrap5/file/index.js ***! + \************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap5/file/form.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap5/file/index.js?"); + +/***/ }), + +/***/ "./lib/templates/bootstrap5/index.js": +/*!*******************************************!*\ + !*** ./lib/templates/bootstrap5/index.js ***! + \*******************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.date.to-string.js */ \"./node_modules/core-js/modules/es.date.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\nvar _builderSidebar = _interopRequireDefault(__webpack_require__(/*! ./builderSidebar */ \"./lib/templates/bootstrap5/builderSidebar/index.js\"));\nvar _builderSidebarGroup = _interopRequireDefault(__webpack_require__(/*! ./builderSidebarGroup */ \"./lib/templates/bootstrap5/builderSidebarGroup/index.js\"));\nvar _builderWizard = _interopRequireDefault(__webpack_require__(/*! ./builderWizard */ \"./lib/templates/bootstrap5/builderWizard/index.js\"));\nvar _componentModal = _interopRequireDefault(__webpack_require__(/*! ./componentModal */ \"./lib/templates/bootstrap5/componentModal/index.js\"));\nvar _datagrid = _interopRequireDefault(__webpack_require__(/*! ./datagrid */ \"./lib/templates/bootstrap5/datagrid/index.js\"));\nvar _dialog = _interopRequireDefault(__webpack_require__(/*! ./dialog */ \"./lib/templates/bootstrap5/dialog/index.js\"));\nvar _file = _interopRequireDefault(__webpack_require__(/*! ./file */ \"./lib/templates/bootstrap5/file/index.js\"));\nvar _input = _interopRequireDefault(__webpack_require__(/*! ./input */ \"./lib/templates/bootstrap5/input/index.js\"));\nvar _label = _interopRequireDefault(__webpack_require__(/*! ./label */ \"./lib/templates/bootstrap5/label/index.js\"));\nvar _modalPreview = _interopRequireDefault(__webpack_require__(/*! ./modalPreview */ \"./lib/templates/bootstrap5/modalPreview/index.js\"));\nvar _radio = _interopRequireDefault(__webpack_require__(/*! ./radio */ \"./lib/templates/bootstrap5/radio/index.js\"));\nvar _table = _interopRequireDefault(__webpack_require__(/*! ./table */ \"./lib/templates/bootstrap5/table/index.js\"));\nvar _cssClasses = _interopRequireDefault(__webpack_require__(/*! ./cssClasses */ \"./lib/templates/bootstrap5/cssClasses.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n transform: function transform(type, text) {\n if (!text) {\n return text;\n }\n switch (type) {\n case 'class':\n return this.cssClasses.hasOwnProperty(text.toString()) ? this.cssClasses[text.toString()] : text;\n }\n return text;\n },\n builderSidebar: _builderSidebar[\"default\"],\n builderSidebarGroup: _builderSidebarGroup[\"default\"],\n builderWizard: _builderWizard[\"default\"],\n componentModal: _componentModal[\"default\"],\n datagrid: _datagrid[\"default\"],\n dialog: _dialog[\"default\"],\n file: _file[\"default\"],\n input: _input[\"default\"],\n label: _label[\"default\"],\n modalPreview: _modalPreview[\"default\"],\n radio: _radio[\"default\"],\n table: _table[\"default\"],\n cssClasses: _cssClasses[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap5/index.js?"); + +/***/ }), + +/***/ "./lib/templates/bootstrap5/input/form.ejs.js": +/*!****************************************************!*\ + !*** ./lib/templates/bootstrap5/input/form.ejs.js ***! + \****************************************************/ +/***/ (function(__unused_webpack_module, exports) { + +eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"]=function(ctx) {\nvar __t, __p = '', __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n\n if (ctx.prefix || ctx.suffix) { ;\n__p += '\\n
\\n ';\n } ;\n__p += '\\n ';\n if (ctx.prefix) { ;\n__p += '\\n
\\n ';\n if(ctx.prefix instanceof HTMLElement){ ;\n__p += '\\n ' +\n((__t = ( ctx.t(ctx.prefix.outerHTML, { _userInput: true }) )) == null ? '' : __t) +\n'\\n ';\n } else{ ;\n__p += '\\n ' +\n((__t = ( ctx.t(ctx.prefix, { _userInput: true }) )) == null ? '' : __t) +\n'\\n ';\n } ;\n__p += '\\n
\\n ';\n } ;\n__p += '\\n ';\n if (!ctx.component.editor && !ctx.component.wysiwyg) { ;\n__p += '\\n <' +\n((__t = (ctx.input.type)) == null ? '' : __t) +\n'\\n ref=\"' +\n((__t = (ctx.input.ref ? ctx.input.ref : 'input')) == null ? '' : __t) +\n'\"\\n ';\n for (var attr in ctx.input.attr) { ;\n__p += '\\n ' +\n((__t = (attr)) == null ? '' : __t) +\n'=\"' +\n((__t = (ctx.input.attr[attr])) == null ? '' : __t) +\n'\"\\n ';\n } ;\n__p += '\\n id=\"' +\n((__t = (ctx.instance.id)) == null ? '' : __t) +\n'-' +\n((__t = (ctx.component.key)) == null ? '' : __t) +\n'\"\\n aria-labelledby=\"l-' +\n((__t = (ctx.instance.id)) == null ? '' : __t) +\n'-' +\n((__t = (ctx.component.key)) == null ? '' : __t) +\n' ';\n if (ctx.component.description) { ;\n__p += 'd-' +\n((__t = (ctx.instance.id)) == null ? '' : __t) +\n'-' +\n((__t = (ctx.component.key)) == null ? '' : __t);\n } ;\n__p += '\"\\n aria-required=\"' +\n((__t = (ctx.input.ref === 'input' || !ctx.input.ref ? ctx.component.validate.required :\n ctx.component.fields && ctx.component.fields[ctx.input.ref] && ctx.component.fields[ctx.input.ref].required || false)) == null ? '' : __t) +\n'\"\\n >' +\n((__t = (ctx.input.content)) == null ? '' : __t) +\n'\\n ';\n if (ctx.hasValueMaskInput) { ;\n__p += '\\n \\n ';\n } ;\n__p += '\\n';\n } ;\n__p += '\\n';\n if (ctx.component.editor || ctx.component.wysiwyg) { ;\n__p += '\\n
\\n';\n } ;\n__p += '\\n';\n if (ctx.component.type === 'datetime') { ;\n__p += '\\n\\n';\n } ;\n__p += '\\n';\n if (ctx.suffix) { ;\n__p += '\\n
\\n ';\n if(ctx.suffix instanceof HTMLElement){ ;\n__p += '\\n ' +\n((__t = ( ctx.t(ctx.suffix.outerHTML, { _userInput: true }) )) == null ? '' : __t) +\n'\\n ';\n } else{ ;\n__p += '\\n ' +\n((__t = ( ctx.t(ctx.suffix, { _userInput: true }) )) == null ? '' : __t) +\n'\\n ';\n } ;\n__p += '\\n
\\n';\n } ;\n__p += '\\n';\n if (ctx.prefix || ctx.suffix) { ;\n__p += '\\n
\\n';\n } ;\n__p += '\\n';\n if (ctx.component.showCharCount || ctx.component.showWordCount) { ;\n__p += '\\n
\\n ';\n if (ctx.component.showCharCount) { ;\n__p += '\\n \\n ';\n } ;\n__p += '\\n ';\n if (ctx.component.showWordCount) { ;\n__p += '\\n \\n ';\n } ;\n__p += '\\n
\\n';\n } ;\n__p += '\\n';\nreturn __p\n}\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap5/input/form.ejs.js?"); + +/***/ }), + +/***/ "./lib/templates/bootstrap5/input/html.ejs.js": +/*!****************************************************!*\ + !*** ./lib/templates/bootstrap5/input/html.ejs.js ***! + \****************************************************/ +/***/ (function(__unused_webpack_module, exports) { + +eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"]=function(ctx) {\nvar __t, __p = '', __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n__p += '
';\n if (ctx.value) { ;\n__p +=\n((__t = (ctx.value)) == null ? '' : __t);\n } else { ;\n__p += '-';\n } ;\n__p += '
\\n';\nreturn __p\n}\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap5/input/html.ejs.js?"); + +/***/ }), + +/***/ "./lib/templates/bootstrap5/input/index.js": +/*!*************************************************!*\ + !*** ./lib/templates/bootstrap5/input/index.js ***! + \*************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap5/input/form.ejs.js\"));\nvar _html = _interopRequireDefault(__webpack_require__(/*! ./html.ejs */ \"./lib/templates/bootstrap5/input/html.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"],\n html: _html[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap5/input/index.js?"); + +/***/ }), + +/***/ "./lib/templates/bootstrap5/label/form.ejs.js": +/*!****************************************************!*\ + !*** ./lib/templates/bootstrap5/label/form.ejs.js ***! + \****************************************************/ +/***/ (function(__unused_webpack_module, exports) { + +eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"]=function(ctx) {\nvar __t, __p = '', __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n__p += '\\n ' +\n((__t = ( ctx.t(ctx.component.label, { _userInput: true }) )) == null ? '' : __t) +\n'\\n ';\n if (ctx.component.type === 'number' || ctx.component.type === 'phoneNumber' || ctx.component.type === 'currency') { ;\n__p += '\\n , ' +\n((__t = (ctx.t('numeric only'))) == null ? '' : __t) +\n',\\n ';\n } ;\n__p += '\\n ';\n if (ctx.component.tooltip) { ;\n__p += '\\n \\n ';\n } ;\n__p += '\\n\\n';\nreturn __p\n}\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap5/label/form.ejs.js?"); + +/***/ }), + +/***/ "./lib/templates/bootstrap5/label/index.js": +/*!*************************************************!*\ + !*** ./lib/templates/bootstrap5/label/index.js ***! + \*************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap5/label/form.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap5/label/index.js?"); + +/***/ }), + +/***/ "./lib/templates/bootstrap5/modalPreview/form.ejs.js": +/*!***********************************************************!*\ + !*** ./lib/templates/bootstrap5/modalPreview/form.ejs.js ***! + \***********************************************************/ +/***/ (function(__unused_webpack_module, exports) { + +eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"]=function(ctx) {\nvar __t, __p = '';\n__p += '
\\n\\n\\n ' +\n((__t = ( ctx.previewText )) == null ? '' : __t) +\n'\\n\\n
\\n ' +\n((__t = ( ctx.messages )) == null ? '' : __t) +\n'\\n
\\n';\nreturn __p\n}\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap5/modalPreview/form.ejs.js?"); + +/***/ }), + +/***/ "./lib/templates/bootstrap5/modalPreview/index.js": +/*!********************************************************!*\ + !*** ./lib/templates/bootstrap5/modalPreview/index.js ***! + \********************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap5/modalPreview/form.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap5/modalPreview/index.js?"); + +/***/ }), + +/***/ "./lib/templates/bootstrap5/radio/form.ejs.js": +/*!****************************************************!*\ + !*** ./lib/templates/bootstrap5/radio/form.ejs.js ***! + \****************************************************/ +/***/ (function(__unused_webpack_module, exports) { + +eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"]=function(ctx) {\nvar __t, __p = '', __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n__p += '\\n \\n \\n ';\n }) ;\n__p += '\\n\\n';\nreturn __p\n}\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap5/radio/form.ejs.js?"); + +/***/ }), + +/***/ "./lib/templates/bootstrap5/radio/index.js": +/*!*************************************************!*\ + !*** ./lib/templates/bootstrap5/radio/index.js ***! + \*************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap5/radio/form.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap5/radio/index.js?"); + +/***/ }), + +/***/ "./lib/templates/bootstrap5/table/form.ejs.js": +/*!****************************************************!*\ + !*** ./lib/templates/bootstrap5/table/form.ejs.js ***! + \****************************************************/ +/***/ (function(__unused_webpack_module, exports) { + +eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"]=function(ctx) {\nvar __t, __p = '', __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n__p += '\\n \\n ';\n if (ctx.component.header && ctx.component.header.length > 0) { ;\n__p += '\\n \\n \\n ';\n ctx.component.header.forEach(function(header) { ;\n__p += '\\n \\n ';\n }) ;\n__p += '\\n \\n \\n ';\n } ;\n__p += '\\n \\n ';\n ctx.tableComponents.forEach(function(row, rowIndex) { ;\n__p += '\\n \\n ';\n row.forEach(function(column, colIndex) { ;\n__p += '\\n \\n ';\n }) ;\n__p += '\\n \\n
' +\n((__t = (ctx.t(ctx.component.label))) == null ? '' : __t) +\n'
' +\n((__t = (ctx.t(header))) == null ? '' : __t) +\n'
\\n ';\n }) ;\n__p += '\\n
\\n';\nreturn __p\n}\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap5/table/form.ejs.js?"); + +/***/ }), + +/***/ "./lib/templates/bootstrap5/table/index.js": +/*!*************************************************!*\ + !*** ./lib/templates/bootstrap5/table/index.js ***! + \*************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _form = _interopRequireDefault(__webpack_require__(/*! ./form.ejs */ \"./lib/templates/bootstrap5/table/form.ejs.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n form: _form[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/bootstrap5/table/index.js?"); + +/***/ }), + +/***/ "./lib/templates/index.js": +/*!********************************!*\ + !*** ./lib/templates/index.js ***! + \********************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _bootstrap = _interopRequireDefault(__webpack_require__(/*! ./bootstrap */ \"./lib/templates/bootstrap/index.js\"));\nvar _bootstrap2 = _interopRequireDefault(__webpack_require__(/*! ./bootstrap5 */ \"./lib/templates/bootstrap5/index.js\"));\nvar _bootstrap3 = _interopRequireDefault(__webpack_require__(/*! @formio/bootstrap3 */ \"./node_modules/@formio/bootstrap3/lib/index.js\"));\nvar _semantic = _interopRequireDefault(__webpack_require__(/*! @formio/semantic */ \"./node_modules/@formio/semantic/lib/index.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n// Deprecated. Semantic and bootstrap3 will be removed in 5.x.\n// Use external modules instead.\nvar _default = {\n bootstrap: _bootstrap[\"default\"],\n bootstrap3: _bootstrap3[\"default\"].templates.bootstrap3,\n bootstrap5: _bootstrap2[\"default\"],\n semantic: _semantic[\"default\"].templates.semantic\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/templates/index.js?"); + +/***/ }), + +/***/ "./lib/translations/en.js": +/*!********************************!*\ + !*** ./lib/translations/en.js ***! + \********************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = {\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 alertMessageWithLabel: '{{label}}: {{message}}',\n alertMessage: '{{message}}',\n complete: 'Submission Complete',\n error: 'Please fix the following errors before submitting.',\n errorListHotkey: 'Press Ctrl + Alt + X to go back to the error list.',\n errorsListNavigationMessage: 'Click to navigate to the field with following error.',\n submitError: 'Please check the form and correct all errors before submitting.',\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',\n // 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 minYear: '{{field}} should not contain year less than {{minYear}}',\n invalid_email: '{{field}} must be a valid email.',\n // eslint-disable-line camelcase\n invalid_url: '{{field}} must be a valid url.',\n // eslint-disable-line camelcase\n invalid_regex: '{{field}} does not match the pattern {{regex}}.',\n // eslint-disable-line camelcase\n invalid_date: '{{field}} is not a valid date.',\n // eslint-disable-line camelcase\n invalid_day: '{{field}} is not a valid day.',\n // eslint-disable-line camelcase\n mask: '{{field}} does not match the mask.',\n valueIsNotAvailable: '{{ field }} is an invalid value.',\n stripe: '{{stripe}}',\n month: 'Month',\n day: 'Day',\n year: 'Year',\n january: 'January',\n february: 'February',\n march: 'March',\n april: 'April',\n may: 'May',\n june: 'June',\n july: 'July',\n august: 'August',\n september: 'September',\n october: 'October',\n november: 'November',\n december: 'December',\n next: 'Next',\n previous: 'Previous',\n cancel: 'Cancel',\n submit: 'Submit Form',\n confirmCancel: 'Are you sure you want to cancel?',\n saveDraftInstanceError: 'Cannot save draft because there is no formio instance.',\n saveDraftAuthError: 'Cannot save draft unless a user is authenticated.',\n restoreDraftInstanceError: 'Cannot restore draft because there is no formio instance.',\n time: 'Invalid time',\n cancelButtonAriaLabel: 'Cancel button. Click to reset the form',\n previousButtonAriaLabel: 'Previous button. Click to go back to the previous tab',\n nextButtonAriaLabel: 'Next button. Click to go to the next tab',\n submitButtonAriaLabel: 'Submit Form button. Click to submit the form'\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/translations/en.js?"); + +/***/ }), + +/***/ "./lib/utils/ChoicesWrapper.js": +/*!*************************************!*\ + !*** ./lib/utils/ChoicesWrapper.js ***! + \*************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = exports.KEY_CODES = void 0;\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/web.timers.js */ \"./node_modules/core-js/modules/web.timers.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _choices = _interopRequireDefault(__webpack_require__(/*! @formio/choices.js */ \"./node_modules/@formio/choices.js/public/assets/scripts/choices.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n/**\n * TODO: REMOVE THIS ONCE THE PULL REQUEST HAS BEEN RESOLVED.\n *\n * https://github.com/jshjohnson/Choices/pull/788\n *\n * This is intentionally not part of the extended class, since other components use Choices and need this fix as well.\n * @type {Choices._generatePlaceholderValue}\n * @private\n */\n_choices[\"default\"].prototype._generatePlaceholderValue = function () {\n if (this._isSelectElement && this.passedElement.placeholderOption) {\n var placeholderOption = this.passedElement.placeholderOption;\n return placeholderOption ? placeholderOption.text : false;\n }\n var _this$config = this.config,\n placeholder = _this$config.placeholder,\n placeholderValue = _this$config.placeholderValue;\n var dataset = this.passedElement.element.dataset;\n if (placeholder) {\n if (placeholderValue) {\n return placeholderValue;\n }\n if (dataset.placeholder) {\n return dataset.placeholder;\n }\n }\n return false;\n};\nvar KEY_CODES = {\n BACK_KEY: 46,\n DELETE_KEY: 8,\n TAB_KEY: 9,\n ENTER_KEY: 13,\n A_KEY: 65,\n ESC_KEY: 27,\n UP_KEY: 38,\n DOWN_KEY: 40,\n PAGE_UP_KEY: 33,\n PAGE_DOWN_KEY: 34\n};\nexports.KEY_CODES = KEY_CODES;\nvar ChoicesWrapper = /*#__PURE__*/function (_Choices) {\n _inherits(ChoicesWrapper, _Choices);\n var _super = _createSuper(ChoicesWrapper);\n function ChoicesWrapper() {\n var _this;\n _classCallCheck(this, ChoicesWrapper);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _this._onTabKey = _this._onTabKey.bind(_assertThisInitialized(_this));\n _this.isDirectionUsing = false;\n _this.shouldOpenDropDown = true;\n return _this;\n }\n _createClass(ChoicesWrapper, [{\n key: \"_handleButtonAction\",\n value: function _handleButtonAction(activeItems, element) {\n if (!this._isSelectOneElement) {\n return _get(_getPrototypeOf(ChoicesWrapper.prototype), \"_handleButtonAction\", this).call(this, activeItems, element);\n }\n if (!activeItems || !element || !this.config.removeItems || !this.config.removeItemButton) {\n return;\n }\n _get(_getPrototypeOf(ChoicesWrapper.prototype), \"_handleButtonAction\", this).call(this, activeItems, element);\n }\n }, {\n key: \"_onEnterKey\",\n value: function _onEnterKey(args) {\n // Prevent dropdown form opening when removeItemButton was pressed using 'Enter' on keyboard\n if (args.event.target.className === 'choices__button') {\n this.shouldOpenDropDown = false;\n }\n _get(_getPrototypeOf(ChoicesWrapper.prototype), \"_onEnterKey\", this).call(this, args);\n }\n }, {\n key: \"_onDirectionKey\",\n value: function _onDirectionKey() {\n var _get3,\n _this2 = this;\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n if (!this._isSelectOneElement) {\n var _get2;\n return (_get2 = _get(_getPrototypeOf(ChoicesWrapper.prototype), \"_onDirectionKey\", this)).call.apply(_get2, [this].concat(args));\n }\n this.isDirectionUsing = true;\n (_get3 = _get(_getPrototypeOf(ChoicesWrapper.prototype), \"_onDirectionKey\", this)).call.apply(_get3, [this].concat(args));\n this.onSelectValue.apply(this, args);\n clearTimeout(this.timeout);\n this.timeout = setTimeout(function () {\n _this2.isDirectionUsing = false;\n }, 250);\n }\n }, {\n key: \"_onTabKey\",\n value: function _onTabKey(_ref) {\n var activeItems = _ref.activeItems,\n hasActiveDropdown = _ref.hasActiveDropdown;\n if (hasActiveDropdown) {\n this._selectHighlightedChoice(activeItems);\n }\n }\n }, {\n key: \"_selectHighlightedChoice\",\n value: function _selectHighlightedChoice(activeItems) {\n var highlightedChoice = this.dropdown.getChild(\".\".concat(this.config.classNames.highlightedState));\n if (highlightedChoice) {\n this._handleChoiceAction(activeItems, highlightedChoice);\n }\n event.preventDefault();\n }\n }, {\n key: \"_onKeyDown\",\n value: function _onKeyDown(event) {\n var _keyDownActions;\n if (!this._isSelectOneElement) {\n return _get(_getPrototypeOf(ChoicesWrapper.prototype), \"_onKeyDown\", this).call(this, event);\n }\n var target = event.target,\n keyCode = event.keyCode,\n ctrlKey = event.ctrlKey,\n metaKey = event.metaKey;\n if (target !== this.input.element && !this.containerOuter.element.contains(target)) {\n return;\n }\n var activeItems = this._store.activeItems;\n var hasFocusedInput = this.input.isFocussed;\n var hasActiveDropdown = this.dropdown.isActive;\n var hasItems = this.itemList.hasChildren;\n var keyString = String.fromCharCode(keyCode);\n var BACK_KEY = KEY_CODES.BACK_KEY,\n DELETE_KEY = KEY_CODES.DELETE_KEY,\n TAB_KEY = KEY_CODES.TAB_KEY,\n ENTER_KEY = KEY_CODES.ENTER_KEY,\n A_KEY = KEY_CODES.A_KEY,\n ESC_KEY = KEY_CODES.ESC_KEY,\n UP_KEY = KEY_CODES.UP_KEY,\n DOWN_KEY = KEY_CODES.DOWN_KEY,\n PAGE_UP_KEY = KEY_CODES.PAGE_UP_KEY,\n PAGE_DOWN_KEY = KEY_CODES.PAGE_DOWN_KEY;\n var hasCtrlDownKeyPressed = ctrlKey || metaKey;\n\n // If a user is typing and the dropdown is not active\n if (!hasActiveDropdown && !this._isTextElement && /[a-zA-Z0-9-_ ]/.test(keyString)) {\n var currentValue = this.input.element.value;\n this.input.element.value = currentValue ? \"\".concat(currentValue).concat(keyString) : keyString;\n this.showDropdown();\n }\n\n // Map keys to key actions\n var keyDownActions = (_keyDownActions = {}, _defineProperty(_keyDownActions, A_KEY, this._onAKey), _defineProperty(_keyDownActions, TAB_KEY, this._onTabKey), _defineProperty(_keyDownActions, ENTER_KEY, this._onEnterKey), _defineProperty(_keyDownActions, ESC_KEY, this._onEscapeKey), _defineProperty(_keyDownActions, UP_KEY, this._onDirectionKey), _defineProperty(_keyDownActions, PAGE_UP_KEY, this._onDirectionKey), _defineProperty(_keyDownActions, DOWN_KEY, this._onDirectionKey), _defineProperty(_keyDownActions, PAGE_DOWN_KEY, this._onDirectionKey), _defineProperty(_keyDownActions, DELETE_KEY, this._onDeleteKey), _defineProperty(_keyDownActions, BACK_KEY, this._onDeleteKey), _keyDownActions);\n\n // If keycode has a function, run it\n if (keyDownActions[keyCode]) {\n keyDownActions[keyCode]({\n event: event,\n target: target,\n keyCode: keyCode,\n metaKey: metaKey,\n activeItems: activeItems,\n hasFocusedInput: hasFocusedInput,\n hasActiveDropdown: hasActiveDropdown,\n hasItems: hasItems,\n hasCtrlDownKeyPressed: hasCtrlDownKeyPressed\n });\n }\n }\n }, {\n key: \"onSelectValue\",\n value: function onSelectValue(_ref2) {\n var event = _ref2.event,\n activeItems = _ref2.activeItems,\n hasActiveDropdown = _ref2.hasActiveDropdown;\n if (hasActiveDropdown) {\n this._selectHighlightedChoice(activeItems);\n } else if (this._isSelectOneElement) {\n this.showDropdown();\n event.preventDefault();\n }\n }\n }, {\n key: \"showDropdown\",\n value: function showDropdown() {\n var _get4;\n if (!this.shouldOpenDropDown) {\n this.shouldOpenDropDown = true;\n return;\n }\n for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n args[_key3] = arguments[_key3];\n }\n (_get4 = _get(_getPrototypeOf(ChoicesWrapper.prototype), \"showDropdown\", this)).call.apply(_get4, [this].concat(args));\n }\n }, {\n key: \"hideDropdown\",\n value: function hideDropdown() {\n var _get5;\n if (this.isDirectionUsing) {\n return;\n }\n for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n args[_key4] = arguments[_key4];\n }\n (_get5 = _get(_getPrototypeOf(ChoicesWrapper.prototype), \"hideDropdown\", this)).call.apply(_get5, [this].concat(args));\n }\n }, {\n key: \"_onBlur\",\n value: function _onBlur() {\n var _get6;\n if (this._isScrollingOnIe) {\n return;\n }\n for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {\n args[_key5] = arguments[_key5];\n }\n (_get6 = _get(_getPrototypeOf(ChoicesWrapper.prototype), \"_onBlur\", this)).call.apply(_get6, [this].concat(args));\n }\n }]);\n return ChoicesWrapper;\n}(_choices[\"default\"]);\nvar _default = ChoicesWrapper;\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/utils/ChoicesWrapper.js?"); + +/***/ }), + +/***/ "./lib/utils/Evaluator.js": +/*!********************************!*\ + !*** ./lib/utils/Evaluator.js ***! + \********************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n__webpack_require__(/*! core-js/modules/es.array.from.js */ \"./node_modules/core-js/modules/es.array.from.js\");\n__webpack_require__(/*! core-js/modules/es.array.slice.js */ \"./node_modules/core-js/modules/es.array.slice.js\");\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n__webpack_require__(/*! core-js/modules/es.string.trim.js */ \"./node_modules/core-js/modules/es.string.trim.js\");\n__webpack_require__(/*! core-js/modules/es.array.is-array.js */ \"./node_modules/core-js/modules/es.array.is-array.js\");\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nvar _stringHash = _interopRequireDefault(__webpack_require__(/*! string-hash */ \"./node_modules/string-hash/index.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct.bind(); } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nvar Evaluator = {\n noeval: false,\n protectedEval: false,\n // This property can be customized only by plugins\n cache: {},\n templateSettings: {\n evaluate: /\\{%([\\s\\S]+?)%\\}/g,\n interpolate: /\\{\\{([\\s\\S]+?)\\}\\}/g,\n escape: /\\{\\{\\{([\\s\\S]+?)\\}\\}\\}/g\n },\n evaluator: function evaluator(func) {\n for (var _len = arguments.length, params = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n params[_key - 1] = arguments[_key];\n }\n if (Evaluator.noeval) {\n console.warn('No evaluations allowed for this renderer.');\n return _lodash[\"default\"].noop;\n }\n if (_typeof(params[0]) === 'object') {\n params = _lodash[\"default\"].keys(params[0]);\n }\n return _construct(Function, _toConsumableArray(params).concat([func]));\n },\n template: function template(_template, hash) {\n hash = hash || (0, _stringHash[\"default\"])(_template);\n if (Evaluator.cache[hash]) {\n return Evaluator.cache[hash];\n }\n try {\n // Ensure we handle copied templates from the ejs files.\n _template = _template.replace(/ctx\\./g, '');\n return Evaluator.cache[hash] = _lodash[\"default\"].template(_template, Evaluator.templateSettings);\n } catch (err) {\n console.warn('Error while processing template', err, _template);\n }\n },\n interpolate: function interpolate(rawTemplate, data, _options) {\n // Ensure reverse compatability.\n var options = _lodash[\"default\"].isObject(_options) ? _options : {\n noeval: _options\n };\n if (typeof rawTemplate === 'function') {\n try {\n return rawTemplate(data);\n } catch (err) {\n console.warn('Error interpolating template', err, data);\n return err.message;\n }\n }\n rawTemplate = String(rawTemplate);\n var template;\n if (Evaluator.noeval || options.noeval) {\n // No cached template methods available. Use poor-mans interpolate without eval.\n return rawTemplate.replace(/({{\\s*(.*?)\\s*}})/g, function (match, $1, $2) {\n // Allow for conditional values.\n var parts = $2.split('||').map(function (item) {\n return item.trim();\n });\n var value = '';\n var path = '';\n for (var i = 0; i < parts.length; i++) {\n path = parts[i];\n value = _lodash[\"default\"].get(data, path);\n if (value) {\n break;\n }\n }\n if (options.data) {\n _lodash[\"default\"].set(options.data, path, value);\n }\n return value;\n });\n } else {\n template = Evaluator.template(rawTemplate);\n }\n if (typeof template === 'function') {\n try {\n return template(data);\n } catch (err) {\n console.warn('Error interpolating template', err, rawTemplate, data);\n return err.message;\n }\n }\n return template;\n },\n evaluate: function evaluate(func, args) {\n return Array.isArray(args) ? func.apply(void 0, _toConsumableArray(args)) : func(args);\n }\n};\nEvaluator.registerEvaluator = function (evaluator) {\n Object.keys(evaluator).forEach(function (key) {\n Evaluator[key] = evaluator[key];\n });\n};\nvar _default = Evaluator;\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/utils/Evaluator.js?"); + +/***/ }), + +/***/ "./lib/utils/builder.js": +/*!******************************!*\ + !*** ./lib/utils/builder.js ***! + \******************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.array.includes.js */ \"./node_modules/core-js/modules/es.array.includes.js\");\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nvar _utils = __webpack_require__(/*! ./utils */ \"./lib/utils/utils.js\");\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n /**\n * Appends a number to a component.key to keep it unique\n *\n * @param {Object} form\n * The components parent form.\n * @param {Object} component\n * The component to uniquify\n */\n uniquify: function uniquify(container, component) {\n var changed = false;\n var formKeys = {};\n (0, _utils.eachComponent)(container, function (comp) {\n formKeys[comp.key] = true;\n if (['address', 'container', 'datagrid', 'editgrid', 'dynamicWizard', 'tree'].includes(comp.type) || comp.tree || comp.arrayTree) {\n return true;\n }\n }, true);\n\n // Recurse into all child components.\n (0, _utils.eachComponent)([component], function (component) {\n // Skip key uniquification if this component doesn't have a key.\n if (!component.key) {\n return;\n }\n var newKey = (0, _utils.uniqueKey)(formKeys, component.key);\n if (newKey !== component.key) {\n component.key = newKey;\n changed = true;\n }\n formKeys[newKey] = true;\n if (['address', 'container', 'datagrid', 'editgrid', 'dynamicWizard', 'tree'].includes(component.type) || component.tree || component.arrayTree) {\n return true;\n }\n }, true);\n return changed;\n },\n additionalShortcuts: {\n button: ['Enter', 'Esc']\n },\n getAlphaShortcuts: function getAlphaShortcuts() {\n return _lodash[\"default\"].range('A'.charCodeAt(), 'Z'.charCodeAt() + 1).map(function (charCode) {\n return String.fromCharCode(charCode);\n });\n },\n getAdditionalShortcuts: function getAdditionalShortcuts(type) {\n return this.additionalShortcuts[type] || [];\n },\n getBindedShortcuts: function getBindedShortcuts(components, input) {\n var result = [];\n (0, _utils.eachComponent)(components, function (component) {\n if (component === input) {\n return;\n }\n if (component.shortcut) {\n result.push(component.shortcut);\n }\n if (component.values) {\n component.values.forEach(function (value) {\n if (value.shortcut) {\n result.push(value.shortcut);\n }\n });\n }\n }, true);\n return result;\n },\n getAvailableShortcuts: function getAvailableShortcuts(form, component) {\n if (!component) {\n return [];\n }\n return [''].concat(_lodash[\"default\"].difference(this.getAlphaShortcuts().concat(this.getAdditionalShortcuts(component.type)), this.getBindedShortcuts(form.components, component))).map(function (shortcut) {\n return {\n label: shortcut,\n value: shortcut\n };\n });\n }\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/utils/builder.js?"); + +/***/ }), + +/***/ "./lib/utils/calendarUtils.js": +/*!************************************!*\ + !*** ./lib/utils/calendarUtils.js ***! + \************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.CALENDAR_ERROR_MESSAGES = void 0;\nexports.checkInvalidDate = checkInvalidDate;\nexports.lessOrGreater = lessOrGreater;\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n__webpack_require__(/*! core-js/modules/es.string.match.js */ \"./node_modules/core-js/modules/es.string.match.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.constructor.js */ \"./node_modules/core-js/modules/es.regexp.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.array.join.js */ \"./node_modules/core-js/modules/es.array.join.js\");\n__webpack_require__(/*! core-js/modules/es.string.split.js */ \"./node_modules/core-js/modules/es.string.split.js\");\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n__webpack_require__(/*! core-js/modules/es.array.find-index.js */ \"./node_modules/core-js/modules/es.array.find-index.js\");\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.array.index-of.js */ \"./node_modules/core-js/modules/es.array.index-of.js\");\nvar _moment = _interopRequireDefault(__webpack_require__(/*! moment */ \"./node_modules/moment/moment.js\"));\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar CALENDAR_ERROR_MESSAGES = {\n INVALID: 'You entered the Invalid Date',\n INCOMPLETE: 'You entered an incomplete date.',\n greater: function greater(date, format) {\n return \"The entered date is greater than \".concat(date.format(format));\n },\n less: function less(date, format) {\n return \"The entered date is less than \".concat(date.format(format));\n }\n};\n\n/**\n * Builds the response for checkInvalidDate.\n *\n * @param {String} message\n * The message for response.\n * @param {Boolean} result\n * The boolean flag for response.\n * * @return {{message: string, result: boolean}}\n */\nexports.CALENDAR_ERROR_MESSAGES = CALENDAR_ERROR_MESSAGES;\nfunction buildResponse(message, result) {\n return {\n message: message,\n result: result\n };\n}\n\n/**\n * Checks the value for a min date and max date.\n *\n * @param {moment} value\n * The value to check.\n * @param {[String]} format\n * A moment formats.\n * @param {Date} maxDate\n * The max date.\n * @param {Date} minDate\n * The min date.\n * * @return {{message: string, result: boolean}}\n */\nfunction lessOrGreater(value, format, maxDate, minDate) {\n var message = '';\n var result = true;\n if (maxDate && value.isValid()) {\n var maxDateMoment = (0, _moment[\"default\"])(maxDate, format);\n if (value > maxDateMoment) {\n message = CALENDAR_ERROR_MESSAGES.greater(maxDateMoment, format);\n result = false;\n }\n }\n if (minDate && value.isValid()) {\n var minDateMoment = (0, _moment[\"default\"])(minDate, format);\n if (value < minDateMoment) {\n message = CALENDAR_ERROR_MESSAGES.less(minDateMoment, format);\n result = false;\n }\n }\n return {\n message: message,\n result: result\n };\n}\n\n/**\n * Checks the entered date for validity.\n *\n * @param {String} value\n * The value to check.\n * @param {[String]} format\n * A moment formats.\n * @param {Date} maxDate\n * The max date.\n * @param {Date} minDate\n * The min date.\n * * @return {{message: string, result: boolean}}\n */\nfunction checkInvalidDate(value, format, minDate, maxDate) {\n var date = (0, _moment[\"default\"])(value, format, true);\n var isValidDate = date.isValid();\n if (!isValidDate) {\n var delimeters = value.match(/[^a-z0-9_]/gi);\n var delimetersRegEx = new RegExp(delimeters.join('|'), 'gi');\n var inputParts = value.replace(/_*/gi, '').split(delimetersRegEx);\n var formatParts = format[1] ? format[1].split(delimetersRegEx) : format[0].split(delimetersRegEx);\n var timeIndex = _lodash[\"default\"].findIndex(formatParts, function (part, index) {\n return part.length === 1 && index === formatParts.length - 1;\n });\n var yearIndex = _lodash[\"default\"].findIndex(formatParts, function (part) {\n return part.match(/yyyy/gi);\n });\n if (inputParts[yearIndex] / 1000 < 1) {\n return buildResponse(CALENDAR_ERROR_MESSAGES.INVALID, false);\n }\n if (inputParts[0].length === formatParts[0].length) {\n var modifiedParts = inputParts.map(function (part, index) {\n var partValue = part;\n if (!part && index === timeIndex) {\n partValue = 'AM';\n } else if (!part) {\n partValue = '01';\n }\n if (delimeters[index]) {\n partValue = \"\".concat(partValue).concat(delimeters[index]);\n }\n return partValue;\n });\n var problemDate = (0, _moment[\"default\"])(modifiedParts.join(''), format, true);\n if (problemDate.isValid()) {\n var checkedLessOrGreater = lessOrGreater(problemDate, format[0], maxDate, minDate);\n if (!checkedLessOrGreater.result) {\n var message = checkedLessOrGreater.message,\n result = checkedLessOrGreater.result;\n return buildResponse(message, result);\n }\n return buildResponse(CALENDAR_ERROR_MESSAGES.INCOMPLETE, false);\n } else {\n return buildResponse(CALENDAR_ERROR_MESSAGES.INVALID, false);\n }\n } else {\n return buildResponse(CALENDAR_ERROR_MESSAGES.INVALID, false);\n }\n } else if (isValidDate && value.indexOf('_') === -1) {\n var _checkedLessOrGreater = lessOrGreater(date, format[0], maxDate, minDate);\n if (!_checkedLessOrGreater.result) {\n var _message = _checkedLessOrGreater.message,\n _result = _checkedLessOrGreater.result;\n return buildResponse(_message, _result);\n }\n }\n return buildResponse('', true);\n}\n\n//# sourceURL=webpack://Formio/./lib/utils/calendarUtils.js?"); + +/***/ }), + +/***/ "./lib/utils/conditionOperators/ConditionOperator.js": +/*!***********************************************************!*\ + !*** ./lib/utils/conditionOperators/ConditionOperator.js ***! + \***********************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptors.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-properties.js */ \"./node_modules/core-js/modules/es.object.define-properties.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.array.some.js */ \"./node_modules/core-js/modules/es.array.some.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\n/* eslint-disable no-unused-vars */\nvar ConditionOperator = /*#__PURE__*/function () {\n function ConditionOperator() {\n _classCallCheck(this, ConditionOperator);\n }\n _createClass(ConditionOperator, [{\n key: \"execute\",\n value: function execute(options) {\n return true;\n }\n }, {\n key: \"getResult\",\n value: function getResult() {\n var _this = this;\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var value = options.value;\n if (_lodash[\"default\"].isArray(value)) {\n return _lodash[\"default\"].some(value, function (valueItem) {\n return _this.execute(_objectSpread(_objectSpread({}, options), {}, {\n value: valueItem\n }));\n });\n }\n return this.execute(options);\n }\n }], [{\n key: \"operatorKey\",\n get: function get() {\n return '';\n }\n }, {\n key: \"displayedName\",\n get: function get() {\n return '';\n }\n }, {\n key: \"requireValue\",\n get: function get() {\n return true;\n }\n }]);\n return ConditionOperator;\n}();\nexports[\"default\"] = ConditionOperator;\n\n//# sourceURL=webpack://Formio/./lib/utils/conditionOperators/ConditionOperator.js?"); + +/***/ }), + +/***/ "./lib/utils/conditionOperators/DateGreaterThan.js": +/*!*********************************************************!*\ + !*** ./lib/utils/conditionOperators/DateGreaterThan.js ***! + \*********************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptors.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-properties.js */ \"./node_modules/core-js/modules/es.object.define-properties.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _ConditionOperator2 = _interopRequireDefault(__webpack_require__(/*! ./ConditionOperator */ \"./lib/utils/conditionOperators/ConditionOperator.js\"));\nvar _moment = _interopRequireDefault(__webpack_require__(/*! moment */ \"./node_modules/moment/moment.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar DateGeaterThan = /*#__PURE__*/function (_ConditionOperator) {\n _inherits(DateGeaterThan, _ConditionOperator);\n var _super = _createSuper(DateGeaterThan);\n function DateGeaterThan() {\n _classCallCheck(this, DateGeaterThan);\n return _super.apply(this, arguments);\n }\n _createClass(DateGeaterThan, [{\n key: \"getFormattedDates\",\n value: function getFormattedDates(_ref) {\n var value = _ref.value,\n comparedValue = _ref.comparedValue,\n conditionTriggerComponent = _ref.conditionTriggerComponent;\n var hasValidationFormat = conditionTriggerComponent ? conditionTriggerComponent.getValidationFormat : null;\n var date = hasValidationFormat ? (0, _moment[\"default\"])(value, conditionTriggerComponent.getValidationFormat()) : (0, _moment[\"default\"])(value);\n var comparedDate = hasValidationFormat ? (0, _moment[\"default\"])(comparedValue, conditionTriggerComponent.getValidationFormat()) : (0, _moment[\"default\"])(comparedValue);\n return {\n date: date,\n comparedDate: comparedDate\n };\n }\n }, {\n key: \"execute\",\n value: function execute(options) {\n var functionName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'isAfter';\n var value = options.value,\n instance = options.instance,\n conditionComponentPath = options.conditionComponentPath;\n if (!value) {\n return false;\n }\n var conditionTriggerComponent = null;\n if (instance && instance.root) {\n conditionTriggerComponent = instance.root.getComponent(conditionComponentPath);\n }\n if (conditionTriggerComponent && conditionTriggerComponent.isPartialDay && conditionTriggerComponent.isPartialDay(value)) {\n return false;\n }\n var _this$getFormattedDat = this.getFormattedDates(_objectSpread(_objectSpread({}, options), {}, {\n conditionTriggerComponent: conditionTriggerComponent\n })),\n date = _this$getFormattedDat.date,\n comparedDate = _this$getFormattedDat.comparedDate;\n return date[functionName](comparedDate);\n }\n }], [{\n key: \"operatorKey\",\n get: function get() {\n return 'dateGreaterThan';\n }\n }, {\n key: \"displayedName\",\n get: function get() {\n return 'Greater Than';\n }\n }]);\n return DateGeaterThan;\n}(_ConditionOperator2[\"default\"]);\nexports[\"default\"] = DateGeaterThan;\n\n//# sourceURL=webpack://Formio/./lib/utils/conditionOperators/DateGreaterThan.js?"); + +/***/ }), + +/***/ "./lib/utils/conditionOperators/DateGreaterThanOrEqual.js": +/*!****************************************************************!*\ + !*** ./lib/utils/conditionOperators/DateGreaterThanOrEqual.js ***! + \****************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _DateGreaterThan = _interopRequireDefault(__webpack_require__(/*! ./DateGreaterThan */ \"./lib/utils/conditionOperators/DateGreaterThan.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar DateGreaterThanOrEqual = /*#__PURE__*/function (_DateGeaterThan) {\n _inherits(DateGreaterThanOrEqual, _DateGeaterThan);\n var _super = _createSuper(DateGreaterThanOrEqual);\n function DateGreaterThanOrEqual() {\n _classCallCheck(this, DateGreaterThanOrEqual);\n return _super.apply(this, arguments);\n }\n _createClass(DateGreaterThanOrEqual, [{\n key: \"execute\",\n value: function execute(options) {\n return _get(_getPrototypeOf(DateGreaterThanOrEqual.prototype), \"execute\", this).call(this, options, 'isSameOrAfter');\n }\n }], [{\n key: \"operatorKey\",\n get: function get() {\n return 'dateGreaterThanOrEqual';\n }\n }, {\n key: \"displayedName\",\n get: function get() {\n return 'Greater Than Or Equal To';\n }\n }]);\n return DateGreaterThanOrEqual;\n}(_DateGreaterThan[\"default\"]);\nexports[\"default\"] = DateGreaterThanOrEqual;\n\n//# sourceURL=webpack://Formio/./lib/utils/conditionOperators/DateGreaterThanOrEqual.js?"); + +/***/ }), + +/***/ "./lib/utils/conditionOperators/DateLessThan.js": +/*!******************************************************!*\ + !*** ./lib/utils/conditionOperators/DateLessThan.js ***! + \******************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _DateGreaterThan = _interopRequireDefault(__webpack_require__(/*! ./DateGreaterThan */ \"./lib/utils/conditionOperators/DateGreaterThan.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar DateLessThan = /*#__PURE__*/function (_DateGeaterThan) {\n _inherits(DateLessThan, _DateGeaterThan);\n var _super = _createSuper(DateLessThan);\n function DateLessThan() {\n _classCallCheck(this, DateLessThan);\n return _super.apply(this, arguments);\n }\n _createClass(DateLessThan, [{\n key: \"execute\",\n value: function execute(options) {\n return _get(_getPrototypeOf(DateLessThan.prototype), \"execute\", this).call(this, options, 'isBefore');\n }\n }], [{\n key: \"operatorKey\",\n get: function get() {\n return 'dateLessThan';\n }\n }, {\n key: \"displayedName\",\n get: function get() {\n return 'Less Than';\n }\n }]);\n return DateLessThan;\n}(_DateGreaterThan[\"default\"]);\nexports[\"default\"] = DateLessThan;\n\n//# sourceURL=webpack://Formio/./lib/utils/conditionOperators/DateLessThan.js?"); + +/***/ }), + +/***/ "./lib/utils/conditionOperators/DateLessThanOrEqual.js": +/*!*************************************************************!*\ + !*** ./lib/utils/conditionOperators/DateLessThanOrEqual.js ***! + \*************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _DateGreaterThan = _interopRequireDefault(__webpack_require__(/*! ./DateGreaterThan */ \"./lib/utils/conditionOperators/DateGreaterThan.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar DateLessThanOrEqual = /*#__PURE__*/function (_DateGeaterThan) {\n _inherits(DateLessThanOrEqual, _DateGeaterThan);\n var _super = _createSuper(DateLessThanOrEqual);\n function DateLessThanOrEqual() {\n _classCallCheck(this, DateLessThanOrEqual);\n return _super.apply(this, arguments);\n }\n _createClass(DateLessThanOrEqual, [{\n key: \"execute\",\n value: function execute(options) {\n return _get(_getPrototypeOf(DateLessThanOrEqual.prototype), \"execute\", this).call(this, options, 'isSameOrBefore');\n }\n }], [{\n key: \"operatorKey\",\n get: function get() {\n return 'dateLessThanOrEqual';\n }\n }, {\n key: \"displayedName\",\n get: function get() {\n return 'Less Than Or Equal To';\n }\n }]);\n return DateLessThanOrEqual;\n}(_DateGreaterThan[\"default\"]);\nexports[\"default\"] = DateLessThanOrEqual;\n\n//# sourceURL=webpack://Formio/./lib/utils/conditionOperators/DateLessThanOrEqual.js?"); + +/***/ }), + +/***/ "./lib/utils/conditionOperators/EndsWith.js": +/*!**************************************************!*\ + !*** ./lib/utils/conditionOperators/EndsWith.js ***! + \**************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.string.ends-with.js */ \"./node_modules/core-js/modules/es.string.ends-with.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _ConditionOperator2 = _interopRequireDefault(__webpack_require__(/*! ./ConditionOperator */ \"./lib/utils/conditionOperators/ConditionOperator.js\"));\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar EndsWith = /*#__PURE__*/function (_ConditionOperator) {\n _inherits(EndsWith, _ConditionOperator);\n var _super = _createSuper(EndsWith);\n function EndsWith() {\n _classCallCheck(this, EndsWith);\n return _super.apply(this, arguments);\n }\n _createClass(EndsWith, [{\n key: \"execute\",\n value: function execute(_ref) {\n var value = _ref.value,\n comparedValue = _ref.comparedValue;\n return _lodash[\"default\"].endsWith(value, comparedValue);\n }\n }], [{\n key: \"operatorKey\",\n get: function get() {\n return 'endsWith';\n }\n }, {\n key: \"displayedName\",\n get: function get() {\n return 'Ends With';\n }\n }]);\n return EndsWith;\n}(_ConditionOperator2[\"default\"]);\nexports[\"default\"] = EndsWith;\n\n//# sourceURL=webpack://Formio/./lib/utils/conditionOperators/EndsWith.js?"); + +/***/ }), + +/***/ "./lib/utils/conditionOperators/GreaterThan.js": +/*!*****************************************************!*\ + !*** ./lib/utils/conditionOperators/GreaterThan.js ***! + \*****************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _ConditionOperator2 = _interopRequireDefault(__webpack_require__(/*! ./ConditionOperator */ \"./lib/utils/conditionOperators/ConditionOperator.js\"));\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar GeaterThan = /*#__PURE__*/function (_ConditionOperator) {\n _inherits(GeaterThan, _ConditionOperator);\n var _super = _createSuper(GeaterThan);\n function GeaterThan() {\n _classCallCheck(this, GeaterThan);\n return _super.apply(this, arguments);\n }\n _createClass(GeaterThan, [{\n key: \"execute\",\n value: function execute(_ref) {\n var value = _ref.value,\n comparedValue = _ref.comparedValue;\n return _lodash[\"default\"].isNumber(value) && value > comparedValue;\n }\n }], [{\n key: \"operatorKey\",\n get: function get() {\n return 'greaterThan';\n }\n }, {\n key: \"displayedName\",\n get: function get() {\n return 'Greater Than';\n }\n }]);\n return GeaterThan;\n}(_ConditionOperator2[\"default\"]);\nexports[\"default\"] = GeaterThan;\n\n//# sourceURL=webpack://Formio/./lib/utils/conditionOperators/GreaterThan.js?"); + +/***/ }), + +/***/ "./lib/utils/conditionOperators/GreaterThanOrEqual.js": +/*!************************************************************!*\ + !*** ./lib/utils/conditionOperators/GreaterThanOrEqual.js ***! + \************************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _ConditionOperator2 = _interopRequireDefault(__webpack_require__(/*! ./ConditionOperator */ \"./lib/utils/conditionOperators/ConditionOperator.js\"));\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar GreaterThanOrEqual = /*#__PURE__*/function (_ConditionOperator) {\n _inherits(GreaterThanOrEqual, _ConditionOperator);\n var _super = _createSuper(GreaterThanOrEqual);\n function GreaterThanOrEqual() {\n _classCallCheck(this, GreaterThanOrEqual);\n return _super.apply(this, arguments);\n }\n _createClass(GreaterThanOrEqual, [{\n key: \"execute\",\n value: function execute(_ref) {\n var value = _ref.value,\n comparedValue = _ref.comparedValue;\n return _lodash[\"default\"].isNumber(value) && (value > comparedValue || _lodash[\"default\"].isEqual(value, comparedValue));\n }\n }], [{\n key: \"operatorKey\",\n get: function get() {\n return 'greaterThanOrEqual';\n }\n }, {\n key: \"displayedName\",\n get: function get() {\n return 'Greater Than Or Equal To';\n }\n }]);\n return GreaterThanOrEqual;\n}(_ConditionOperator2[\"default\"]);\nexports[\"default\"] = GreaterThanOrEqual;\n\n//# sourceURL=webpack://Formio/./lib/utils/conditionOperators/GreaterThanOrEqual.js?"); + +/***/ }), + +/***/ "./lib/utils/conditionOperators/Includes.js": +/*!**************************************************!*\ + !*** ./lib/utils/conditionOperators/Includes.js ***! + \**************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.array.includes.js */ \"./node_modules/core-js/modules/es.array.includes.js\");\n__webpack_require__(/*! core-js/modules/es.string.includes.js */ \"./node_modules/core-js/modules/es.string.includes.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _ConditionOperator2 = _interopRequireDefault(__webpack_require__(/*! ./ConditionOperator */ \"./lib/utils/conditionOperators/ConditionOperator.js\"));\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar Includes = /*#__PURE__*/function (_ConditionOperator) {\n _inherits(Includes, _ConditionOperator);\n var _super = _createSuper(Includes);\n function Includes() {\n _classCallCheck(this, Includes);\n return _super.apply(this, arguments);\n }\n _createClass(Includes, [{\n key: \"execute\",\n value: function execute(_ref) {\n var value = _ref.value,\n comparedValue = _ref.comparedValue;\n return _lodash[\"default\"].includes(value, comparedValue);\n }\n }], [{\n key: \"operatorKey\",\n get: function get() {\n return 'includes';\n }\n }, {\n key: \"displayedName\",\n get: function get() {\n return 'Includes';\n }\n }]);\n return Includes;\n}(_ConditionOperator2[\"default\"]);\nexports[\"default\"] = Includes;\n\n//# sourceURL=webpack://Formio/./lib/utils/conditionOperators/Includes.js?"); + +/***/ }), + +/***/ "./lib/utils/conditionOperators/IsDateEqual.js": +/*!*****************************************************!*\ + !*** ./lib/utils/conditionOperators/IsDateEqual.js ***! + \*****************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _DateGreaterThan = _interopRequireDefault(__webpack_require__(/*! ./DateGreaterThan */ \"./lib/utils/conditionOperators/DateGreaterThan.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar IsDateEqual = /*#__PURE__*/function (_DateGeaterThan) {\n _inherits(IsDateEqual, _DateGeaterThan);\n var _super = _createSuper(IsDateEqual);\n function IsDateEqual() {\n _classCallCheck(this, IsDateEqual);\n return _super.apply(this, arguments);\n }\n _createClass(IsDateEqual, [{\n key: \"execute\",\n value: function execute(options) {\n return _get(_getPrototypeOf(IsDateEqual.prototype), \"execute\", this).call(this, options, 'isSame');\n }\n }], [{\n key: \"operatorKey\",\n get: function get() {\n return 'isDateEqual';\n }\n }, {\n key: \"displayedName\",\n get: function get() {\n return 'Is Equal To';\n }\n }]);\n return IsDateEqual;\n}(_DateGreaterThan[\"default\"]);\nexports[\"default\"] = IsDateEqual;\n\n//# sourceURL=webpack://Formio/./lib/utils/conditionOperators/IsDateEqual.js?"); + +/***/ }), + +/***/ "./lib/utils/conditionOperators/IsEmptyValue.js": +/*!******************************************************!*\ + !*** ./lib/utils/conditionOperators/IsEmptyValue.js ***! + \******************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _ConditionOperator2 = _interopRequireDefault(__webpack_require__(/*! ./ConditionOperator */ \"./lib/utils/conditionOperators/ConditionOperator.js\"));\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar IsEmptyValue = /*#__PURE__*/function (_ConditionOperator) {\n _inherits(IsEmptyValue, _ConditionOperator);\n var _super = _createSuper(IsEmptyValue);\n function IsEmptyValue() {\n _classCallCheck(this, IsEmptyValue);\n return _super.apply(this, arguments);\n }\n _createClass(IsEmptyValue, [{\n key: \"execute\",\n value: function execute(_ref) {\n var value = _ref.value,\n instance = _ref.instance,\n conditionComponentPath = _ref.conditionComponentPath;\n var isEmptyValue = _lodash[\"default\"].isEmpty(value);\n if (instance && instance.root) {\n var conditionTriggerComponent = instance.root.getComponent(conditionComponentPath);\n return conditionTriggerComponent ? conditionTriggerComponent.isEmpty() : isEmptyValue;\n }\n return isEmptyValue;\n }\n }, {\n key: \"getResult\",\n value: function getResult(options) {\n return this.execute(options);\n }\n }], [{\n key: \"operatorKey\",\n get: function get() {\n return 'isEmpty';\n }\n }, {\n key: \"displayedName\",\n get: function get() {\n return 'Is Empty';\n }\n }, {\n key: \"requireValue\",\n get: function get() {\n return false;\n }\n }]);\n return IsEmptyValue;\n}(_ConditionOperator2[\"default\"]);\nexports[\"default\"] = IsEmptyValue;\n\n//# sourceURL=webpack://Formio/./lib/utils/conditionOperators/IsEmptyValue.js?"); + +/***/ }), + +/***/ "./lib/utils/conditionOperators/IsEqualTo.js": +/*!***************************************************!*\ + !*** ./lib/utils/conditionOperators/IsEqualTo.js ***! + \***************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _ConditionOperator2 = _interopRequireDefault(__webpack_require__(/*! ./ConditionOperator */ \"./lib/utils/conditionOperators/ConditionOperator.js\"));\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar IsEqualTo = /*#__PURE__*/function (_ConditionOperator) {\n _inherits(IsEqualTo, _ConditionOperator);\n var _super = _createSuper(IsEqualTo);\n function IsEqualTo() {\n _classCallCheck(this, IsEqualTo);\n return _super.apply(this, arguments);\n }\n _createClass(IsEqualTo, [{\n key: \"execute\",\n value: function execute(_ref) {\n var value = _ref.value,\n comparedValue = _ref.comparedValue;\n if (value && comparedValue && _typeof(value) !== _typeof(comparedValue) && _lodash[\"default\"].isString(comparedValue)) {\n try {\n comparedValue = JSON.parse(comparedValue);\n }\n // eslint-disable-next-line no-empty\n catch (e) {}\n }\n\n //special check for select boxes\n if (_lodash[\"default\"].isObject(value) && comparedValue && _lodash[\"default\"].isString(comparedValue)) {\n return value[comparedValue];\n }\n return _lodash[\"default\"].isEqual(value, comparedValue);\n }\n }], [{\n key: \"operatorKey\",\n get: function get() {\n return 'isEqual';\n }\n }, {\n key: \"displayedName\",\n get: function get() {\n return 'Is Equal To';\n }\n }]);\n return IsEqualTo;\n}(_ConditionOperator2[\"default\"]);\nexports[\"default\"] = IsEqualTo;\n\n//# sourceURL=webpack://Formio/./lib/utils/conditionOperators/IsEqualTo.js?"); + +/***/ }), + +/***/ "./lib/utils/conditionOperators/IsNotDateEqual.js": +/*!********************************************************!*\ + !*** ./lib/utils/conditionOperators/IsNotDateEqual.js ***! + \********************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _DateGreaterThan = _interopRequireDefault(__webpack_require__(/*! ./DateGreaterThan */ \"./lib/utils/conditionOperators/DateGreaterThan.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar IsNotDateEqual = /*#__PURE__*/function (_DateGeaterThan) {\n _inherits(IsNotDateEqual, _DateGeaterThan);\n var _super = _createSuper(IsNotDateEqual);\n function IsNotDateEqual() {\n _classCallCheck(this, IsNotDateEqual);\n return _super.apply(this, arguments);\n }\n _createClass(IsNotDateEqual, [{\n key: \"execute\",\n value: function execute(options) {\n return !_get(_getPrototypeOf(IsNotDateEqual.prototype), \"execute\", this).call(this, options, 'isSame');\n }\n }], [{\n key: \"operatorKey\",\n get: function get() {\n return 'isNotDateEqual';\n }\n }, {\n key: \"displayedName\",\n get: function get() {\n return 'Is Not Equal To';\n }\n }]);\n return IsNotDateEqual;\n}(_DateGreaterThan[\"default\"]);\nexports[\"default\"] = IsNotDateEqual;\n\n//# sourceURL=webpack://Formio/./lib/utils/conditionOperators/IsNotDateEqual.js?"); + +/***/ }), + +/***/ "./lib/utils/conditionOperators/IsNotEmptyValue.js": +/*!*********************************************************!*\ + !*** ./lib/utils/conditionOperators/IsNotEmptyValue.js ***! + \*********************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _IsEmptyValue2 = _interopRequireDefault(__webpack_require__(/*! ./IsEmptyValue */ \"./lib/utils/conditionOperators/IsEmptyValue.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar IsNotEmptyValue = /*#__PURE__*/function (_IsEmptyValue) {\n _inherits(IsNotEmptyValue, _IsEmptyValue);\n var _super = _createSuper(IsNotEmptyValue);\n function IsNotEmptyValue() {\n _classCallCheck(this, IsNotEmptyValue);\n return _super.apply(this, arguments);\n }\n _createClass(IsNotEmptyValue, [{\n key: \"getResult\",\n value: function getResult(options) {\n return !_get(_getPrototypeOf(IsNotEmptyValue.prototype), \"getResult\", this).call(this, options);\n }\n }], [{\n key: \"operatorKey\",\n get: function get() {\n return 'isNotEmpty';\n }\n }, {\n key: \"displayedName\",\n get: function get() {\n return 'Is Not Empty';\n }\n }]);\n return IsNotEmptyValue;\n}(_IsEmptyValue2[\"default\"]);\nexports[\"default\"] = IsNotEmptyValue;\n\n//# sourceURL=webpack://Formio/./lib/utils/conditionOperators/IsNotEmptyValue.js?"); + +/***/ }), + +/***/ "./lib/utils/conditionOperators/IsNotEqualTo.js": +/*!******************************************************!*\ + !*** ./lib/utils/conditionOperators/IsNotEqualTo.js ***! + \******************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _ConditionOperator2 = _interopRequireDefault(__webpack_require__(/*! ./ConditionOperator */ \"./lib/utils/conditionOperators/ConditionOperator.js\"));\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar IsNotEqualTo = /*#__PURE__*/function (_ConditionOperator) {\n _inherits(IsNotEqualTo, _ConditionOperator);\n var _super = _createSuper(IsNotEqualTo);\n function IsNotEqualTo() {\n _classCallCheck(this, IsNotEqualTo);\n return _super.apply(this, arguments);\n }\n _createClass(IsNotEqualTo, [{\n key: \"execute\",\n value: function execute(_ref) {\n var value = _ref.value,\n comparedValue = _ref.comparedValue;\n return !_lodash[\"default\"].isEqual(value, comparedValue);\n }\n }], [{\n key: \"operatorKey\",\n get: function get() {\n return 'isNotEqual';\n }\n }, {\n key: \"displayedName\",\n get: function get() {\n return 'Is Not Equal To';\n }\n }]);\n return IsNotEqualTo;\n}(_ConditionOperator2[\"default\"]);\nexports[\"default\"] = IsNotEqualTo;\n\n//# sourceURL=webpack://Formio/./lib/utils/conditionOperators/IsNotEqualTo.js?"); + +/***/ }), + +/***/ "./lib/utils/conditionOperators/LessThan.js": +/*!**************************************************!*\ + !*** ./lib/utils/conditionOperators/LessThan.js ***! + \**************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _ConditionOperator2 = _interopRequireDefault(__webpack_require__(/*! ./ConditionOperator */ \"./lib/utils/conditionOperators/ConditionOperator.js\"));\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar LessThan = /*#__PURE__*/function (_ConditionOperator) {\n _inherits(LessThan, _ConditionOperator);\n var _super = _createSuper(LessThan);\n function LessThan() {\n _classCallCheck(this, LessThan);\n return _super.apply(this, arguments);\n }\n _createClass(LessThan, [{\n key: \"execute\",\n value: function execute(_ref) {\n var value = _ref.value,\n comparedValue = _ref.comparedValue;\n return _lodash[\"default\"].isNumber(value) && value < comparedValue;\n }\n }], [{\n key: \"operatorKey\",\n get: function get() {\n return 'lessThan';\n }\n }, {\n key: \"displayedName\",\n get: function get() {\n return 'Less Than';\n }\n }]);\n return LessThan;\n}(_ConditionOperator2[\"default\"]);\nexports[\"default\"] = LessThan;\n\n//# sourceURL=webpack://Formio/./lib/utils/conditionOperators/LessThan.js?"); + +/***/ }), + +/***/ "./lib/utils/conditionOperators/LessThanOrEqual.js": +/*!*********************************************************!*\ + !*** ./lib/utils/conditionOperators/LessThanOrEqual.js ***! + \*********************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _ConditionOperator2 = _interopRequireDefault(__webpack_require__(/*! ./ConditionOperator */ \"./lib/utils/conditionOperators/ConditionOperator.js\"));\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar LessThanOrEqual = /*#__PURE__*/function (_ConditionOperator) {\n _inherits(LessThanOrEqual, _ConditionOperator);\n var _super = _createSuper(LessThanOrEqual);\n function LessThanOrEqual() {\n _classCallCheck(this, LessThanOrEqual);\n return _super.apply(this, arguments);\n }\n _createClass(LessThanOrEqual, [{\n key: \"execute\",\n value: function execute(_ref) {\n var value = _ref.value,\n comparedValue = _ref.comparedValue;\n return _lodash[\"default\"].isNumber(value) && (value < comparedValue || _lodash[\"default\"].isEqual(value, comparedValue));\n }\n }], [{\n key: \"operatorKey\",\n get: function get() {\n return 'lessThanOrEqual';\n }\n }, {\n key: \"displayedName\",\n get: function get() {\n return 'Less Than Or Equal To';\n }\n }]);\n return LessThanOrEqual;\n}(_ConditionOperator2[\"default\"]);\nexports[\"default\"] = LessThanOrEqual;\n\n//# sourceURL=webpack://Formio/./lib/utils/conditionOperators/LessThanOrEqual.js?"); + +/***/ }), + +/***/ "./lib/utils/conditionOperators/NotIncludes.js": +/*!*****************************************************!*\ + !*** ./lib/utils/conditionOperators/NotIncludes.js ***! + \*****************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _Includes2 = _interopRequireDefault(__webpack_require__(/*! ./Includes */ \"./lib/utils/conditionOperators/Includes.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar NotIncludes = /*#__PURE__*/function (_Includes) {\n _inherits(NotIncludes, _Includes);\n var _super = _createSuper(NotIncludes);\n function NotIncludes() {\n _classCallCheck(this, NotIncludes);\n return _super.apply(this, arguments);\n }\n _createClass(NotIncludes, [{\n key: \"execute\",\n value: function execute(options) {\n return !_get(_getPrototypeOf(NotIncludes.prototype), \"execute\", this).call(this, options);\n }\n }], [{\n key: \"operatorKey\",\n get: function get() {\n return 'notIncludes';\n }\n }, {\n key: \"displayedName\",\n get: function get() {\n return 'Not Includes';\n }\n }]);\n return NotIncludes;\n}(_Includes2[\"default\"]);\nexports[\"default\"] = NotIncludes;\n\n//# sourceURL=webpack://Formio/./lib/utils/conditionOperators/NotIncludes.js?"); + +/***/ }), + +/***/ "./lib/utils/conditionOperators/StartsWith.js": +/*!****************************************************!*\ + !*** ./lib/utils/conditionOperators/StartsWith.js ***! + \****************************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.string.starts-with.js */ \"./node_modules/core-js/modules/es.string.starts-with.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _ConditionOperator2 = _interopRequireDefault(__webpack_require__(/*! ./ConditionOperator */ \"./lib/utils/conditionOperators/ConditionOperator.js\"));\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar StartsWith = /*#__PURE__*/function (_ConditionOperator) {\n _inherits(StartsWith, _ConditionOperator);\n var _super = _createSuper(StartsWith);\n function StartsWith() {\n _classCallCheck(this, StartsWith);\n return _super.apply(this, arguments);\n }\n _createClass(StartsWith, [{\n key: \"execute\",\n value: function execute(_ref) {\n var value = _ref.value,\n comparedValue = _ref.comparedValue;\n return _lodash[\"default\"].startsWith(value, comparedValue);\n }\n }], [{\n key: \"operatorKey\",\n get: function get() {\n return 'startsWith';\n }\n }, {\n key: \"displayedName\",\n get: function get() {\n return 'Starts With';\n }\n }]);\n return StartsWith;\n}(_ConditionOperator2[\"default\"]);\nexports[\"default\"] = StartsWith;\n\n//# sourceURL=webpack://Formio/./lib/utils/conditionOperators/StartsWith.js?"); + +/***/ }), + +/***/ "./lib/utils/conditionOperators/index.js": +/*!***********************************************!*\ + !*** ./lib/utils/conditionOperators/index.js ***! + \***********************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\nvar _IsNotEqualTo = _interopRequireDefault(__webpack_require__(/*! ./IsNotEqualTo */ \"./lib/utils/conditionOperators/IsNotEqualTo.js\"));\nvar _IsEmptyValue = _interopRequireDefault(__webpack_require__(/*! ./IsEmptyValue */ \"./lib/utils/conditionOperators/IsEmptyValue.js\"));\nvar _IsNotEmptyValue = _interopRequireDefault(__webpack_require__(/*! ./IsNotEmptyValue */ \"./lib/utils/conditionOperators/IsNotEmptyValue.js\"));\nvar _LessThan = _interopRequireDefault(__webpack_require__(/*! ./LessThan */ \"./lib/utils/conditionOperators/LessThan.js\"));\nvar _GreaterThan = _interopRequireDefault(__webpack_require__(/*! ./GreaterThan */ \"./lib/utils/conditionOperators/GreaterThan.js\"));\nvar _IsEqualTo = _interopRequireDefault(__webpack_require__(/*! ./IsEqualTo */ \"./lib/utils/conditionOperators/IsEqualTo.js\"));\nvar _DateGreaterThan = _interopRequireDefault(__webpack_require__(/*! ./DateGreaterThan */ \"./lib/utils/conditionOperators/DateGreaterThan.js\"));\nvar _DateLessThan = _interopRequireDefault(__webpack_require__(/*! ./DateLessThan */ \"./lib/utils/conditionOperators/DateLessThan.js\"));\nvar _Includes = _interopRequireDefault(__webpack_require__(/*! ./Includes */ \"./lib/utils/conditionOperators/Includes.js\"));\nvar _StartsWith = _interopRequireDefault(__webpack_require__(/*! ./StartsWith */ \"./lib/utils/conditionOperators/StartsWith.js\"));\nvar _NotIncludes = _interopRequireDefault(__webpack_require__(/*! ./NotIncludes */ \"./lib/utils/conditionOperators/NotIncludes.js\"));\nvar _EndsWith = _interopRequireDefault(__webpack_require__(/*! ./EndsWith */ \"./lib/utils/conditionOperators/EndsWith.js\"));\nvar _DateGreaterThanOrEqual = _interopRequireDefault(__webpack_require__(/*! ./DateGreaterThanOrEqual */ \"./lib/utils/conditionOperators/DateGreaterThanOrEqual.js\"));\nvar _DateLessThanOrEqual = _interopRequireDefault(__webpack_require__(/*! ./DateLessThanOrEqual */ \"./lib/utils/conditionOperators/DateLessThanOrEqual.js\"));\nvar _LessThanOrEqual = _interopRequireDefault(__webpack_require__(/*! ./LessThanOrEqual */ \"./lib/utils/conditionOperators/LessThanOrEqual.js\"));\nvar _GreaterThanOrEqual = _interopRequireDefault(__webpack_require__(/*! ./GreaterThanOrEqual */ \"./lib/utils/conditionOperators/GreaterThanOrEqual.js\"));\nvar _IsDateEqual = _interopRequireDefault(__webpack_require__(/*! ./IsDateEqual */ \"./lib/utils/conditionOperators/IsDateEqual.js\"));\nvar _IsNotDateEqual = _interopRequireDefault(__webpack_require__(/*! ./IsNotDateEqual */ \"./lib/utils/conditionOperators/IsNotDateEqual.js\"));\nvar _ConditionOperators;\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar ConditionOperators = (_ConditionOperators = {}, _defineProperty(_ConditionOperators, \"\".concat(_IsNotEqualTo[\"default\"].operatorKey), _IsNotEqualTo[\"default\"]), _defineProperty(_ConditionOperators, \"\".concat(_IsEqualTo[\"default\"].operatorKey), _IsEqualTo[\"default\"]), _defineProperty(_ConditionOperators, \"\".concat(_IsEmptyValue[\"default\"].operatorKey), _IsEmptyValue[\"default\"]), _defineProperty(_ConditionOperators, \"\".concat(_IsNotEmptyValue[\"default\"].operatorKey), _IsNotEmptyValue[\"default\"]), _defineProperty(_ConditionOperators, \"\".concat(_LessThan[\"default\"].operatorKey), _LessThan[\"default\"]), _defineProperty(_ConditionOperators, \"\".concat(_GreaterThan[\"default\"].operatorKey), _GreaterThan[\"default\"]), _defineProperty(_ConditionOperators, \"\".concat(_DateGreaterThan[\"default\"].operatorKey), _DateGreaterThan[\"default\"]), _defineProperty(_ConditionOperators, \"\".concat(_DateLessThan[\"default\"].operatorKey), _DateLessThan[\"default\"]), _defineProperty(_ConditionOperators, \"\".concat(_Includes[\"default\"].operatorKey), _Includes[\"default\"]), _defineProperty(_ConditionOperators, \"\".concat(_StartsWith[\"default\"].operatorKey), _StartsWith[\"default\"]), _defineProperty(_ConditionOperators, \"\".concat(_EndsWith[\"default\"].operatorKey), _EndsWith[\"default\"]), _defineProperty(_ConditionOperators, \"\".concat(_NotIncludes[\"default\"].operatorKey), _NotIncludes[\"default\"]), _defineProperty(_ConditionOperators, \"\".concat(_DateGreaterThanOrEqual[\"default\"].operatorKey), _DateGreaterThanOrEqual[\"default\"]), _defineProperty(_ConditionOperators, \"\".concat(_DateLessThanOrEqual[\"default\"].operatorKey), _DateLessThanOrEqual[\"default\"]), _defineProperty(_ConditionOperators, \"\".concat(_LessThanOrEqual[\"default\"].operatorKey), _LessThanOrEqual[\"default\"]), _defineProperty(_ConditionOperators, \"\".concat(_GreaterThanOrEqual[\"default\"].operatorKey), _GreaterThanOrEqual[\"default\"]), _defineProperty(_ConditionOperators, \"\".concat(_IsDateEqual[\"default\"].operatorKey), _IsDateEqual[\"default\"]), _defineProperty(_ConditionOperators, \"\".concat(_IsNotDateEqual[\"default\"].operatorKey), _IsNotDateEqual[\"default\"]), _ConditionOperators);\nvar _default = ConditionOperators;\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/utils/conditionOperators/index.js?"); + +/***/ }), + +/***/ "./lib/utils/formUtils.js": +/*!********************************!*\ + !*** ./lib/utils/formUtils.js ***! + \********************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.applyFormChanges = applyFormChanges;\nexports.eachComponent = eachComponent;\nexports.escapeRegExCharacters = escapeRegExCharacters;\nexports.findComponent = findComponent;\nexports.findComponents = findComponents;\nexports.flattenComponents = flattenComponents;\nexports.formatAsCurrency = formatAsCurrency;\nexports.generateFormChange = generateFormChange;\nexports.getComponent = getComponent;\nexports.getStrings = getStrings;\nexports.getValue = getValue;\nexports.hasCondition = hasCondition;\nexports.isLayoutComponent = isLayoutComponent;\nexports.matchComponent = matchComponent;\nexports.parseFloatExt = parseFloatExt;\nexports.removeComponent = removeComponent;\nexports.searchComponents = searchComponents;\n__webpack_require__(/*! core-js/modules/es.array.is-array.js */ \"./node_modules/core-js/modules/es.array.is-array.js\");\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.array.index-of.js */ \"./node_modules/core-js/modules/es.array.index-of.js\");\n__webpack_require__(/*! core-js/modules/es.array.includes.js */ \"./node_modules/core-js/modules/es.array.includes.js\");\n__webpack_require__(/*! core-js/modules/es.array.slice.js */ \"./node_modules/core-js/modules/es.array.slice.js\");\n__webpack_require__(/*! core-js/modules/es.array.splice.js */ \"./node_modules/core-js/modules/es.array.splice.js\");\n__webpack_require__(/*! core-js/modules/es.array.some.js */ \"./node_modules/core-js/modules/es.array.some.js\");\n__webpack_require__(/*! core-js/modules/es.parse-float.js */ \"./node_modules/core-js/modules/es.parse-float.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-string.js */ \"./node_modules/core-js/modules/es.date.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.array.join.js */ \"./node_modules/core-js/modules/es.array.join.js\");\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n__webpack_require__(/*! core-js/modules/es.array.reverse.js */ \"./node_modules/core-js/modules/es.array.reverse.js\");\n__webpack_require__(/*! core-js/modules/es.array.from.js */ \"./node_modules/core-js/modules/es.array.from.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nvar _get = _interopRequireDefault(__webpack_require__(/*! lodash/get */ \"./node_modules/lodash/get.js\"));\nvar _set = _interopRequireDefault(__webpack_require__(/*! lodash/set */ \"./node_modules/lodash/set.js\"));\nvar _has = _interopRequireDefault(__webpack_require__(/*! lodash/has */ \"./node_modules/lodash/has.js\"));\nvar _clone = _interopRequireDefault(__webpack_require__(/*! lodash/clone */ \"./node_modules/lodash/clone.js\"));\nvar _forOwn = _interopRequireDefault(__webpack_require__(/*! lodash/forOwn */ \"./node_modules/lodash/forOwn.js\"));\nvar _isString = _interopRequireDefault(__webpack_require__(/*! lodash/isString */ \"./node_modules/lodash/isString.js\"));\nvar _isNaN = _interopRequireDefault(__webpack_require__(/*! lodash/isNaN */ \"./node_modules/lodash/isNaN.js\"));\nvar _isNil = _interopRequireDefault(__webpack_require__(/*! lodash/isNil */ \"./node_modules/lodash/isNil.js\"));\nvar _isPlainObject = _interopRequireDefault(__webpack_require__(/*! lodash/isPlainObject */ \"./node_modules/lodash/isPlainObject.js\"));\nvar _round = _interopRequireDefault(__webpack_require__(/*! lodash/round */ \"./node_modules/lodash/round.js\"));\nvar _chunk = _interopRequireDefault(__webpack_require__(/*! lodash/chunk */ \"./node_modules/lodash/chunk.js\"));\nvar _pad = _interopRequireDefault(__webpack_require__(/*! lodash/pad */ \"./node_modules/lodash/pad.js\"));\nvar _fastJsonPatch = __webpack_require__(/*! fast-json-patch */ \"./node_modules/fast-json-patch/index.mjs\");\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n/**\n * Determine if a component is a layout component or not.\n *\n * @param {Object} component\n * The component to check.\n *\n * @returns {Boolean}\n * Whether or not the component is a layout component.\n */\nfunction isLayoutComponent(component) {\n return Boolean(component.columns && Array.isArray(component.columns) || component.rows && Array.isArray(component.rows) || component.components && Array.isArray(component.components));\n}\n\n/**\n * Iterate through each component within a form.\n *\n * @param {Object} components\n * The components to iterate.\n * @param {Function} fn\n * The iteration function to invoke for each component.\n * @param {Boolean} includeAll\n * Whether or not to include layout components.\n * @param {String} path\n * The current data path of the element. Example: data.user.firstName\n * @param {Object} parent\n * The parent object.\n */\nfunction eachComponent(components, fn, includeAll, path, parent, inRecursion) {\n if (!components) return;\n path = path || '';\n if (inRecursion) {\n if (components.noRecurse) {\n delete components.noRecurse;\n return;\n }\n components.noRecurse = true;\n }\n components.forEach(function (component) {\n if (!component) {\n return;\n }\n var hasColumns = component.columns && Array.isArray(component.columns);\n var hasRows = component.rows && Array.isArray(component.rows);\n var hasComps = component.components && Array.isArray(component.components);\n var noRecurse = false;\n var newPath = component.key ? path ? \"\".concat(path, \".\").concat(component.key) : component.key : '';\n\n // Keep track of parent references.\n if (parent) {\n // Ensure we don't create infinite JSON structures.\n component.parent = (0, _clone[\"default\"])(parent);\n delete component.parent.components;\n delete component.parent.componentMap;\n delete component.parent.columns;\n delete component.parent.rows;\n }\n\n // there's no need to add other layout components here because we expect that those would either have columns, rows or components\n var layoutTypes = ['htmlelement', 'content'];\n var isLayoutComponent = hasColumns || hasRows || hasComps && !component.input || layoutTypes.indexOf(component.type) > -1;\n if (includeAll || component.tree || !isLayoutComponent) {\n noRecurse = fn(component, newPath, components);\n }\n var subPath = function subPath() {\n if (component.key && !['panel', 'table', 'well', 'columns', 'fieldset', 'tabs', 'form'].includes(component.type) && (['datagrid', 'container', 'editgrid', 'address', 'dynamicWizard', 'datatable', 'tagpad'].includes(component.type) || component.tree)) {\n return newPath;\n } else if (component.key && component.type === 'form') {\n return \"\".concat(newPath, \".data\");\n }\n return path;\n };\n if (!noRecurse) {\n if (hasColumns) {\n component.columns.forEach(function (column) {\n return eachComponent(column.components, fn, includeAll, subPath(), parent ? component : null);\n }, true);\n } else if (hasRows) {\n component.rows.forEach(function (row) {\n if (Array.isArray(row)) {\n row.forEach(function (column) {\n return eachComponent(column.components, fn, includeAll, subPath(), parent ? component : null);\n }, true);\n }\n });\n } else if (hasComps) {\n eachComponent(component.components, fn, includeAll, subPath(), parent ? component : null, true);\n }\n }\n });\n if (components.noRecurse) {\n delete components.noRecurse;\n }\n}\n\n/**\n * Matches if a component matches the query.\n *\n * @param component\n * @param query\n * @return {boolean}\n */\nfunction matchComponent(component, query) {\n if ((0, _isString[\"default\"])(query)) {\n return component.key === query || component.path === query;\n } else {\n var matches = false;\n (0, _forOwn[\"default\"])(query, function (value, key) {\n matches = (0, _get[\"default\"])(component, key) === value;\n if (!matches) {\n return false;\n }\n });\n return matches;\n }\n}\n\n/**\n * Get a component by its key\n *\n * @param {Object} components\n * The components to iterate.\n * @param {String|Object} key\n * The key of the component to get, or a query of the component to search.\n *\n * @returns {Object}\n * The component that matches the given key, or undefined if not found.\n */\nfunction getComponent(components, key, includeAll) {\n var result;\n eachComponent(components, function (component, path) {\n if (path === key || component.path === key) {\n result = component;\n return true;\n }\n }, includeAll);\n return result;\n}\n\n/**\n * Finds a component provided a query of properties of that component.\n *\n * @param components\n * @param query\n * @return {*}\n */\nfunction searchComponents(components, query) {\n var results = [];\n eachComponent(components, function (component) {\n if (matchComponent(component, query)) {\n results.push(component);\n }\n }, true);\n return results;\n}\n\n/**\n * Deprecated version of findComponents. Renamed to searchComponents.\n *\n * @param components\n * @param query\n * @returns {*}\n */\nfunction findComponents(components, query) {\n console.warn('formio.js/utils findComponents is deprecated. Use searchComponents instead.');\n return searchComponents(components, query);\n}\n\n/**\n * This function will find a component in a form and return the component AND THE PATH to the component in the form.\n * Path to the component is stored as an array of nested components and their indexes.The Path is being filled recursively\n * when you iterating through the nested structure.\n * If the component is not found the callback won't be called and function won't return anything.\n *\n * @param components\n * @param key\n * @param fn\n * @param path\n * @returns {*}\n */\nfunction findComponent(components, key, path, fn) {\n if (!components) return;\n path = path || [];\n if (!key) {\n return fn(components);\n }\n components.forEach(function (component, index) {\n var newPath = path.slice();\n // Add an index of the component it iterates through in nested structure\n newPath.push(index);\n if (!component) return;\n if (component.hasOwnProperty('columns') && Array.isArray(component.columns)) {\n newPath.push('columns');\n component.columns.forEach(function (column, index) {\n var colPath = newPath.slice();\n colPath.push(index);\n colPath.push('components');\n findComponent(column.components, key, colPath, fn);\n });\n }\n if (component.hasOwnProperty('rows') && Array.isArray(component.rows)) {\n newPath.push('rows');\n component.rows.forEach(function (row, index) {\n var rowPath = newPath.slice();\n rowPath.push(index);\n row.forEach(function (column, index) {\n var colPath = rowPath.slice();\n colPath.push(index);\n colPath.push('components');\n findComponent(column.components, key, colPath, fn);\n });\n });\n }\n if (component.hasOwnProperty('components') && Array.isArray(component.components)) {\n newPath.push('components');\n findComponent(component.components, key, newPath, fn);\n }\n if (component.key === key) {\n //Final callback if the component is found\n fn(component, newPath, components);\n }\n });\n}\n\n/**\n * Remove a component by path.\n *\n * @param components\n * @param path\n */\nfunction removeComponent(components, path) {\n // Using _.unset() leave a null value. Use Array splice instead.\n var index = path.pop();\n if (path.length !== 0) {\n components = (0, _get[\"default\"])(components, path);\n }\n components.splice(index, 1);\n}\nfunction generateFormChange(type, data) {\n var change;\n switch (type) {\n case 'add':\n change = {\n op: 'add',\n key: data.component.key,\n container: data.parent.key,\n // Parent component\n path: data.path,\n // Path to container within parent component.\n index: data.index,\n // Index of component in parent container.\n component: data.component\n };\n break;\n case 'edit':\n change = {\n op: 'edit',\n key: data.originalComponent.key,\n patches: (0, _fastJsonPatch.compare)(data.originalComponent, data.component)\n };\n\n // Don't save if nothing changed.\n if (!change.patches.length) {\n change = null;\n }\n break;\n case 'remove':\n change = {\n op: 'remove',\n key: data.component.key\n };\n break;\n }\n return change;\n}\nfunction applyFormChanges(form, changes) {\n var failed = [];\n changes.forEach(function (change) {\n var found = false;\n switch (change.op) {\n case 'add':\n var newComponent = change.component;\n\n // Find the container to set the component in.\n findComponent(form.components, change.container, null, function (parent) {\n if (!change.container) {\n parent = form;\n }\n\n // A move will first run an add so remove any existing components with matching key before inserting.\n findComponent(form.components, change.key, null, function (component, path) {\n // If found, use the existing component. (If someone else edited it, the changes would be here)\n newComponent = component;\n removeComponent(form.components, path);\n });\n found = true;\n var container = (0, _get[\"default\"])(parent, change.path);\n container.splice(change.index, 0, newComponent);\n });\n break;\n case 'remove':\n findComponent(form.components, change.key, null, function (component, path) {\n found = true;\n var oldComponent = (0, _get[\"default\"])(form.components, path);\n if (oldComponent.key !== component.key) {\n path.pop();\n }\n removeComponent(form.components, path);\n });\n break;\n case 'edit':\n findComponent(form.components, change.key, null, function (component, path) {\n found = true;\n try {\n var oldComponent = (0, _get[\"default\"])(form.components, path);\n var _newComponent = (0, _fastJsonPatch.applyPatch)(component, change.patches).newDocument;\n if (oldComponent.key !== _newComponent.key) {\n path.pop();\n }\n (0, _set[\"default\"])(form.components, path, _newComponent);\n } catch (err) {\n failed.push(change);\n }\n });\n break;\n case 'move':\n break;\n }\n if (!found) {\n failed.push(change);\n }\n });\n return {\n form: form,\n failed: failed\n };\n}\n\n/**\n * Flatten the form components for data manipulation.\n *\n * @param {Object} components\n * The components to iterate.\n * @param {Boolean} includeAll\n * Whether or not to include layout components.\n *\n * @returns {Object}\n * The flattened components map.\n */\nfunction flattenComponents(components, includeAll) {\n var flattened = {};\n eachComponent(components, function (component, path) {\n flattened[path] = component;\n }, includeAll);\n return flattened;\n}\n\n/**\n * Returns if this component has a conditional statement.\n *\n * @param component - The component JSON schema.\n *\n * @returns {boolean} - TRUE - This component has a conditional, FALSE - No conditional provided.\n */\nfunction hasCondition(component) {\n return Boolean(component.customConditional || component.conditional && (component.conditional.when || _lodash[\"default\"].some(component.conditional.conditions || [], function (condition) {\n return condition.component && condition.operator;\n }) || component.conditional.json || component.conditional.condition));\n}\n\n/**\n * Extension of standard #parseFloat(value) function, that also clears input string.\n *\n * @param {any} value\n * The value to parse.\n *\n * @returns {Number}\n * Parsed value.\n */\nfunction parseFloatExt(value) {\n return parseFloat((0, _isString[\"default\"])(value) ? value.replace(/[^\\de.+-]/gi, '') : value);\n}\n\n/**\n * Formats provided value in way how Currency component uses it.\n *\n * @param {any} value\n * The value to format.\n *\n * @returns {String}\n * Value formatted for Currency component.\n */\nfunction formatAsCurrency(value) {\n var parsedValue = parseFloatExt(value);\n if ((0, _isNaN[\"default\"])(parsedValue)) {\n return '';\n }\n var parts = (0, _round[\"default\"])(parsedValue, 2).toString().split('.');\n parts[0] = (0, _chunk[\"default\"])(Array.from(parts[0]).reverse(), 3).reverse().map(function (part) {\n return part.reverse().join('');\n }).join(',');\n parts[1] = (0, _pad[\"default\"])(parts[1], 2, '0');\n return parts.join('.');\n}\n\n/**\n * Escapes RegEx characters in provided String value.\n *\n * @param {String} value\n * String for escaping RegEx characters.\n * @returns {string}\n * String with escaped RegEx characters.\n */\nfunction escapeRegExCharacters(value) {\n return value.replace(/[-[\\]/{}()*+?.\\\\^$|]/g, '\\\\$&');\n}\n\n/**\n * Get the value for a component key, in the given submission.\n *\n * @param {Object} submission\n * A submission object to search.\n * @param {String} key\n * A for components API key to search for.\n */\nfunction getValue(submission, key) {\n var search = function search(data) {\n if ((0, _isPlainObject[\"default\"])(data)) {\n if ((0, _has[\"default\"])(data, key)) {\n return _lodash[\"default\"].get(data, key);\n }\n var value = null;\n (0, _forOwn[\"default\"])(data, function (prop) {\n var result = search(prop);\n if (!(0, _isNil[\"default\"])(result)) {\n value = result;\n return false;\n }\n });\n return value;\n } else {\n return null;\n }\n };\n return search(submission.data);\n}\n\n/**\n * Iterate over all components in a form and get string values for translation.\n * @param form\n */\nfunction getStrings(form) {\n var properties = ['label', 'title', 'legend', 'tooltip', 'description', 'placeholder', 'prefix', 'suffix', 'errorLabel', 'content', 'html'];\n var strings = [];\n eachComponent(form.components, function (component) {\n properties.forEach(function (property) {\n if (component.hasOwnProperty(property) && component[property]) {\n strings.push({\n key: component.key,\n type: component.type,\n property: property,\n string: component[property]\n });\n }\n });\n if ((!component.dataSrc || component.dataSrc === 'values') && component.hasOwnProperty('values') && Array.isArray(component.values) && component.values.length) {\n component.values.forEach(function (value, index) {\n strings.push({\n key: component.key,\n property: \"value[\".concat(index, \"].label\"),\n string: component.values[index].label\n });\n });\n }\n\n // Hard coded values from Day component\n if (component.type === 'day') {\n ['day', 'month', 'year', 'Day', 'Month', 'Year', 'january', 'february', 'march', 'april', 'may', 'june', 'july', 'august', 'september', 'october', 'november', 'december'].forEach(function (string) {\n strings.push({\n key: component.key,\n property: 'day',\n string: string\n });\n });\n if (component.fields.day.placeholder) {\n strings.push({\n key: component.key,\n property: 'fields.day.placeholder',\n string: component.fields.day.placeholder\n });\n }\n if (component.fields.month.placeholder) {\n strings.push({\n key: component.key,\n property: 'fields.month.placeholder',\n string: component.fields.month.placeholder\n });\n }\n if (component.fields.year.placeholder) {\n strings.push({\n key: component.key,\n property: 'fields.year.placeholder',\n string: component.fields.year.placeholder\n });\n }\n }\n if (component.type === 'editgrid') {\n var string = component.addAnother || 'Add Another';\n if (component.addAnother) {\n strings.push({\n key: component.key,\n property: 'addAnother',\n string: string\n });\n }\n }\n if (component.type === 'select') {\n ['loading...', 'Type to search'].forEach(function (string) {\n strings.push({\n key: component.key,\n property: 'select',\n string: string\n });\n });\n }\n }, true);\n return strings;\n}\n\n//# sourceURL=webpack://Formio/./lib/utils/formUtils.js?"); + +/***/ }), + +/***/ "./lib/utils/index.js": +/*!****************************!*\ + !*** ./lib/utils/index.js ***! + \****************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +eval("\n\n__webpack_require__(/*! core-js/modules/es.weak-map.js */ \"./node_modules/core-js/modules/es.weak-map.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nvar FormioUtils = _interopRequireWildcard(__webpack_require__(/*! ./utils */ \"./lib/utils/utils.js\"));\nfunction _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== \"function\") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }\nfunction _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== \"object\" && typeof obj !== \"function\") { return { \"default\": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== \"default\" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj[\"default\"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nif ((typeof __webpack_require__.g === \"undefined\" ? \"undefined\" : _typeof(__webpack_require__.g)) === 'object') {\n __webpack_require__.g.FormioUtils = FormioUtils;\n}\nvar _default = FormioUtils;\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/utils/index.js?"); + +/***/ }), + +/***/ "./lib/utils/jsonlogic/operators.js": +/*!******************************************!*\ !*** ./lib/utils/jsonlogic/operators.js ***! \******************************************/ -/***/ (function(__unused_webpack_module, exports) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.lodashOperators = void 0;\n// Use only immutable useful functions from Lodash.\n// Visit https://lodash.com/docs for more info.\nvar lodashOperators = [// Array\n'chunk', 'compact', 'concat', 'difference', 'differenceBy', 'differenceWith', 'drop', 'dropRight', 'dropRightWhile', 'dropWhile', 'findIndex', 'findLastIndex', 'first', 'flatten', 'flattenDeep', 'flattenDepth', 'fromPairs', 'head', 'indexOf', 'initial', 'intersection', 'intersectionBy', 'intersectionWith', 'join', 'last', 'lastIndexOf', 'nth', 'slice', 'sortedIndex', 'sortedIndexBy', 'sortedIndexOf', 'sortedLastIndex', 'sortedLastIndexBy', 'sortedLastIndexOf', 'sortedUniq', 'sortedUniqBy', 'tail', 'take', 'takeRight', 'takeRightWhile', 'takeWhile', 'union', 'unionBy', 'unionWith', 'uniq', 'uniqBy', 'uniqWith', 'unzip', 'unzipWith', 'without', 'xor', 'xorBy', 'xorWith', 'zip', 'zipObject', 'zipObjectDeep', 'zipWith', // Collection\n'countBy', 'every', 'filter', 'find', 'findLast', 'flatMap', 'flatMapDeep', 'flatMapDepth', 'groupBy', 'includes', 'invokeMap', 'keyBy', 'map', 'orderBy', 'partition', 'reduce', 'reduceRight', 'reject', 'sample', 'sampleSize', 'shuffle', 'size', 'some', 'sortBy', // Date\n'now', // Function\n'flip', 'negate', 'overArgs', 'partial', 'partialRight', 'rearg', 'rest', 'spread', // Lang\n'castArray', 'clone', 'cloneDeep', 'cloneDeepWith', 'cloneDeep', 'conformsTo', 'eq', 'gt', 'gte', 'isArguments', 'isArray', 'isArrayBuffer', 'isArrayLike', 'isArrayLikeObject', 'isBoolean', 'isBuffer', 'isDate', 'isElement', 'isEmpty', 'isEqual', 'isEqualWith', 'isError', 'isFinite', 'isFunction', 'isInteger', 'isLength', 'isMap', 'isMatch', 'isMatchWith', 'isNaN', 'isNative', 'isNil', 'isNull', 'isNumber', 'isObject', 'isObjectLike', 'isPlainObject', 'isRegExp', 'isSafeInteger', 'isSet', 'isString', 'isSymbol', 'isTypedArray', 'isUndefined', 'isWeakMap', 'isWeakSet', 'lt', 'lte', 'toArray', 'toFinite', 'toInteger', 'toLength', 'toNumber', 'toPlainObject', 'toSafeInteger', 'toString', // Math\n'add', 'ceil', 'divide', 'floor', 'max', 'maxBy', 'mean', 'meanBy', 'min', 'minBy', 'multiply', 'round', 'subtract', 'sum', 'sumBy', // Number\n'clamp', 'inRange', 'random', // Object\n'at', 'entries', 'entriesIn', 'findKey', 'findLastKey', 'functions', 'functionsIn', 'get', 'has', 'hasIn', 'invert', 'invertBy', 'invoke', 'keys', 'keysIn', 'mapKeys', 'mapValues', 'omit', 'omitBy', 'pick', 'pickBy', 'result', 'toPairs', 'toPairsIn', 'transform', 'values', 'valuesIn', // String\n'camelCase', 'capitalize', 'deburr', 'endsWith', 'escape', 'escapeRegExp', 'kebabCase', 'lowerCase', 'lowerFirst', 'pad', 'padEnd', 'padStart', 'parseInt', 'repeat', 'replace', 'snakeCase', 'split', 'startCase', 'startsWith', 'toLower', 'toUpper', 'trim', 'trimEnd', 'trimStart', 'truncate', 'unescape', 'upperCase', 'upperFirst', 'words', // Util\n'cond', 'conforms', 'constant', 'defaultTo', 'flow', 'flowRight', 'identity', 'iteratee', 'matches', 'matchesProperty', 'method', 'methodOf', 'nthArg', 'over', 'overEvery', 'overSome', 'property', 'propertyOf', 'range', 'rangeRight', 'stubArray', 'stubFalse', 'stubObject', 'stubString', 'stubTrue', 'times', 'toPath', 'uniqueId'];\nexports.lodashOperators = lodashOperators;\n\n//# sourceURL=webpack://Formio/./lib/utils/jsonlogic/operators.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.lodashOperators = void 0;\n// Use only immutable useful functions from Lodash.\n// Visit https://lodash.com/docs for more info.\nvar lodashOperators = [\n// Array\n'chunk', 'compact', 'concat', 'difference', 'differenceBy', 'differenceWith', 'drop', 'dropRight', 'dropRightWhile', 'dropWhile', 'findIndex', 'findLastIndex', 'first', 'flatten', 'flattenDeep', 'flattenDepth', 'fromPairs', 'head', 'indexOf', 'initial', 'intersection', 'intersectionBy', 'intersectionWith', 'join', 'last', 'lastIndexOf', 'nth', 'slice', 'sortedIndex', 'sortedIndexBy', 'sortedIndexOf', 'sortedLastIndex', 'sortedLastIndexBy', 'sortedLastIndexOf', 'sortedUniq', 'sortedUniqBy', 'tail', 'take', 'takeRight', 'takeRightWhile', 'takeWhile', 'union', 'unionBy', 'unionWith', 'uniq', 'uniqBy', 'uniqWith', 'unzip', 'unzipWith', 'without', 'xor', 'xorBy', 'xorWith', 'zip', 'zipObject', 'zipObjectDeep', 'zipWith',\n// Collection\n'countBy', 'every', 'filter', 'find', 'findLast', 'flatMap', 'flatMapDeep', 'flatMapDepth', 'groupBy', 'includes', 'invokeMap', 'keyBy', 'map', 'orderBy', 'partition', 'reduce', 'reduceRight', 'reject', 'sample', 'sampleSize', 'shuffle', 'size', 'some', 'sortBy',\n// Date\n'now',\n// Function\n'flip', 'negate', 'overArgs', 'partial', 'partialRight', 'rearg', 'rest', 'spread',\n// Lang\n'castArray', 'clone', 'cloneDeep', 'cloneDeepWith', 'cloneDeep', 'conformsTo', 'eq', 'gt', 'gte', 'isArguments', 'isArray', 'isArrayBuffer', 'isArrayLike', 'isArrayLikeObject', 'isBoolean', 'isBuffer', 'isDate', 'isElement', 'isEmpty', 'isEqual', 'isEqualWith', 'isError', 'isFinite', 'isFunction', 'isInteger', 'isLength', 'isMap', 'isMatch', 'isMatchWith', 'isNaN', 'isNative', 'isNil', 'isNull', 'isNumber', 'isObject', 'isObjectLike', 'isPlainObject', 'isRegExp', 'isSafeInteger', 'isSet', 'isString', 'isSymbol', 'isTypedArray', 'isUndefined', 'isWeakMap', 'isWeakSet', 'lt', 'lte', 'toArray', 'toFinite', 'toInteger', 'toLength', 'toNumber', 'toPlainObject', 'toSafeInteger', 'toString',\n// Math\n'add', 'ceil', 'divide', 'floor', 'max', 'maxBy', 'mean', 'meanBy', 'min', 'minBy', 'multiply', 'round', 'subtract', 'sum', 'sumBy',\n// Number\n'clamp', 'inRange', 'random',\n// Object\n'at', 'entries', 'entriesIn', 'findKey', 'findLastKey', 'functions', 'functionsIn', 'get', 'has', 'hasIn', 'invert', 'invertBy', 'invoke', 'keys', 'keysIn', 'mapKeys', 'mapValues', 'omit', 'omitBy', 'pick', 'pickBy', 'result', 'toPairs', 'toPairsIn', 'transform', 'values', 'valuesIn',\n// String\n'camelCase', 'capitalize', 'deburr', 'endsWith', 'escape', 'escapeRegExp', 'kebabCase', 'lowerCase', 'lowerFirst', 'pad', 'padEnd', 'padStart', 'parseInt', 'repeat', 'replace', 'snakeCase', 'split', 'startCase', 'startsWith', 'toLower', 'toUpper', 'trim', 'trimEnd', 'trimStart', 'truncate', 'unescape', 'upperCase', 'upperFirst', 'words',\n// Util\n'cond', 'conforms', 'constant', 'defaultTo', 'flow', 'flowRight', 'identity', 'iteratee', 'matches', 'matchesProperty', 'method', 'methodOf', 'nthArg', 'over', 'overEvery', 'overSome', 'property', 'propertyOf', 'range', 'rangeRight', 'stubArray', 'stubFalse', 'stubObject', 'stubString', 'stubTrue', 'times', 'toPath', 'uniqueId'];\nexports.lodashOperators = lodashOperators;\n\n//# sourceURL=webpack://Formio/./lib/utils/jsonlogic/operators.js?"); /***/ }), @@ -4235,7 +4772,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.from.js */ \"./node_modules/core-js/modules/es.array.from.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nvar _exportNames = {\n evaluate: true,\n getRandomComponentId: true,\n getPropertyValue: true,\n getElementRect: true,\n boolValue: true,\n isMongoId: true,\n checkCalculated: true,\n checkSimpleConditional: true,\n checkCustomConditional: true,\n checkJsonConditional: true,\n checkCondition: true,\n checkTrigger: true,\n setActionProperty: true,\n unescapeHTML: true,\n convertStringToHTMLElement: true,\n uniqueName: true,\n guid: true,\n getDateSetting: true,\n isValidDate: true,\n currentTimezone: true,\n offsetDate: true,\n zonesLoaded: true,\n shouldLoadZones: true,\n loadZones: true,\n momentDate: true,\n formatDate: true,\n formatOffset: true,\n getLocaleDateFormatInfo: true,\n convertFormatToFlatpickr: true,\n convertFormatToMoment: true,\n convertFormatToMask: true,\n getInputMask: true,\n unmaskValue: true,\n matchInputMask: true,\n getNumberSeparators: true,\n getNumberDecimalLimit: true,\n getCurrencyAffixes: true,\n fieldData: true,\n delay: true,\n iterateKey: true,\n uniqueKey: true,\n bootstrapVersion: true,\n unfold: true,\n firstNonNil: true,\n withSwitch: true,\n observeOverload: true,\n getContextComponents: true,\n getContextButtons: true,\n translateHTMLTemplate: true,\n sanitize: true,\n fastCloneDeep: true,\n interpolate: true,\n isInputComponent: true,\n getArrayFromComponentPath: true,\n hasInvalidComponent: true,\n getStringFromComponentPath: true,\n round: true,\n getIEBrowserVersion: true,\n getBrowserInfo: true,\n getComponentPathWithoutIndicies: true,\n getComponentPath: true,\n getDataParentComponent: true,\n isPromise: true,\n isInsideScopingComponent: true,\n getFocusableElements: true,\n _: true,\n jsonLogic: true,\n moment: true,\n Evaluator: true\n};\nObject.defineProperty(exports, \"Evaluator\", ({\n enumerable: true,\n get: function get() {\n return _Evaluator.default;\n }\n}));\nObject.defineProperty(exports, \"_\", ({\n enumerable: true,\n get: function get() {\n return _lodash.default;\n }\n}));\nexports.boolValue = boolValue;\nexports.bootstrapVersion = bootstrapVersion;\nexports.checkCalculated = checkCalculated;\nexports.checkCondition = checkCondition;\nexports.checkCustomConditional = checkCustomConditional;\nexports.checkJsonConditional = checkJsonConditional;\nexports.checkSimpleConditional = checkSimpleConditional;\nexports.checkTrigger = checkTrigger;\nexports.convertFormatToFlatpickr = convertFormatToFlatpickr;\nexports.convertFormatToMask = convertFormatToMask;\nexports.convertFormatToMoment = convertFormatToMoment;\nexports.convertStringToHTMLElement = convertStringToHTMLElement;\nexports.currentTimezone = currentTimezone;\nexports.delay = delay;\nexports.evaluate = evaluate;\nexports.fastCloneDeep = fastCloneDeep;\nexports.fieldData = fieldData;\nexports.firstNonNil = void 0;\nexports.formatDate = formatDate;\nexports.formatOffset = formatOffset;\nexports.getArrayFromComponentPath = getArrayFromComponentPath;\nexports.getBrowserInfo = getBrowserInfo;\nexports.getComponentPath = getComponentPath;\nexports.getComponentPathWithoutIndicies = getComponentPathWithoutIndicies;\nexports.getContextButtons = getContextButtons;\nexports.getContextComponents = getContextComponents;\nexports.getCurrencyAffixes = getCurrencyAffixes;\nexports.getDataParentComponent = getDataParentComponent;\nexports.getDateSetting = getDateSetting;\nexports.getElementRect = getElementRect;\nexports.getFocusableElements = getFocusableElements;\nexports.getIEBrowserVersion = getIEBrowserVersion;\nexports.getInputMask = getInputMask;\nexports.getLocaleDateFormatInfo = getLocaleDateFormatInfo;\nexports.getNumberDecimalLimit = getNumberDecimalLimit;\nexports.getNumberSeparators = getNumberSeparators;\nexports.getPropertyValue = getPropertyValue;\nexports.getRandomComponentId = getRandomComponentId;\nexports.getStringFromComponentPath = getStringFromComponentPath;\nexports.guid = guid;\nexports.hasInvalidComponent = hasInvalidComponent;\nexports.interpolate = void 0;\nexports.isInputComponent = isInputComponent;\nexports.isInsideScopingComponent = isInsideScopingComponent;\nexports.isMongoId = isMongoId;\nexports.isPromise = isPromise;\nexports.isValidDate = isValidDate;\nexports.iterateKey = iterateKey;\nObject.defineProperty(exports, \"jsonLogic\", ({\n enumerable: true,\n get: function get() {\n return _jsonLogicJs.default;\n }\n}));\nexports.loadZones = loadZones;\nexports.matchInputMask = matchInputMask;\nObject.defineProperty(exports, \"moment\", ({\n enumerable: true,\n get: function get() {\n return _momentTimezone.default;\n }\n}));\nexports.momentDate = momentDate;\nexports.observeOverload = observeOverload;\nexports.offsetDate = offsetDate;\nexports.round = round;\nexports.sanitize = sanitize;\nexports.setActionProperty = setActionProperty;\nexports.shouldLoadZones = shouldLoadZones;\nexports.translateHTMLTemplate = translateHTMLTemplate;\nexports.unescapeHTML = unescapeHTML;\nexports.unfold = unfold;\nexports.uniqueKey = uniqueKey;\nexports.uniqueName = uniqueName;\nexports.unmaskValue = unmaskValue;\nexports.withSwitch = withSwitch;\nexports.zonesLoaded = zonesLoaded;\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.match.js */ \"./node_modules/core-js/modules/es.string.match.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.includes.js */ \"./node_modules/core-js/modules/es.array.includes.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.includes.js */ \"./node_modules/core-js/modules/es.string.includes.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.starts-with.js */ \"./node_modules/core-js/modules/es.string.starts-with.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.split.js */ \"./node_modules/core-js/modules/es.string.split.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.join.js */ \"./node_modules/core-js/modules/es.array.join.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.slice.js */ \"./node_modules/core-js/modules/es.array.slice.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.assign.js */ \"./node_modules/core-js/modules/es.object.assign.js\");\n\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.constructor.js */ \"./node_modules/core-js/modules/es.regexp.constructor.js\");\n\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.find.js */ \"./node_modules/core-js/modules/es.array.find.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.trim.js */ \"./node_modules/core-js/modules/es.string.trim.js\");\n\n__webpack_require__(/*! core-js/modules/es.number.to-fixed.js */ \"./node_modules/core-js/modules/es.number.to-fixed.js\");\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nvar _fetchPonyfill2 = _interopRequireDefault(__webpack_require__(/*! fetch-ponyfill */ \"./node_modules/fetch-ponyfill/build/fetch-browser.js\"));\n\nvar _jsonLogicJs = _interopRequireDefault(__webpack_require__(/*! json-logic-js */ \"./node_modules/json-logic-js/logic.js\"));\n\nvar _momentTimezone = _interopRequireDefault(__webpack_require__(/*! moment-timezone/moment-timezone */ \"./node_modules/moment-timezone/moment-timezone.js\"));\n\nvar _jstimezonedetect = _interopRequireDefault(__webpack_require__(/*! jstimezonedetect */ \"./node_modules/jstimezonedetect/dist/jstz.min.js\"));\n\nvar _operators = __webpack_require__(/*! ./jsonlogic/operators */ \"./lib/utils/jsonlogic/operators.js\");\n\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\n\nvar _dompurify = _interopRequireDefault(__webpack_require__(/*! dompurify */ \"./node_modules/dompurify/dist/purify.js\"));\n\nvar _formUtils = __webpack_require__(/*! ./formUtils */ \"./lib/utils/formUtils.js\");\n\nObject.keys(_formUtils).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;\n if (key in exports && exports[key] === _formUtils[key]) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function get() {\n return _formUtils[key];\n }\n });\n});\n\nvar _Evaluator = _interopRequireDefault(__webpack_require__(/*! ./Evaluator */ \"./lib/utils/Evaluator.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nvar interpolate = _Evaluator.default.interpolate;\nexports.interpolate = interpolate;\n\nvar _fetchPonyfill = (0, _fetchPonyfill2.default)({\n Promise: _nativePromiseOnly.default\n}),\n fetch = _fetchPonyfill.fetch;\n\n// Configure JsonLogic\n_operators.lodashOperators.forEach(function (name) {\n return _jsonLogicJs.default.add_operation(\"_\".concat(name), _lodash.default[name]);\n}); // Retrieve Any Date\n\n\n_jsonLogicJs.default.add_operation('getDate', function (date) {\n return (0, _momentTimezone.default)(date).toISOString();\n}); // Set Relative Minimum Date\n\n\n_jsonLogicJs.default.add_operation('relativeMinDate', function (relativeMinDate) {\n return (0, _momentTimezone.default)().subtract(relativeMinDate, 'days').toISOString();\n}); // Set Relative Maximum Date\n\n\n_jsonLogicJs.default.add_operation('relativeMaxDate', function (relativeMaxDate) {\n return (0, _momentTimezone.default)().add(relativeMaxDate, 'days').toISOString();\n});\n\nfunction setPathToComponentAndPerentSchema(component) {\n component.path = getComponentPath(component);\n var dataParent = getDataParentComponent(component);\n\n if (dataParent && _typeof(dataParent) === 'object') {\n dataParent.path = getComponentPath(dataParent);\n }\n}\n/**\n * Evaluate a method.\n *\n * @param func\n * @param args\n * @return {*}\n */\n\n\nfunction evaluate(func, args, ret, tokenize) {\n var returnVal = null;\n var component = args.component ? args.component : {\n key: 'unknown'\n };\n\n if (!args.form && args.instance) {\n args.form = _lodash.default.get(args.instance, 'root._form', {});\n }\n\n var componentKey = component.key;\n\n if (typeof func === 'string') {\n if (ret) {\n func += \";return \".concat(ret);\n }\n\n if (tokenize) {\n // Replace all {{ }} references with actual data.\n func = func.replace(/({{\\s+(.*)\\s+}})/, function (match, $1, $2) {\n if ($2.indexOf('data.') === 0) {\n return _lodash.default.get(args.data, $2.replace('data.', ''));\n } else if ($2.indexOf('row.') === 0) {\n return _lodash.default.get(args.row, $2.replace('row.', ''));\n } // Support legacy...\n\n\n return _lodash.default.get(args.data, $2);\n });\n }\n\n try {\n func = _Evaluator.default.evaluator(func, args);\n args = _lodash.default.values(args);\n } catch (err) {\n console.warn(\"An error occured within the custom function for \".concat(componentKey), err);\n returnVal = null;\n func = false;\n }\n }\n\n if (typeof func === 'function') {\n try {\n returnVal = _Evaluator.default.evaluate(func, args);\n } catch (err) {\n returnVal = null;\n console.warn(\"An error occured within custom function for \".concat(componentKey), err);\n }\n } else if (_typeof(func) === 'object') {\n try {\n returnVal = _jsonLogicJs.default.apply(func, args);\n } catch (err) {\n returnVal = null;\n console.warn(\"An error occured within custom function for \".concat(componentKey), err);\n }\n } else if (func) {\n console.warn(\"Unknown function type for \".concat(componentKey));\n }\n\n return returnVal;\n}\n\nfunction getRandomComponentId() {\n return \"e\".concat(Math.random().toString(36).substring(7));\n}\n/**\n * Get a property value of an element.\n *\n * @param style\n * @param prop\n * @return {number}\n */\n\n\nfunction getPropertyValue(style, prop) {\n var value = style.getPropertyValue(prop);\n value = value ? value.replace(/[^0-9.]/g, '') : '0';\n return parseFloat(value);\n}\n/**\n * Get an elements bounding rectagle.\n *\n * @param element\n * @return {{x: string, y: string, width: string, height: string}}\n */\n\n\nfunction getElementRect(element) {\n var 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}\n/**\n * Determines the boolean value of a setting.\n *\n * @param value\n * @return {boolean}\n */\n\n\nfunction boolValue(value) {\n if (_lodash.default.isBoolean(value)) {\n return value;\n } else if (_lodash.default.isString(value)) {\n return value.toLowerCase() === 'true';\n } else {\n return !!value;\n }\n}\n/**\n * Check to see if an ID is a mongoID.\n * @param text\n * @return {Array|{index: number, input: string}|Boolean|*}\n */\n\n\nfunction isMongoId(text) {\n return text.toString().match(/^[0-9a-fA-F]{24}$/);\n}\n/**\n * Checks the calculated value for a provided component and data.\n *\n * @param {Object} component\n * The component to check for the calculated value.\n * @param {Object} submission\n * A submission object.\n * @param data\n * The full submission data.\n */\n\n\nfunction checkCalculated(component, submission, rowData) {\n // Process calculated value stuff if present.\n if (component.calculateValue) {\n _lodash.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: component\n }, 'value'));\n }\n}\n/**\n * Check if a simple conditional evaluates to true.\n *\n * @param condition\n * @param condition\n * @param row\n * @param data\n * @returns {boolean}\n */\n\n\nfunction checkSimpleConditional(component, condition, row, data) {\n var value = null;\n\n if (row) {\n value = (0, _formUtils.getValue)({\n data: row\n }, condition.when);\n }\n\n if (data && _lodash.default.isNil(value)) {\n value = (0, _formUtils.getValue)({\n data: data\n }, condition.when);\n } // FOR-400 - Fix issue where falsey values were being evaluated as show=true\n\n\n if (_lodash.default.isNil(value)) {\n value = '';\n }\n\n var eq = String(condition.eq);\n var show = String(condition.show); // Special check for selectboxes component.\n\n if (_lodash.default.isObject(value) && _lodash.default.has(value, condition.eq)) {\n return String(value[condition.eq]) === show;\n } // FOR-179 - Check for multiple values.\n\n\n if (Array.isArray(value) && value.map(String).includes(eq)) {\n return show === 'true';\n }\n\n return String(value) === eq === (show === 'true');\n}\n/**\n * Check custom javascript conditional.\n *\n * @param component\n * @param custom\n * @param row\n * @param data\n * @returns {*}\n */\n\n\nfunction checkCustomConditional(component, custom, row, data, form, variable, onError, instance) {\n if (typeof custom === 'string') {\n custom = \"var \".concat(variable, \" = true; \").concat(custom, \"; return \").concat(variable, \";\");\n }\n\n var value = instance && instance.evaluate ? instance.evaluate(custom, {\n row: row,\n data: data,\n form: form\n }) : evaluate(custom, {\n row: row,\n data: data,\n form: form\n });\n\n if (value === null) {\n return onError;\n }\n\n return value;\n}\n\nfunction checkJsonConditional(component, json, row, data, form, onError) {\n try {\n return _jsonLogicJs.default.apply(json, {\n data: data,\n row: row,\n form: form,\n _: _lodash.default\n });\n } catch (err) {\n console.warn(\"An error occurred in jsonLogic advanced condition for \".concat(component.key), err);\n return onError;\n }\n}\n\nfunction getRow(component, row, instance, conditional) {\n var _condition$when;\n\n var condition = conditional || component.conditional; // If no component's instance passed (happens only in 6.x server), calculate its path based on the schema\n\n if (!instance) {\n instance = _lodash.default.cloneDeep(component);\n setPathToComponentAndPerentSchema(instance);\n }\n\n var dataParent = getDataParentComponent(instance);\n var parentPath = dataParent ? getComponentPath(dataParent) : null;\n\n if (dataParent && (_condition$when = condition.when) !== null && _condition$when !== void 0 && _condition$when.startsWith(parentPath)) {\n var newRow = {};\n\n _lodash.default.set(newRow, parentPath, row);\n\n row = newRow;\n }\n\n return row;\n}\n/**\n * Checks the conditions for a provided component and data.\n *\n * @param component\n * The component to check for the condition.\n * @param row\n * The data within a row\n * @param data\n * The full submission data.\n *\n * @returns {boolean}\n */\n\n\nfunction checkCondition(component, row, data, form, instance) {\n var customConditional = component.customConditional,\n conditional = component.conditional;\n\n if (customConditional) {\n return checkCustomConditional(component, customConditional, row, data, form, 'show', true, instance);\n } else if (conditional && conditional.when) {\n row = getRow(component, row, instance);\n return checkSimpleConditional(component, conditional, row, data);\n } else if (conditional && conditional.json) {\n return checkJsonConditional(component, conditional.json, row, data, form, true);\n } // Default to show.\n\n\n return true;\n}\n/**\n * Test a trigger on a component.\n *\n * @param component\n * @param action\n * @param data\n * @param row\n * @returns {mixed}\n */\n\n\nfunction checkTrigger(component, trigger, row, data, form, instance) {\n // If trigger is empty, don't fire it\n if (!trigger[trigger.type]) {\n return false;\n }\n\n switch (trigger.type) {\n case 'simple':\n row = getRow(component, row, instance, trigger.simple);\n return checkSimpleConditional(component, trigger.simple, row, data);\n\n case 'javascript':\n return checkCustomConditional(component, trigger.javascript, row, data, form, 'result', false, instance);\n\n case 'json':\n return checkJsonConditional(component, trigger.json, row, data, form, false);\n } // If none of the types matched, don't fire the trigger.\n\n\n return false;\n}\n\nfunction setActionProperty(component, action, result, row, data, instance) {\n var property = action.property.value;\n\n switch (action.property.type) {\n case 'boolean':\n {\n var currentValue = _lodash.default.get(component, property, false).toString();\n\n var newValue = action.state.toString();\n\n if (currentValue !== newValue) {\n _lodash.default.set(component, property, newValue === 'true');\n }\n\n break;\n }\n\n case 'string':\n {\n var evalData = {\n data: data,\n row: row,\n component: component,\n result: result\n };\n var textValue = action.property.component ? action[action.property.component] : action.text;\n\n var _currentValue = _lodash.default.get(component, property, '');\n\n var _newValue = instance && instance.interpolate ? instance.interpolate(textValue, evalData) : _Evaluator.default.interpolate(textValue, evalData);\n\n if (_newValue !== _currentValue) {\n _lodash.default.set(component, property, _newValue);\n }\n\n break;\n }\n }\n\n return component;\n}\n/**\n * Unescape HTML characters like <, >, & and etc.\n * @param str\n * @returns {string}\n */\n\n\nfunction unescapeHTML(str) {\n if (typeof window === 'undefined' || !('DOMParser' in window)) {\n return str;\n }\n\n var doc = new window.DOMParser().parseFromString(str, 'text/html');\n return doc.documentElement.textContent;\n}\n/**\n * Make HTML element from string\n * @param str\n * @param selector\n * @returns {HTMLElement}\n */\n\n\nfunction convertStringToHTMLElement(str, selector) {\n var doc = new window.DOMParser().parseFromString(str, 'text/html');\n return doc.body.querySelector(selector);\n}\n/**\n * Make a filename guaranteed to be unique.\n * @param name\n * @param template\n * @param evalContext\n * @returns {string}\n */\n\n\nfunction uniqueName(name, template, evalContext) {\n template = template || '{{fileName}}-{{guid}}'; //include guid in template anyway, to prevent overwriting issue if filename matches existing file\n\n if (!template.includes('{{guid}}')) {\n template = \"\".concat(template, \"-{{guid}}\");\n }\n\n var parts = name.split('.');\n var fileName = parts.slice(0, parts.length - 1).join('.');\n var extension = parts.length > 1 ? \".\".concat(_lodash.default.last(parts)) : ''; //allow only 100 characters from original name to avoid issues with filename length restrictions\n\n fileName = fileName.substr(0, 100);\n evalContext = Object.assign(evalContext || {}, {\n fileName: fileName,\n guid: guid()\n }); //only letters, numbers, dots, dashes, underscores and spaces are allowed. Anything else will be replaced with dash\n\n var uniqueName = \"\".concat(_Evaluator.default.interpolate(template, evalContext)).concat(extension).replace(/[^0-9a-zA-Z.\\-_ ]/g, '-');\n return uniqueName;\n}\n\nfunction guid() {\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\n var r = Math.random() * 16 | 0;\n var v = c === 'x' ? r : r & 0x3 | 0x8;\n return v.toString(16);\n });\n}\n/**\n * Return a translated date setting.\n *\n * @param date\n * @return {(null|Date)}\n */\n\n\nfunction getDateSetting(date) {\n if (_lodash.default.isNil(date) || _lodash.default.isNaN(date) || date === '') {\n return null;\n }\n\n if (date instanceof Date) {\n return date;\n } else if (typeof date.toDate === 'function') {\n return date.isValid() ? date.toDate() : null;\n }\n\n var dateSetting = typeof date !== 'string' || date.indexOf('moment(') === -1 ? (0, _momentTimezone.default)(date) : null;\n\n if (dateSetting && dateSetting.isValid()) {\n return dateSetting.toDate();\n }\n\n dateSetting = null;\n\n try {\n var value = _Evaluator.default.evaluator(\"return \".concat(date, \";\"), 'moment')(_momentTimezone.default);\n\n if (typeof value === 'string') {\n dateSetting = (0, _momentTimezone.default)(value);\n } else if (typeof value.toDate === 'function') {\n dateSetting = (0, _momentTimezone.default)(value.toDate().toUTCString());\n } else if (value instanceof Date) {\n dateSetting = (0, _momentTimezone.default)(value);\n }\n } catch (e) {\n return null;\n }\n\n if (!dateSetting) {\n return null;\n } // Ensure this is a date.\n\n\n if (!dateSetting.isValid()) {\n return null;\n }\n\n return dateSetting.toDate();\n}\n\nfunction isValidDate(date) {\n return _lodash.default.isDate(date) && !_lodash.default.isNaN(date.getDate());\n}\n/**\n * Get the current timezone string.\n *\n * @return {string}\n */\n\n\nfunction currentTimezone() {\n if (_momentTimezone.default.currentTimezone) {\n return _momentTimezone.default.currentTimezone;\n }\n\n _momentTimezone.default.currentTimezone = _jstimezonedetect.default.determine().name();\n return _momentTimezone.default.currentTimezone;\n}\n/**\n * Get an offset date provided a date object and timezone object.\n *\n * @param date\n * @param timezone\n * @return {Date}\n */\n\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\n var dateMoment = (0, _momentTimezone.default)(date).tz(timezone);\n return {\n date: new Date(date.getTime() + (dateMoment.utcOffset() + date.getTimezoneOffset()) * 60000),\n abbr: dateMoment.format('z')\n };\n}\n/**\n * Returns if the zones are loaded.\n *\n * @return {boolean}\n */\n\n\nfunction zonesLoaded() {\n return _momentTimezone.default.zonesLoaded;\n}\n/**\n * Returns if we should load the zones.\n *\n * @param timezone\n * @return {boolean}\n */\n\n\nfunction shouldLoadZones(timezone) {\n if (timezone === currentTimezone() || timezone === 'UTC') {\n return false;\n }\n\n return true;\n}\n/**\n * Externally load the timezone data.\n *\n * @return {Promise | *}\n */\n\n\nfunction loadZones(timezone) {\n if (timezone && !shouldLoadZones(timezone)) {\n // Return non-resolving promise.\n return new _nativePromiseOnly.default(_lodash.default.noop);\n }\n\n if (_momentTimezone.default.zonesPromise) {\n return _momentTimezone.default.zonesPromise;\n }\n\n return _momentTimezone.default.zonesPromise = fetch('https://cdn.form.io/moment-timezone/data/packed/latest.json').then(function (resp) {\n return resp.json().then(function (zones) {\n _momentTimezone.default.tz.load(zones);\n\n _momentTimezone.default.zonesLoaded = true; // Trigger a global event that the timezones have finished loading.\n\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 });\n}\n/**\n * Get the moment date object for translating dates with timezones.\n *\n * @param value\n * @param format\n * @param timezone\n * @return {*}\n */\n\n\nfunction momentDate(value, format, timezone) {\n var momentDate = (0, _momentTimezone.default)(value);\n\n if (timezone === 'UTC') {\n timezone = 'Etc/UTC';\n }\n\n if ((timezone !== currentTimezone() || format && format.match(/\\s(z$|z\\s)/)) && _momentTimezone.default.zonesLoaded) {\n return momentDate.tz(timezone);\n }\n\n return momentDate;\n}\n/**\n * Format a date provided a value, format, and timezone object.\n *\n * @param value\n * @param format\n * @param timezone\n * @return {string}\n */\n\n\nfunction formatDate(value, format, timezone, flatPickrInputFormat) {\n var momentDate = (0, _momentTimezone.default)(value, flatPickrInputFormat || undefined);\n\n if (timezone === currentTimezone()) {\n // See if our format contains a \"z\" timezone character.\n if (format.match(/\\s(z$|z\\s)/)) {\n loadZones();\n\n if (_momentTimezone.default.zonesLoaded) {\n return momentDate.tz(timezone).format(convertFormatToMoment(format));\n } else {\n return momentDate.format(convertFormatToMoment(format.replace(/\\s(z$|z\\s)/, '')));\n }\n } // Return the standard format.\n\n\n return momentDate.format(convertFormatToMoment(format));\n }\n\n if (timezone === 'UTC') {\n var offset = offsetDate(momentDate.toDate(), 'UTC');\n return \"\".concat((0, _momentTimezone.default)(offset.date).format(convertFormatToMoment(format)), \" UTC\");\n } // Load the zones since we need timezone information.\n\n\n loadZones();\n\n if (_momentTimezone.default.zonesLoaded && timezone) {\n return momentDate.tz(timezone).format(\"\".concat(convertFormatToMoment(format), \" z\"));\n } else {\n return momentDate.format(convertFormatToMoment(format));\n }\n}\n/**\n * Pass a format function to format within a timezone.\n *\n * @param formatFn\n * @param date\n * @param format\n * @param timezone\n * @return {string}\n */\n\n\nfunction formatOffset(formatFn, date, format, timezone) {\n if (timezone === currentTimezone()) {\n return formatFn(date, format);\n }\n\n if (timezone === 'UTC') {\n return \"\".concat(formatFn(offsetDate(date, 'UTC').date, format), \" UTC\");\n } // Load the zones since we need timezone information.\n\n\n loadZones();\n\n if (_momentTimezone.default.zonesLoaded) {\n var offset = offsetDate(date, timezone);\n return \"\".concat(formatFn(offset.date, format), \" \").concat(offset.abbr);\n } else {\n return formatFn(date, format);\n }\n}\n\nfunction getLocaleDateFormatInfo(locale) {\n var formatInfo = {};\n var day = 21;\n var exampleDate = new Date(2017, 11, day);\n var localDateString = exampleDate.toLocaleDateString(locale);\n formatInfo.dayFirst = localDateString.slice(0, 2) === day.toString();\n return formatInfo;\n}\n/**\n * Convert the format from the angular-datepicker module to flatpickr format.\n * @param format\n * @return {string}\n */\n\n\nfunction convertFormatToFlatpickr(format) {\n return format // Remove the Z timezone offset, not supported by flatpickr.\n .replace(/Z/g, '') // Year conversion.\n .replace(/y/g, 'Y').replace('YYYY', 'Y').replace('YY', 'y') // Month conversion.\n .replace('MMMM', 'F').replace(/M/g, 'n').replace('nnn', 'M').replace('nn', 'm') // Day in month.\n .replace(/d/g, 'j').replace(/jj/g, 'd') // Day in week.\n .replace('EEEE', 'l').replace('EEE', 'D') // Hours, minutes, seconds\n .replace('HH', 'H').replace('hh', 'G').replace('mm', 'i').replace('ss', 'S').replace(/a/g, 'K');\n}\n/**\n * Convert the format from the angular-datepicker module to moment format.\n * @param format\n * @return {string}\n */\n\n\nfunction convertFormatToMoment(format) {\n return format // Year conversion.\n .replace(/y/g, 'Y') // Day in month.\n .replace(/d/g, 'D') // Day in week.\n .replace(/E/g, 'd') // AM/PM marker\n .replace(/a/g, 'A') // Unix Timestamp\n .replace(/U/g, 'X');\n}\n\nfunction convertFormatToMask(format) {\n return format // Long month replacement.\n .replace(/M{4}/g, 'MM') // Initial short month conversion.\n .replace(/M{3}/g, '***') // Short month conversion if input as text.\n .replace(/e/g, 'Q') // Year conversion.\n .replace(/[ydhmsHMG]/g, '9') // AM/PM conversion.\n .replace(/a/g, 'AA');\n}\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 */\n\n\nfunction getInputMask(mask, placeholderChar) {\n if (mask instanceof Array) {\n return mask;\n }\n\n var maskArray = [];\n maskArray.numeric = true;\n\n for (var i = 0; i < mask.length; i++) {\n switch (mask[i]) {\n case '9':\n maskArray.push(/\\d/);\n break;\n\n case 'A':\n maskArray.numeric = false;\n maskArray.push(/[a-zA-Z]/);\n break;\n\n case 'a':\n maskArray.numeric = false;\n maskArray.push(/[a-z]/);\n break;\n\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\n case placeholderChar:\n maskArray.numeric = false;\n maskArray.push(' ');\n break;\n\n default:\n maskArray.numeric = false;\n maskArray.push(mask[i]);\n break;\n }\n }\n\n return maskArray;\n}\n\nfunction unmaskValue(value, mask, placeholderChar) {\n if (!mask || !value || value.length > mask.length) {\n return value;\n }\n\n var unmaskedValue = value.split('');\n\n for (var i = 0; i < mask.length; i++) {\n var char = value[i] || '';\n var charPart = mask[i];\n\n if (!_lodash.default.isRegExp(charPart) && char === charPart) {\n unmaskedValue[i] = '';\n }\n }\n\n unmaskedValue = unmaskedValue.join('').replace(placeholderChar, '');\n return unmaskedValue;\n}\n\nfunction matchInputMask(value, inputMask) {\n if (!inputMask) {\n return true;\n } // If value is longer than mask, it isn't valid.\n\n\n if (value.length > inputMask.length) {\n return false;\n }\n\n for (var i = 0; i < inputMask.length; i++) {\n var char = value[i] || '';\n var charPart = inputMask[i];\n\n if (!(_lodash.default.isRegExp(charPart) && charPart.test(char) || charPart === char)) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction getNumberSeparators() {\n var lang = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'en';\n var formattedNumberString = 12345.6789.toLocaleString(lang);\n var delimeters = formattedNumberString.match(/..(.)...(.)../);\n\n if (!delimeters) {\n return {\n delimiter: ',',\n decimalSeparator: '.'\n };\n }\n\n return {\n delimiter: delimeters.length > 1 ? delimeters[1] : ',',\n decimalSeparator: delimeters.length > 2 ? delimeters[2] : '.'\n };\n}\n\nfunction getNumberDecimalLimit(component, defaultLimit) {\n if (_lodash.default.has(component, 'decimalLimit')) {\n return _lodash.default.get(component, 'decimalLimit');\n } // Determine the decimal limit. Defaults to 20 but can be overridden by validate.step or decimalLimit settings.\n\n\n var decimalLimit = defaultLimit || 20;\n\n var step = _lodash.default.get(component, 'validate.step', 'any');\n\n if (step !== 'any') {\n var parts = step.toString().split('.');\n\n if (parts.length > 1) {\n decimalLimit = parts[1].length;\n }\n }\n\n return decimalLimit;\n}\n\nfunction getCurrencyAffixes(_ref) {\n var _ref$currency = _ref.currency,\n currency = _ref$currency === void 0 ? 'USD' : _ref$currency,\n decimalLimit = _ref.decimalLimit,\n decimalSeparator = _ref.decimalSeparator,\n lang = _ref.lang;\n // Get the prefix and suffix from the localized string.\n var regex = \"(.*)?\".concat(100 .toLocaleString(lang));\n\n if (decimalLimit) {\n regex += \"\".concat(decimalSeparator === '.' ? '\\\\.' : decimalSeparator).concat(0 .toLocaleString(lang), \"{\").concat(decimalLimit, \"}\");\n }\n\n regex += '(.*)?';\n var parts = 100 .toLocaleString(lang, {\n style: 'currency',\n currency: currency,\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}\n/**\n * Fetch the field data provided a component.\n *\n * @param data\n * @param component\n * @return {*}\n */\n\n\nfunction fieldData(data, component) {\n if (!data) {\n return '';\n }\n\n if (!component || !component.key) {\n return data;\n }\n\n if (component.key.includes('.')) {\n var value = data;\n var parts = component.key.split('.');\n var key = '';\n\n for (var i = 0; i < parts.length; i++) {\n key = parts[i]; // Handle nested resources\n\n if (value.hasOwnProperty('_id')) {\n value = value.data;\n } // Return if the key is not found on the value.\n\n\n if (!value.hasOwnProperty(key)) {\n return;\n } // Convert old single field data in submissions to multiple\n\n\n if (key === parts[parts.length - 1] && component.multiple && !Array.isArray(value[key])) {\n value[key] = [value[key]];\n } // Set the value of this key.\n\n\n value = value[key];\n }\n\n return value;\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 } // Fix for checkbox type radio submission values in tableView\n\n\n if (component.type === 'checkbox' && component.inputType === 'radio') {\n return data[component.name] === component.value;\n }\n\n return data[component.key];\n }\n}\n/**\n * Delays function execution with possibility to execute function synchronously or cancel it.\n *\n * @param fn Function to delay\n * @param delay Delay time\n * @return {*}\n */\n\n\nfunction delay(fn) {\n var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n\n for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n args[_key - 2] = arguments[_key];\n }\n\n var timer = setTimeout.apply(void 0, [fn, delay].concat(args));\n\n function cancel() {\n clearTimeout(timer);\n }\n\n function earlyCall() {\n cancel();\n return fn.apply(void 0, args);\n }\n\n earlyCall.timer = timer;\n earlyCall.cancel = cancel;\n return earlyCall;\n}\n/**\n * Iterate the given key to make it unique.\n *\n * @param {String} key\n * Modify the component key to be unique.\n *\n * @returns {String}\n * The new component key.\n */\n\n\nfunction iterateKey(key) {\n if (!key.match(/(\\d+)$/)) {\n return \"\".concat(key, \"1\");\n }\n\n return key.replace(/(\\d+)$/, function (suffix) {\n return Number(suffix) + 1;\n });\n}\n/**\n * Determines a unique key within a map provided the base key.\n *\n * @param map\n * @param base\n * @return {*}\n */\n\n\nfunction uniqueKey(map, base) {\n var newKey = base;\n\n while (map.hasOwnProperty(newKey)) {\n newKey = iterateKey(newKey);\n }\n\n return newKey;\n}\n/**\n * Determines the major version number of bootstrap.\n *\n * @return {number}\n */\n\n\nfunction bootstrapVersion(options) {\n if (options.bootstrap) {\n return options.bootstrap;\n }\n\n if (typeof $ === 'function' && typeof $().collapse === 'function') {\n return parseInt($.fn.collapse.Constructor.VERSION.split('.')[0], 10);\n }\n\n return 0;\n}\n/**\n * Retrun provided argument.\n * If argument is a function, returns the result of a function call.\n * @param {*} e;\n *\n * @return {*}\n */\n\n\nfunction unfold(e) {\n if (typeof e === 'function') {\n return e();\n }\n\n return e;\n}\n/**\n * Map values through unfold and return first non-nil value.\n * @param {Array} collection;\n *\n * @return {T}\n */\n\n\nvar firstNonNil = _lodash.default.flow([_lodash.default.partialRight(_lodash.default.map, unfold), _lodash.default.partialRight(_lodash.default.find, function (v) {\n return !_lodash.default.isUndefined(v);\n})]);\n/*\n * Create enclosed state.\n * Returns functions to getting and cycling between states.\n * @param {*} a - initial state.\n * @param {*} b - next state.\n * @return {Functions[]} -- [get, toggle];\n */\n\n\nexports.firstNonNil = firstNonNil;\n\nfunction withSwitch(a, b) {\n var state = a;\n var next = b;\n\n function get() {\n return state;\n }\n\n function toggle() {\n var prev = state;\n state = next;\n next = prev;\n }\n\n return [get, toggle];\n}\n\nfunction observeOverload(callback) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var _options$limit = options.limit,\n limit = _options$limit === void 0 ? 50 : _options$limit,\n _options$delay = options.delay,\n delay = _options$delay === void 0 ? 500 : _options$delay;\n var callCount = 0;\n var timeoutID = 0;\n\n var reset = function reset() {\n return callCount = 0;\n };\n\n return function () {\n if (timeoutID !== 0) {\n clearTimeout(timeoutID);\n timeoutID = 0;\n }\n\n timeoutID = setTimeout(reset, delay);\n callCount += 1;\n\n if (callCount >= limit) {\n clearTimeout(timeoutID);\n reset();\n return callback();\n }\n };\n}\n\nfunction getContextComponents(context) {\n var values = [];\n context.utils.eachComponent(context.instance.options.editForm.components, function (component, path) {\n if (component.key !== context.data.key) {\n values.push({\n label: \"\".concat(component.label || component.key, \" (\").concat(path, \")\"),\n value: path\n });\n }\n });\n return values;\n}\n\nfunction getContextButtons(context) {\n var values = [];\n context.utils.eachComponent(context.instance.options.editForm.components, function (component) {\n if (component.type === 'button') {\n values.push({\n label: \"\".concat(component.key, \" (\").concat(component.label, \")\"),\n value: component.key\n });\n }\n });\n return values;\n} // Tags that could be in text, that should be ommited or handled in a special way\n\n\nvar 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 *\n * @param {HTMLElement} elem\n * @param {Function} translate\n *\n * @returns {String}\n * Translated element template.\n */\n\nfunction translateElemValue(elem, translate) {\n if (!elem.innerText) {\n return elem.innerHTML;\n }\n\n var elemValue = elem.innerText.replace(_Evaluator.default.templateSettings.interpolate, '').replace(/\\s\\s+/g, ' ').trim();\n var translatedValue = translate(elemValue);\n\n if (elemValue !== translatedValue) {\n var links = elem.innerHTML.match(/]*>(.*?)<\\/a>/g);\n\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\n var translatedLinks = links.map(function (link) {\n var linkElem = document.createElement('a');\n linkElem.innerHTML = link;\n return translateElemValue(linkElem, translate);\n });\n return \"\".concat(translatedValue, \" (\").concat(translatedLinks.join(', '), \")\");\n } else {\n return elem.innerText.replace(elemValue, translatedValue);\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 *\n * @param {HTMLElement} tag\n * @param {Function} translate\n *\n * @returns {void}\n */\n\n\nfunction translateDeepTag(tag, translate) {\n var children = tag.children.length && _toConsumableArray(tag.children);\n\n var shouldTranslateEntireContent = children && children.every(function (child) {\n return child.children.length === 0 && inTextTags.some(function (tag) {\n return child.nodeName === tag;\n });\n });\n\n if (!children || shouldTranslateEntireContent) {\n tag.innerHTML = translateElemValue(tag, translate);\n } else {\n children.forEach(function (child) {\n return translateDeepTag(child, translate);\n });\n }\n}\n/**\n * Translates text values in html template.\n *\n * @param {String} template\n * @param {Function} translate\n *\n * @returns {String}\n * Html template with translated values.\n */\n\n\nfunction translateHTMLTemplate(template, translate) {\n var isHTML = /<[^>]*>/.test(template);\n\n if (!isHTML) {\n return translate(template);\n }\n\n var tempElem = document.createElement('div');\n tempElem.innerHTML = template;\n\n if (tempElem.innerText && tempElem.children.length) {\n translateDeepTag(tempElem, translate);\n return tempElem.innerHTML;\n }\n\n return template;\n}\n/**\n * Sanitize an html string.\n *\n * @param string\n * @returns {*}\n */\n\n\nfunction sanitize(string, options) {\n if (typeof _dompurify.default.sanitize !== 'function') {\n return string;\n } // Dompurify configuration\n\n\n var sanitizeOptions = {\n ADD_ATTR: ['ref', 'target'],\n USE_PROFILES: {\n html: true\n }\n }; // Add attrs\n\n if (options.sanitizeConfig && Array.isArray(options.sanitizeConfig.addAttr) && options.sanitizeConfig.addAttr.length > 0) {\n options.sanitizeConfig.addAttr.forEach(function (attr) {\n sanitizeOptions.ADD_ATTR.push(attr);\n });\n } // Add tags\n\n\n if (options.sanitizeConfig && Array.isArray(options.sanitizeConfig.addTags) && options.sanitizeConfig.addTags.length > 0) {\n sanitizeOptions.ADD_TAGS = options.sanitizeConfig.addTags;\n } // Allow tags\n\n\n if (options.sanitizeConfig && Array.isArray(options.sanitizeConfig.allowedTags) && options.sanitizeConfig.allowedTags.length > 0) {\n sanitizeOptions.ALLOWED_TAGS = options.sanitizeConfig.allowedTags;\n } // Allow attributes\n\n\n if (options.sanitizeConfig && Array.isArray(options.sanitizeConfig.allowedAttrs) && options.sanitizeConfig.allowedAttrs.length > 0) {\n sanitizeOptions.ALLOWED_ATTR = options.sanitizeConfig.allowedAttrs;\n } // Allowd URI Regex\n\n\n if (options.sanitizeConfig && options.sanitizeConfig.allowedUriRegex) {\n sanitizeOptions.ALLOWED_URI_REGEXP = options.sanitizeConfig.allowedUriRegex;\n } // Allow to extend the existing array of elements that are safe for URI-like values\n\n\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\n return _dompurify.default.sanitize(string, sanitizeOptions);\n}\n/**\n * Fast cloneDeep for JSON objects only.\n */\n\n\nfunction fastCloneDeep(obj) {\n return obj ? JSON.parse(JSON.stringify(obj)) : obj;\n}\n\nfunction isInputComponent(componentJson) {\n if (componentJson.input === false || componentJson.input === true) {\n return componentJson.input;\n }\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\n default:\n return true;\n }\n}\n\nfunction getArrayFromComponentPath(pathStr) {\n if (!pathStr || !_lodash.default.isString(pathStr)) {\n if (!_lodash.default.isArray(pathStr)) {\n return [pathStr];\n }\n\n return pathStr;\n }\n\n return pathStr.replace(/[[\\]]/g, '.').replace(/\\.\\./g, '.').replace(/(^\\.)|(\\.$)/g, '').split('.').map(function (part) {\n return _lodash.default.defaultTo(_lodash.default.toNumber(part), part);\n });\n}\n\nfunction hasInvalidComponent(component) {\n return component.getComponents().some(function (comp) {\n if (_lodash.default.isArray(comp.components)) {\n return hasInvalidComponent(comp);\n }\n\n return comp.error;\n });\n}\n\nfunction getStringFromComponentPath(path) {\n if (!_lodash.default.isArray(path)) {\n return path;\n }\n\n var strPath = '';\n path.forEach(function (part, i) {\n if (_lodash.default.isNumber(part)) {\n strPath += \"[\".concat(part, \"]\");\n } else {\n strPath += i === 0 ? part : \".\".concat(part);\n }\n });\n return strPath;\n}\n\nfunction round(number, precision) {\n if (_lodash.default.isNumber(number)) {\n return number.toFixed(precision);\n }\n\n return number;\n}\n/**\n * Check for Internet Explorer browser version\n *\n * @return {(number|null)}\n */\n\n\nfunction getIEBrowserVersion() {\n var _getBrowserInfo = getBrowserInfo(),\n ie = _getBrowserInfo.ie,\n version = _getBrowserInfo.version;\n\n return ie ? version : null;\n}\n/**\n * Get browser name and version (modified from 'jquery-browser-plugin')\n *\n * @return {Object} -- {{browser name, version, isWebkit?}}\n * Possible browser names: chrome, safari, ie, edge, opera, mozilla, yabrowser\n */\n\n\nfunction getBrowserInfo() {\n var browser = {};\n\n if (typeof window === 'undefined') {\n return browser;\n }\n\n var ua = window.navigator.userAgent.toLowerCase();\n var match = /(edge|edg)\\/([\\w.]+)/.exec(ua) || /(opr)[/]([\\w.]+)/.exec(ua) || /(yabrowser)[ /]([\\w.]+)/.exec(ua) || /(chrome)[ /]([\\w.]+)/.exec(ua) || /(iemobile)[/]([\\w.]+)/.exec(ua) || /(version)(applewebkit)[ /]([\\w.]+).*(safari)[ /]([\\w.]+)/.exec(ua) || /(webkit)[ /]([\\w.]+).*(version)[ /]([\\w.]+).*(safari)[ /]([\\w.]+)/.exec(ua) || /(webkit)[ /]([\\w.]+)/.exec(ua) || /(opera)(?:.*version|)[ /]([\\w.]+)/.exec(ua) || /(msie) ([\\w.]+)/.exec(ua) || ua.indexOf('trident') >= 0 && /(rv)(?::| )([\\w.]+)/.exec(ua) || ua.indexOf('compatible') < 0 && /(mozilla)(?:.*? rv:([\\w.]+)|)/.exec(ua) || [];\n var matched = {\n browser: match[5] || match[3] || match[1] || '',\n version: match[4] || match[2] || '0'\n };\n\n if (matched.browser) {\n browser[matched.browser] = true;\n browser.version = parseInt(matched.version, 10);\n } // Chrome, Opera 15+, Safari and Yandex.Browser are webkit based browsers\n\n\n if (browser.chrome || browser.opr || browser.safari || browser.edg || browser.yabrowser) {\n browser.isWebkit = true;\n } // IE11 has a new token so we will assign it ie to avoid breaking changes\n\n\n if (browser.rv || browser.iemobile) {\n browser.ie = true;\n } // Edge has a new token since it became webkit based\n\n\n if (browser.edg) {\n browser.edge = true;\n } // Opera 15+ are identified as opr\n\n\n if (browser.opr) {\n browser.opera = true;\n }\n\n return browser;\n}\n\nfunction getComponentPathWithoutIndicies() {\n var path = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n return path.replace(/\\[\\d+\\]/, '');\n}\n/**\n * Returns a path to the component which based on its schema\n * @param {*} component is a component's schema containing link to its parent's schema in the 'parent' property\n */\n\n\nfunction getComponentPath(component) {\n var _component$_form;\n\n var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n\n if (!component || !component.key || (component === null || component === void 0 ? void 0 : (_component$_form = component._form) === null || _component$_form === void 0 ? void 0 : _component$_form.display) === 'wizard') {\n // unlike the Webform, the Wizard has the key and it is a duplicate of the panel key\n return path;\n }\n\n path = component.isInputComponent || component.input === true ? \"\".concat(component.key).concat(path ? '.' : '').concat(path) : path;\n return getComponentPath(component.parent, path);\n}\n/**\n * Returns a parent component of the passed component instance skipping all the Layout components\n * @param {*} componentInstance\n * @return {(Component|undefined)}\n */\n\n\nfunction getDataParentComponent(componentInstance) {\n if (!componentInstance) {\n return;\n }\n\n var parent = componentInstance.parent;\n\n if (parent && (parent.isInputComponent || parent.input)) {\n return parent;\n } else {\n return getDataParentComponent(parent);\n }\n}\n/**\n * Returns whether the value is a promise\n * @param value\n * @return {boolean}\n */\n\n\nfunction isPromise(value) {\n return value && value.then && typeof value.then === 'function' && Object.prototype.toString.call(value) === '[object Promise]';\n}\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 componentInstance\n * @param firstPass\n * @returns {boolean|boolean|*}\n */\n\n\nfunction isInsideScopingComponent(componentInstance) {\n var firstPass = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n if (!firstPass && componentInstance !== null && componentInstance !== void 0 && componentInstance.hasScopedChildren) {\n return true;\n }\n\n var dataParent = getDataParentComponent(componentInstance);\n\n if (dataParent !== null && dataParent !== void 0 && dataParent.hasScopedChildren) {\n return true;\n } else if (dataParent !== null && dataParent !== void 0 && dataParent.parent) {\n return isInsideScopingComponent(dataParent.parent, false);\n }\n\n return false;\n}\n\nfunction getFocusableElements(element) {\n var focusableSelector = \"button:not([disabled]), input:not([disabled]), select:not([disabled]),\\n textarea:not([disabled]), button:not([disabled]), [href]\";\n return element.querySelectorAll(focusableSelector);\n} // Export lodash to save space with other libraries.\n\n//# sourceURL=webpack://Formio/./lib/utils/utils.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.from.js */ \"./node_modules/core-js/modules/es.array.from.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nvar _exportNames = {\n evaluate: true,\n getRandomComponentId: true,\n getPropertyValue: true,\n getElementRect: true,\n boolValue: true,\n isMongoId: true,\n checkCalculated: true,\n checkSimpleConditional: true,\n getComponentActualValue: true,\n checkCustomConditional: true,\n checkJsonConditional: true,\n checkCondition: true,\n checkTrigger: true,\n setActionProperty: true,\n unescapeHTML: true,\n convertStringToHTMLElement: true,\n uniqueName: true,\n guid: true,\n getDateSetting: true,\n isValidDate: true,\n currentTimezone: true,\n offsetDate: true,\n zonesLoaded: true,\n shouldLoadZones: true,\n loadZones: true,\n momentDate: true,\n formatDate: true,\n formatOffset: true,\n getLocaleDateFormatInfo: true,\n convertFormatToFlatpickr: true,\n convertFormatToMoment: true,\n convertFormatToMask: true,\n getInputMask: true,\n unmaskValue: true,\n matchInputMask: true,\n getNumberSeparators: true,\n getNumberDecimalLimit: true,\n getCurrencyAffixes: true,\n fieldData: true,\n delay: true,\n iterateKey: true,\n uniqueKey: true,\n bootstrapVersion: true,\n unfold: true,\n firstNonNil: true,\n withSwitch: true,\n observeOverload: true,\n getContextComponents: true,\n getContextButtons: true,\n translateHTMLTemplate: true,\n sanitize: true,\n fastCloneDeep: true,\n interpolate: true,\n isInputComponent: true,\n getArrayFromComponentPath: true,\n hasInvalidComponent: true,\n getStringFromComponentPath: true,\n round: true,\n getIEBrowserVersion: true,\n getBrowserInfo: true,\n getComponentPathWithoutIndicies: true,\n getComponentPath: true,\n getDataParentComponent: true,\n isPromise: true,\n isInsideScopingComponent: true,\n getFocusableElements: true,\n _: true,\n jsonLogic: true,\n moment: true,\n Evaluator: true,\n ConditionOperators: true\n};\nObject.defineProperty(exports, \"ConditionOperators\", ({\n enumerable: true,\n get: function get() {\n return _conditionOperators[\"default\"];\n }\n}));\nObject.defineProperty(exports, \"Evaluator\", ({\n enumerable: true,\n get: function get() {\n return _Evaluator[\"default\"];\n }\n}));\nObject.defineProperty(exports, \"_\", ({\n enumerable: true,\n get: function get() {\n return _lodash[\"default\"];\n }\n}));\nexports.boolValue = boolValue;\nexports.bootstrapVersion = bootstrapVersion;\nexports.checkCalculated = checkCalculated;\nexports.checkCondition = checkCondition;\nexports.checkCustomConditional = checkCustomConditional;\nexports.checkJsonConditional = checkJsonConditional;\nexports.checkSimpleConditional = checkSimpleConditional;\nexports.checkTrigger = checkTrigger;\nexports.convertFormatToFlatpickr = convertFormatToFlatpickr;\nexports.convertFormatToMask = convertFormatToMask;\nexports.convertFormatToMoment = convertFormatToMoment;\nexports.convertStringToHTMLElement = convertStringToHTMLElement;\nexports.currentTimezone = currentTimezone;\nexports.delay = delay;\nexports.evaluate = evaluate;\nexports.fastCloneDeep = fastCloneDeep;\nexports.fieldData = fieldData;\nexports.firstNonNil = void 0;\nexports.formatDate = formatDate;\nexports.formatOffset = formatOffset;\nexports.getArrayFromComponentPath = getArrayFromComponentPath;\nexports.getBrowserInfo = getBrowserInfo;\nexports.getComponentActualValue = getComponentActualValue;\nexports.getComponentPath = getComponentPath;\nexports.getComponentPathWithoutIndicies = getComponentPathWithoutIndicies;\nexports.getContextButtons = getContextButtons;\nexports.getContextComponents = getContextComponents;\nexports.getCurrencyAffixes = getCurrencyAffixes;\nexports.getDataParentComponent = getDataParentComponent;\nexports.getDateSetting = getDateSetting;\nexports.getElementRect = getElementRect;\nexports.getFocusableElements = getFocusableElements;\nexports.getIEBrowserVersion = getIEBrowserVersion;\nexports.getInputMask = getInputMask;\nexports.getLocaleDateFormatInfo = getLocaleDateFormatInfo;\nexports.getNumberDecimalLimit = getNumberDecimalLimit;\nexports.getNumberSeparators = getNumberSeparators;\nexports.getPropertyValue = getPropertyValue;\nexports.getRandomComponentId = getRandomComponentId;\nexports.getStringFromComponentPath = getStringFromComponentPath;\nexports.guid = guid;\nexports.hasInvalidComponent = hasInvalidComponent;\nexports.interpolate = void 0;\nexports.isInputComponent = isInputComponent;\nexports.isInsideScopingComponent = isInsideScopingComponent;\nexports.isMongoId = isMongoId;\nexports.isPromise = isPromise;\nexports.isValidDate = isValidDate;\nexports.iterateKey = iterateKey;\nObject.defineProperty(exports, \"jsonLogic\", ({\n enumerable: true,\n get: function get() {\n return _jsonLogicJs[\"default\"];\n }\n}));\nexports.loadZones = loadZones;\nexports.matchInputMask = matchInputMask;\nObject.defineProperty(exports, \"moment\", ({\n enumerable: true,\n get: function get() {\n return _momentTimezone[\"default\"];\n }\n}));\nexports.momentDate = momentDate;\nexports.observeOverload = observeOverload;\nexports.offsetDate = offsetDate;\nexports.round = round;\nexports.sanitize = sanitize;\nexports.setActionProperty = setActionProperty;\nexports.shouldLoadZones = shouldLoadZones;\nexports.translateHTMLTemplate = translateHTMLTemplate;\nexports.unescapeHTML = unescapeHTML;\nexports.unfold = unfold;\nexports.uniqueKey = uniqueKey;\nexports.uniqueName = uniqueName;\nexports.unmaskValue = unmaskValue;\nexports.withSwitch = withSwitch;\nexports.zonesLoaded = zonesLoaded;\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-iso-string.js */ \"./node_modules/core-js/modules/es.date.to-iso-string.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n__webpack_require__(/*! core-js/modules/es.array.index-of.js */ \"./node_modules/core-js/modules/es.array.index-of.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-string.js */ \"./node_modules/core-js/modules/es.date.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.parse-float.js */ \"./node_modules/core-js/modules/es.parse-float.js\");\n__webpack_require__(/*! core-js/modules/es.string.match.js */ \"./node_modules/core-js/modules/es.string.match.js\");\n__webpack_require__(/*! core-js/modules/es.array.is-array.js */ \"./node_modules/core-js/modules/es.array.is-array.js\");\n__webpack_require__(/*! core-js/modules/es.array.includes.js */ \"./node_modules/core-js/modules/es.array.includes.js\");\n__webpack_require__(/*! core-js/modules/es.string.includes.js */ \"./node_modules/core-js/modules/es.string.includes.js\");\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n__webpack_require__(/*! core-js/modules/es.array.some.js */ \"./node_modules/core-js/modules/es.array.some.js\");\n__webpack_require__(/*! core-js/modules/es.array.every.js */ \"./node_modules/core-js/modules/es.array.every.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.string.starts-with.js */ \"./node_modules/core-js/modules/es.string.starts-with.js\");\n__webpack_require__(/*! core-js/modules/es.array.join.js */ \"./node_modules/core-js/modules/es.array.join.js\");\n__webpack_require__(/*! core-js/modules/es.array.slice.js */ \"./node_modules/core-js/modules/es.array.slice.js\");\n__webpack_require__(/*! core-js/modules/es.object.assign.js */ \"./node_modules/core-js/modules/es.object.assign.js\");\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.constructor.js */ \"./node_modules/core-js/modules/es.regexp.constructor.js\");\n__webpack_require__(/*! core-js/modules/web.timers.js */ \"./node_modules/core-js/modules/web.timers.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.parse-int.js */ \"./node_modules/core-js/modules/es.parse-int.js\");\n__webpack_require__(/*! core-js/modules/es.array.find.js */ \"./node_modules/core-js/modules/es.array.find.js\");\n__webpack_require__(/*! core-js/modules/es.string.trim.js */ \"./node_modules/core-js/modules/es.string.trim.js\");\n__webpack_require__(/*! core-js/modules/es.number.to-fixed.js */ \"./node_modules/core-js/modules/es.number.to-fixed.js\");\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nvar _fetchPonyfill2 = _interopRequireDefault(__webpack_require__(/*! fetch-ponyfill */ \"./node_modules/fetch-ponyfill/build/fetch-browser.js\"));\nvar _jsonLogicJs = _interopRequireDefault(__webpack_require__(/*! json-logic-js */ \"./node_modules/json-logic-js/logic.js\"));\nvar _momentTimezone = _interopRequireDefault(__webpack_require__(/*! moment-timezone/moment-timezone */ \"./node_modules/moment-timezone/moment-timezone.js\"));\nvar _jstimezonedetect = _interopRequireDefault(__webpack_require__(/*! jstimezonedetect */ \"./node_modules/jstimezonedetect/dist/jstz.min.js\"));\nvar _operators = __webpack_require__(/*! ./jsonlogic/operators */ \"./lib/utils/jsonlogic/operators.js\");\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\nvar _dompurify = _interopRequireDefault(__webpack_require__(/*! dompurify */ \"./node_modules/dompurify/dist/purify.js\"));\nvar _formUtils = __webpack_require__(/*! ./formUtils */ \"./lib/utils/formUtils.js\");\nObject.keys(_formUtils).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;\n if (key in exports && exports[key] === _formUtils[key]) return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function get() {\n return _formUtils[key];\n }\n });\n});\nvar _Evaluator = _interopRequireDefault(__webpack_require__(/*! ./Evaluator */ \"./lib/utils/Evaluator.js\"));\nvar _conditionOperators = _interopRequireDefault(__webpack_require__(/*! ./conditionOperators */ \"./lib/utils/conditionOperators/index.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nvar interpolate = _Evaluator[\"default\"].interpolate;\nexports.interpolate = interpolate;\nvar _fetchPonyfill = (0, _fetchPonyfill2[\"default\"])({\n Promise: _nativePromiseOnly[\"default\"]\n }),\n fetch = _fetchPonyfill.fetch;\n// Configure JsonLogic\n_operators.lodashOperators.forEach(function (name) {\n return _jsonLogicJs[\"default\"].add_operation(\"_\".concat(name), _lodash[\"default\"][name]);\n});\n\n// Retrieve Any Date\n_jsonLogicJs[\"default\"].add_operation('getDate', function (date) {\n return (0, _momentTimezone[\"default\"])(date).toISOString();\n});\n\n// Set Relative Minimum Date\n_jsonLogicJs[\"default\"].add_operation('relativeMinDate', function (relativeMinDate) {\n return (0, _momentTimezone[\"default\"])().subtract(relativeMinDate, 'days').toISOString();\n});\n\n// Set Relative Maximum Date\n_jsonLogicJs[\"default\"].add_operation('relativeMaxDate', function (relativeMaxDate) {\n return (0, _momentTimezone[\"default\"])().add(relativeMaxDate, 'days').toISOString();\n});\nfunction setPathToComponentAndPerentSchema(component) {\n component.path = getComponentPath(component);\n var dataParent = getDataParentComponent(component);\n if (dataParent && _typeof(dataParent) === 'object') {\n dataParent.path = getComponentPath(dataParent);\n }\n}\n\n/**\n * Evaluate a method.\n *\n * @param func\n * @param args\n * @return {*}\n */\nfunction evaluate(func, args, ret, tokenize) {\n var returnVal = null;\n var component = args.component ? args.component : {\n key: 'unknown'\n };\n if (!args.form && args.instance) {\n args.form = _lodash[\"default\"].get(args.instance, 'root._form', {});\n }\n var componentKey = component.key;\n if (typeof func === 'string') {\n if (ret) {\n func += \";return \".concat(ret);\n }\n if (tokenize) {\n // Replace all {{ }} references with actual data.\n func = func.replace(/({{\\s+(.*)\\s+}})/, function (match, $1, $2) {\n if ($2.indexOf('data.') === 0) {\n return _lodash[\"default\"].get(args.data, $2.replace('data.', ''));\n } else if ($2.indexOf('row.') === 0) {\n return _lodash[\"default\"].get(args.row, $2.replace('row.', ''));\n }\n\n // Support legacy...\n return _lodash[\"default\"].get(args.data, $2);\n });\n }\n try {\n func = _Evaluator[\"default\"].evaluator(func, args);\n args = _lodash[\"default\"].values(args);\n } catch (err) {\n console.warn(\"An error occured within the custom function for \".concat(componentKey), err);\n returnVal = null;\n func = false;\n }\n }\n if (typeof func === 'function') {\n try {\n returnVal = _Evaluator[\"default\"].evaluate(func, args);\n } catch (err) {\n returnVal = null;\n console.warn(\"An error occured within custom function for \".concat(componentKey), err);\n }\n } else if (_typeof(func) === 'object') {\n try {\n returnVal = _jsonLogicJs[\"default\"].apply(func, args);\n } catch (err) {\n returnVal = null;\n console.warn(\"An error occured within custom function for \".concat(componentKey), err);\n }\n } else if (func) {\n console.warn(\"Unknown function type for \".concat(componentKey));\n }\n return returnVal;\n}\nfunction getRandomComponentId() {\n return \"e\".concat(Math.random().toString(36).substring(7));\n}\n\n/**\n * Get a property value of an element.\n *\n * @param style\n * @param prop\n * @return {number}\n */\nfunction getPropertyValue(style, prop) {\n var value = style.getPropertyValue(prop);\n value = value ? value.replace(/[^0-9.]/g, '') : '0';\n return parseFloat(value);\n}\n\n/**\n * Get an elements bounding rectagle.\n *\n * @param element\n * @return {{x: string, y: string, width: string, height: string}}\n */\nfunction getElementRect(element) {\n var 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}\n\n/**\n * Determines the boolean value of a setting.\n *\n * @param value\n * @return {boolean}\n */\nfunction boolValue(value) {\n if (_lodash[\"default\"].isBoolean(value)) {\n return value;\n } else if (_lodash[\"default\"].isString(value)) {\n return value.toLowerCase() === 'true';\n } else {\n return !!value;\n }\n}\n\n/**\n * Check to see if an ID is a mongoID.\n * @param text\n * @return {Array|{index: number, input: string}|Boolean|*}\n */\nfunction isMongoId(text) {\n return text.toString().match(/^[0-9a-fA-F]{24}$/);\n}\n\n/**\n * Checks the calculated value for a provided component and data.\n *\n * @param {Object} component\n * The component to check for the calculated value.\n * @param {Object} submission\n * A submission object.\n * @param data\n * The full submission data.\n */\nfunction checkCalculated(component, submission, rowData) {\n // Process calculated value stuff if present.\n if (component.calculateValue) {\n _lodash[\"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: component\n }, 'value'));\n }\n}\n\n/**\n * Check if a simple conditional evaluates to true.\n *\n * @param condition\n * @param condition\n * @param row\n * @param data\n * @param instance\n * @returns {boolean}\n */\nfunction checkSimpleConditional(component, condition, row, data, instance) {\n if (condition.when) {\n var value = getComponentActualValue(condition.when, data, row);\n var eq = String(condition.eq);\n var show = String(condition.show);\n\n // Special check for selectboxes component.\n if (_lodash[\"default\"].isObject(value) && _lodash[\"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 } else {\n var _condition$conditions = condition.conditions,\n conditions = _condition$conditions === void 0 ? [] : _condition$conditions,\n _condition$conjunctio = condition.conjunction,\n conjunction = _condition$conjunctio === void 0 ? 'all' : _condition$conjunctio,\n _condition$show = condition.show,\n _show = _condition$show === void 0 ? true : _condition$show;\n if (!conditions.length) {\n return true;\n }\n var conditionsResult = _lodash[\"default\"].map(conditions, function (cond) {\n var comparedValue = cond.value,\n operator = cond.operator,\n conditionComponentPath = cond.component;\n if (!conditionComponentPath) {\n return true;\n }\n var value = getComponentActualValue(conditionComponentPath, data, row);\n var СonditionOperator = _conditionOperators[\"default\"][operator];\n return СonditionOperator ? new СonditionOperator().getResult({\n value: value,\n comparedValue: comparedValue,\n instance: instance,\n component: component,\n conditionComponentPath: conditionComponentPath\n }) : true;\n });\n var result = false;\n switch (conjunction) {\n case 'any':\n result = _lodash[\"default\"].some(conditionsResult, function (res) {\n return !!res;\n });\n break;\n default:\n result = _lodash[\"default\"].every(conditionsResult, function (res) {\n return !!res;\n });\n }\n return _show ? result : !result;\n }\n}\nfunction getComponentActualValue(compPath, data, row) {\n var value = null;\n if (row) {\n value = (0, _formUtils.getValue)({\n data: row\n }, compPath);\n }\n if (data && _lodash[\"default\"].isNil(value)) {\n value = (0, _formUtils.getValue)({\n data: data\n }, compPath);\n }\n // FOR-400 - Fix issue where falsey values were being evaluated as show=true\n if (_lodash[\"default\"].isNil(value) || _lodash[\"default\"].isObject(value) && _lodash[\"default\"].isEmpty(value)) {\n value = '';\n }\n return value;\n}\n\n/**\n * Check custom javascript conditional.\n *\n * @param component\n * @param custom\n * @param row\n * @param data\n * @returns {*}\n */\nfunction checkCustomConditional(component, custom, row, data, form, variable, onError, instance) {\n if (typeof custom === 'string') {\n custom = \"var \".concat(variable, \" = true; \").concat(custom, \"; return \").concat(variable, \";\");\n }\n var value = instance && instance.evaluate ? instance.evaluate(custom, {\n row: row,\n data: data,\n form: form\n }) : evaluate(custom, {\n row: row,\n data: data,\n form: form\n });\n if (value === null) {\n return onError;\n }\n return value;\n}\nfunction checkJsonConditional(component, json, row, data, form, onError) {\n try {\n return _jsonLogicJs[\"default\"].apply(json, {\n data: data,\n row: row,\n form: form,\n _: _lodash[\"default\"]\n });\n } catch (err) {\n console.warn(\"An error occurred in jsonLogic advanced condition for \".concat(component.key), err);\n return onError;\n }\n}\nfunction getRow(component, row, instance, conditional) {\n var _condition$when;\n var 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[\"default\"].cloneDeep(component);\n setPathToComponentAndPerentSchema(instance);\n }\n var dataParent = getDataParentComponent(instance);\n var parentPath = dataParent ? getComponentPath(dataParent) : null;\n var isTriggerCondtionComponentPath = condition.when || !condition.conditions ? (_condition$when = condition.when) === null || _condition$when === void 0 ? void 0 : _condition$when.startsWith(parentPath) : _lodash[\"default\"].some(condition.conditions, function (cond) {\n return cond.component.startsWith(parentPath);\n });\n if (dataParent && isTriggerCondtionComponentPath) {\n var newRow = {};\n _lodash[\"default\"].set(newRow, parentPath, row);\n row = newRow;\n }\n return row;\n}\n\n/**\n * Checks the conditions for a provided component and data.\n *\n * @param component\n * The component to check for the condition.\n * @param row\n * The data within a row\n * @param data\n * The full submission data.\n *\n * @returns {boolean}\n */\nfunction checkCondition(component, row, data, form, instance) {\n var customConditional = component.customConditional,\n conditional = component.conditional;\n if (customConditional) {\n return checkCustomConditional(component, customConditional, row, data, form, 'show', true, instance);\n } else if (conditional && (conditional.when || _lodash[\"default\"].some(conditional.conditions || [], function (condition) {\n return condition.component && condition.operator;\n }))) {\n row = getRow(component, row, instance);\n return checkSimpleConditional(component, conditional, row, data, instance);\n } else if (conditional && conditional.json) {\n return checkJsonConditional(component, conditional.json, row, data, form, true);\n }\n\n // Default to show.\n return true;\n}\n\n/**\n * Test a trigger on a component.\n *\n * @param component\n * @param action\n * @param data\n * @param row\n * @returns {mixed}\n */\nfunction checkTrigger(component, trigger, row, data, form, instance) {\n // If trigger is empty, don't fire it\n if (!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}\nfunction setActionProperty(component, action, result, row, data, instance) {\n var property = action.property.value;\n switch (action.property.type) {\n case 'boolean':\n {\n var currentValue = _lodash[\"default\"].get(component, property, false).toString();\n var newValue = action.state.toString();\n if (currentValue !== newValue) {\n _lodash[\"default\"].set(component, property, newValue === 'true');\n }\n break;\n }\n case 'string':\n {\n var evalData = {\n data: data,\n row: row,\n component: component,\n result: result\n };\n var textValue = action.property.component ? action[action.property.component] : action.text;\n var _currentValue = _lodash[\"default\"].get(component, property, '');\n var _newValue = instance && instance.interpolate ? instance.interpolate(textValue, evalData) : _Evaluator[\"default\"].interpolate(textValue, evalData);\n if (_newValue !== _currentValue) {\n _lodash[\"default\"].set(component, property, _newValue);\n }\n break;\n }\n }\n return component;\n}\n\n/**\n * Unescape HTML characters like <, >, & and etc.\n * @param str\n * @returns {string}\n */\nfunction unescapeHTML(str) {\n if (typeof window === 'undefined' || !('DOMParser' in window)) {\n return str;\n }\n var doc = new window.DOMParser().parseFromString(str, 'text/html');\n return doc.documentElement.textContent;\n}\n\n/**\n * Make HTML element from string\n * @param str\n * @param selector\n * @returns {HTMLElement}\n */\n\nfunction convertStringToHTMLElement(str, selector) {\n var doc = new window.DOMParser().parseFromString(str, 'text/html');\n return doc.body.querySelector(selector);\n}\n\n/**\n * Make a filename guaranteed to be unique.\n * @param name\n * @param template\n * @param evalContext\n * @returns {string}\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 = \"\".concat(template, \"-{{guid}}\");\n }\n var parts = name.split('.');\n var fileName = parts.slice(0, parts.length - 1).join('.');\n var extension = parts.length > 1 ? \".\".concat(_lodash[\"default\"].last(parts)) : '';\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: fileName,\n guid: guid()\n });\n //only letters, numbers, dots, dashes, underscores and spaces are allowed. Anything else will be replaced with dash\n var uniqueName = \"\".concat(_Evaluator[\"default\"].interpolate(template, evalContext)).concat(extension).replace(/[^0-9a-zA-Z.\\-_ ]/g, '-');\n return uniqueName;\n}\nfunction guid() {\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\n var r = Math.random() * 16 | 0;\n var v = c === 'x' ? r : r & 0x3 | 0x8;\n return v.toString(16);\n });\n}\n\n/**\n * Return a translated date setting.\n *\n * @param date\n * @return {(null|Date)}\n */\nfunction getDateSetting(date) {\n if (_lodash[\"default\"].isNil(date) || _lodash[\"default\"].isNaN(date) || date === '') {\n return null;\n }\n if (date instanceof Date) {\n return date;\n } else if (typeof date.toDate === 'function') {\n return date.isValid() ? date.toDate() : null;\n }\n var dateSetting = typeof date !== 'string' || date.indexOf('moment(') === -1 ? (0, _momentTimezone[\"default\"])(date) : null;\n if (dateSetting && dateSetting.isValid()) {\n return dateSetting.toDate();\n }\n dateSetting = null;\n try {\n var value = _Evaluator[\"default\"].evaluator(\"return \".concat(date, \";\"), 'moment')(_momentTimezone[\"default\"]);\n if (typeof value === 'string') {\n dateSetting = (0, _momentTimezone[\"default\"])(value);\n } else if (typeof value.toDate === 'function') {\n dateSetting = (0, _momentTimezone[\"default\"])(value.toDate().toUTCString());\n } else if (value instanceof Date) {\n dateSetting = (0, _momentTimezone[\"default\"])(value);\n }\n } catch (e) {\n return null;\n }\n if (!dateSetting) {\n return null;\n }\n\n // Ensure this is a date.\n if (!dateSetting.isValid()) {\n return null;\n }\n return dateSetting.toDate();\n}\nfunction isValidDate(date) {\n return _lodash[\"default\"].isDate(date) && !_lodash[\"default\"].isNaN(date.getDate());\n}\n\n/**\n * Get the current timezone string.\n *\n * @return {string}\n */\nfunction currentTimezone() {\n if (_momentTimezone[\"default\"].currentTimezone) {\n return _momentTimezone[\"default\"].currentTimezone;\n }\n _momentTimezone[\"default\"].currentTimezone = _jstimezonedetect[\"default\"].determine().name();\n return _momentTimezone[\"default\"].currentTimezone;\n}\n\n/**\n * Get an offset date provided a date object and timezone object.\n *\n * @param date\n * @param timezone\n * @return {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 var dateMoment = (0, _momentTimezone[\"default\"])(date).tz(timezone);\n return {\n date: new Date(date.getTime() + (dateMoment.utcOffset() + date.getTimezoneOffset()) * 60000),\n abbr: dateMoment.format('z')\n };\n}\n\n/**\n * Returns if the zones are loaded.\n *\n * @return {boolean}\n */\nfunction zonesLoaded() {\n return _momentTimezone[\"default\"].zonesLoaded;\n}\n\n/**\n * Returns if we should load the zones.\n *\n * @param timezone\n * @return {boolean}\n */\nfunction shouldLoadZones(timezone) {\n if (timezone === currentTimezone() || timezone === 'UTC') {\n return false;\n }\n return true;\n}\n\n/**\n * Externally load the timezone data.\n *\n * @return {Promise | *}\n */\nfunction loadZones(url, timezone) {\n if (timezone && !shouldLoadZones(timezone)) {\n // Return non-resolving promise.\n return new _nativePromiseOnly[\"default\"](_lodash[\"default\"].noop);\n }\n if (_momentTimezone[\"default\"].zonesPromise) {\n return _momentTimezone[\"default\"].zonesPromise;\n }\n return _momentTimezone[\"default\"].zonesPromise = fetch(url).then(function (resp) {\n return resp.json().then(function (zones) {\n _momentTimezone[\"default\"].tz.load(zones);\n _momentTimezone[\"default\"].zonesLoaded = true;\n\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 });\n}\n\n/**\n * Get the moment date object for translating dates with timezones.\n *\n * @param value\n * @param format\n * @param timezone\n * @return {*}\n */\nfunction momentDate(value, format, timezone) {\n var momentDate = (0, _momentTimezone[\"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)/)) && _momentTimezone[\"default\"].zonesLoaded) {\n return momentDate.tz(timezone);\n }\n return momentDate;\n}\n\n/**\n * Format a date provided a value, format, and timezone object.\n *\n * @param value\n * @param format\n * @param timezone\n * @return {string}\n */\nfunction formatDate(timezonesUrl, value, format, timezone, flatPickrInputFormat) {\n var momentDate = (0, _momentTimezone[\"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 (_momentTimezone[\"default\"].zonesLoaded) {\n return momentDate.tz(timezone).format(convertFormatToMoment(format));\n } else {\n return momentDate.format(convertFormatToMoment(format.replace(/\\s(z$|z\\s)/, '')));\n }\n }\n\n // Return the standard format.\n return momentDate.format(convertFormatToMoment(format));\n }\n if (timezone === 'UTC') {\n var offset = offsetDate(momentDate.toDate(), 'UTC');\n return \"\".concat((0, _momentTimezone[\"default\"])(offset.date).format(convertFormatToMoment(format)), \" UTC\");\n }\n\n // Load the zones since we need timezone information.\n loadZones(timezonesUrl);\n if (_momentTimezone[\"default\"].zonesLoaded && timezone) {\n return momentDate.tz(timezone).format(\"\".concat(convertFormatToMoment(format), \" z\"));\n } else {\n return momentDate.format(convertFormatToMoment(format));\n }\n}\n\n/**\n * Pass a format function to format within a timezone.\n *\n * @param formatFn\n * @param date\n * @param format\n * @param timezone\n * @return {string}\n */\nfunction formatOffset(timezonesUrl, formatFn, date, format, timezone) {\n if (timezone === currentTimezone()) {\n return formatFn(date, format);\n }\n if (timezone === 'UTC') {\n return \"\".concat(formatFn(offsetDate(date, 'UTC').date, format), \" UTC\");\n }\n\n // Load the zones since we need timezone information.\n loadZones(timezonesUrl);\n if (_momentTimezone[\"default\"].zonesLoaded) {\n var offset = offsetDate(date, timezone);\n return \"\".concat(formatFn(offset.date, format), \" \").concat(offset.abbr);\n } else {\n return formatFn(date, format);\n }\n}\nfunction getLocaleDateFormatInfo(locale) {\n var formatInfo = {};\n var day = 21;\n var exampleDate = new Date(2017, 11, day);\n var localDateString = exampleDate.toLocaleDateString(locale);\n formatInfo.dayFirst = localDateString.slice(0, 2) === day.toString();\n return formatInfo;\n}\n\n/**\n * Convert the format from the angular-datepicker module to flatpickr format.\n * @param format\n * @return {string}\n */\nfunction convertFormatToFlatpickr(format) {\n return format\n // Remove the Z timezone offset, not supported by flatpickr.\n .replace(/Z/g, '')\n\n // Year conversion.\n .replace(/y/g, 'Y').replace('YYYY', 'Y').replace('YY', 'y')\n\n // Month conversion.\n .replace('MMMM', 'F').replace(/M/g, 'n').replace('nnn', 'M').replace('nn', 'm')\n\n // Day in month.\n .replace(/d/g, 'j').replace(/jj/g, 'd')\n\n // Day in week.\n .replace('EEEE', 'l').replace('EEE', 'D')\n\n // Hours, minutes, seconds\n .replace('HH', 'H').replace('hh', 'G').replace('mm', 'i').replace('ss', 'S').replace(/a/g, 'K');\n}\n\n/**\n * Convert the format from the angular-datepicker module to moment format.\n * @param format\n * @return {string}\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}\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 // Year conversion.\n .replace(/[ydhmsHMG]/g, '9')\n // AM/PM conversion.\n .replace(/a/g, 'AA');\n}\n\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 var maskArray = [];\n maskArray.numeric = true;\n for (var 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}\nfunction unmaskValue(value, mask, placeholderChar) {\n if (!mask || !value || value.length > mask.length) {\n return value;\n }\n var unmaskedValue = value.split('');\n for (var i = 0; i < mask.length; i++) {\n var _char = value[i] || '';\n var charPart = mask[i];\n if (!_lodash[\"default\"].isRegExp(charPart) && _char === charPart) {\n unmaskedValue[i] = '';\n }\n }\n unmaskedValue = unmaskedValue.join('').replace(placeholderChar, '');\n return unmaskedValue;\n}\nfunction matchInputMask(value, inputMask) {\n if (!inputMask) {\n return true;\n }\n\n // If value is longer than mask, it isn't valid.\n if (value.length > inputMask.length) {\n return false;\n }\n for (var i = 0; i < inputMask.length; i++) {\n var _char2 = value[i] || '';\n var charPart = inputMask[i];\n if (!(_lodash[\"default\"].isRegExp(charPart) && charPart.test(_char2) || charPart === _char2)) {\n return false;\n }\n }\n return true;\n}\nfunction getNumberSeparators() {\n var lang = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'en';\n var formattedNumberString = 12345.6789.toLocaleString(lang);\n var 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}\nfunction getNumberDecimalLimit(component, defaultLimit) {\n if (_lodash[\"default\"].has(component, 'decimalLimit')) {\n return _lodash[\"default\"].get(component, 'decimalLimit');\n }\n // Determine the decimal limit. Defaults to 20 but can be overridden by validate.step or decimalLimit settings.\n var decimalLimit = defaultLimit || 20;\n var step = _lodash[\"default\"].get(component, 'validate.step', 'any');\n if (step !== 'any') {\n var parts = step.toString().split('.');\n if (parts.length > 1) {\n decimalLimit = parts[1].length;\n }\n }\n return decimalLimit;\n}\nfunction getCurrencyAffixes(_ref) {\n var _ref$currency = _ref.currency,\n currency = _ref$currency === void 0 ? 'USD' : _ref$currency,\n decimalLimit = _ref.decimalLimit,\n decimalSeparator = _ref.decimalSeparator,\n lang = _ref.lang;\n // Get the prefix and suffix from the localized string.\n var regex = \"(.*)?\".concat(100 .toLocaleString(lang));\n if (decimalLimit) {\n regex += \"\".concat(decimalSeparator === '.' ? '\\\\.' : decimalSeparator).concat(0 .toLocaleString(lang), \"{\").concat(decimalLimit, \"}\");\n }\n regex += '(.*)?';\n var parts = 100 .toLocaleString(lang, {\n style: 'currency',\n currency: currency,\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}\n\n/**\n * Fetch the field data provided a component.\n *\n * @param data\n * @param component\n * @return {*}\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 var value = data;\n var parts = component.key.split('.');\n var key = '';\n for (var i = 0; i < parts.length; i++) {\n key = parts[i];\n\n // Handle nested resources\n if (value.hasOwnProperty('_id')) {\n value = value.data;\n }\n\n // Return if the key is not found on the value.\n if (!value.hasOwnProperty(key)) {\n return;\n }\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\n // Set the value of this key.\n value = value[key];\n }\n return value;\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\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}\n\n/**\n * Delays function execution with possibility to execute function synchronously or cancel it.\n *\n * @param fn Function to delay\n * @param delay Delay time\n * @return {*}\n */\nfunction delay(fn) {\n var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n args[_key - 2] = arguments[_key];\n }\n var timer = setTimeout.apply(void 0, [fn, delay].concat(args));\n function cancel() {\n clearTimeout(timer);\n }\n function earlyCall() {\n cancel();\n return fn.apply(void 0, args);\n }\n earlyCall.timer = timer;\n earlyCall.cancel = cancel;\n return earlyCall;\n}\n\n/**\n * Iterate the given key to make it unique.\n *\n * @param {String} key\n * Modify the component key to be unique.\n *\n * @returns {String}\n * The new component key.\n */\nfunction iterateKey(key) {\n if (!key.match(/(\\d+)$/)) {\n return \"\".concat(key, \"1\");\n }\n return key.replace(/(\\d+)$/, function (suffix) {\n return Number(suffix) + 1;\n });\n}\n\n/**\n * Determines a unique key within a map provided the base key.\n *\n * @param map\n * @param base\n * @return {*}\n */\nfunction uniqueKey(map, base) {\n var newKey = base;\n while (map.hasOwnProperty(newKey)) {\n newKey = iterateKey(newKey);\n }\n return newKey;\n}\n\n/**\n * Determines the major version number of bootstrap.\n *\n * @return {number}\n */\nfunction bootstrapVersion(options) {\n if (options.bootstrap) {\n return options.bootstrap;\n }\n if (typeof $ === 'function' && typeof $().collapse === 'function') {\n return parseInt($.fn.collapse.Constructor.VERSION.split('.')[0], 10);\n }\n return 0;\n}\n\n/**\n * Retrun provided argument.\n * If argument is a function, returns the result of a function call.\n * @param {*} e;\n *\n * @return {*}\n */\nfunction unfold(e) {\n if (typeof e === 'function') {\n return e();\n }\n return e;\n}\n\n/**\n * Map values through unfold and return first non-nil value.\n * @param {Array} collection;\n *\n * @return {T}\n */\nvar firstNonNil = _lodash[\"default\"].flow([_lodash[\"default\"].partialRight(_lodash[\"default\"].map, unfold), _lodash[\"default\"].partialRight(_lodash[\"default\"].find, function (v) {\n return !_lodash[\"default\"].isUndefined(v);\n})]);\n\n/*\n * Create enclosed state.\n * Returns functions to getting and cycling between states.\n * @param {*} a - initial state.\n * @param {*} b - next state.\n * @return {Functions[]} -- [get, toggle];\n */\nexports.firstNonNil = firstNonNil;\nfunction withSwitch(a, b) {\n var state = a;\n var next = b;\n function get() {\n return state;\n }\n function toggle() {\n var prev = state;\n state = next;\n next = prev;\n }\n return [get, toggle];\n}\nfunction observeOverload(callback) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var _options$limit = options.limit,\n limit = _options$limit === void 0 ? 50 : _options$limit,\n _options$delay = options.delay,\n delay = _options$delay === void 0 ? 500 : _options$delay;\n var callCount = 0;\n var timeoutID = 0;\n var reset = function reset() {\n return callCount = 0;\n };\n return function () {\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}\nfunction getContextComponents(context, excludeNested) {\n var excludedTypes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n var values = [];\n context.utils.eachComponent(context.instance.options.editForm.components, function (component, path) {\n var addToContextComponents = excludeNested ? !component.tree : true;\n if (component.key !== context.data.key && addToContextComponents && !_lodash[\"default\"].includes(excludedTypes, component.type)) {\n values.push({\n label: \"\".concat(component.label || component.key, \" (\").concat(path, \")\"),\n value: path\n });\n }\n });\n return values;\n}\nfunction getContextButtons(context) {\n var values = [];\n context.utils.eachComponent(context.instance.options.editForm.components, function (component) {\n if (component.type === 'button') {\n values.push({\n label: \"\".concat(component.key, \" (\").concat(component.label, \")\"),\n value: component.key\n });\n }\n });\n return values;\n}\n\n// Tags that could be in text, that should be ommited or handled in a special way\nvar inTextTags = ['#text', 'A', 'B', 'EM', 'I', 'SMALL', 'STRONG', 'SUB', 'SUP', 'INS', 'DEL', 'MARK', 'CODE'];\n\n/**\n * Helper function for 'translateHTMLTemplate'. Translates text value of the passed html element.\n *\n * @param {HTMLElement} elem\n * @param {Function} translate\n *\n * @returns {String}\n * Translated element template.\n */\nfunction translateElemValue(elem, translate) {\n if (!elem.innerText) {\n return elem.innerHTML;\n }\n var elemValue = elem.innerText.replace(_Evaluator[\"default\"].templateSettings.interpolate, '').replace(/\\s\\s+/g, ' ').trim();\n var translatedValue = translate(elemValue);\n if (elemValue !== translatedValue) {\n var links = elem.innerHTML.match(/]*>(.*?)<\\/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 var translatedLinks = links.map(function (link) {\n var linkElem = document.createElement('a');\n linkElem.innerHTML = link;\n return translateElemValue(linkElem, translate);\n });\n return \"\".concat(translatedValue, \" (\").concat(translatedLinks.join(', '), \")\");\n } else {\n return elem.innerText.replace(elemValue, translatedValue);\n }\n } else {\n return elem.innerHTML;\n }\n}\n\n/**\n * Helper function for 'translateHTMLTemplate'. Goes deep through html tag children and calls function to translate their text values.\n *\n * @param {HTMLElement} tag\n * @param {Function} translate\n *\n * @returns {void}\n */\nfunction translateDeepTag(tag, translate) {\n var children = tag.children.length && _toConsumableArray(tag.children);\n var shouldTranslateEntireContent = children && children.every(function (child) {\n return child.children.length === 0 && inTextTags.some(function (tag) {\n return child.nodeName === tag;\n });\n });\n if (!children || shouldTranslateEntireContent) {\n tag.innerHTML = translateElemValue(tag, translate);\n } else {\n children.forEach(function (child) {\n return translateDeepTag(child, translate);\n });\n }\n}\n\n/**\n * Translates text values in html template.\n *\n * @param {String} template\n * @param {Function} translate\n *\n * @returns {String}\n * Html template with translated values.\n */\nfunction translateHTMLTemplate(template, translate) {\n var isHTML = /<[^>]*>/.test(template);\n if (!isHTML) {\n return translate(template);\n }\n var 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}\n\n/**\n * Sanitize an html string.\n *\n * @param string\n * @returns {*}\n */\nfunction sanitize(string, options) {\n if (typeof _dompurify[\"default\"].sanitize !== 'function') {\n return string;\n }\n // Dompurify configuration\n var sanitizeOptions = {\n ADD_ATTR: ['ref', 'target'],\n USE_PROFILES: {\n html: true\n }\n };\n // Add attrs\n if (options.sanitizeConfig && Array.isArray(options.sanitizeConfig.addAttr) && options.sanitizeConfig.addAttr.length > 0) {\n options.sanitizeConfig.addAttr.forEach(function (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[\"default\"].sanitize(string, sanitizeOptions);\n}\n\n/**\n * Fast cloneDeep for JSON objects only.\n */\nfunction fastCloneDeep(obj) {\n return obj ? JSON.parse(JSON.stringify(obj)) : obj;\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}\nfunction getArrayFromComponentPath(pathStr) {\n if (!pathStr || !_lodash[\"default\"].isString(pathStr)) {\n if (!_lodash[\"default\"].isArray(pathStr)) {\n return [pathStr];\n }\n return pathStr;\n }\n return pathStr.replace(/[[\\]]/g, '.').replace(/\\.\\./g, '.').replace(/(^\\.)|(\\.$)/g, '').split('.').map(function (part) {\n return _lodash[\"default\"].defaultTo(_lodash[\"default\"].toNumber(part), part);\n });\n}\nfunction hasInvalidComponent(component) {\n return component.getComponents().some(function (comp) {\n if (_lodash[\"default\"].isArray(comp.components)) {\n return hasInvalidComponent(comp);\n }\n return comp.error;\n });\n}\nfunction getStringFromComponentPath(path) {\n if (!_lodash[\"default\"].isArray(path)) {\n return path;\n }\n var strPath = '';\n path.forEach(function (part, i) {\n if (_lodash[\"default\"].isNumber(part)) {\n strPath += \"[\".concat(part, \"]\");\n } else {\n strPath += i === 0 ? part : \".\".concat(part);\n }\n });\n return strPath;\n}\nfunction round(number, precision) {\n if (_lodash[\"default\"].isNumber(number)) {\n return number.toFixed(precision);\n }\n return number;\n}\n\n/**\n * Check for Internet Explorer browser version\n *\n * @return {(number|null)}\n */\nfunction getIEBrowserVersion() {\n var _getBrowserInfo = getBrowserInfo(),\n ie = _getBrowserInfo.ie,\n version = _getBrowserInfo.version;\n return ie ? version : null;\n}\n\n/**\n * Get browser name and version (modified from 'jquery-browser-plugin')\n *\n * @return {Object} -- {{browser name, version, isWebkit?}}\n * Possible browser names: chrome, safari, ie, edge, opera, mozilla, yabrowser\n */\nfunction getBrowserInfo() {\n var browser = {};\n if (typeof window === 'undefined') {\n return browser;\n }\n var ua = window.navigator.userAgent.toLowerCase();\n var match = /(edge|edg)\\/([\\w.]+)/.exec(ua) || /(opr)[/]([\\w.]+)/.exec(ua) || /(yabrowser)[ /]([\\w.]+)/.exec(ua) || /(chrome)[ /]([\\w.]+)/.exec(ua) || /(iemobile)[/]([\\w.]+)/.exec(ua) || /(version)(applewebkit)[ /]([\\w.]+).*(safari)[ /]([\\w.]+)/.exec(ua) || /(webkit)[ /]([\\w.]+).*(version)[ /]([\\w.]+).*(safari)[ /]([\\w.]+)/.exec(ua) || /(webkit)[ /]([\\w.]+)/.exec(ua) || /(opera)(?:.*version|)[ /]([\\w.]+)/.exec(ua) || /(msie) ([\\w.]+)/.exec(ua) || ua.indexOf('trident') >= 0 && /(rv)(?::| )([\\w.]+)/.exec(ua) || ua.indexOf('compatible') < 0 && /(mozilla)(?:.*? rv:([\\w.]+)|)/.exec(ua) || [];\n var 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}\nfunction getComponentPathWithoutIndicies() {\n var path = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n return path.replace(/\\[\\d+\\]/, '');\n}\n\n/**\n * Returns a path to the component which based on its schema\n * @param {*} component is a component's schema containing link to its parent's schema in the 'parent' property\n */\nfunction getComponentPath(component) {\n var _component$_form;\n var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n if (!component || !component.key || (component === null || component === void 0 ? void 0 : (_component$_form = component._form) === null || _component$_form === void 0 ? void 0 : _component$_form.display) === 'wizard') {\n // 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 ? \"\".concat(component.key).concat(path ? '.' : '').concat(path) : path;\n return getComponentPath(component.parent, path);\n}\n\n/**\n * Returns a parent component of the passed component instance skipping all the Layout components\n * @param {*} componentInstance\n * @return {(Component|undefined)}\n */\nfunction getDataParentComponent(componentInstance) {\n if (!componentInstance) {\n return;\n }\n var parent = componentInstance.parent;\n if (parent && (parent.isInputComponent || parent.input)) {\n return parent;\n } else {\n return getDataParentComponent(parent);\n }\n}\n\n/**\n * Returns whether the value is a promise\n * @param value\n * @return {boolean}\n */\nfunction isPromise(value) {\n return value && value.then && typeof value.then === 'function' && Object.prototype.toString.call(value) === '[object Promise]';\n}\n\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 componentInstance\n * @param firstPass\n * @returns {boolean|boolean|*}\n */\nfunction isInsideScopingComponent(componentInstance) {\n var firstPass = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n if (!firstPass && componentInstance !== null && componentInstance !== void 0 && componentInstance.hasScopedChildren) {\n return true;\n }\n var dataParent = getDataParentComponent(componentInstance);\n if (dataParent !== null && dataParent !== void 0 && dataParent.hasScopedChildren) {\n return true;\n } else if (dataParent !== null && dataParent !== void 0 && dataParent.parent) {\n return isInsideScopingComponent(dataParent.parent, false);\n }\n return false;\n}\nfunction getFocusableElements(element) {\n var focusableSelector = \"button:not([disabled]), input:not([disabled]), select:not([disabled]),\\n textarea:not([disabled]), button:not([disabled]), [href]\";\n return element.querySelectorAll(focusableSelector);\n}\n\n// Export lodash to save space with other libraries.\n\n//# sourceURL=webpack://Formio/./lib/utils/utils.js?"); /***/ }), @@ -4246,7 +4783,7 @@ eval("\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modul /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptors.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _index = _interopRequireDefault(__webpack_require__(/*! ./rules/index */ \"./lib/validator/rules/index.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar Rules = /*#__PURE__*/function () {\n function Rules() {\n _classCallCheck(this, Rules);\n }\n\n _createClass(Rules, null, [{\n key: \"addRule\",\n value: function addRule(name, rule) {\n Rules.rules[name] = rule;\n }\n }, {\n key: \"addRules\",\n value: function addRules(rules) {\n Rules.rules = _objectSpread(_objectSpread({}, Rules.rules), rules);\n }\n }, {\n key: \"getRule\",\n value: function getRule(name) {\n return Rules.rules[name];\n }\n }, {\n key: \"getRules\",\n value: function getRules() {\n return Rules.rules;\n }\n }]);\n\n return Rules;\n}();\n\nexports[\"default\"] = Rules;\n\n_defineProperty(Rules, \"rules\", _index.default);\n\n//# sourceURL=webpack://Formio/./lib/validator/Rules.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptors.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-properties.js */ \"./node_modules/core-js/modules/es.object.define-properties.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\nvar _index = _interopRequireDefault(__webpack_require__(/*! ./rules/index */ \"./lib/validator/rules/index.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar Rules = /*#__PURE__*/function () {\n function Rules() {\n _classCallCheck(this, Rules);\n }\n _createClass(Rules, null, [{\n key: \"addRule\",\n value: function addRule(name, rule) {\n Rules.rules[name] = rule;\n }\n }, {\n key: \"addRules\",\n value: function addRules(rules) {\n Rules.rules = _objectSpread(_objectSpread({}, Rules.rules), rules);\n }\n }, {\n key: \"getRule\",\n value: function getRule(name) {\n return Rules.rules[name];\n }\n }, {\n key: \"getRules\",\n value: function getRules() {\n return Rules.rules;\n }\n }]);\n return Rules;\n}();\nexports[\"default\"] = Rules;\n_defineProperty(Rules, \"rules\", _index[\"default\"]);\n\n//# sourceURL=webpack://Formio/./lib/validator/Rules.js?"); /***/ }), @@ -4257,7 +4794,7 @@ eval("\n\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.slice.js */ \"./node_modules/core-js/modules/es.array.slice.js\");\n\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.from.js */ \"./node_modules/core-js/modules/es.array.from.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = exports.ValidationChecker = void 0;\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.split.js */ \"./node_modules/core-js/modules/es.string.split.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.constructor.js */ \"./node_modules/core-js/modules/es.regexp.constructor.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.includes.js */ \"./node_modules/core-js/modules/es.array.includes.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.includes.js */ \"./node_modules/core-js/modules/es.string.includes.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.join.js */ \"./node_modules/core-js/modules/es.array.join.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n\n__webpack_require__(/*! core-js/modules/es.number.is-nan.js */ \"./node_modules/core-js/modules/es.number.is-nan.js\");\n\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.trim.js */ \"./node_modules/core-js/modules/es.string.trim.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.match.js */ \"./node_modules/core-js/modules/es.string.match.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.values.js */ \"./node_modules/core-js/modules/es.object.values.js\");\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nvar _utils = __webpack_require__(/*! ../utils/utils */ \"./lib/utils/utils.js\");\n\nvar _moment = _interopRequireDefault(__webpack_require__(/*! moment */ \"./node_modules/moment/moment.js\"));\n\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\n\nvar _fetchPonyfill2 = _interopRequireDefault(__webpack_require__(/*! fetch-ponyfill */ \"./node_modules/fetch-ponyfill/build/fetch-browser.js\"));\n\nvar _calendarUtils = __webpack_require__(/*! ../utils/calendarUtils */ \"./lib/utils/calendarUtils.js\");\n\nvar _Rules = _interopRequireDefault(__webpack_require__(/*! ./Rules */ \"./lib/validator/Rules.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { 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\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nvar _fetchPonyfill = (0, _fetchPonyfill2.default)({\n Promise: _nativePromiseOnly.default\n}),\n fetch = _fetchPonyfill.fetch,\n Headers = _fetchPonyfill.Headers,\n Request = _fetchPonyfill.Request;\n\nvar ValidationChecker = /*#__PURE__*/function () {\n function ValidationChecker() {\n var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n _classCallCheck(this, ValidationChecker);\n\n this.config = _lodash.default.defaults(config, ValidationChecker.config);\n this.validators = {\n required: {\n key: 'validate.required',\n method: 'validateRequired',\n hasLabel: true,\n message: function message(component) {\n return component.t(component.errorMessage('required'), {\n field: component.errorLabel,\n data: component.data\n });\n },\n check: function check(component, setting, value) {\n if (!(0, _utils.boolValue)(setting) || component.isValueHidden()) {\n return true;\n }\n\n var isCalendar = component.validators.some(function (validator) {\n return validator === 'calendar';\n });\n\n if (!value && isCalendar && component.widget.enteredDate) {\n return !this.validators.calendar.check.call(this, component, setting, value);\n }\n\n return !component.isEmpty(value);\n }\n },\n onlyAvailableItems: {\n key: 'validate.onlyAvailableItems',\n method: 'validateValueAvailability',\n hasLabel: true,\n message: function message(component) {\n return component.t(component.errorMessage('valueIsNotAvailable'), {\n field: component.errorLabel,\n data: component.data\n });\n },\n check: function check(component, setting) {\n return !(0, _utils.boolValue)(setting);\n }\n },\n unique: {\n key: 'validate.unique',\n hasLabel: true,\n message: function message(component) {\n return component.t(component.errorMessage('unique'), {\n field: component.errorLabel,\n data: component.data\n });\n },\n check: function check(component, setting, value) {\n var _this = this;\n\n // Skip if setting is falsy\n if (!(0, _utils.boolValue)(setting)) {\n return true;\n } // Skip if value is empty object or falsy\n\n\n if (!value || _lodash.default.isObjectLike(value) && _lodash.default.isEmpty(value)) {\n return true;\n } // Skip if we don't have a database connection\n\n\n if (!this.config.db) {\n return true;\n }\n\n return new _nativePromiseOnly.default(function (resolve) {\n var form = _this.config.form;\n var submission = _this.config.submission;\n var path = \"data.\".concat(component.path);\n\n var addPathQueryParams = function addPathQueryParams(pathQueryParams, query, path) {\n var pathArray = path.split(/\\[\\d+\\]?./);\n var needValuesInArray = pathArray.length > 1;\n var pathToValue = path;\n\n if (needValuesInArray) {\n pathToValue = pathArray.shift();\n var pathQueryObj = {};\n\n _lodash.default.reduce(pathArray, function (pathQueryPath, pathPart, index) {\n var isLastPathPart = index === pathArray.length - 1;\n\n var obj = _lodash.default.get(pathQueryObj, pathQueryPath, pathQueryObj);\n\n var addedPath = \"$elemMatch['\".concat(pathPart, \"']\");\n\n _lodash.default.set(obj, addedPath, isLastPathPart ? pathQueryParams : {});\n\n return pathQueryPath ? \"\".concat(pathQueryPath, \".\").concat(addedPath) : addedPath;\n }, '');\n\n query[pathToValue] = pathQueryObj;\n } else {\n query[pathToValue] = pathQueryParams;\n }\n }; // Build the query\n\n\n var query = {\n form: form._id\n };\n\n if (_lodash.default.isString(value)) {\n if (component.component.dbIndex) {\n addPathQueryParams(value, query, path);\n } else {\n addPathQueryParams({\n $regex: new RegExp(\"^\".concat((0, _utils.escapeRegExCharacters)(value), \"$\")),\n $options: 'i'\n }, query, path);\n }\n } // FOR-213 - Pluck the unique location id\n else if (_lodash.default.isPlainObject(value) && value.address && value.address['address_components'] && value.address['place_id']) {\n addPathQueryParams({\n $regex: new RegExp(\"^\".concat((0, _utils.escapeRegExCharacters)(value.address['place_id']), \"$\")),\n $options: 'i'\n }, query, \"\".concat(path, \".address.place_id\"));\n } // Compare the contents of arrays vs the order.\n else if (_lodash.default.isArray(value)) {\n addPathQueryParams({\n $all: value\n }, query, path);\n } else if (_lodash.default.isObject(value) || _lodash.default.isNumber(value)) {\n addPathQueryParams({\n $eq: value\n }, query, path);\n } // Only search for non-deleted items\n\n\n query.deleted = {\n $eq: null\n }; // Try to find an existing value within the form\n\n _this.config.db.findOne(query, function (err, result) {\n if (err) {\n return resolve(false);\n } else if (result) {\n // Only OK if it matches the current submission\n if (submission._id && result._id.toString() === submission._id) {\n resolve(true);\n } else {\n component.conflictId = result._id.toString();\n return resolve(false);\n }\n } else {\n return resolve(true);\n }\n });\n }).catch(function () {\n return false;\n });\n }\n },\n multiple: {\n key: 'validate.multiple',\n hasLabel: true,\n message: function message(component) {\n var shouldBeArray = (0, _utils.boolValue)(component.component.multiple) || Array.isArray(component.emptyValue);\n var isRequired = component.component.validate.required;\n var messageKey = shouldBeArray ? isRequired ? 'array_nonempty' : 'array' : 'nonarray';\n return component.t(component.errorMessage(messageKey), {\n field: component.errorLabel,\n data: component.data\n });\n },\n check: function check(component, setting, value) {\n // Skip multiple validation if the component tells us to\n if (!component.validateMultiple()) {\n return true;\n }\n\n var shouldBeArray = (0, _utils.boolValue)(setting);\n var canBeArray = Array.isArray(component.emptyValue);\n var isArray = Array.isArray(value);\n var isRequired = component.component.validate.required;\n\n if (shouldBeArray) {\n if (isArray) {\n return isRequired ? !!value.length : true;\n } else {\n // Null/undefined is ok if this value isn't required; anything else should fail\n return _lodash.default.isNil(value) ? !isRequired : false;\n }\n } else {\n return canBeArray || !isArray;\n }\n }\n },\n select: {\n key: 'validate.select',\n hasLabel: true,\n message: function message(component) {\n return component.t(component.errorMessage('select'), {\n field: component.errorLabel,\n data: component.data\n });\n },\n check: function check(component, setting, value, data, index, row, async) {\n // Skip if setting is falsy\n if (!(0, _utils.boolValue)(setting)) {\n return true;\n } // Skip if value is empty\n\n\n if (!value || _lodash.default.isEmpty(value)) {\n return true;\n } // Skip if we're not async-capable\n\n\n if (!async) {\n return true;\n }\n\n var schema = component.component; // Initialize the request options\n\n var requestOptions = {\n url: setting,\n method: 'GET',\n qs: {},\n json: true,\n headers: {}\n }; // If the url is a boolean value\n\n if (_lodash.default.isBoolean(requestOptions.url)) {\n requestOptions.url = !!requestOptions.url;\n\n if (!requestOptions.url || schema.dataSrc !== 'url' || !schema.data.url || !schema.searchField) {\n return true;\n } // Get the validation url\n\n\n requestOptions.url = schema.data.url; // Add the search field\n\n requestOptions.qs[schema.searchField] = value; // Add the filters\n\n if (schema.filter) {\n requestOptions.url += (!requestOptions.url.includes('?') ? '?' : '&') + schema.filter;\n } // If they only wish to return certain fields.\n\n\n if (schema.selectFields) {\n requestOptions.qs.select = schema.selectFields;\n }\n }\n\n if (!requestOptions.url) {\n return true;\n } // Make sure to interpolate.\n\n\n requestOptions.url = (0, _utils.interpolate)(requestOptions.url, {\n data: component.data\n }); // Add query string to URL\n\n requestOptions.url += (requestOptions.url.includes('?') ? '&' : '?') + _lodash.default.chain(requestOptions.qs).map(function (val, key) {\n return \"\".concat(encodeURIComponent(key), \"=\").concat(encodeURIComponent(val));\n }).join('&').value(); // Set custom headers.\n\n if (schema.data && schema.data.headers) {\n _lodash.default.each(schema.data.headers, function (header) {\n if (header.key) {\n requestOptions.headers[header.key] = header.value;\n }\n });\n } // Set form.io authentication.\n\n\n if (schema.authenticate && this.config.token) {\n requestOptions.headers['x-jwt-token'] = this.config.token;\n }\n\n return fetch(new Request(requestOptions.url, {\n headers: new Headers(requestOptions.headers)\n })).then(function (response) {\n if (!response.ok) {\n return false;\n }\n\n return response.json();\n }).then(function (results) {\n return results && results.length;\n }).catch(function () {\n return false;\n });\n }\n },\n min: {\n key: 'validate.min',\n hasLabel: true,\n message: function message(component, setting) {\n return component.t(component.errorMessage('min'), {\n field: component.errorLabel,\n min: parseFloat(setting),\n data: component.data\n });\n },\n check: function check(component, setting, value) {\n var min = parseFloat(setting);\n var parsedValue = parseFloat(value);\n\n if (Number.isNaN(min) || Number.isNaN(parsedValue)) {\n return true;\n }\n\n return parsedValue >= min;\n }\n },\n max: {\n key: 'validate.max',\n hasLabel: true,\n message: function message(component, setting) {\n return component.t(component.errorMessage('max'), {\n field: component.errorLabel,\n max: parseFloat(setting),\n data: component.data\n });\n },\n check: function check(component, setting, value) {\n var max = parseFloat(setting);\n var parsedValue = parseFloat(value);\n\n if (Number.isNaN(max) || Number.isNaN(parsedValue)) {\n return true;\n }\n\n return parsedValue <= max;\n }\n },\n minSelectedCount: {\n key: 'validate.minSelectedCount',\n message: function message(component, setting) {\n return component.component.minSelectedCountMessage ? component.component.minSelectedCountMessage : component.t(component.errorMessage('minSelectedCount'), {\n minCount: parseFloat(setting),\n data: component.data\n });\n },\n check: function check(component, setting, value) {\n var min = parseFloat(setting);\n\n if (!min) {\n return true;\n }\n\n var count = Object.keys(value).reduce(function (total, key) {\n if (value[key]) {\n total++;\n }\n\n return total;\n }, 0); // Should not be triggered if there is no options selected at all\n\n return !count || count >= min;\n }\n },\n maxSelectedCount: {\n key: 'validate.maxSelectedCount',\n message: function message(component, setting) {\n return component.component.maxSelectedCountMessage ? component.component.maxSelectedCountMessage : component.t(component.errorMessage('maxSelectedCount'), {\n minCount: parseFloat(setting),\n data: component.data\n });\n },\n check: function check(component, setting, value) {\n var max = parseFloat(setting);\n\n if (!max) {\n return true;\n }\n\n var count = Object.keys(value).reduce(function (total, key) {\n if (value[key]) {\n total++;\n }\n\n return total;\n }, 0);\n return count <= max;\n }\n },\n minLength: {\n key: 'validate.minLength',\n hasLabel: true,\n message: function message(component, setting) {\n return component.t(component.errorMessage('minLength'), {\n field: component.errorLabel,\n length: setting,\n data: component.data\n });\n },\n check: function check(component, setting, value) {\n var minLength = parseInt(setting, 10);\n\n if (!value || !minLength || typeof value !== 'string' || component.isEmpty(value)) {\n return true;\n }\n\n return value.length >= minLength;\n }\n },\n maxLength: {\n key: 'validate.maxLength',\n hasLabel: true,\n message: function message(component, setting) {\n return component.t(component.errorMessage('maxLength'), {\n field: component.errorLabel,\n length: setting,\n data: component.data\n });\n },\n check: function check(component, setting, value) {\n var maxLength = parseInt(setting, 10);\n\n if (!maxLength || typeof value !== 'string') {\n return true;\n }\n\n return value.length <= maxLength;\n }\n },\n maxWords: {\n key: 'validate.maxWords',\n hasLabel: true,\n message: function message(component, setting) {\n return component.t(component.errorMessage('maxWords'), {\n field: component.errorLabel,\n length: setting,\n data: component.data\n });\n },\n check: function check(component, setting, value) {\n var maxWords = parseInt(setting, 10);\n\n if (!maxWords || typeof value !== 'string') {\n return true;\n }\n\n return value.trim().split(/\\s+/).length <= maxWords;\n }\n },\n minWords: {\n key: 'validate.minWords',\n hasLabel: true,\n message: function message(component, setting) {\n return component.t(component.errorMessage('minWords'), {\n field: component.errorLabel,\n length: setting,\n data: component.data\n });\n },\n check: function check(component, setting, value) {\n var minWords = parseInt(setting, 10);\n\n if (!minWords || !value || typeof value !== 'string') {\n return true;\n }\n\n return value.trim().split(/\\s+/).length >= minWords;\n }\n },\n email: {\n hasLabel: true,\n message: function message(component) {\n return component.t(component.errorMessage('invalid_email'), {\n field: component.errorLabel,\n data: component.data\n });\n },\n check: function check(component, setting, value) {\n /* eslint-disable max-len */\n // From http://stackoverflow.com/questions/46155/validate-email-address-in-javascript\n var re = /^(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\n /* eslint-enable max-len */\n // Allow emails to be valid if the component is pristine and no value is provided.\n\n return !value || re.test(value);\n }\n },\n url: {\n hasLabel: true,\n message: function message(component) {\n return component.t(component.errorMessage('invalid_url'), {\n field: component.errorLabel,\n data: component.data\n });\n },\n check: function check(component, setting, value) {\n /* eslint-disable max-len */\n // From https://stackoverflow.com/questions/8667070/javascript-regular-expression-to-validate-url\n var re = /^(?:(?:(?:https?|ftp):)?\\/\\/)?(?:\\S+(?::\\S*)?@)?(?:(?!(?:10|127)(?:\\.\\d{1,3}){3})(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:[/?#]\\S*)?$/i; // From http://stackoverflow.com/questions/46155/validate-email-address-in-javascript\n\n var emailRe = /^(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\n /* eslint-enable max-len */\n // Allow urls to be valid if the component is pristine and no value is provided.\n\n return !value || re.test(value) && !emailRe.test(value);\n }\n },\n date: {\n hasLabel: true,\n message: function message(component) {\n return component.t(component.errorMessage('invalid_date'), {\n field: component.errorLabel,\n data: component.data\n });\n },\n check: function check(component, setting, value) {\n return value !== 'Invalid date';\n }\n },\n day: {\n hasLabel: true,\n message: function message(component) {\n return component.t(component.errorMessage('invalid_day'), {\n field: component.errorLabel,\n data: component.data\n });\n },\n check: function check(component, setting, value) {\n if (!value) {\n return true;\n }\n\n var _ref = component.dayFirst ? [0, 1, 2] : [1, 0, 2],\n _ref2 = _slicedToArray(_ref, 3),\n DAY = _ref2[0],\n MONTH = _ref2[1],\n YEAR = _ref2[2];\n\n var values = value.split('/').map(function (x) {\n return parseInt(x, 10);\n }),\n day = values[DAY],\n month = values[MONTH],\n year = values[YEAR],\n maxDay = getDaysInMonthCount(month, year);\n\n if (day < 0 || day > maxDay) {\n return false;\n }\n\n if (month < 0 || month > 12) {\n return false;\n }\n\n if (year < 0 || year > 9999) {\n return false;\n }\n\n return true;\n\n function isLeapYear(year) {\n // Year is leap if it is evenly divisible by 400 or evenly divisible by 4 and not evenly divisible by 100.\n return !(year % 400) || !!(year % 100) && !(year % 4);\n }\n\n function getDaysInMonthCount(month, year) {\n switch (month) {\n case 1: // January\n\n case 3: // March\n\n case 5: // May\n\n case 7: // July\n\n case 8: // August\n\n case 10: // October\n\n case 12:\n // December\n return 31;\n\n case 4: // April\n\n case 6: // June\n\n case 9: // September\n\n case 11:\n // November\n return 30;\n\n case 2:\n // February\n return isLeapYear(year) ? 29 : 28;\n\n default:\n return 31;\n }\n }\n }\n },\n pattern: {\n key: 'validate.pattern',\n hasLabel: true,\n message: function message(component, setting) {\n return component.t(_lodash.default.get(component, 'component.validate.patternMessage', component.errorMessage('pattern')), {\n field: component.errorLabel,\n pattern: setting,\n data: component.data\n });\n },\n check: function check(component, setting, value) {\n if (component.isEmpty(value)) return true;\n var pattern = setting;\n\n if (!pattern) {\n return true;\n }\n\n var regex = new RegExp(\"^\".concat(pattern, \"$\"));\n return regex.test(value);\n }\n },\n json: {\n key: 'validate.json',\n check: function check(component, setting, value, data, index, row) {\n if (!setting) {\n return true;\n }\n\n var valid = component.evaluate(setting, {\n data: data,\n row: row,\n rowIndex: index,\n input: value\n });\n\n if (valid === null) {\n return true;\n }\n\n return valid;\n }\n },\n mask: {\n key: 'inputMask',\n hasLabel: true,\n message: function message(component) {\n return component.t(component.errorMessage('mask'), {\n field: component.errorLabel,\n data: component.data\n });\n },\n check: function check(component, setting, value) {\n var inputMask;\n\n if (component.isMultipleMasksField) {\n var maskName = value ? value.maskName : undefined;\n var formioInputMask = component.getMaskByName(maskName);\n\n if (formioInputMask) {\n inputMask = formioInputMask;\n }\n\n value = value ? value.value : value;\n } else {\n inputMask = setting;\n }\n\n inputMask = inputMask ? (0, _utils.getInputMask)(inputMask) : null;\n\n if (value && inputMask && !component.skipMaskValidation) {\n // If char which is used inside mask placeholder was used in the mask, replace it with space to prevent errors\n inputMask = inputMask.map(function (char) {\n return char === component.placeholderChar ? ' ' : char;\n });\n return (0, _utils.matchInputMask)(value, inputMask);\n }\n\n return true;\n }\n },\n custom: {\n key: 'validate.custom',\n message: function message(component) {\n return component.t(component.errorMessage('custom'), {\n field: component.errorLabel,\n data: component.data\n });\n },\n check: function check(component, setting, value, data, index, row) {\n if (!setting) {\n return true;\n }\n\n var valid = component.evaluate(setting, {\n valid: true,\n data: data,\n rowIndex: index,\n row: row,\n input: value\n }, 'valid', true);\n\n if (valid === null) {\n return true;\n }\n\n return valid;\n }\n },\n maxDate: {\n key: 'maxDate',\n hasLabel: true,\n message: function message(component, setting) {\n var date = (0, _utils.getDateSetting)(setting);\n return component.t(component.errorMessage('maxDate'), {\n field: component.errorLabel,\n maxDate: (0, _moment.default)(date).format(component.format)\n });\n },\n check: function check(component, setting, value) {\n //if any parts of day are missing, skip maxDate validation\n if (component.isPartialDay && component.isPartialDay(value)) {\n return true;\n }\n\n var date = component.getValidationFormat ? (0, _moment.default)(value, component.getValidationFormat()) : (0, _moment.default)(value);\n var maxDate = (0, _utils.getDateSetting)(setting);\n\n if (_lodash.default.isNull(maxDate)) {\n return true;\n } else {\n maxDate.setHours(0, 0, 0, 0);\n }\n\n return date.isBefore(maxDate) || date.isSame(maxDate);\n }\n },\n minDate: {\n key: 'minDate',\n hasLabel: true,\n message: function message(component, setting) {\n var date = (0, _utils.getDateSetting)(setting);\n return component.t(component.errorMessage('minDate'), {\n field: component.errorLabel,\n minDate: (0, _moment.default)(date).format(component.format)\n });\n },\n check: function check(component, setting, value) {\n //if any parts of day are missing, skip minDate validation\n if (component.isPartialDay && component.isPartialDay(value)) {\n return true;\n }\n\n var date = component.getValidationFormat ? (0, _moment.default)(value, component.getValidationFormat()) : (0, _moment.default)(value);\n var minDate = (0, _utils.getDateSetting)(setting);\n\n if (_lodash.default.isNull(minDate)) {\n return true;\n } else {\n minDate.setHours(0, 0, 0, 0);\n }\n\n return date.isAfter(minDate) || date.isSame(minDate);\n }\n },\n minYear: {\n key: 'minYear',\n hasLabel: true,\n message: function message(component, setting) {\n return component.t(component.errorMessage('minYear'), {\n field: component.errorLabel,\n minYear: setting\n });\n },\n check: function check(component, setting, value) {\n var minYear = setting;\n var year = /\\d{4}$/.exec(value);\n year = year ? year[0] : null;\n\n if (!+minYear || !+year) {\n return true;\n }\n\n return +year >= +minYear;\n }\n },\n maxYear: {\n key: 'maxYear',\n hasLabel: true,\n message: function message(component, setting) {\n return component.t(component.errorMessage('maxYear'), {\n field: component.errorLabel,\n maxYear: setting\n });\n },\n check: function check(component, setting, value) {\n var maxYear = setting;\n var year = /\\d{4}$/.exec(value);\n year = year ? year[0] : null;\n\n if (!+maxYear || !+year) {\n return true;\n }\n\n return +year <= +maxYear;\n }\n },\n calendar: {\n key: 'validate.calendar',\n messageText: '',\n hasLabel: true,\n message: function message(component) {\n return component.t(component.errorMessage(this.validators.calendar.messageText), {\n field: component.errorLabel,\n maxDate: (0, _moment.default)(component.dataValue).format(component.format)\n });\n },\n check: function check(component, setting, value, data, index) {\n this.validators.calendar.messageText = '';\n var widget = component.getWidget(index);\n\n if (!widget) {\n return true;\n }\n\n var settings = widget.settings,\n enteredDate = widget.enteredDate;\n var minDate = settings.minDate,\n maxDate = settings.maxDate,\n format = settings.format;\n var momentFormat = [(0, _utils.convertFormatToMoment)(format)];\n\n if (momentFormat[0].match(/M{3,}/g)) {\n momentFormat.push(momentFormat[0].replace(/M{3,}/g, 'MM'));\n }\n\n if (!value && enteredDate) {\n var _checkInvalidDate = (0, _calendarUtils.checkInvalidDate)(enteredDate, momentFormat, minDate, maxDate),\n message = _checkInvalidDate.message,\n result = _checkInvalidDate.result;\n\n if (!result) {\n this.validators.calendar.messageText = message;\n return result;\n }\n }\n\n if (value && enteredDate) {\n if ((0, _moment.default)(value).format() !== (0, _moment.default)(enteredDate, momentFormat, true).format() && enteredDate.match(/_/gi)) {\n this.validators.calendar.messageText = _calendarUtils.CALENDAR_ERROR_MESSAGES.INCOMPLETE;\n return false;\n } else {\n widget.enteredDate = '';\n return true;\n }\n }\n }\n },\n time: {\n key: 'validate.time',\n messageText: 'Invalid time',\n hasLabel: true,\n message: function message(component) {\n return component.t(component.errorMessage(this.validators.time.messageText), {\n field: component.errorLabel\n });\n },\n check: function check(component, setting, value) {\n if (component.isEmpty(value)) return true;\n return (0, _moment.default)(value, component.component.format).isValid();\n }\n }\n };\n }\n\n _createClass(ValidationChecker, [{\n key: \"checkValidator\",\n value: function checkValidator(component, validator, setting, value, data, index, row, async) {\n var _this2 = this;\n\n var resultOrPromise = null; // Allow each component to override their own validators by implementing the validator.method\n\n if (validator.method && typeof component[validator.method] === 'function') {\n resultOrPromise = component[validator.method](setting, value, data, index, row, async);\n } else {\n resultOrPromise = validator.check.call(this, component, setting, value, data, index, row, async);\n }\n\n var processResult = function processResult(result) {\n if (typeof result === 'string') {\n return result;\n }\n\n if (!result && validator.message) {\n return validator.message.call(_this2, component, setting, index, row);\n }\n\n return '';\n };\n\n if (async) {\n return _nativePromiseOnly.default.resolve(resultOrPromise).then(processResult);\n } else {\n return processResult(resultOrPromise);\n }\n }\n }, {\n key: \"validate\",\n value: function validate(component, validatorName, value, data, index, row, async, conditionallyVisible, validationObj) {\n // Skip validation for conditionally hidden components\n if (!conditionallyVisible) {\n return false;\n }\n\n var validator = this.validators[validatorName];\n\n var setting = _lodash.default.get(validationObj || component.component, validator.key, null);\n\n var resultOrPromise = this.checkValidator(component, validator, setting, value, data, index, row, async);\n\n var processResult = function processResult(result) {\n if (result) {\n var _component$refs$input;\n\n var resultData = {\n message: (0, _utils.unescapeHTML)(_lodash.default.get(result, 'message', result)),\n level: _lodash.default.get(result, 'level') === 'warning' ? 'warning' : 'error',\n path: (0, _utils.getArrayFromComponentPath)(component.path || ''),\n context: {\n validator: validatorName,\n hasLabel: validator.hasLabel,\n setting: setting,\n key: component.key,\n label: component.label,\n value: value,\n index: index,\n input: (_component$refs$input = component.refs.input) === null || _component$refs$input === void 0 ? void 0 : _component$refs$input[index]\n }\n };\n\n if (validatorName === 'unique' && component.conflictId) {\n resultData.conflictId = component.conflictId;\n }\n\n return resultData;\n } else {\n return false;\n }\n };\n\n if (async) {\n return _nativePromiseOnly.default.resolve(resultOrPromise).then(processResult);\n } else {\n return processResult(resultOrPromise);\n }\n }\n }, {\n key: \"checkComponent\",\n value: function checkComponent(component, data, row) {\n var _component$addons,\n _this3 = this;\n\n var includeWarnings = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n var async = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;\n var isServerSidePersistent = typeof process !== 'undefined' && _lodash.default.get(process, 'release.name') === 'node' && !_lodash.default.defaultTo(component.component.persistent, true); // If we're server-side and it's not a persistent component, don't run validation at all\n\n if (isServerSidePersistent || component.component.validate === false) {\n return async ? _nativePromiseOnly.default.resolve([]) : [];\n }\n\n data = data || component.rootValue;\n row = row || component.data;\n var values = component.component.multiple && Array.isArray(component.validationValue) ? component.validationValue : [component.validationValue];\n var conditionallyVisible = component.conditionallyVisible();\n var addonsValidations = [];\n\n if (component !== null && component !== void 0 && (_component$addons = component.addons) !== null && _component$addons !== void 0 && _component$addons.length) {\n values.forEach(function (value) {\n component.addons.forEach(function (addon) {\n if (!addon.checkValidity(value)) {\n addonsValidations.push.apply(addonsValidations, _toConsumableArray(addon.errors || []));\n }\n });\n });\n } // If this component has the new validation system enabled, use it instead.\n\n\n var validations = _lodash.default.get(component, 'component.validations');\n\n var nextGenResultsOrPromises = [];\n\n if (validations && Array.isArray(validations) && validations.length) {\n var validationsGroupedByMode = _lodash.default.chain(validations).groupBy(function (validation) {\n return validation.mode;\n }).value();\n\n if (component.calculateCondition) {\n includeWarnings = true;\n\n var uiGroupedValidation = _lodash.default.chain(validationsGroupedByMode.ui).filter('active').groupBy(function (validation) {\n return validation.group || null;\n }).value();\n\n var commonValidations = uiGroupedValidation.null || [];\n delete uiGroupedValidation.null;\n commonValidations.forEach(function (_ref3) {\n var condition = _ref3.condition,\n message = _ref3.message,\n severity = _ref3.severity;\n\n if (!component.calculateCondition(condition)) {\n nextGenResultsOrPromises.push({\n level: severity || 'error',\n message: component.t(message),\n componentInstance: component\n });\n }\n });\n\n _lodash.default.forEach(uiGroupedValidation, function (validationGroup) {\n _lodash.default.forEach(validationGroup, function (_ref4) {\n var condition = _ref4.condition,\n message = _ref4.message,\n severity = _ref4.severity;\n\n if (!component.calculateCondition(condition)) {\n nextGenResultsOrPromises.push({\n level: severity || 'error',\n message: component.t(message),\n componentInstance: component\n });\n return false;\n }\n });\n });\n } else {\n nextGenResultsOrPromises = this.checkValidations(component, validations, data, row, values, async);\n }\n\n if (component.validators.includes('custom') && validationsGroupedByMode.js) {\n _lodash.default.each(validationsGroupedByMode.js, function (validation) {\n nextGenResultsOrPromises.push(_lodash.default.map(values, function (value, index) {\n return _this3.validate(component, 'custom', value, data, index, row, async, conditionallyVisible, validation);\n }));\n });\n }\n\n if (component.validators.includes('json') && validationsGroupedByMode.json) {\n _lodash.default.each(validationsGroupedByMode.json, function (validation) {\n nextGenResultsOrPromises.push(_lodash.default.map(values, function (value, index) {\n return _this3.validate(component, 'json', value, data, index, row, async, conditionallyVisible, validation);\n }));\n });\n }\n }\n\n var validateCustom = _lodash.default.get(component, 'component.validate.custom');\n\n var customErrorMessage = _lodash.default.get(component, 'component.validate.customMessage'); // Run primary validators\n\n\n var resultsOrPromises = (0, _lodash.default)(component.validators).chain().map(function (validatorName) {\n if (!_this3.validators.hasOwnProperty(validatorName)) {\n return {\n message: \"Validator for \\\"\".concat(validatorName, \"\\\" is not defined\"),\n level: 'warning',\n context: {\n validator: validatorName,\n key: component.key,\n label: component.label\n }\n };\n } // Handle the case when there is no values defined and it is required.\n\n\n if (validatorName === 'required' && !values.length) {\n return [_this3.validate(component, validatorName, null, data, 0, row, async, conditionallyVisible)];\n }\n\n return _lodash.default.map(values, function (value, index) {\n return _this3.validate(component, validatorName, value, data, index, row, async, conditionallyVisible);\n });\n }).flatten().value(); // Run the \"unique\" pseudo-validator\n\n component.component.validate = component.component.validate || {};\n component.component.validate.unique = component.component.unique;\n resultsOrPromises.push(this.validate(component, 'unique', component.validationValue, data, 0, data, async, conditionallyVisible)); // Run the \"multiple\" pseudo-validator\n\n component.component.validate.multiple = component.component.multiple;\n resultsOrPromises.push(this.validate(component, 'multiple', component.validationValue, data, 0, data, async, conditionallyVisible));\n resultsOrPromises.push.apply(resultsOrPromises, addonsValidations);\n resultsOrPromises.push.apply(resultsOrPromises, _toConsumableArray(nextGenResultsOrPromises)); // Define how results should be formatted\n\n var formatResults = function formatResults(results) {\n // Condense to a single flat array\n results = (0, _lodash.default)(results).chain().flatten().compact().value();\n\n if (customErrorMessage || validateCustom) {\n _lodash.default.each(results, function (result) {\n result.message = component.t(customErrorMessage || result.message, {\n field: component.errorLabel,\n data: data,\n row: row,\n error: result\n });\n result.context.hasLabel = false;\n });\n }\n\n return includeWarnings ? results : _lodash.default.reject(results, function (result) {\n return result.level === 'warning';\n });\n }; // Wait for results if using async mode, otherwise process and return immediately\n\n\n if (async) {\n return _nativePromiseOnly.default.all(resultsOrPromises).then(formatResults);\n } else {\n return formatResults(resultsOrPromises);\n }\n }\n /**\n * Use the new validations engine to evaluate any errors.\n *\n * @param component\n * @param validations\n * @param data\n * @param row\n * @param values\n * @returns {any[]}\n */\n\n }, {\n key: \"checkValidations\",\n value: function checkValidations(component, validations, data, row, values, async) {\n var _this4 = this;\n\n // Get results.\n var results = validations.map(function (validation) {\n return _this4.checkRule(component, validation, data, row, values, async);\n }); // Flatten array and filter out empty results.\n\n var messages = results.reduce(function (prev, result) {\n if (result) {\n return [].concat(_toConsumableArray(prev), _toConsumableArray(result));\n }\n\n return prev;\n }, []).filter(function (result) {\n return result;\n }); // Keep only the last error for each rule.\n\n var rules = messages.reduce(function (prev, message) {\n prev[message.context.validator] = message;\n return prev;\n }, {});\n return Object.values(rules);\n }\n }, {\n key: \"checkRule\",\n value: function checkRule(component, validation, data, row, values, async) {\n var Rule = _Rules.default.getRule(validation.rule);\n\n var results = [];\n\n if (Rule) {\n var rule = new Rule(component, validation.settings, this.config);\n values.map(function (value, index) {\n var result = rule.check(value, data, row, async);\n\n if (result !== true) {\n results.push({\n level: validation.level || 'error',\n message: component.t(validation.message || rule.defaultMessage, {\n settings: validation.settings,\n field: component.errorLabel,\n data: data,\n row: row,\n error: result\n }),\n context: {\n key: component.key,\n index: index,\n label: component.label,\n validator: validation.rule\n }\n });\n }\n });\n } // If there are no results, return false so it is removed by filter.\n\n\n return results.length === 0 ? false : results;\n }\n }, {\n key: \"check\",\n get: function get() {\n return this.checkComponent;\n }\n }, {\n key: \"get\",\n value: function get() {\n _lodash.default.get.call(this, arguments);\n }\n }, {\n key: \"each\",\n value: function each() {\n _lodash.default.each.call(this, arguments);\n }\n }, {\n key: \"has\",\n value: function has() {\n _lodash.default.has.call(this, arguments);\n }\n }]);\n\n return ValidationChecker;\n}();\n\nexports.ValidationChecker = ValidationChecker;\nValidationChecker.config = {\n db: null,\n token: null,\n form: null,\n submission: null\n};\nvar instance = new ValidationChecker();\nexports[\"default\"] = instance;\n\n//# sourceURL=webpack://Formio/./lib/validator/Validator.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.slice.js */ \"./node_modules/core-js/modules/es.array.slice.js\");\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n__webpack_require__(/*! core-js/modules/es.array.from.js */ \"./node_modules/core-js/modules/es.array.from.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = exports.ValidationChecker = void 0;\n__webpack_require__(/*! core-js/modules/es.array.some.js */ \"./node_modules/core-js/modules/es.array.some.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n__webpack_require__(/*! core-js/modules/es.string.split.js */ \"./node_modules/core-js/modules/es.string.split.js\");\n__webpack_require__(/*! core-js/modules/es.array.reduce.js */ \"./node_modules/core-js/modules/es.array.reduce.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.constructor.js */ \"./node_modules/core-js/modules/es.regexp.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-string.js */ \"./node_modules/core-js/modules/es.date.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.array.is-array.js */ \"./node_modules/core-js/modules/es.array.is-array.js\");\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n__webpack_require__(/*! core-js/modules/es.array.includes.js */ \"./node_modules/core-js/modules/es.array.includes.js\");\n__webpack_require__(/*! core-js/modules/es.string.includes.js */ \"./node_modules/core-js/modules/es.string.includes.js\");\n__webpack_require__(/*! core-js/modules/es.array.join.js */ \"./node_modules/core-js/modules/es.array.join.js\");\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n__webpack_require__(/*! core-js/modules/es.parse-float.js */ \"./node_modules/core-js/modules/es.parse-float.js\");\n__webpack_require__(/*! core-js/modules/es.number.is-nan.js */ \"./node_modules/core-js/modules/es.number.is-nan.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n__webpack_require__(/*! core-js/modules/es.parse-int.js */ \"./node_modules/core-js/modules/es.parse-int.js\");\n__webpack_require__(/*! core-js/modules/es.string.trim.js */ \"./node_modules/core-js/modules/es.string.trim.js\");\n__webpack_require__(/*! core-js/modules/es.string.match.js */ \"./node_modules/core-js/modules/es.string.match.js\");\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.object.values.js */ \"./node_modules/core-js/modules/es.object.values.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nvar _utils = __webpack_require__(/*! ../utils/utils */ \"./lib/utils/utils.js\");\nvar _moment = _interopRequireDefault(__webpack_require__(/*! moment */ \"./node_modules/moment/moment.js\"));\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\nvar _fetchPonyfill2 = _interopRequireDefault(__webpack_require__(/*! fetch-ponyfill */ \"./node_modules/fetch-ponyfill/build/fetch-browser.js\"));\nvar _calendarUtils = __webpack_require__(/*! ../utils/calendarUtils */ \"./lib/utils/calendarUtils.js\");\nvar _Rules = _interopRequireDefault(__webpack_require__(/*! ./Rules */ \"./lib/validator/Rules.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\nfunction _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : \"undefined\" != typeof Symbol && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) { ; } } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i[\"return\"] && (_r = _i[\"return\"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar _fetchPonyfill = (0, _fetchPonyfill2[\"default\"])({\n Promise: _nativePromiseOnly[\"default\"]\n }),\n fetch = _fetchPonyfill.fetch,\n Headers = _fetchPonyfill.Headers,\n Request = _fetchPonyfill.Request;\nvar ValidationChecker = /*#__PURE__*/function () {\n function ValidationChecker() {\n var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n _classCallCheck(this, ValidationChecker);\n this.config = _lodash[\"default\"].defaults(config, ValidationChecker.config);\n this.validators = {\n required: {\n key: 'validate.required',\n method: 'validateRequired',\n hasLabel: true,\n message: function message(component) {\n return component.t(component.errorMessage('required'), {\n field: component.errorLabel,\n data: component.data\n });\n },\n check: function check(component, setting, value) {\n if (!(0, _utils.boolValue)(setting) || component.isValueHidden()) {\n return true;\n }\n var isCalendar = component.validators.some(function (validator) {\n return validator === 'calendar';\n });\n if (!value && isCalendar && component.widget.enteredDate) {\n return !this.validators.calendar.check.call(this, component, setting, value);\n }\n return !component.isEmpty(value);\n }\n },\n onlyAvailableItems: {\n key: 'validate.onlyAvailableItems',\n method: 'validateValueAvailability',\n hasLabel: true,\n message: function message(component) {\n return component.t(component.errorMessage('valueIsNotAvailable'), {\n field: component.errorLabel,\n data: component.data\n });\n },\n check: function check(component, setting) {\n return !(0, _utils.boolValue)(setting);\n }\n },\n unique: {\n key: 'validate.unique',\n hasLabel: true,\n message: function message(component) {\n return component.t(component.errorMessage('unique'), {\n field: component.errorLabel,\n data: component.data\n });\n },\n check: function check(component, setting, value) {\n var _this = this;\n // Skip if setting is falsy\n if (!(0, _utils.boolValue)(setting)) {\n return true;\n }\n\n // Skip if value is empty object or falsy\n if (!value || _lodash[\"default\"].isObjectLike(value) && _lodash[\"default\"].isEmpty(value)) {\n return true;\n }\n\n // Skip if we don't have a database connection\n if (!this.config.db) {\n return true;\n }\n return new _nativePromiseOnly[\"default\"](function (resolve) {\n var form = _this.config.form;\n var submission = _this.config.submission;\n var path = \"data.\".concat(component.path);\n var addPathQueryParams = function addPathQueryParams(pathQueryParams, query, path) {\n var pathArray = path.split(/\\[\\d+\\]?./);\n var needValuesInArray = pathArray.length > 1;\n var pathToValue = path;\n if (needValuesInArray) {\n pathToValue = pathArray.shift();\n var pathQueryObj = {};\n _lodash[\"default\"].reduce(pathArray, function (pathQueryPath, pathPart, index) {\n var isLastPathPart = index === pathArray.length - 1;\n var obj = _lodash[\"default\"].get(pathQueryObj, pathQueryPath, pathQueryObj);\n var addedPath = \"$elemMatch['\".concat(pathPart, \"']\");\n _lodash[\"default\"].set(obj, addedPath, isLastPathPart ? pathQueryParams : {});\n return pathQueryPath ? \"\".concat(pathQueryPath, \".\").concat(addedPath) : addedPath;\n }, '');\n query[pathToValue] = pathQueryObj;\n } else {\n query[pathToValue] = pathQueryParams;\n }\n };\n\n // Build the query\n var query = {\n form: form._id\n };\n var collationOptions = {};\n if (_lodash[\"default\"].isString(value)) {\n var _component$component$;\n if (component.component.dbIndex) {\n addPathQueryParams(value, query, path);\n }\n // These are kind of hacky but provides for a more efficient \"unique\" validation when the string is an email,\n // because we (by and large) only have to worry about ASCII and partial unicode; this way, we can use collation-\n // aware indexes with case insensitive email searches to make things like login and registration a whole lot faster\n else if (component.component.type === 'email' || component.component.type === 'textfield' && ((_component$component$ = component.component.validate) === null || _component$component$ === void 0 ? void 0 : _component$component$.pattern) === '[A-Za-z0-9]+') {\n addPathQueryParams(value, query, path);\n collationOptions = {\n collation: {\n locale: 'en',\n strength: 2\n }\n };\n } else {\n addPathQueryParams({\n $regex: new RegExp(\"^\".concat((0, _utils.escapeRegExCharacters)(value), \"$\")),\n $options: 'i'\n }, query, path);\n }\n }\n // FOR-213 - Pluck the unique location id\n else if (_lodash[\"default\"].isPlainObject(value) && value.address && value.address['address_components'] && value.address['place_id']) {\n addPathQueryParams({\n $regex: new RegExp(\"^\".concat((0, _utils.escapeRegExCharacters)(value.address['place_id']), \"$\")),\n $options: 'i'\n }, query, \"\".concat(path, \".address.place_id\"));\n }\n // Compare the contents of arrays vs the order.\n else if (_lodash[\"default\"].isArray(value)) {\n addPathQueryParams({\n $all: value\n }, query, path);\n } else if (_lodash[\"default\"].isObject(value) || _lodash[\"default\"].isNumber(value)) {\n addPathQueryParams({\n $eq: value\n }, query, path);\n }\n // Only search for non-deleted items\n query.deleted = {\n $eq: null\n };\n query.state = 'submitted';\n var uniqueValidationCallback = function uniqueValidationCallback(err, result) {\n if (err) {\n return resolve(false);\n } else if (result) {\n // Only OK if it matches the current submission\n if (submission._id && result._id.toString() === submission._id) {\n resolve(true);\n } else {\n component.conflictId = result._id.toString();\n return resolve(false);\n }\n } else {\n return resolve(true);\n }\n };\n // Try to find an existing value within the form\n _this.config.db.findOne(query, null, collationOptions, function (err, result) {\n if (err && collationOptions.collation) {\n // presume this error comes from db compatibility, try again as regex\n delete query[path];\n addPathQueryParams({\n $regex: new RegExp(\"^\".concat((0, _utils.escapeRegExCharacters)(value), \"$\")),\n $options: 'i'\n }, query, path);\n _this.config.db.findOne(query, uniqueValidationCallback);\n } else {\n return uniqueValidationCallback(err, result);\n }\n });\n })[\"catch\"](function () {\n return false;\n });\n }\n },\n multiple: {\n key: 'validate.multiple',\n hasLabel: true,\n message: function message(component) {\n var shouldBeArray = (0, _utils.boolValue)(component.component.multiple) || Array.isArray(component.emptyValue);\n var isRequired = component.component.validate.required;\n var messageKey = shouldBeArray ? isRequired ? 'array_nonempty' : 'array' : 'nonarray';\n return component.t(component.errorMessage(messageKey), {\n field: component.errorLabel,\n data: component.data\n });\n },\n check: function check(component, setting, value) {\n // Skip multiple validation if the component tells us to\n if (!component.validateMultiple()) {\n return true;\n }\n var shouldBeArray = (0, _utils.boolValue)(setting);\n var canBeArray = Array.isArray(component.emptyValue);\n var isArray = Array.isArray(value);\n var isRequired = component.component.validate.required;\n if (shouldBeArray) {\n if (isArray) {\n return isRequired ? !!value.length : true;\n } else {\n // Null/undefined is ok if this value isn't required; anything else should fail\n return _lodash[\"default\"].isNil(value) ? !isRequired : false;\n }\n } else {\n return canBeArray || !isArray;\n }\n }\n },\n select: {\n key: 'validate.select',\n hasLabel: true,\n message: function message(component) {\n return component.t(component.errorMessage('select'), {\n field: component.errorLabel,\n data: component.data\n });\n },\n check: function check(component, setting, value, data, index, row, async) {\n // Skip if setting is falsy\n if (!(0, _utils.boolValue)(setting)) {\n return true;\n }\n\n // Skip if value is empty\n if (!value || _lodash[\"default\"].isEmpty(value)) {\n return true;\n }\n\n // Skip if we're not async-capable\n if (!async) {\n return true;\n }\n var schema = component.component;\n\n // Initialize the request options\n var requestOptions = {\n url: setting,\n method: 'GET',\n qs: {},\n json: true,\n headers: {}\n };\n\n // If the url is a boolean value\n if (_lodash[\"default\"].isBoolean(requestOptions.url)) {\n requestOptions.url = !!requestOptions.url;\n if (!requestOptions.url || schema.dataSrc !== 'url' || !schema.data.url || !schema.searchField) {\n return true;\n }\n\n // Get the validation url\n requestOptions.url = schema.data.url;\n\n // Add the search field\n requestOptions.qs[schema.searchField] = value;\n\n // Add the filters\n if (schema.filter) {\n requestOptions.url += (!requestOptions.url.includes('?') ? '?' : '&') + schema.filter;\n }\n\n // If they only wish to return certain fields.\n if (schema.selectFields) {\n requestOptions.qs.select = schema.selectFields;\n }\n }\n if (!requestOptions.url) {\n return true;\n }\n\n // Make sure to interpolate.\n requestOptions.url = (0, _utils.interpolate)(requestOptions.url, {\n data: component.data\n });\n\n // Add query string to URL\n requestOptions.url += (requestOptions.url.includes('?') ? '&' : '?') + _lodash[\"default\"].chain(requestOptions.qs).map(function (val, key) {\n return \"\".concat(encodeURIComponent(key), \"=\").concat(encodeURIComponent(val));\n }).join('&').value();\n\n // Set custom headers.\n if (schema.data && schema.data.headers) {\n _lodash[\"default\"].each(schema.data.headers, function (header) {\n if (header.key) {\n requestOptions.headers[header.key] = header.value;\n }\n });\n }\n\n // Set form.io authentication.\n if (schema.authenticate && this.config.token) {\n requestOptions.headers['x-jwt-token'] = this.config.token;\n }\n return fetch(new Request(requestOptions.url, {\n headers: new Headers(requestOptions.headers)\n })).then(function (response) {\n if (!response.ok) {\n return false;\n }\n return response.json();\n }).then(function (results) {\n return results && results.length;\n })[\"catch\"](function () {\n return false;\n });\n }\n },\n min: {\n key: 'validate.min',\n hasLabel: true,\n message: function message(component, setting) {\n return component.t(component.errorMessage('min'), {\n field: component.errorLabel,\n min: parseFloat(setting),\n data: component.data\n });\n },\n check: function check(component, setting, value) {\n var min = parseFloat(setting);\n var parsedValue = parseFloat(value);\n if (Number.isNaN(min) || Number.isNaN(parsedValue)) {\n return true;\n }\n return parsedValue >= min;\n }\n },\n max: {\n key: 'validate.max',\n hasLabel: true,\n message: function message(component, setting) {\n return component.t(component.errorMessage('max'), {\n field: component.errorLabel,\n max: parseFloat(setting),\n data: component.data\n });\n },\n check: function check(component, setting, value) {\n var max = parseFloat(setting);\n var parsedValue = parseFloat(value);\n if (Number.isNaN(max) || Number.isNaN(parsedValue)) {\n return true;\n }\n return parsedValue <= max;\n }\n },\n minSelectedCount: {\n key: 'validate.minSelectedCount',\n message: function message(component, setting) {\n return component.component.minSelectedCountMessage ? component.component.minSelectedCountMessage : component.t(component.errorMessage('minSelectedCount'), {\n minCount: parseFloat(setting),\n data: component.data\n });\n },\n check: function check(component, setting, value) {\n var min = parseFloat(setting);\n if (!min) {\n return true;\n }\n var count = Object.keys(value).reduce(function (total, key) {\n if (value[key]) {\n total++;\n }\n return total;\n }, 0);\n\n // Should not be triggered if there is no options selected at all\n return !count || count >= min;\n }\n },\n maxSelectedCount: {\n key: 'validate.maxSelectedCount',\n message: function message(component, setting) {\n return component.component.maxSelectedCountMessage ? component.component.maxSelectedCountMessage : component.t(component.errorMessage('maxSelectedCount'), {\n minCount: parseFloat(setting),\n data: component.data\n });\n },\n check: function check(component, setting, value) {\n var max = parseFloat(setting);\n if (!max) {\n return true;\n }\n var count = Object.keys(value).reduce(function (total, key) {\n if (value[key]) {\n total++;\n }\n return total;\n }, 0);\n return count <= max;\n }\n },\n minLength: {\n key: 'validate.minLength',\n hasLabel: true,\n message: function message(component, setting) {\n return component.t(component.errorMessage('minLength'), {\n field: component.errorLabel,\n length: setting,\n data: component.data\n });\n },\n check: function check(component, setting, value) {\n var minLength = parseInt(setting, 10);\n if (!value || !minLength || typeof value !== 'string' || component.isEmpty(value)) {\n return true;\n }\n return value.length >= minLength;\n }\n },\n maxLength: {\n key: 'validate.maxLength',\n hasLabel: true,\n message: function message(component, setting) {\n return component.t(component.errorMessage('maxLength'), {\n field: component.errorLabel,\n length: setting,\n data: component.data\n });\n },\n check: function check(component, setting, value) {\n var maxLength = parseInt(setting, 10);\n if (!maxLength || typeof value !== 'string') {\n return true;\n }\n return value.length <= maxLength;\n }\n },\n maxWords: {\n key: 'validate.maxWords',\n hasLabel: true,\n message: function message(component, setting) {\n return component.t(component.errorMessage('maxWords'), {\n field: component.errorLabel,\n length: setting,\n data: component.data\n });\n },\n check: function check(component, setting, value) {\n var maxWords = parseInt(setting, 10);\n if (!maxWords || typeof value !== 'string') {\n return true;\n }\n return value.trim().split(/\\s+/).length <= maxWords;\n }\n },\n minWords: {\n key: 'validate.minWords',\n hasLabel: true,\n message: function message(component, setting) {\n return component.t(component.errorMessage('minWords'), {\n field: component.errorLabel,\n length: setting,\n data: component.data\n });\n },\n check: function check(component, setting, value) {\n var minWords = parseInt(setting, 10);\n if (!minWords || !value || typeof value !== 'string') {\n return true;\n }\n return value.trim().split(/\\s+/).length >= minWords;\n }\n },\n email: {\n hasLabel: true,\n message: function message(component) {\n return component.t(component.errorMessage('invalid_email'), {\n field: component.errorLabel,\n data: component.data\n });\n },\n check: function check(component, setting, value) {\n /* eslint-disable max-len */\n // From http://stackoverflow.com/questions/46155/validate-email-address-in-javascript\n var re = /^(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\n /* eslint-enable max-len */\n\n // Allow emails to be valid if the component is pristine and no value is provided.\n return !value || re.test(value);\n }\n },\n url: {\n hasLabel: true,\n message: function message(component) {\n return component.t(component.errorMessage('invalid_url'), {\n field: component.errorLabel,\n data: component.data\n });\n },\n check: function check(component, setting, value) {\n /* eslint-disable max-len */\n // From https://stackoverflow.com/questions/8667070/javascript-regular-expression-to-validate-url\n var re = /^(?:(?:(?:https?|ftp):)?\\/\\/)?(?:\\S+(?::\\S*)?@)?(?:(?!(?:10|127)(?:\\.\\d{1,3}){3})(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:[/?#]\\S*)?$/i;\n // From http://stackoverflow.com/questions/46155/validate-email-address-in-javascript\n var emailRe = /^(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\n /* eslint-enable max-len */\n\n // Allow urls to be valid if the component is pristine and no value is provided.\n return !value || re.test(value) && !emailRe.test(value);\n }\n },\n date: {\n hasLabel: true,\n message: function message(component) {\n return component.t(component.errorMessage('invalid_date'), {\n field: component.errorLabel,\n data: component.data\n });\n },\n check: function check(component, setting, value) {\n if (!value) {\n return true;\n }\n if (value === 'Invalid date' || value === 'Invalid Date') {\n return false;\n }\n if (typeof value === 'string') {\n value = new Date(value);\n }\n return value instanceof Date === true && value.toString() !== 'Invalid Date';\n }\n },\n day: {\n hasLabel: true,\n message: function message(component) {\n return component.t(component.errorMessage('invalid_day'), {\n field: component.errorLabel,\n data: component.data\n });\n },\n check: function check(component, setting, value) {\n if (!value) {\n return true;\n }\n var _ref = component.dayFirst ? [0, 1, 2] : [1, 0, 2],\n _ref2 = _slicedToArray(_ref, 3),\n DAY = _ref2[0],\n MONTH = _ref2[1],\n YEAR = _ref2[2];\n var values = value.split('/').map(function (x) {\n return parseInt(x, 10);\n }),\n day = values[DAY],\n month = values[MONTH],\n year = values[YEAR],\n maxDay = getDaysInMonthCount(month, year);\n if (day < 0 || day > maxDay) {\n return false;\n }\n if (month < 0 || month > 12) {\n return false;\n }\n if (year < 0 || year > 9999) {\n return false;\n }\n return true;\n function isLeapYear(year) {\n // Year is leap if it is evenly divisible by 400 or evenly divisible by 4 and not evenly divisible by 100.\n return !(year % 400) || !!(year % 100) && !(year % 4);\n }\n function getDaysInMonthCount(month, year) {\n switch (month) {\n case 1: // January\n case 3: // March\n case 5: // May\n case 7: // July\n case 8: // August\n case 10: // October\n case 12:\n // December\n return 31;\n case 4: // April\n case 6: // June\n case 9: // September\n case 11:\n // November\n return 30;\n case 2:\n // February\n return isLeapYear(year) ? 29 : 28;\n default:\n return 31;\n }\n }\n }\n },\n pattern: {\n key: 'validate.pattern',\n hasLabel: true,\n message: function message(component, setting) {\n return component.t(_lodash[\"default\"].get(component, 'component.validate.patternMessage', component.errorMessage('pattern')), {\n field: component.errorLabel,\n pattern: setting,\n data: component.data\n });\n },\n check: function check(component, setting, value) {\n if (component.isEmpty(value)) return true;\n var pattern = setting;\n if (!pattern) {\n return true;\n }\n var regex = new RegExp(\"^\".concat(pattern, \"$\"));\n return regex.test(value);\n }\n },\n json: {\n key: 'validate.json',\n check: function check(component, setting, value, data, index, row) {\n if (!setting) {\n return true;\n }\n var valid = component.evaluate(setting, {\n data: data,\n row: row,\n rowIndex: index,\n input: value\n });\n if (valid === null) {\n return true;\n }\n return valid;\n }\n },\n mask: {\n key: 'inputMask',\n hasLabel: true,\n message: function message(component) {\n return component.t(component.errorMessage('mask'), {\n field: component.errorLabel,\n data: component.data\n });\n },\n check: function check(component, setting, value) {\n var inputMask;\n if (component.isMultipleMasksField) {\n var maskName = value ? value.maskName : undefined;\n var formioInputMask = component.getMaskByName(maskName);\n if (formioInputMask) {\n inputMask = formioInputMask;\n }\n value = value ? value.value : value;\n } else {\n inputMask = setting;\n }\n inputMask = inputMask ? (0, _utils.getInputMask)(inputMask) : null;\n if (value && inputMask && !component.skipMaskValidation) {\n // If char which is used inside mask placeholder was used in the mask, replace it with space to prevent errors\n inputMask = inputMask.map(function (_char) {\n return _char === component.placeholderChar ? ' ' : _char;\n });\n return (0, _utils.matchInputMask)(value, inputMask);\n }\n return true;\n }\n },\n custom: {\n key: 'validate.custom',\n message: function message(component) {\n return component.t(component.errorMessage('custom'), {\n field: component.errorLabel,\n data: component.data\n });\n },\n check: function check(component, setting, value, data, index, row) {\n if (!setting) {\n return true;\n }\n var valid = component.evaluate(setting, {\n valid: true,\n data: data,\n rowIndex: index,\n row: row,\n input: value\n }, 'valid', true);\n if (valid === null) {\n return true;\n }\n return valid;\n }\n },\n maxDate: {\n key: 'maxDate',\n hasLabel: true,\n message: function message(component, setting) {\n var date = (0, _utils.getDateSetting)(setting);\n return component.t(component.errorMessage('maxDate'), {\n field: component.errorLabel,\n maxDate: (0, _moment[\"default\"])(date).format(component.format)\n });\n },\n check: function check(component, setting, value) {\n //if any parts of day are missing, skip maxDate validation\n if (component.isPartialDay && component.isPartialDay(value)) {\n return true;\n }\n var date = component.getValidationFormat ? (0, _moment[\"default\"])(value, component.getValidationFormat()) : (0, _moment[\"default\"])(value);\n var maxDate = (0, _utils.getDateSetting)(setting);\n if (_lodash[\"default\"].isNull(maxDate)) {\n return true;\n } else {\n maxDate.setHours(0, 0, 0, 0);\n }\n return date.isBefore(maxDate) || date.isSame(maxDate);\n }\n },\n minDate: {\n key: 'minDate',\n hasLabel: true,\n message: function message(component, setting) {\n var date = (0, _utils.getDateSetting)(setting);\n return component.t(component.errorMessage('minDate'), {\n field: component.errorLabel,\n minDate: (0, _moment[\"default\"])(date).format(component.format)\n });\n },\n check: function check(component, setting, value) {\n //if any parts of day are missing, skip minDate validation\n if (component.isPartialDay && component.isPartialDay(value)) {\n return true;\n }\n var date = component.getValidationFormat ? (0, _moment[\"default\"])(value, component.getValidationFormat()) : (0, _moment[\"default\"])(value);\n var minDate = (0, _utils.getDateSetting)(setting);\n if (_lodash[\"default\"].isNull(minDate)) {\n return true;\n } else {\n minDate.setHours(0, 0, 0, 0);\n }\n return date.isAfter(minDate) || date.isSame(minDate);\n }\n },\n minYear: {\n key: 'minYear',\n hasLabel: true,\n message: function message(component, setting) {\n return component.t(component.errorMessage('minYear'), {\n field: component.errorLabel,\n minYear: setting\n });\n },\n check: function check(component, setting, value) {\n var minYear = setting;\n var year = /\\d{4}$/.exec(value);\n year = year ? year[0] : null;\n if (!+minYear || !+year) {\n return true;\n }\n return +year >= +minYear;\n }\n },\n maxYear: {\n key: 'maxYear',\n hasLabel: true,\n message: function message(component, setting) {\n return component.t(component.errorMessage('maxYear'), {\n field: component.errorLabel,\n maxYear: setting\n });\n },\n check: function check(component, setting, value) {\n var maxYear = setting;\n var year = /\\d{4}$/.exec(value);\n year = year ? year[0] : null;\n if (!+maxYear || !+year) {\n return true;\n }\n return +year <= +maxYear;\n }\n },\n calendar: {\n key: 'validate.calendar',\n messageText: '',\n hasLabel: true,\n message: function message(component) {\n return component.t(component.errorMessage(this.validators.calendar.messageText), {\n field: component.errorLabel,\n maxDate: (0, _moment[\"default\"])(component.dataValue).format(component.format)\n });\n },\n check: function check(component, setting, value, data, index) {\n this.validators.calendar.messageText = '';\n var widget = component.getWidget(index);\n if (!widget) {\n return true;\n }\n var settings = widget.settings,\n enteredDate = widget.enteredDate;\n var minDate = settings.minDate,\n maxDate = settings.maxDate,\n format = settings.format;\n var momentFormat = [(0, _utils.convertFormatToMoment)(format)];\n if (momentFormat[0].match(/M{3,}/g)) {\n momentFormat.push(momentFormat[0].replace(/M{3,}/g, 'MM'));\n }\n if (!value && enteredDate) {\n var _checkInvalidDate = (0, _calendarUtils.checkInvalidDate)(enteredDate, momentFormat, minDate, maxDate),\n message = _checkInvalidDate.message,\n result = _checkInvalidDate.result;\n if (!result) {\n this.validators.calendar.messageText = message;\n return result;\n }\n }\n if (value && enteredDate) {\n if ((0, _moment[\"default\"])(value).format() !== (0, _moment[\"default\"])(enteredDate, momentFormat, true).format() && enteredDate.match(/_/gi)) {\n this.validators.calendar.messageText = _calendarUtils.CALENDAR_ERROR_MESSAGES.INCOMPLETE;\n return false;\n } else {\n widget.enteredDate = '';\n return true;\n }\n }\n }\n },\n time: {\n key: 'validate.time',\n messageText: 'Invalid time',\n hasLabel: true,\n message: function message(component) {\n return component.t(component.errorMessage(this.validators.time.messageText), {\n field: component.errorLabel\n });\n },\n check: function check(component, setting, value) {\n if (component.isEmpty(value)) return true;\n return (0, _moment[\"default\"])(value, component.component.format).isValid();\n }\n },\n availableValueProperty: {\n key: 'validate.availableValueProperty',\n method: 'validateValueProperty',\n messageText: 'Invalid Value Property',\n hasLabel: true,\n message: function message(component) {\n return component.t(component.errorMessage(this.validators.availableValueProperty.messageText), {\n field: component.errorLabel\n });\n },\n check: function check(component, setting, value) {\n if (component.component.dataSrc === 'url' && (_lodash[\"default\"].isUndefined(value) || _lodash[\"default\"].isObject(value))) {\n return false;\n }\n return true;\n }\n }\n };\n }\n _createClass(ValidationChecker, [{\n key: \"checkValidator\",\n value: function checkValidator(component, validator, setting, value, data, index, row, async) {\n var _this2 = this;\n var resultOrPromise = null;\n\n // Allow each component to override their own validators by implementing the validator.method\n if (validator.method && typeof component[validator.method] === 'function') {\n resultOrPromise = component[validator.method](setting, value, data, index, row, async);\n } else {\n resultOrPromise = validator.check.call(this, component, setting, value, data, index, row, async);\n }\n var processResult = function processResult(result) {\n if (typeof result === 'string') {\n return result;\n }\n if (!result && validator.message) {\n return validator.message.call(_this2, component, setting, index, row);\n }\n return '';\n };\n if (async) {\n return _nativePromiseOnly[\"default\"].resolve(resultOrPromise).then(processResult);\n } else {\n return processResult(resultOrPromise);\n }\n }\n }, {\n key: \"validate\",\n value: function validate(component, validatorName, value, data, index, row, async, conditionallyVisible, validationObj) {\n // Skip validation for conditionally hidden components\n if (!conditionallyVisible) {\n return false;\n }\n var validator = this.validators[validatorName];\n var setting = _lodash[\"default\"].get(validationObj || component.component, validator.key, null);\n var resultOrPromise = this.checkValidator(component, validator, setting, value, data, index, row, async);\n var processResult = function processResult(result) {\n if (result) {\n var _component$refs$input;\n var resultData = {\n message: (0, _utils.unescapeHTML)(_lodash[\"default\"].get(result, 'message', result)),\n level: _lodash[\"default\"].get(result, 'level') === 'warning' ? 'warning' : 'error',\n path: (0, _utils.getArrayFromComponentPath)(component.path || ''),\n context: {\n validator: validatorName,\n hasLabel: validator.hasLabel,\n setting: setting,\n key: component.key,\n label: component.label,\n value: value,\n index: index,\n input: (_component$refs$input = component.refs.input) === null || _component$refs$input === void 0 ? void 0 : _component$refs$input[index]\n }\n };\n if (validatorName === 'unique' && component.conflictId) {\n resultData.conflictId = component.conflictId;\n }\n return resultData;\n } else {\n return false;\n }\n };\n if (async) {\n return _nativePromiseOnly[\"default\"].resolve(resultOrPromise).then(processResult);\n } else {\n return processResult(resultOrPromise);\n }\n }\n }, {\n key: \"checkComponent\",\n value: function checkComponent(component, data, row) {\n var _component$addons,\n _this3 = this;\n var includeWarnings = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n var async = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;\n var isServerSidePersistent = typeof process !== 'undefined' && _lodash[\"default\"].get(process, 'release.name') === 'node' && !_lodash[\"default\"].defaultTo(component.component.persistent, true);\n\n // If we're server-side and it's not a persistent component, don't run validation at all\n if (isServerSidePersistent || component.component.validate === false) {\n return async ? _nativePromiseOnly[\"default\"].resolve([]) : [];\n }\n data = data || component.rootValue;\n row = row || component.data;\n var values = component.component.multiple && Array.isArray(component.validationValue) ? component.validationValue : [component.validationValue];\n var conditionallyVisible = component.conditionallyVisible();\n var addonsValidations = [];\n if (component !== null && component !== void 0 && (_component$addons = component.addons) !== null && _component$addons !== void 0 && _component$addons.length) {\n values.forEach(function (value) {\n component.addons.forEach(function (addon) {\n if (!addon.checkValidity(value)) {\n addonsValidations.push.apply(addonsValidations, _toConsumableArray(addon.errors || []));\n }\n });\n });\n }\n\n // If this component has the new validation system enabled, use it instead.\n var validations = _lodash[\"default\"].get(component, 'component.validations');\n var nextGenResultsOrPromises = [];\n if (validations && Array.isArray(validations) && validations.length) {\n var validationsGroupedByMode = _lodash[\"default\"].chain(validations).groupBy(function (validation) {\n return validation.mode;\n }).value();\n if (component.calculateCondition) {\n includeWarnings = true;\n var uiGroupedValidation = _lodash[\"default\"].chain(validationsGroupedByMode.ui).filter('active').groupBy(function (validation) {\n return validation.group || null;\n }).value();\n var commonValidations = uiGroupedValidation[\"null\"] || [];\n delete uiGroupedValidation[\"null\"];\n commonValidations.forEach(function (_ref3) {\n var condition = _ref3.condition,\n message = _ref3.message,\n severity = _ref3.severity;\n if (!component.calculateCondition(condition)) {\n nextGenResultsOrPromises.push({\n level: severity || 'error',\n message: component.t(message),\n componentInstance: component\n });\n }\n });\n _lodash[\"default\"].forEach(uiGroupedValidation, function (validationGroup) {\n _lodash[\"default\"].forEach(validationGroup, function (_ref4) {\n var condition = _ref4.condition,\n message = _ref4.message,\n severity = _ref4.severity;\n if (!component.calculateCondition(condition)) {\n nextGenResultsOrPromises.push({\n level: severity || 'error',\n message: component.t(message),\n componentInstance: component\n });\n return false;\n }\n });\n });\n } else {\n nextGenResultsOrPromises = this.checkValidations(component, validations, data, row, values, async);\n }\n if (component.validators.includes('custom') && validationsGroupedByMode.js) {\n _lodash[\"default\"].each(validationsGroupedByMode.js, function (validation) {\n nextGenResultsOrPromises.push(_lodash[\"default\"].map(values, function (value, index) {\n return _this3.validate(component, 'custom', value, data, index, row, async, conditionallyVisible, validation);\n }));\n });\n }\n if (component.validators.includes('json') && validationsGroupedByMode.json) {\n _lodash[\"default\"].each(validationsGroupedByMode.json, function (validation) {\n nextGenResultsOrPromises.push(_lodash[\"default\"].map(values, function (value, index) {\n return _this3.validate(component, 'json', value, data, index, row, async, conditionallyVisible, validation);\n }));\n });\n }\n }\n var validateCustom = _lodash[\"default\"].get(component, 'component.validate.custom');\n var customErrorMessage = _lodash[\"default\"].get(component, 'component.validate.customMessage');\n\n // Run primary validators\n var resultsOrPromises = (0, _lodash[\"default\"])(component.validators).chain().map(function (validatorName) {\n if (!_this3.validators.hasOwnProperty(validatorName)) {\n return {\n message: \"Validator for \\\"\".concat(validatorName, \"\\\" is not defined\"),\n level: 'warning',\n context: {\n validator: validatorName,\n key: component.key,\n label: component.label\n }\n };\n }\n\n // Handle the case when there is no values defined and it is required.\n if (validatorName === 'required' && !values.length) {\n return [_this3.validate(component, validatorName, null, data, 0, row, async, conditionallyVisible)];\n }\n return _lodash[\"default\"].map(values, function (value, index) {\n return _this3.validate(component, validatorName, value, data, index, row, async, conditionallyVisible);\n });\n }).flatten().value();\n\n // Run the \"unique\" pseudo-validator\n component.component.validate = component.component.validate || {};\n component.component.validate.unique = component.component.unique;\n resultsOrPromises.push(this.validate(component, 'unique', component.validationValue, data, 0, data, async, conditionallyVisible));\n\n // Run the \"multiple\" pseudo-validator\n component.component.validate.multiple = component.component.multiple;\n resultsOrPromises.push(this.validate(component, 'multiple', component.validationValue, data, 0, data, async, conditionallyVisible));\n resultsOrPromises.push.apply(resultsOrPromises, addonsValidations);\n resultsOrPromises.push.apply(resultsOrPromises, _toConsumableArray(nextGenResultsOrPromises));\n\n // Define how results should be formatted\n var formatResults = function formatResults(results) {\n // Condense to a single flat array\n results = (0, _lodash[\"default\"])(results).chain().flatten().compact().value();\n if (customErrorMessage || validateCustom) {\n _lodash[\"default\"].each(results, function (result) {\n result.message = component.t(customErrorMessage || result.message, {\n field: component.errorLabel,\n data: data,\n row: row,\n error: result\n });\n result.context.hasLabel = false;\n });\n }\n return includeWarnings ? results : _lodash[\"default\"].reject(results, function (result) {\n return result.level === 'warning';\n });\n };\n // Wait for results if using async mode, otherwise process and return immediately\n if (async) {\n return _nativePromiseOnly[\"default\"].all(resultsOrPromises).then(formatResults);\n } else {\n return formatResults(resultsOrPromises);\n }\n }\n\n /**\n * Use the new validations engine to evaluate any errors.\n *\n * @param component\n * @param validations\n * @param data\n * @param row\n * @param values\n * @returns {any[]}\n */\n }, {\n key: \"checkValidations\",\n value: function checkValidations(component, validations, data, row, values, async) {\n var _this4 = this;\n // Get results.\n var results = validations.map(function (validation) {\n return _this4.checkRule(component, validation, data, row, values, async);\n });\n\n // Flatten array and filter out empty results.\n var messages = results.reduce(function (prev, result) {\n if (result) {\n return [].concat(_toConsumableArray(prev), _toConsumableArray(result));\n }\n return prev;\n }, []).filter(function (result) {\n return result;\n });\n\n // Keep only the last error for each rule.\n var rules = messages.reduce(function (prev, message) {\n prev[message.context.validator] = message;\n return prev;\n }, {});\n return Object.values(rules);\n }\n }, {\n key: \"checkRule\",\n value: function checkRule(component, validation, data, row, values, async) {\n var Rule = _Rules[\"default\"].getRule(validation.rule);\n var results = [];\n if (Rule) {\n var rule = new Rule(component, validation.settings, this.config);\n values.map(function (value, index) {\n var result = rule.check(value, data, row, async);\n if (result !== true) {\n results.push({\n level: validation.level || 'error',\n message: component.t(validation.message || rule.defaultMessage, {\n settings: validation.settings,\n field: component.errorLabel,\n data: data,\n row: row,\n error: result\n }),\n context: {\n key: component.key,\n index: index,\n label: component.label,\n validator: validation.rule\n }\n });\n }\n });\n }\n // If there are no results, return false so it is removed by filter.\n return results.length === 0 ? false : results;\n }\n }, {\n key: \"check\",\n get: function get() {\n return this.checkComponent;\n }\n }, {\n key: \"get\",\n value: function get() {\n _lodash[\"default\"].get.call(this, arguments);\n }\n }, {\n key: \"each\",\n value: function each() {\n _lodash[\"default\"].each.call(this, arguments);\n }\n }, {\n key: \"has\",\n value: function has() {\n _lodash[\"default\"].has.call(this, arguments);\n }\n }]);\n return ValidationChecker;\n}();\nexports.ValidationChecker = ValidationChecker;\nValidationChecker.config = {\n db: null,\n token: null,\n form: null,\n submission: null\n};\nvar instance = new ValidationChecker();\nexports[\"default\"] = instance;\n\n//# sourceURL=webpack://Formio/./lib/validator/Validator.js?"); /***/ }), @@ -4268,7 +4805,7 @@ eval("\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modul /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptors.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar Conjunctions = /*#__PURE__*/function () {\n function Conjunctions() {\n _classCallCheck(this, Conjunctions);\n }\n\n _createClass(Conjunctions, null, [{\n key: \"addConjunction\",\n value: function addConjunction(name, conjunction) {\n Conjunctions.conjunctions[name] = conjunction;\n }\n }, {\n key: \"addConjunctions\",\n value: function addConjunctions(conjunctions) {\n Conjunctions.conjunctions = _objectSpread(_objectSpread({}, Conjunctions.conjunctions), conjunctions);\n }\n }, {\n key: \"getConjunction\",\n value: function getConjunction(name) {\n return Conjunctions.conjunctions[name];\n }\n }, {\n key: \"getConjunctions\",\n value: function getConjunctions() {\n return Conjunctions.conjunctions;\n }\n }]);\n\n return Conjunctions;\n}();\n\nexports[\"default\"] = Conjunctions;\n\n_defineProperty(Conjunctions, \"conjunctions\", {});\n\n//# sourceURL=webpack://Formio/./lib/validator/conjunctions/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptors.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-properties.js */ \"./node_modules/core-js/modules/es.object.define-properties.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar Conjunctions = /*#__PURE__*/function () {\n function Conjunctions() {\n _classCallCheck(this, Conjunctions);\n }\n _createClass(Conjunctions, null, [{\n key: \"addConjunction\",\n value: function addConjunction(name, conjunction) {\n Conjunctions.conjunctions[name] = conjunction;\n }\n }, {\n key: \"addConjunctions\",\n value: function addConjunctions(conjunctions) {\n Conjunctions.conjunctions = _objectSpread(_objectSpread({}, Conjunctions.conjunctions), conjunctions);\n }\n }, {\n key: \"getConjunction\",\n value: function getConjunction(name) {\n return Conjunctions.conjunctions[name];\n }\n }, {\n key: \"getConjunctions\",\n value: function getConjunctions() {\n return Conjunctions.conjunctions;\n }\n }]);\n return Conjunctions;\n}();\nexports[\"default\"] = Conjunctions;\n_defineProperty(Conjunctions, \"conjunctions\", {});\n\n//# sourceURL=webpack://Formio/./lib/validator/conjunctions/index.js?"); /***/ }), @@ -4279,7 +4816,7 @@ eval("\n\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptors.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar Operators = /*#__PURE__*/function () {\n function Operators() {\n _classCallCheck(this, Operators);\n }\n\n _createClass(Operators, null, [{\n key: \"addOperator\",\n value: function addOperator(name, operator) {\n Operators.operators[name] = operator;\n }\n }, {\n key: \"addOperators\",\n value: function addOperators(operators) {\n Operators.operators = _objectSpread(_objectSpread({}, Operators.operators), operators);\n }\n }, {\n key: \"getOperator\",\n value: function getOperator(name) {\n return Operators.operators[name];\n }\n }, {\n key: \"getOperators\",\n value: function getOperators() {\n return Operators.operators;\n }\n }]);\n\n return Operators;\n}();\n\nexports[\"default\"] = Operators;\n\n_defineProperty(Operators, \"operators\", {});\n\n//# sourceURL=webpack://Formio/./lib/validator/operators/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptors.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-properties.js */ \"./node_modules/core-js/modules/es.object.define-properties.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar Operators = /*#__PURE__*/function () {\n function Operators() {\n _classCallCheck(this, Operators);\n }\n _createClass(Operators, null, [{\n key: \"addOperator\",\n value: function addOperator(name, operator) {\n Operators.operators[name] = operator;\n }\n }, {\n key: \"addOperators\",\n value: function addOperators(operators) {\n Operators.operators = _objectSpread(_objectSpread({}, Operators.operators), operators);\n }\n }, {\n key: \"getOperator\",\n value: function getOperator(name) {\n return Operators.operators[name];\n }\n }, {\n key: \"getOperators\",\n value: function getOperators() {\n return Operators.operators;\n }\n }]);\n return Operators;\n}();\nexports[\"default\"] = Operators;\n_defineProperty(Operators, \"operators\", {});\n\n//# sourceURL=webpack://Formio/./lib/validator/operators/index.js?"); /***/ }), @@ -4290,7 +4827,7 @@ eval("\n\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptors.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar QuickRules = /*#__PURE__*/function () {\n function QuickRules() {\n _classCallCheck(this, QuickRules);\n }\n\n _createClass(QuickRules, null, [{\n key: \"addQuickRule\",\n value: function addQuickRule(name, quickRule) {\n QuickRules.quickRules[name] = quickRule;\n }\n }, {\n key: \"addQuickRules\",\n value: function addQuickRules(quickRules) {\n QuickRules.quickRules = _objectSpread(_objectSpread({}, QuickRules.quickRules), quickRules);\n }\n }, {\n key: \"getQuickRule\",\n value: function getQuickRule(name) {\n return QuickRules.quickRules[name];\n }\n }, {\n key: \"getQuickRules\",\n value: function getQuickRules() {\n return QuickRules.quickRules;\n }\n }]);\n\n return QuickRules;\n}();\n\nexports[\"default\"] = QuickRules;\n\n_defineProperty(QuickRules, \"quickRules\", {});\n\n//# sourceURL=webpack://Formio/./lib/validator/quickRules/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptors.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-properties.js */ \"./node_modules/core-js/modules/es.object.define-properties.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar QuickRules = /*#__PURE__*/function () {\n function QuickRules() {\n _classCallCheck(this, QuickRules);\n }\n _createClass(QuickRules, null, [{\n key: \"addQuickRule\",\n value: function addQuickRule(name, quickRule) {\n QuickRules.quickRules[name] = quickRule;\n }\n }, {\n key: \"addQuickRules\",\n value: function addQuickRules(quickRules) {\n QuickRules.quickRules = _objectSpread(_objectSpread({}, QuickRules.quickRules), quickRules);\n }\n }, {\n key: \"getQuickRule\",\n value: function getQuickRule(name) {\n return QuickRules.quickRules[name];\n }\n }, {\n key: \"getQuickRules\",\n value: function getQuickRules() {\n return QuickRules.quickRules;\n }\n }]);\n return QuickRules;\n}();\nexports[\"default\"] = QuickRules;\n_defineProperty(QuickRules, \"quickRules\", {});\n\n//# sourceURL=webpack://Formio/./lib/validator/quickRules/index.js?"); /***/ }), @@ -4301,7 +4838,7 @@ eval("\n\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar Rule = __webpack_require__(/*! ./Rule */ \"./lib/validator/rules/Rule.js\");\n\nmodule.exports = /*#__PURE__*/function (_Rule) {\n _inherits(Custom, _Rule);\n\n var _super = _createSuper(Custom);\n\n function Custom() {\n var _this;\n\n _classCallCheck(this, Custom);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"defaultMessage\", '{{error}}');\n\n return _this;\n }\n\n _createClass(Custom, [{\n key: \"check\",\n value: function check(value, data, row, index) {\n var custom = this.settings.custom;\n\n if (!custom) {\n return true;\n }\n\n var valid = this.component.evaluate(custom, {\n valid: true,\n data: data,\n row: row,\n rowIndex: index,\n input: value\n }, 'valid', true);\n\n if (valid === null) {\n return true;\n }\n\n return valid;\n }\n }]);\n\n return Custom;\n}(Rule);\n\n//# sourceURL=webpack://Formio/./lib/validator/rules/Custom.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar Rule = __webpack_require__(/*! ./Rule */ \"./lib/validator/rules/Rule.js\");\nmodule.exports = /*#__PURE__*/function (_Rule) {\n _inherits(Custom, _Rule);\n var _super = _createSuper(Custom);\n function Custom() {\n var _this;\n _classCallCheck(this, Custom);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"defaultMessage\", '{{error}}');\n return _this;\n }\n _createClass(Custom, [{\n key: \"check\",\n value: function check(value, data, row, index) {\n var custom = this.settings.custom;\n if (!custom) {\n return true;\n }\n var valid = this.component.evaluate(custom, {\n valid: true,\n data: data,\n row: row,\n rowIndex: index,\n input: value\n }, 'valid', true);\n if (valid === null) {\n return true;\n }\n return valid;\n }\n }]);\n return Custom;\n}(Rule);\n\n//# sourceURL=webpack://Formio/./lib/validator/rules/Custom.js?"); /***/ }), @@ -4312,7 +4849,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar Rule = __webpack_require__(/*! ./Rule */ \"./lib/validator/rules/Rule.js\");\n\nmodule.exports = /*#__PURE__*/function (_Rule) {\n _inherits(DateRule, _Rule);\n\n var _super = _createSuper(DateRule);\n\n function DateRule() {\n var _this;\n\n _classCallCheck(this, DateRule);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"defaultMessage\", '{{field}} is not a valid date.');\n\n return _this;\n }\n\n _createClass(DateRule, [{\n key: \"check\",\n value: function check(value) {\n if (!value || value instanceof Date) {\n return true;\n }\n\n if (value === 'Invalid date' || value === 'Invalid Date') {\n return false;\n }\n\n if (typeof value === 'string') {\n value = new Date(value);\n }\n\n return value.toString() !== 'Invalid Date';\n }\n }]);\n\n return DateRule;\n}(Rule);\n\n//# sourceURL=webpack://Formio/./lib/validator/rules/Date.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-string.js */ \"./node_modules/core-js/modules/es.date.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar Rule = __webpack_require__(/*! ./Rule */ \"./lib/validator/rules/Rule.js\");\nmodule.exports = /*#__PURE__*/function (_Rule) {\n _inherits(DateRule, _Rule);\n var _super = _createSuper(DateRule);\n function DateRule() {\n var _this;\n _classCallCheck(this, DateRule);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"defaultMessage\", '{{field}} is not a valid date.');\n return _this;\n }\n _createClass(DateRule, [{\n key: \"check\",\n value: function check(value) {\n if (!value) {\n return true;\n }\n if (value === 'Invalid date' || value === 'Invalid Date') {\n return false;\n }\n if (typeof value === 'string') {\n value = new Date(value);\n }\n return value instanceof Date === true && value.toString() !== 'Invalid Date';\n }\n }]);\n return DateRule;\n}(Rule);\n\n//# sourceURL=webpack://Formio/./lib/validator/rules/Date.js?"); /***/ }), @@ -4323,7 +4860,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.slice.js */ \"./node_modules/core-js/modules/es.array.slice.js\");\n\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.from.js */ \"./node_modules/core-js/modules/es.array.from.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.split.js */ \"./node_modules/core-js/modules/es.string.split.js\");\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { 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\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar Rule = __webpack_require__(/*! ./Rule */ \"./lib/validator/rules/Rule.js\");\n\nmodule.exports = /*#__PURE__*/function (_Rule) {\n _inherits(Day, _Rule);\n\n var _super = _createSuper(Day);\n\n function Day() {\n var _this;\n\n _classCallCheck(this, Day);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"defaultMessage\", '{{field}} is not a valid day.');\n\n return _this;\n }\n\n _createClass(Day, [{\n key: \"check\",\n value: function check(value) {\n if (!value) {\n return true;\n }\n\n if (typeof value !== 'string') {\n return false;\n }\n\n var _ref = this.component.dayFirst ? [0, 1, 2] : [1, 0, 2],\n _ref2 = _slicedToArray(_ref, 3),\n DAY = _ref2[0],\n MONTH = _ref2[1],\n YEAR = _ref2[2];\n\n var values = value.split('/').map(function (x) {\n return parseInt(x, 10);\n }),\n day = values[DAY],\n month = values[MONTH],\n year = values[YEAR],\n maxDay = getDaysInMonthCount(month, year);\n\n if (isNaN(day) || day < 0 || day > maxDay) {\n return false;\n }\n\n if (isNaN(month) || month < 0 || month > 12) {\n return false;\n }\n\n if (isNaN(year) || year < 0 || year > 9999) {\n return false;\n }\n\n return true;\n\n function isLeapYear(year) {\n // Year is leap if it is evenly divisible by 400 or evenly divisible by 4 and not evenly divisible by 100.\n return !(year % 400) || !!(year % 100) && !(year % 4);\n }\n\n function getDaysInMonthCount(month, year) {\n switch (month) {\n case 1: // January\n\n case 3: // March\n\n case 5: // May\n\n case 7: // July\n\n case 8: // August\n\n case 10: // October\n\n case 12:\n // December\n return 31;\n\n case 4: // April\n\n case 6: // June\n\n case 9: // September\n\n case 11:\n // November\n return 30;\n\n case 2:\n // February\n return isLeapYear(year) ? 29 : 28;\n\n default:\n return 31;\n }\n }\n }\n }]);\n\n return Day;\n}(Rule);\n\n//# sourceURL=webpack://Formio/./lib/validator/rules/Day.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.array.is-array.js */ \"./node_modules/core-js/modules/es.array.is-array.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.slice.js */ \"./node_modules/core-js/modules/es.array.slice.js\");\n__webpack_require__(/*! core-js/modules/es.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n__webpack_require__(/*! core-js/modules/es.array.from.js */ \"./node_modules/core-js/modules/es.array.from.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n__webpack_require__(/*! core-js/modules/es.parse-int.js */ \"./node_modules/core-js/modules/es.parse-int.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\nfunction _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : \"undefined\" != typeof Symbol && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) { ; } } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i[\"return\"] && (_r = _i[\"return\"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar Rule = __webpack_require__(/*! ./Rule */ \"./lib/validator/rules/Rule.js\");\nmodule.exports = /*#__PURE__*/function (_Rule) {\n _inherits(Day, _Rule);\n var _super = _createSuper(Day);\n function Day() {\n var _this;\n _classCallCheck(this, Day);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"defaultMessage\", '{{field}} is not a valid day.');\n return _this;\n }\n _createClass(Day, [{\n key: \"check\",\n value: function check(value) {\n if (!value) {\n return true;\n }\n if (typeof value !== 'string') {\n return false;\n }\n var _ref = this.component.dayFirst ? [0, 1, 2] : [1, 0, 2],\n _ref2 = _slicedToArray(_ref, 3),\n DAY = _ref2[0],\n MONTH = _ref2[1],\n YEAR = _ref2[2];\n var values = value.split('/').map(function (x) {\n return parseInt(x, 10);\n }),\n day = values[DAY],\n month = values[MONTH],\n year = values[YEAR],\n maxDay = getDaysInMonthCount(month, year);\n if (isNaN(day) || day < 0 || day > maxDay) {\n return false;\n }\n if (isNaN(month) || month < 0 || month > 12) {\n return false;\n }\n if (isNaN(year) || year < 0 || year > 9999) {\n return false;\n }\n return true;\n function isLeapYear(year) {\n // Year is leap if it is evenly divisible by 400 or evenly divisible by 4 and not evenly divisible by 100.\n return !(year % 400) || !!(year % 100) && !(year % 4);\n }\n function getDaysInMonthCount(month, year) {\n switch (month) {\n case 1: // January\n case 3: // March\n case 5: // May\n case 7: // July\n case 8: // August\n case 10: // October\n case 12:\n // December\n return 31;\n case 4: // April\n case 6: // June\n case 9: // September\n case 11:\n // November\n return 30;\n case 2:\n // February\n return isLeapYear(year) ? 29 : 28;\n default:\n return 31;\n }\n }\n }\n }]);\n return Day;\n}(Rule);\n\n//# sourceURL=webpack://Formio/./lib/validator/rules/Day.js?"); /***/ }), @@ -4334,7 +4871,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar Rule = __webpack_require__(/*! ./Rule */ \"./lib/validator/rules/Rule.js\");\n\nmodule.exports = /*#__PURE__*/function (_Rule) {\n _inherits(Email, _Rule);\n\n var _super = _createSuper(Email);\n\n function Email() {\n var _this;\n\n _classCallCheck(this, Email);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"defaultMessage\", '{{field}} must be a valid email.');\n\n return _this;\n }\n\n _createClass(Email, [{\n key: \"check\",\n value: function check(value) {\n if (!value) {\n return true;\n }\n /* eslint-disable max-len */\n // From http://stackoverflow.com/questions/46155/validate-email-address-in-javascript\n\n\n var re = /^(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\n /* eslint-enable max-len */\n // Allow emails to be valid if the component is pristine and no value is provided.\n\n return re.test(value);\n }\n }]);\n\n return Email;\n}(Rule);\n\n//# sourceURL=webpack://Formio/./lib/validator/rules/Email.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar Rule = __webpack_require__(/*! ./Rule */ \"./lib/validator/rules/Rule.js\");\nmodule.exports = /*#__PURE__*/function (_Rule) {\n _inherits(Email, _Rule);\n var _super = _createSuper(Email);\n function Email() {\n var _this;\n _classCallCheck(this, Email);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"defaultMessage\", '{{field}} must be a valid email.');\n return _this;\n }\n _createClass(Email, [{\n key: \"check\",\n value: function check(value) {\n if (!value) {\n return true;\n }\n\n /* eslint-disable max-len */\n // From http://stackoverflow.com/questions/46155/validate-email-address-in-javascript\n var re = /^(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\n /* eslint-enable max-len */\n\n // Allow emails to be valid if the component is pristine and no value is provided.\n return re.test(value);\n }\n }]);\n return Email;\n}(Rule);\n\n//# sourceURL=webpack://Formio/./lib/validator/rules/Email.js?"); /***/ }), @@ -4345,7 +4882,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar Rule = __webpack_require__(/*! ./Rule */ \"./lib/validator/rules/Rule.js\");\n\nmodule.exports = /*#__PURE__*/function (_Rule) {\n _inherits(JSON, _Rule);\n\n var _super = _createSuper(JSON);\n\n function JSON() {\n var _this;\n\n _classCallCheck(this, JSON);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"defaultMessage\", '{{error}}');\n\n return _this;\n }\n\n _createClass(JSON, [{\n key: \"check\",\n value: function check(value, data, row, index) {\n var json = this.settings.json;\n\n if (!json) {\n return true;\n }\n\n var valid = this.component.evaluate(json, {\n data: data,\n row: row,\n rowIndex: index,\n input: value\n });\n\n if (valid === null) {\n return true;\n }\n\n return valid;\n }\n }]);\n\n return JSON;\n}(Rule);\n\n//# sourceURL=webpack://Formio/./lib/validator/rules/JSON.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar Rule = __webpack_require__(/*! ./Rule */ \"./lib/validator/rules/Rule.js\");\nmodule.exports = /*#__PURE__*/function (_Rule) {\n _inherits(JSON, _Rule);\n var _super = _createSuper(JSON);\n function JSON() {\n var _this;\n _classCallCheck(this, JSON);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"defaultMessage\", '{{error}}');\n return _this;\n }\n _createClass(JSON, [{\n key: \"check\",\n value: function check(value, data, row, index) {\n var json = this.settings.json;\n if (!json) {\n return true;\n }\n var valid = this.component.evaluate(json, {\n data: data,\n row: row,\n rowIndex: index,\n input: value\n });\n if (valid === null) {\n return true;\n }\n return valid;\n }\n }]);\n return JSON;\n}(Rule);\n\n//# sourceURL=webpack://Formio/./lib/validator/rules/JSON.js?"); /***/ }), @@ -4356,7 +4893,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\nvar _utils = __webpack_require__(/*! ../../utils/utils */ \"./lib/utils/utils.js\");\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar Rule = __webpack_require__(/*! ./Rule */ \"./lib/validator/rules/Rule.js\");\n\nmodule.exports = /*#__PURE__*/function (_Rule) {\n _inherits(Mask, _Rule);\n\n var _super = _createSuper(Mask);\n\n function Mask() {\n var _this;\n\n _classCallCheck(this, Mask);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"defaultMessage\", '{{field}} does not match the mask.');\n\n return _this;\n }\n\n _createClass(Mask, [{\n key: \"check\",\n value: function check(value) {\n var inputMask;\n\n if (this.component.isMultipleMasksField) {\n var maskName = value ? value.maskName : undefined;\n var formioInputMask = this.component.getMaskByName(maskName);\n\n if (formioInputMask) {\n inputMask = (0, _utils.getInputMask)(formioInputMask);\n }\n\n value = value ? value.value : value;\n } else {\n inputMask = (0, _utils.getInputMask)(this.settings.mask);\n }\n\n if (value && inputMask) {\n return (0, _utils.matchInputMask)(value, inputMask);\n }\n\n return true;\n }\n }]);\n\n return Mask;\n}(Rule);\n\n//# sourceURL=webpack://Formio/./lib/validator/rules/Mask.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\nvar _utils = __webpack_require__(/*! ../../utils/utils */ \"./lib/utils/utils.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar Rule = __webpack_require__(/*! ./Rule */ \"./lib/validator/rules/Rule.js\");\nmodule.exports = /*#__PURE__*/function (_Rule) {\n _inherits(Mask, _Rule);\n var _super = _createSuper(Mask);\n function Mask() {\n var _this;\n _classCallCheck(this, Mask);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"defaultMessage\", '{{field}} does not match the mask.');\n return _this;\n }\n _createClass(Mask, [{\n key: \"check\",\n value: function check(value) {\n var inputMask;\n if (this.component.isMultipleMasksField) {\n var maskName = value ? value.maskName : undefined;\n var formioInputMask = this.component.getMaskByName(maskName);\n if (formioInputMask) {\n inputMask = (0, _utils.getInputMask)(formioInputMask);\n }\n value = value ? value.value : value;\n } else {\n inputMask = (0, _utils.getInputMask)(this.settings.mask);\n }\n if (value && inputMask) {\n return (0, _utils.matchInputMask)(value, inputMask);\n }\n return true;\n }\n }]);\n return Mask;\n}(Rule);\n\n//# sourceURL=webpack://Formio/./lib/validator/rules/Mask.js?"); /***/ }), @@ -4367,7 +4904,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.number.is-nan.js */ \"./node_modules/core-js/modules/es.number.is-nan.js\");\n\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar Rule = __webpack_require__(/*! ./Rule */ \"./lib/validator/rules/Rule.js\");\n\nmodule.exports = /*#__PURE__*/function (_Rule) {\n _inherits(Max, _Rule);\n\n var _super = _createSuper(Max);\n\n function Max() {\n var _this;\n\n _classCallCheck(this, Max);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"defaultMessage\", '{{field}} cannot be greater than {{settings.limit}}.');\n\n return _this;\n }\n\n _createClass(Max, [{\n key: \"check\",\n value: function check(value) {\n var max = parseFloat(this.settings.limit);\n var parsedValue = parseFloat(value);\n\n if (Number.isNaN(max) || Number.isNaN(parsedValue)) {\n return true;\n }\n\n return parsedValue <= max;\n }\n }]);\n\n return Max;\n}(Rule);\n\n//# sourceURL=webpack://Formio/./lib/validator/rules/Max.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.parse-float.js */ \"./node_modules/core-js/modules/es.parse-float.js\");\n__webpack_require__(/*! core-js/modules/es.number.is-nan.js */ \"./node_modules/core-js/modules/es.number.is-nan.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar Rule = __webpack_require__(/*! ./Rule */ \"./lib/validator/rules/Rule.js\");\nmodule.exports = /*#__PURE__*/function (_Rule) {\n _inherits(Max, _Rule);\n var _super = _createSuper(Max);\n function Max() {\n var _this;\n _classCallCheck(this, Max);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"defaultMessage\", '{{field}} cannot be greater than {{settings.limit}}.');\n return _this;\n }\n _createClass(Max, [{\n key: \"check\",\n value: function check(value) {\n var max = parseFloat(this.settings.limit);\n var parsedValue = parseFloat(value);\n if (Number.isNaN(max) || Number.isNaN(parsedValue)) {\n return true;\n }\n return parsedValue <= max;\n }\n }]);\n return Max;\n}(Rule);\n\n//# sourceURL=webpack://Formio/./lib/validator/rules/Max.js?"); /***/ }), @@ -4378,7 +4915,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\nvar _utils = __webpack_require__(/*! ../../utils/utils */ \"./lib/utils/utils.js\");\n\nvar _moment = _interopRequireDefault(__webpack_require__(/*! moment */ \"./node_modules/moment/moment.js\"));\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar Rule = __webpack_require__(/*! ./Rule */ \"./lib/validator/rules/Rule.js\");\n\nmodule.exports = /*#__PURE__*/function (_Rule) {\n _inherits(MaxDate, _Rule);\n\n var _super = _createSuper(MaxDate);\n\n function MaxDate() {\n var _this;\n\n _classCallCheck(this, MaxDate);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"defaultMessage\", '{{field}} should not contain date after {{settings.dateLimit}}');\n\n return _this;\n }\n\n _createClass(MaxDate, [{\n key: \"check\",\n value: function check(value) {\n if (!value) {\n return true;\n } // If they are the exact same string or object, then return true.\n\n\n if (value === this.settings.dateLimit) {\n return true;\n }\n\n var date = (0, _moment.default)(value);\n var maxDate = (0, _utils.getDateSetting)(this.settings.dateLimit);\n\n if (_lodash.default.isNull(maxDate)) {\n return true;\n } else {\n maxDate.setHours(0, 0, 0, 0);\n }\n\n return date.isBefore(maxDate) || date.isSame(maxDate);\n }\n }]);\n\n return MaxDate;\n}(Rule);\n\n//# sourceURL=webpack://Formio/./lib/validator/rules/MaxDate.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\nvar _utils = __webpack_require__(/*! ../../utils/utils */ \"./lib/utils/utils.js\");\nvar _moment = _interopRequireDefault(__webpack_require__(/*! moment */ \"./node_modules/moment/moment.js\"));\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar Rule = __webpack_require__(/*! ./Rule */ \"./lib/validator/rules/Rule.js\");\nmodule.exports = /*#__PURE__*/function (_Rule) {\n _inherits(MaxDate, _Rule);\n var _super = _createSuper(MaxDate);\n function MaxDate() {\n var _this;\n _classCallCheck(this, MaxDate);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"defaultMessage\", '{{field}} should not contain date after {{settings.dateLimit}}');\n return _this;\n }\n _createClass(MaxDate, [{\n key: \"check\",\n value: function check(value) {\n if (!value) {\n return true;\n }\n\n // If they are the exact same string or object, then return true.\n if (value === this.settings.dateLimit) {\n return true;\n }\n var date = (0, _moment[\"default\"])(value);\n var maxDate = (0, _utils.getDateSetting)(this.settings.dateLimit);\n if (_lodash[\"default\"].isNull(maxDate)) {\n return true;\n } else {\n maxDate.setHours(0, 0, 0, 0);\n }\n return date.isBefore(maxDate) || date.isSame(maxDate);\n }\n }]);\n return MaxDate;\n}(Rule);\n\n//# sourceURL=webpack://Formio/./lib/validator/rules/MaxDate.js?"); /***/ }), @@ -4389,7 +4926,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar Rule = __webpack_require__(/*! ./Rule */ \"./lib/validator/rules/Rule.js\");\n\nmodule.exports = /*#__PURE__*/function (_Rule) {\n _inherits(MaxLength, _Rule);\n\n var _super = _createSuper(MaxLength);\n\n function MaxLength() {\n var _this;\n\n _classCallCheck(this, MaxLength);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"defaultMessage\", '{{field}} must have no more than {{- settings.length}} characters.');\n\n return _this;\n }\n\n _createClass(MaxLength, [{\n key: \"check\",\n value: function check(value) {\n var maxLength = parseInt(this.settings.length, 10);\n\n if (!value || !maxLength || !value.hasOwnProperty('length')) {\n return true;\n }\n\n return value.length <= maxLength;\n }\n }]);\n\n return MaxLength;\n}(Rule);\n\n//# sourceURL=webpack://Formio/./lib/validator/rules/MaxLength.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.parse-int.js */ \"./node_modules/core-js/modules/es.parse-int.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar Rule = __webpack_require__(/*! ./Rule */ \"./lib/validator/rules/Rule.js\");\nmodule.exports = /*#__PURE__*/function (_Rule) {\n _inherits(MaxLength, _Rule);\n var _super = _createSuper(MaxLength);\n function MaxLength() {\n var _this;\n _classCallCheck(this, MaxLength);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"defaultMessage\", '{{field}} must have no more than {{- settings.length}} characters.');\n return _this;\n }\n _createClass(MaxLength, [{\n key: \"check\",\n value: function check(value) {\n var maxLength = parseInt(this.settings.length, 10);\n if (!value || !maxLength || !value.hasOwnProperty('length')) {\n return true;\n }\n return value.length <= maxLength;\n }\n }]);\n return MaxLength;\n}(Rule);\n\n//# sourceURL=webpack://Formio/./lib/validator/rules/MaxLength.js?"); /***/ }), @@ -4400,7 +4937,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.split.js */ \"./node_modules/core-js/modules/es.string.split.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.trim.js */ \"./node_modules/core-js/modules/es.string.trim.js\");\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar Rule = __webpack_require__(/*! ./Rule */ \"./lib/validator/rules/Rule.js\");\n\nmodule.exports = /*#__PURE__*/function (_Rule) {\n _inherits(MaxWords, _Rule);\n\n var _super = _createSuper(MaxWords);\n\n function MaxWords() {\n var _this;\n\n _classCallCheck(this, MaxWords);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"defaultMessage\", '{{field}} must have no more than {{- settings.length}} words.');\n\n return _this;\n }\n\n _createClass(MaxWords, [{\n key: \"check\",\n value: function check(value) {\n var maxWords = parseInt(this.settings.length, 10);\n\n if (!maxWords || typeof value !== 'string') {\n return true;\n }\n\n return value.trim().split(/\\s+/).length <= maxWords;\n }\n }]);\n\n return MaxWords;\n}(Rule);\n\n//# sourceURL=webpack://Formio/./lib/validator/rules/MaxWords.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.parse-int.js */ \"./node_modules/core-js/modules/es.parse-int.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n__webpack_require__(/*! core-js/modules/es.string.split.js */ \"./node_modules/core-js/modules/es.string.split.js\");\n__webpack_require__(/*! core-js/modules/es.string.trim.js */ \"./node_modules/core-js/modules/es.string.trim.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar Rule = __webpack_require__(/*! ./Rule */ \"./lib/validator/rules/Rule.js\");\nmodule.exports = /*#__PURE__*/function (_Rule) {\n _inherits(MaxWords, _Rule);\n var _super = _createSuper(MaxWords);\n function MaxWords() {\n var _this;\n _classCallCheck(this, MaxWords);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"defaultMessage\", '{{field}} must have no more than {{- settings.length}} words.');\n return _this;\n }\n _createClass(MaxWords, [{\n key: \"check\",\n value: function check(value) {\n var maxWords = parseInt(this.settings.length, 10);\n if (!maxWords || typeof value !== 'string') {\n return true;\n }\n return value.trim().split(/\\s+/).length <= maxWords;\n }\n }]);\n return MaxWords;\n}(Rule);\n\n//# sourceURL=webpack://Formio/./lib/validator/rules/MaxWords.js?"); /***/ }), @@ -4411,7 +4948,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar Rule = __webpack_require__(/*! ./Rule */ \"./lib/validator/rules/Rule.js\");\n\nmodule.exports = /*#__PURE__*/function (_Rule) {\n _inherits(MaxYear, _Rule);\n\n var _super = _createSuper(MaxYear);\n\n function MaxYear() {\n var _this;\n\n _classCallCheck(this, MaxYear);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"defaultMessage\", '{{field}} should not contain year greater than {{maxYear}}');\n\n return _this;\n }\n\n _createClass(MaxYear, [{\n key: \"check\",\n value: function check(value) {\n var maxYear = this.settings;\n var year = /\\d{4}$/.exec(value);\n year = year ? year[0] : null;\n\n if (!+maxYear || !+year) {\n return true;\n }\n\n return +year <= +maxYear;\n }\n }]);\n\n return MaxYear;\n}(Rule);\n\n//# sourceURL=webpack://Formio/./lib/validator/rules/MaxYear.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar Rule = __webpack_require__(/*! ./Rule */ \"./lib/validator/rules/Rule.js\");\nmodule.exports = /*#__PURE__*/function (_Rule) {\n _inherits(MaxYear, _Rule);\n var _super = _createSuper(MaxYear);\n function MaxYear() {\n var _this;\n _classCallCheck(this, MaxYear);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"defaultMessage\", '{{field}} should not contain year greater than {{maxYear}}');\n return _this;\n }\n _createClass(MaxYear, [{\n key: \"check\",\n value: function check(value) {\n var maxYear = this.settings;\n var year = /\\d{4}$/.exec(value);\n year = year ? year[0] : null;\n if (!+maxYear || !+year) {\n return true;\n }\n return +year <= +maxYear;\n }\n }]);\n return MaxYear;\n}(Rule);\n\n//# sourceURL=webpack://Formio/./lib/validator/rules/MaxYear.js?"); /***/ }), @@ -4422,7 +4959,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.number.is-nan.js */ \"./node_modules/core-js/modules/es.number.is-nan.js\");\n\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar Rule = __webpack_require__(/*! ./Rule */ \"./lib/validator/rules/Rule.js\");\n\nmodule.exports = /*#__PURE__*/function (_Rule) {\n _inherits(Min, _Rule);\n\n var _super = _createSuper(Min);\n\n function Min() {\n var _this;\n\n _classCallCheck(this, Min);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"defaultMessage\", '{{field}} cannot be less than {{settings.limit}}.');\n\n return _this;\n }\n\n _createClass(Min, [{\n key: \"check\",\n value: function check(value) {\n var min = parseFloat(this.settings.limit);\n var parsedValue = parseFloat(value);\n\n if (Number.isNaN(min) || Number.isNaN(parsedValue)) {\n return true;\n }\n\n return parsedValue >= min;\n }\n }]);\n\n return Min;\n}(Rule);\n\n//# sourceURL=webpack://Formio/./lib/validator/rules/Min.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.parse-float.js */ \"./node_modules/core-js/modules/es.parse-float.js\");\n__webpack_require__(/*! core-js/modules/es.number.is-nan.js */ \"./node_modules/core-js/modules/es.number.is-nan.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar Rule = __webpack_require__(/*! ./Rule */ \"./lib/validator/rules/Rule.js\");\nmodule.exports = /*#__PURE__*/function (_Rule) {\n _inherits(Min, _Rule);\n var _super = _createSuper(Min);\n function Min() {\n var _this;\n _classCallCheck(this, Min);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"defaultMessage\", '{{field}} cannot be less than {{settings.limit}}.');\n return _this;\n }\n _createClass(Min, [{\n key: \"check\",\n value: function check(value) {\n var min = parseFloat(this.settings.limit);\n var parsedValue = parseFloat(value);\n if (Number.isNaN(min) || Number.isNaN(parsedValue)) {\n return true;\n }\n return parsedValue >= min;\n }\n }]);\n return Min;\n}(Rule);\n\n//# sourceURL=webpack://Formio/./lib/validator/rules/Min.js?"); /***/ }), @@ -4433,7 +4970,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\nvar _utils = __webpack_require__(/*! ../../utils/utils */ \"./lib/utils/utils.js\");\n\nvar _moment = _interopRequireDefault(__webpack_require__(/*! moment */ \"./node_modules/moment/moment.js\"));\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar Rule = __webpack_require__(/*! ./Rule */ \"./lib/validator/rules/Rule.js\");\n\nmodule.exports = /*#__PURE__*/function (_Rule) {\n _inherits(MinDate, _Rule);\n\n var _super = _createSuper(MinDate);\n\n function MinDate() {\n var _this;\n\n _classCallCheck(this, MinDate);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"defaultMessage\", '{{field}} should not contain date before {{settings.dateLimit}}');\n\n return _this;\n }\n\n _createClass(MinDate, [{\n key: \"check\",\n value: function check(value) {\n if (!value) {\n return true;\n }\n\n var date = (0, _moment.default)(value);\n var minDate = (0, _utils.getDateSetting)(this.settings.dateLimit);\n\n if (_lodash.default.isNull(minDate)) {\n return true;\n } else {\n minDate.setHours(0, 0, 0, 0);\n }\n\n return date.isAfter(minDate) || date.isSame(minDate);\n }\n }]);\n\n return MinDate;\n}(Rule);\n\n//# sourceURL=webpack://Formio/./lib/validator/rules/MinDate.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\nvar _utils = __webpack_require__(/*! ../../utils/utils */ \"./lib/utils/utils.js\");\nvar _moment = _interopRequireDefault(__webpack_require__(/*! moment */ \"./node_modules/moment/moment.js\"));\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar Rule = __webpack_require__(/*! ./Rule */ \"./lib/validator/rules/Rule.js\");\nmodule.exports = /*#__PURE__*/function (_Rule) {\n _inherits(MinDate, _Rule);\n var _super = _createSuper(MinDate);\n function MinDate() {\n var _this;\n _classCallCheck(this, MinDate);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"defaultMessage\", '{{field}} should not contain date before {{settings.dateLimit}}');\n return _this;\n }\n _createClass(MinDate, [{\n key: \"check\",\n value: function check(value) {\n if (!value) {\n return true;\n }\n var date = (0, _moment[\"default\"])(value);\n var minDate = (0, _utils.getDateSetting)(this.settings.dateLimit);\n if (_lodash[\"default\"].isNull(minDate)) {\n return true;\n } else {\n minDate.setHours(0, 0, 0, 0);\n }\n return date.isAfter(minDate) || date.isSame(minDate);\n }\n }]);\n return MinDate;\n}(Rule);\n\n//# sourceURL=webpack://Formio/./lib/validator/rules/MinDate.js?"); /***/ }), @@ -4444,7 +4981,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar Rule = __webpack_require__(/*! ./Rule */ \"./lib/validator/rules/Rule.js\");\n\nmodule.exports = /*#__PURE__*/function (_Rule) {\n _inherits(MinLength, _Rule);\n\n var _super = _createSuper(MinLength);\n\n function MinLength() {\n var _this;\n\n _classCallCheck(this, MinLength);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"defaultMessage\", '{{field}} must have no more than {{- settings.length}} characters.');\n\n return _this;\n }\n\n _createClass(MinLength, [{\n key: \"check\",\n value: function check(value) {\n var minLength = parseInt(this.settings.length, 10);\n\n if (!minLength || !value || !value.hasOwnProperty('length') || this.component.isEmpty(value)) {\n return true;\n }\n\n return value.length >= minLength;\n }\n }]);\n\n return MinLength;\n}(Rule);\n\n//# sourceURL=webpack://Formio/./lib/validator/rules/MinLength.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.parse-int.js */ \"./node_modules/core-js/modules/es.parse-int.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar Rule = __webpack_require__(/*! ./Rule */ \"./lib/validator/rules/Rule.js\");\nmodule.exports = /*#__PURE__*/function (_Rule) {\n _inherits(MinLength, _Rule);\n var _super = _createSuper(MinLength);\n function MinLength() {\n var _this;\n _classCallCheck(this, MinLength);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"defaultMessage\", '{{field}} must have no more than {{- settings.length}} characters.');\n return _this;\n }\n _createClass(MinLength, [{\n key: \"check\",\n value: function check(value) {\n var minLength = parseInt(this.settings.length, 10);\n if (!minLength || !value || !value.hasOwnProperty('length') || this.component.isEmpty(value)) {\n return true;\n }\n return value.length >= minLength;\n }\n }]);\n return MinLength;\n}(Rule);\n\n//# sourceURL=webpack://Formio/./lib/validator/rules/MinLength.js?"); /***/ }), @@ -4455,7 +4992,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.split.js */ \"./node_modules/core-js/modules/es.string.split.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.trim.js */ \"./node_modules/core-js/modules/es.string.trim.js\");\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar Rule = __webpack_require__(/*! ./Rule */ \"./lib/validator/rules/Rule.js\");\n\nmodule.exports = /*#__PURE__*/function (_Rule) {\n _inherits(MinWords, _Rule);\n\n var _super = _createSuper(MinWords);\n\n function MinWords() {\n var _this;\n\n _classCallCheck(this, MinWords);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"defaultMessage\", '{{field}} must have at least {{- settings.length}} words.');\n\n return _this;\n }\n\n _createClass(MinWords, [{\n key: \"check\",\n value: function check(value) {\n var minWords = parseInt(this.settings.length, 10);\n\n if (!minWords || !value || typeof value !== 'string') {\n return true;\n }\n\n return value.trim().split(/\\s+/).length >= minWords;\n }\n }]);\n\n return MinWords;\n}(Rule);\n\n//# sourceURL=webpack://Formio/./lib/validator/rules/MinWords.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.parse-int.js */ \"./node_modules/core-js/modules/es.parse-int.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n__webpack_require__(/*! core-js/modules/es.string.split.js */ \"./node_modules/core-js/modules/es.string.split.js\");\n__webpack_require__(/*! core-js/modules/es.string.trim.js */ \"./node_modules/core-js/modules/es.string.trim.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar Rule = __webpack_require__(/*! ./Rule */ \"./lib/validator/rules/Rule.js\");\nmodule.exports = /*#__PURE__*/function (_Rule) {\n _inherits(MinWords, _Rule);\n var _super = _createSuper(MinWords);\n function MinWords() {\n var _this;\n _classCallCheck(this, MinWords);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"defaultMessage\", '{{field}} must have at least {{- settings.length}} words.');\n return _this;\n }\n _createClass(MinWords, [{\n key: \"check\",\n value: function check(value) {\n var minWords = parseInt(this.settings.length, 10);\n if (!minWords || !value || typeof value !== 'string') {\n return true;\n }\n return value.trim().split(/\\s+/).length >= minWords;\n }\n }]);\n return MinWords;\n}(Rule);\n\n//# sourceURL=webpack://Formio/./lib/validator/rules/MinWords.js?"); /***/ }), @@ -4466,7 +5003,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar Rule = __webpack_require__(/*! ./Rule */ \"./lib/validator/rules/Rule.js\");\n\nmodule.exports = /*#__PURE__*/function (_Rule) {\n _inherits(MinYear, _Rule);\n\n var _super = _createSuper(MinYear);\n\n function MinYear() {\n var _this;\n\n _classCallCheck(this, MinYear);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"defaultMessage\", '{{field}} should not contain year less than {{minYear}}');\n\n return _this;\n }\n\n _createClass(MinYear, [{\n key: \"check\",\n value: function check(value) {\n var minYear = this.settings;\n var year = /\\d{4}$/.exec(value);\n year = year ? year[0] : null;\n\n if (!+minYear || !+year) {\n return true;\n }\n\n return +year >= +minYear;\n }\n }]);\n\n return MinYear;\n}(Rule);\n\n//# sourceURL=webpack://Formio/./lib/validator/rules/MinYear.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar Rule = __webpack_require__(/*! ./Rule */ \"./lib/validator/rules/Rule.js\");\nmodule.exports = /*#__PURE__*/function (_Rule) {\n _inherits(MinYear, _Rule);\n var _super = _createSuper(MinYear);\n function MinYear() {\n var _this;\n _classCallCheck(this, MinYear);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"defaultMessage\", '{{field}} should not contain year less than {{minYear}}');\n return _this;\n }\n _createClass(MinYear, [{\n key: \"check\",\n value: function check(value) {\n var minYear = this.settings;\n var year = /\\d{4}$/.exec(value);\n year = year ? year[0] : null;\n if (!+minYear || !+year) {\n return true;\n }\n return +year >= +minYear;\n }\n }]);\n return MinYear;\n}(Rule);\n\n//# sourceURL=webpack://Formio/./lib/validator/rules/MinYear.js?"); /***/ }), @@ -4477,7 +5014,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.constructor.js */ \"./node_modules/core-js/modules/es.regexp.constructor.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar Rule = __webpack_require__(/*! ./Rule */ \"./lib/validator/rules/Rule.js\");\n\nmodule.exports = /*#__PURE__*/function (_Rule) {\n _inherits(Pattern, _Rule);\n\n var _super = _createSuper(Pattern);\n\n function Pattern() {\n var _this;\n\n _classCallCheck(this, Pattern);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"defaultMessage\", '{{field}} does not match the pattern {{settings.pattern}}');\n\n return _this;\n }\n\n _createClass(Pattern, [{\n key: \"check\",\n value: function check(value) {\n var pattern = this.settings.pattern;\n\n if (!pattern) {\n return true;\n }\n\n return new RegExp(\"^\".concat(pattern, \"$\")).test(value);\n }\n }]);\n\n return Pattern;\n}(Rule);\n\n//# sourceURL=webpack://Formio/./lib/validator/rules/Pattern.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.constructor.js */ \"./node_modules/core-js/modules/es.regexp.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar Rule = __webpack_require__(/*! ./Rule */ \"./lib/validator/rules/Rule.js\");\nmodule.exports = /*#__PURE__*/function (_Rule) {\n _inherits(Pattern, _Rule);\n var _super = _createSuper(Pattern);\n function Pattern() {\n var _this;\n _classCallCheck(this, Pattern);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"defaultMessage\", '{{field}} does not match the pattern {{settings.pattern}}');\n return _this;\n }\n _createClass(Pattern, [{\n key: \"check\",\n value: function check(value) {\n var pattern = this.settings.pattern;\n if (!pattern) {\n return true;\n }\n return new RegExp(\"^\".concat(pattern, \"$\")).test(value);\n }\n }]);\n return Pattern;\n}(Rule);\n\n//# sourceURL=webpack://Formio/./lib/validator/rules/Pattern.js?"); /***/ }), @@ -4488,7 +5025,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar Rule = __webpack_require__(/*! ./Rule */ \"./lib/validator/rules/Rule.js\");\n\nmodule.exports = /*#__PURE__*/function (_Rule) {\n _inherits(Required, _Rule);\n\n var _super = _createSuper(Required);\n\n function Required() {\n var _this;\n\n _classCallCheck(this, Required);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"defaultMessage\", '{{field}} is required');\n\n return _this;\n }\n\n _createClass(Required, [{\n key: \"check\",\n value: function check(value) {\n // TODO: Day, Survey overrides.\n return !this.component.isValueHidden() && !this.component.isEmpty(value);\n }\n }]);\n\n return Required;\n}(Rule);\n\n//# sourceURL=webpack://Formio/./lib/validator/rules/Required.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar Rule = __webpack_require__(/*! ./Rule */ \"./lib/validator/rules/Rule.js\");\nmodule.exports = /*#__PURE__*/function (_Rule) {\n _inherits(Required, _Rule);\n var _super = _createSuper(Required);\n function Required() {\n var _this;\n _classCallCheck(this, Required);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"defaultMessage\", '{{field}} is required');\n return _this;\n }\n _createClass(Required, [{\n key: \"check\",\n value: function check(value) {\n // TODO: Day, Survey overrides.\n\n return !this.component.isValueHidden() && !this.component.isEmpty(value);\n }\n }]);\n return Required;\n}(Rule);\n\n//# sourceURL=webpack://Formio/./lib/validator/rules/Required.js?"); /***/ }), @@ -4496,10 +5033,10 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /*!*************************************!*\ !*** ./lib/validator/rules/Rule.js ***! \*************************************/ -/***/ (function(module) { +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nmodule.exports = /*#__PURE__*/function () {\n function Rule(component, settings, config) {\n _classCallCheck(this, Rule);\n\n this.component = component;\n this.settings = settings;\n this.config = config;\n }\n\n _createClass(Rule, [{\n key: \"check\",\n value: function check() {}\n }]);\n\n return Rule;\n}();\n\n//# sourceURL=webpack://Formio/./lib/validator/rules/Rule.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nmodule.exports = /*#__PURE__*/function () {\n function Rule(component, settings, config) {\n _classCallCheck(this, Rule);\n this.component = component;\n this.settings = settings;\n this.config = config;\n }\n _createClass(Rule, [{\n key: \"check\",\n value: function check() {}\n }]);\n return Rule;\n}();\n\n//# sourceURL=webpack://Formio/./lib/validator/rules/Rule.js?"); /***/ }), @@ -4510,7 +5047,7 @@ eval("\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance insta /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.includes.js */ \"./node_modules/core-js/modules/es.array.includes.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.includes.js */ \"./node_modules/core-js/modules/es.string.includes.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.join.js */ \"./node_modules/core-js/modules/es.array.join.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n\nvar _utils = __webpack_require__(/*! ../../utils/utils */ \"./lib/utils/utils.js\");\n\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\n\nvar _fetchPonyfill2 = _interopRequireDefault(__webpack_require__(/*! fetch-ponyfill */ \"./node_modules/fetch-ponyfill/build/fetch-browser.js\"));\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar _fetchPonyfill = (0, _fetchPonyfill2.default)({\n Promise: _nativePromiseOnly.default\n}),\n fetch = _fetchPonyfill.fetch,\n Headers = _fetchPonyfill.Headers,\n Request = _fetchPonyfill.Request;\n\nvar Rule = __webpack_require__(/*! ./Rule */ \"./lib/validator/rules/Rule.js\");\n\nmodule.exports = /*#__PURE__*/function (_Rule) {\n _inherits(Select, _Rule);\n\n var _super = _createSuper(Select);\n\n function Select() {\n var _this;\n\n _classCallCheck(this, Select);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"defaultMessage\", '{{field}} contains an invalid selection');\n\n return _this;\n }\n\n _createClass(Select, [{\n key: \"check\",\n value: function check(value, data, row, async) {\n // Skip if value is empty\n if (!value || _lodash.default.isEmpty(value)) {\n return true;\n } // Skip if we're not async-capable\n\n\n if (!async) {\n return true;\n }\n\n var schema = this.component.component; // Initialize the request options\n\n var requestOptions = {\n url: this.settings.url,\n method: 'GET',\n qs: {},\n json: true,\n headers: {}\n }; // If the url is a boolean value\n\n if (_lodash.default.isBoolean(requestOptions.url)) {\n requestOptions.url = !!requestOptions.url;\n\n if (!requestOptions.url || schema.dataSrc !== 'url' || !schema.data.url || !schema.searchField) {\n return true;\n } // Get the validation url\n\n\n requestOptions.url = schema.data.url; // Add the search field\n\n requestOptions.qs[schema.searchField] = value; // Add the filters\n\n if (schema.filter) {\n requestOptions.url += (!requestOptions.url.includes('?') ? '?' : '&') + schema.filter;\n } // If they only wish to return certain fields.\n\n\n if (schema.selectFields) {\n requestOptions.qs.select = schema.selectFields;\n }\n }\n\n if (!requestOptions.url) {\n return true;\n } // Make sure to interpolate.\n\n\n requestOptions.url = (0, _utils.interpolate)(requestOptions.url, {\n data: this.component.data\n }); // Add query string to URL\n\n requestOptions.url += (requestOptions.url.includes('?') ? '&' : '?') + _lodash.default.chain(requestOptions.qs).map(function (val, key) {\n return \"\".concat(encodeURIComponent(key), \"=\").concat(encodeURIComponent(val));\n }).join('&').value(); // Set custom headers.\n\n if (schema.data && schema.data.headers) {\n _lodash.default.each(schema.data.headers, function (header) {\n if (header.key) {\n requestOptions.headers[header.key] = header.value;\n }\n });\n } // Set form.io authentication.\n\n\n if (schema.authenticate && this.config.token) {\n requestOptions.headers['x-jwt-token'] = this.config.token;\n }\n\n return fetch(new Request(requestOptions.url, {\n headers: new Headers(requestOptions.headers)\n })).then(function (response) {\n if (!response.ok) {\n return false;\n }\n\n return response.json();\n }).then(function (results) {\n return results && results.length;\n }).catch(function () {\n return false;\n });\n }\n }]);\n\n return Select;\n}(Rule);\n\n//# sourceURL=webpack://Formio/./lib/validator/rules/Select.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.array.includes.js */ \"./node_modules/core-js/modules/es.array.includes.js\");\n__webpack_require__(/*! core-js/modules/es.string.includes.js */ \"./node_modules/core-js/modules/es.string.includes.js\");\n__webpack_require__(/*! core-js/modules/es.array.join.js */ \"./node_modules/core-js/modules/es.array.join.js\");\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\nvar _utils = __webpack_require__(/*! ../../utils/utils */ \"./lib/utils/utils.js\");\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\nvar _fetchPonyfill2 = _interopRequireDefault(__webpack_require__(/*! fetch-ponyfill */ \"./node_modules/fetch-ponyfill/build/fetch-browser.js\"));\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar _fetchPonyfill = (0, _fetchPonyfill2[\"default\"])({\n Promise: _nativePromiseOnly[\"default\"]\n }),\n fetch = _fetchPonyfill.fetch,\n Headers = _fetchPonyfill.Headers,\n Request = _fetchPonyfill.Request;\nvar Rule = __webpack_require__(/*! ./Rule */ \"./lib/validator/rules/Rule.js\");\nmodule.exports = /*#__PURE__*/function (_Rule) {\n _inherits(Select, _Rule);\n var _super = _createSuper(Select);\n function Select() {\n var _this;\n _classCallCheck(this, Select);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"defaultMessage\", '{{field}} contains an invalid selection');\n return _this;\n }\n _createClass(Select, [{\n key: \"check\",\n value: function check(value, data, row, async) {\n // Skip if value is empty\n if (!value || _lodash[\"default\"].isEmpty(value)) {\n return true;\n }\n\n // Skip if we're not async-capable\n if (!async) {\n return true;\n }\n var schema = this.component.component;\n\n // Initialize the request options\n var requestOptions = {\n url: this.settings.url,\n method: 'GET',\n qs: {},\n json: true,\n headers: {}\n };\n\n // If the url is a boolean value\n if (_lodash[\"default\"].isBoolean(requestOptions.url)) {\n requestOptions.url = !!requestOptions.url;\n if (!requestOptions.url || schema.dataSrc !== 'url' || !schema.data.url || !schema.searchField) {\n return true;\n }\n\n // Get the validation url\n requestOptions.url = schema.data.url;\n\n // Add the search field\n requestOptions.qs[schema.searchField] = value;\n\n // Add the filters\n if (schema.filter) {\n requestOptions.url += (!requestOptions.url.includes('?') ? '?' : '&') + schema.filter;\n }\n\n // If they only wish to return certain fields.\n if (schema.selectFields) {\n requestOptions.qs.select = schema.selectFields;\n }\n }\n if (!requestOptions.url) {\n return true;\n }\n\n // Make sure to interpolate.\n requestOptions.url = (0, _utils.interpolate)(requestOptions.url, {\n data: this.component.data\n });\n\n // Add query string to URL\n requestOptions.url += (requestOptions.url.includes('?') ? '&' : '?') + _lodash[\"default\"].chain(requestOptions.qs).map(function (val, key) {\n return \"\".concat(encodeURIComponent(key), \"=\").concat(encodeURIComponent(val));\n }).join('&').value();\n\n // Set custom headers.\n if (schema.data && schema.data.headers) {\n _lodash[\"default\"].each(schema.data.headers, function (header) {\n if (header.key) {\n requestOptions.headers[header.key] = header.value;\n }\n });\n }\n\n // Set form.io authentication.\n if (schema.authenticate && this.config.token) {\n requestOptions.headers['x-jwt-token'] = this.config.token;\n }\n return fetch(new Request(requestOptions.url, {\n headers: new Headers(requestOptions.headers)\n })).then(function (response) {\n if (!response.ok) {\n return false;\n }\n return response.json();\n }).then(function (results) {\n return results && results.length;\n })[\"catch\"](function () {\n return false;\n });\n }\n }]);\n return Select;\n}(Rule);\n\n//# sourceURL=webpack://Formio/./lib/validator/rules/Select.js?"); /***/ }), @@ -4521,7 +5058,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\nvar _moment = _interopRequireDefault(__webpack_require__(/*! moment */ \"./node_modules/moment/moment.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar Rule = __webpack_require__(/*! ./Rule */ \"./lib/validator/rules/Rule.js\");\n\nmodule.exports = /*#__PURE__*/function (_Rule) {\n _inherits(Time, _Rule);\n\n var _super = _createSuper(Time);\n\n function Time() {\n var _this;\n\n _classCallCheck(this, Time);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"defaultMessage\", '{{field}} must contain valid time');\n\n return _this;\n }\n\n _createClass(Time, [{\n key: \"check\",\n value: function check(value) {\n if (this.component.isEmpty(value)) return true;\n return (0, _moment.default)(value, this.component.component.format).isValid();\n }\n }]);\n\n return Time;\n}(Rule);\n\n//# sourceURL=webpack://Formio/./lib/validator/rules/Time.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\nvar _moment = _interopRequireDefault(__webpack_require__(/*! moment */ \"./node_modules/moment/moment.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar Rule = __webpack_require__(/*! ./Rule */ \"./lib/validator/rules/Rule.js\");\nmodule.exports = /*#__PURE__*/function (_Rule) {\n _inherits(Time, _Rule);\n var _super = _createSuper(Time);\n function Time() {\n var _this;\n _classCallCheck(this, Time);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"defaultMessage\", '{{field}} must contain valid time');\n return _this;\n }\n _createClass(Time, [{\n key: \"check\",\n value: function check(value) {\n if (this.component.isEmpty(value)) return true;\n return (0, _moment[\"default\"])(value, this.component.component.format).isValid();\n }\n }]);\n return Time;\n}(Rule);\n\n//# sourceURL=webpack://Formio/./lib/validator/rules/Time.js?"); /***/ }), @@ -4532,7 +5069,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.constructor.js */ \"./node_modules/core-js/modules/es.regexp.constructor.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\nvar _utils = __webpack_require__(/*! ../../utils/utils */ \"./lib/utils/utils.js\");\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar Rule = __webpack_require__(/*! ./Rule */ \"./lib/validator/rules/Rule.js\");\n\nmodule.exports = /*#__PURE__*/function (_Rule) {\n _inherits(Unique, _Rule);\n\n var _super = _createSuper(Unique);\n\n function Unique() {\n var _this;\n\n _classCallCheck(this, Unique);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"defaultMessage\", '{{field}} must be unique');\n\n return _this;\n }\n\n _createClass(Unique, [{\n key: \"check\",\n value: function check(value) {\n var _this2 = this;\n\n // Skip if value is empty object or falsy\n if (!value || _lodash.default.isObjectLike(value) && _lodash.default.isEmpty(value)) {\n return true;\n } // Skip if we don't have a database connection\n\n\n if (!this.config.db) {\n return true;\n }\n\n return new _nativePromiseOnly.default(function (resolve) {\n var form = _this2.config.form;\n var submission = _this2.config.submission;\n var path = \"data.\".concat(_this2.component.path); // Build the query\n\n var query = {\n form: form._id\n };\n\n if (_lodash.default.isString(value)) {\n query[path] = {\n $regex: new RegExp(\"^\".concat((0, _utils.escapeRegExCharacters)(value), \"$\")),\n $options: 'i'\n };\n } else if (_lodash.default.isPlainObject(value) && value.address && value.address['address_components'] && value.address['place_id']) {\n query[\"\".concat(path, \".address.place_id\")] = {\n $regex: new RegExp(\"^\".concat((0, _utils.escapeRegExCharacters)(value.address['place_id']), \"$\")),\n $options: 'i'\n };\n } // Compare the contents of arrays vs the order.\n else if (_lodash.default.isArray(value)) {\n query[path] = {\n $all: value\n };\n } else if (_lodash.default.isObject(value) || _lodash.default.isNumber(value)) {\n query[path] = {\n $eq: value\n };\n } // Only search for non-deleted items\n\n\n query.deleted = {\n $eq: null\n }; // Try to find an existing value within the form\n\n _this2.config.db.findOne(query, function (err, result) {\n if (err) {\n return resolve(false);\n } else if (result) {\n // Only OK if it matches the current submission\n return resolve(submission._id && result._id.toString() === submission._id);\n } else {\n return resolve(true);\n }\n });\n }).catch(function () {\n return false;\n });\n }\n }]);\n\n return Unique;\n}(Rule);\n\n//# sourceURL=webpack://Formio/./lib/validator/rules/Unique.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.constructor.js */ \"./node_modules/core-js/modules/es.regexp.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-string.js */ \"./node_modules/core-js/modules/es.date.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\nvar _utils = __webpack_require__(/*! ../../utils/utils */ \"./lib/utils/utils.js\");\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar Rule = __webpack_require__(/*! ./Rule */ \"./lib/validator/rules/Rule.js\");\nmodule.exports = /*#__PURE__*/function (_Rule) {\n _inherits(Unique, _Rule);\n var _super = _createSuper(Unique);\n function Unique() {\n var _this;\n _classCallCheck(this, Unique);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"defaultMessage\", '{{field}} must be unique');\n return _this;\n }\n _createClass(Unique, [{\n key: \"check\",\n value: function check(value) {\n var _this2 = this;\n // Skip if value is empty object or falsy\n if (!value || _lodash[\"default\"].isObjectLike(value) && _lodash[\"default\"].isEmpty(value)) {\n return true;\n }\n\n // Skip if we don't have a database connection\n if (!this.config.db) {\n return true;\n }\n return new _nativePromiseOnly[\"default\"](function (resolve) {\n var form = _this2.config.form;\n var submission = _this2.config.submission;\n var path = \"data.\".concat(_this2.component.path);\n\n // Build the query\n var query = {\n form: form._id\n };\n if (_lodash[\"default\"].isString(value)) {\n query[path] = {\n $regex: new RegExp(\"^\".concat((0, _utils.escapeRegExCharacters)(value), \"$\")),\n $options: 'i'\n };\n } else if (_lodash[\"default\"].isPlainObject(value) && value.address && value.address['address_components'] && value.address['place_id']) {\n query[\"\".concat(path, \".address.place_id\")] = {\n $regex: new RegExp(\"^\".concat((0, _utils.escapeRegExCharacters)(value.address['place_id']), \"$\")),\n $options: 'i'\n };\n }\n // Compare the contents of arrays vs the order.\n else if (_lodash[\"default\"].isArray(value)) {\n query[path] = {\n $all: value\n };\n } else if (_lodash[\"default\"].isObject(value) || _lodash[\"default\"].isNumber(value)) {\n query[path] = {\n $eq: value\n };\n }\n\n // Only search for non-deleted items\n query.deleted = {\n $eq: null\n };\n\n // Try to find an existing value within the form\n _this2.config.db.findOne(query, function (err, result) {\n if (err) {\n return resolve(false);\n } else if (result) {\n // Only OK if it matches the current submission\n return resolve(submission._id && result._id.toString() === submission._id);\n } else {\n return resolve(true);\n }\n });\n })[\"catch\"](function () {\n return false;\n });\n }\n }]);\n return Unique;\n}(Rule);\n\n//# sourceURL=webpack://Formio/./lib/validator/rules/Unique.js?"); /***/ }), @@ -4543,7 +5080,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar Rule = __webpack_require__(/*! ./Rule */ \"./lib/validator/rules/Rule.js\");\n\nmodule.exports = /*#__PURE__*/function (_Rule) {\n _inherits(Url, _Rule);\n\n var _super = _createSuper(Url);\n\n function Url() {\n var _this;\n\n _classCallCheck(this, Url);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"defaultMessage\", '{{field}} must be a valid url.');\n\n return _this;\n }\n\n _createClass(Url, [{\n key: \"check\",\n value: function check(value) {\n /* eslint-disable max-len */\n // From https://stackoverflow.com/questions/8667070/javascript-regular-expression-to-validate-url\n var re = /^(?:(?:(?:https?|ftp):)?\\/\\/)?(?:\\S+(?::\\S*)?@)?(?:(?!(?:10|127)(?:\\.\\d{1,3}){3})(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:[/?#]\\S*)?$/i; // From http://stackoverflow.com/questions/46155/validate-email-address-in-javascript\n\n var emailRe = /^(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\n /* eslint-enable max-len */\n // Allow urls to be valid if the component is pristine and no value is provided.\n\n return !value || re.test(value) && !emailRe.test(value);\n }\n }]);\n\n return Url;\n}(Rule);\n\n//# sourceURL=webpack://Formio/./lib/validator/rules/Url.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar Rule = __webpack_require__(/*! ./Rule */ \"./lib/validator/rules/Rule.js\");\nmodule.exports = /*#__PURE__*/function (_Rule) {\n _inherits(Url, _Rule);\n var _super = _createSuper(Url);\n function Url() {\n var _this;\n _classCallCheck(this, Url);\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n _this = _super.call.apply(_super, [this].concat(args));\n _defineProperty(_assertThisInitialized(_this), \"defaultMessage\", '{{field}} must be a valid url.');\n return _this;\n }\n _createClass(Url, [{\n key: \"check\",\n value: function check(value) {\n /* eslint-disable max-len */\n // From https://stackoverflow.com/questions/8667070/javascript-regular-expression-to-validate-url\n var re = /^(?:(?:(?:https?|ftp):)?\\/\\/)?(?:\\S+(?::\\S*)?@)?(?:(?!(?:10|127)(?:\\.\\d{1,3}){3})(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:[/?#]\\S*)?$/i;\n // From http://stackoverflow.com/questions/46155/validate-email-address-in-javascript\n var emailRe = /^(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\n /* eslint-enable max-len */\n\n // Allow urls to be valid if the component is pristine and no value is provided.\n return !value || re.test(value) && !emailRe.test(value);\n }\n }]);\n return Url;\n}(Rule);\n\n//# sourceURL=webpack://Formio/./lib/validator/rules/Url.js?"); /***/ }), @@ -4554,7 +5091,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; -eval("\n\nvar custom = __webpack_require__(/*! ./Custom */ \"./lib/validator/rules/Custom.js\");\n\nvar date = __webpack_require__(/*! ./Date */ \"./lib/validator/rules/Date.js\");\n\nvar day = __webpack_require__(/*! ./Day */ \"./lib/validator/rules/Day.js\");\n\nvar email = __webpack_require__(/*! ./Email */ \"./lib/validator/rules/Email.js\");\n\nvar json = __webpack_require__(/*! ./JSON */ \"./lib/validator/rules/JSON.js\");\n\nvar mask = __webpack_require__(/*! ./Mask */ \"./lib/validator/rules/Mask.js\");\n\nvar max = __webpack_require__(/*! ./Max */ \"./lib/validator/rules/Max.js\");\n\nvar maxDate = __webpack_require__(/*! ./MaxDate */ \"./lib/validator/rules/MaxDate.js\");\n\nvar maxLength = __webpack_require__(/*! ./MaxLength */ \"./lib/validator/rules/MaxLength.js\");\n\nvar maxWords = __webpack_require__(/*! ./MaxWords */ \"./lib/validator/rules/MaxWords.js\");\n\nvar min = __webpack_require__(/*! ./Min */ \"./lib/validator/rules/Min.js\");\n\nvar minDate = __webpack_require__(/*! ./MinDate */ \"./lib/validator/rules/MinDate.js\");\n\nvar minLength = __webpack_require__(/*! ./MinLength */ \"./lib/validator/rules/MinLength.js\");\n\nvar minWords = __webpack_require__(/*! ./MinWords */ \"./lib/validator/rules/MinWords.js\");\n\nvar pattern = __webpack_require__(/*! ./Pattern */ \"./lib/validator/rules/Pattern.js\");\n\nvar required = __webpack_require__(/*! ./Required */ \"./lib/validator/rules/Required.js\");\n\nvar select = __webpack_require__(/*! ./Select */ \"./lib/validator/rules/Select.js\");\n\nvar unique = __webpack_require__(/*! ./Unique */ \"./lib/validator/rules/Unique.js\");\n\nvar url = __webpack_require__(/*! ./Url */ \"./lib/validator/rules/Url.js\");\n\nvar minYear = __webpack_require__(/*! ./MinYear */ \"./lib/validator/rules/MinYear.js\");\n\nvar maxYear = __webpack_require__(/*! ./MaxYear */ \"./lib/validator/rules/MaxYear.js\");\n\nvar time = __webpack_require__(/*! ./Time */ \"./lib/validator/rules/Time.js\");\n\nmodule.exports = {\n custom: custom,\n date: date,\n day: day,\n email: email,\n json: json,\n mask: mask,\n max: max,\n maxDate: maxDate,\n maxLength: maxLength,\n maxWords: maxWords,\n min: min,\n minDate: minDate,\n minLength: minLength,\n minWords: minWords,\n pattern: pattern,\n required: required,\n select: select,\n unique: unique,\n url: url,\n minYear: minYear,\n maxYear: maxYear,\n time: time\n};\n\n//# sourceURL=webpack://Formio/./lib/validator/rules/index.js?"); +eval("\n\nvar custom = __webpack_require__(/*! ./Custom */ \"./lib/validator/rules/Custom.js\");\nvar date = __webpack_require__(/*! ./Date */ \"./lib/validator/rules/Date.js\");\nvar day = __webpack_require__(/*! ./Day */ \"./lib/validator/rules/Day.js\");\nvar email = __webpack_require__(/*! ./Email */ \"./lib/validator/rules/Email.js\");\nvar json = __webpack_require__(/*! ./JSON */ \"./lib/validator/rules/JSON.js\");\nvar mask = __webpack_require__(/*! ./Mask */ \"./lib/validator/rules/Mask.js\");\nvar max = __webpack_require__(/*! ./Max */ \"./lib/validator/rules/Max.js\");\nvar maxDate = __webpack_require__(/*! ./MaxDate */ \"./lib/validator/rules/MaxDate.js\");\nvar maxLength = __webpack_require__(/*! ./MaxLength */ \"./lib/validator/rules/MaxLength.js\");\nvar maxWords = __webpack_require__(/*! ./MaxWords */ \"./lib/validator/rules/MaxWords.js\");\nvar min = __webpack_require__(/*! ./Min */ \"./lib/validator/rules/Min.js\");\nvar minDate = __webpack_require__(/*! ./MinDate */ \"./lib/validator/rules/MinDate.js\");\nvar minLength = __webpack_require__(/*! ./MinLength */ \"./lib/validator/rules/MinLength.js\");\nvar minWords = __webpack_require__(/*! ./MinWords */ \"./lib/validator/rules/MinWords.js\");\nvar pattern = __webpack_require__(/*! ./Pattern */ \"./lib/validator/rules/Pattern.js\");\nvar required = __webpack_require__(/*! ./Required */ \"./lib/validator/rules/Required.js\");\nvar select = __webpack_require__(/*! ./Select */ \"./lib/validator/rules/Select.js\");\nvar unique = __webpack_require__(/*! ./Unique */ \"./lib/validator/rules/Unique.js\");\nvar url = __webpack_require__(/*! ./Url */ \"./lib/validator/rules/Url.js\");\nvar minYear = __webpack_require__(/*! ./MinYear */ \"./lib/validator/rules/MinYear.js\");\nvar maxYear = __webpack_require__(/*! ./MaxYear */ \"./lib/validator/rules/MaxYear.js\");\nvar time = __webpack_require__(/*! ./Time */ \"./lib/validator/rules/Time.js\");\nmodule.exports = {\n custom: custom,\n date: date,\n day: day,\n email: email,\n json: json,\n mask: mask,\n max: max,\n maxDate: maxDate,\n maxLength: maxLength,\n maxWords: maxWords,\n min: min,\n minDate: minDate,\n minLength: minLength,\n minWords: minWords,\n pattern: pattern,\n required: required,\n select: select,\n unique: unique,\n url: url,\n minYear: minYear,\n maxYear: maxYear,\n time: time\n};\n\n//# sourceURL=webpack://Formio/./lib/validator/rules/index.js?"); /***/ }), @@ -4565,7 +5102,7 @@ eval("\n\nvar custom = __webpack_require__(/*! ./Custom */ \"./lib/validator/rul /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptors.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar Transformers = /*#__PURE__*/function () {\n function Transformers() {\n _classCallCheck(this, Transformers);\n }\n\n _createClass(Transformers, null, [{\n key: \"addTransformer\",\n value: function addTransformer(name, transformer) {\n Transformers.transformers[name] = transformer;\n }\n }, {\n key: \"addTransformers\",\n value: function addTransformers(transformers) {\n Transformers.transformers = _objectSpread(_objectSpread({}, Transformers.transformers), transformers);\n }\n }, {\n key: \"getTransformer\",\n value: function getTransformer(name) {\n return Transformers.transformers[name];\n }\n }, {\n key: \"getTransformers\",\n value: function getTransformers() {\n return Transformers.transformers;\n }\n }]);\n\n return Transformers;\n}();\n\nexports[\"default\"] = Transformers;\n\n_defineProperty(Transformers, \"transformers\", {});\n\n//# sourceURL=webpack://Formio/./lib/validator/transformers/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptors.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-properties.js */ \"./node_modules/core-js/modules/es.object.define-properties.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar Transformers = /*#__PURE__*/function () {\n function Transformers() {\n _classCallCheck(this, Transformers);\n }\n _createClass(Transformers, null, [{\n key: \"addTransformer\",\n value: function addTransformer(name, transformer) {\n Transformers.transformers[name] = transformer;\n }\n }, {\n key: \"addTransformers\",\n value: function addTransformers(transformers) {\n Transformers.transformers = _objectSpread(_objectSpread({}, Transformers.transformers), transformers);\n }\n }, {\n key: \"getTransformer\",\n value: function getTransformer(name) {\n return Transformers.transformers[name];\n }\n }, {\n key: \"getTransformers\",\n value: function getTransformers() {\n return Transformers.transformers;\n }\n }]);\n return Transformers;\n}();\nexports[\"default\"] = Transformers;\n_defineProperty(Transformers, \"transformers\", {});\n\n//# sourceURL=webpack://Formio/./lib/validator/transformers/index.js?"); /***/ }), @@ -4576,7 +5113,7 @@ eval("\n\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptors.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar ValueSources = /*#__PURE__*/function () {\n function ValueSources() {\n _classCallCheck(this, ValueSources);\n }\n\n _createClass(ValueSources, null, [{\n key: \"addValueSource\",\n value: function addValueSource(name, valueSource) {\n ValueSources.valueSources[name] = valueSource;\n }\n }, {\n key: \"addValueSources\",\n value: function addValueSources(valueSources) {\n ValueSources.valueSources = _objectSpread(_objectSpread({}, ValueSources.valueSources), valueSources);\n }\n }, {\n key: \"getValueSource\",\n value: function getValueSource(name) {\n return ValueSources.valueSources[name];\n }\n }, {\n key: \"getValueSources\",\n value: function getValueSources() {\n return ValueSources.valueSources;\n }\n }]);\n\n return ValueSources;\n}();\n\nexports[\"default\"] = ValueSources;\n\n_defineProperty(ValueSources, \"valueSources\", {});\n\n//# sourceURL=webpack://Formio/./lib/validator/valueSources/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptors.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-properties.js */ \"./node_modules/core-js/modules/es.object.define-properties.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nvar ValueSources = /*#__PURE__*/function () {\n function ValueSources() {\n _classCallCheck(this, ValueSources);\n }\n _createClass(ValueSources, null, [{\n key: \"addValueSource\",\n value: function addValueSource(name, valueSource) {\n ValueSources.valueSources[name] = valueSource;\n }\n }, {\n key: \"addValueSources\",\n value: function addValueSources(valueSources) {\n ValueSources.valueSources = _objectSpread(_objectSpread({}, ValueSources.valueSources), valueSources);\n }\n }, {\n key: \"getValueSource\",\n value: function getValueSource(name) {\n return ValueSources.valueSources[name];\n }\n }, {\n key: \"getValueSources\",\n value: function getValueSources() {\n return ValueSources.valueSources;\n }\n }]);\n return ValueSources;\n}();\nexports[\"default\"] = ValueSources;\n_defineProperty(ValueSources, \"valueSources\", {});\n\n//# sourceURL=webpack://Formio/./lib/validator/valueSources/index.js?"); /***/ }), @@ -4587,7 +5124,7 @@ eval("\n\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.set.js */ \"./node_modules/core-js/modules/es.reflect.set.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptors.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.array.includes.js */ \"./node_modules/core-js/modules/es.array.includes.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.includes.js */ \"./node_modules/core-js/modules/es.string.includes.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.split.js */ \"./node_modules/core-js/modules/es.string.split.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.match.js */ \"./node_modules/core-js/modules/es.string.match.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.find.js */ \"./node_modules/core-js/modules/es.array.find.js\");\n\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n\nvar _Formio = __webpack_require__(/*! ../Formio */ \"./lib/Formio.js\");\n\nvar _InputWidget2 = _interopRequireDefault(__webpack_require__(/*! ./InputWidget */ \"./lib/widgets/InputWidget.js\"));\n\nvar _utils = __webpack_require__(/*! ../utils/utils */ \"./lib/utils/utils.js\");\n\nvar _moment = _interopRequireDefault(__webpack_require__(/*! moment */ \"./node_modules/moment/moment.js\"));\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction set(target, property, value, receiver) { if (typeof Reflect !== \"undefined\" && Reflect.set) { set = Reflect.set; } else { set = function set(target, property, value, receiver) { var base = _superPropBase(target, property); var desc; if (base) { desc = Object.getOwnPropertyDescriptor(base, property); if (desc.set) { desc.set.call(receiver, value); return true; } else if (!desc.writable) { return false; } } desc = Object.getOwnPropertyDescriptor(receiver, property); if (desc) { if (!desc.writable) { return false; } desc.value = value; Object.defineProperty(receiver, property, desc); } else { _defineProperty(receiver, property, value); } return true; }; } return set(target, property, value, receiver); }\n\nfunction _set(target, property, value, receiver, isStrict) { var s = set(target, property, value, receiver || target); if (!s && isStrict) { throw new Error('failed to set property'); } return value; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar DEFAULT_FORMAT = 'yyyy-MM-dd hh:mm a';\nvar ISO_8601_FORMAT = 'yyyy-MM-ddTHH:mm:ssZ';\nvar CDN_URL = ((_Formio.GlobalFormio === null || _Formio.GlobalFormio === void 0 ? void 0 : _Formio.GlobalFormio.version) || '').includes('rc') ? 'https://cdn.test-form.io/flatpickr-formio' : 'https://cdn.form.io/flatpickr-formio';\nvar JSDELIVR_CDN_URL = 'https://cdn.jsdelivr.net';\nvar SHORTCUT_BUTTONS_PLUGIN_URL = '/npm/shortcut-buttons-flatpickr@0.1.0/dist/';\nvar SHORTCUT_BUTTONS_CSS = \"\".concat(JSDELIVR_CDN_URL).concat(SHORTCUT_BUTTONS_PLUGIN_URL, \"themes/light.min.css\");\nvar SHORTCUT_BUTTONS_PLUGIN = \"\".concat(JSDELIVR_CDN_URL).concat(SHORTCUT_BUTTONS_PLUGIN_URL, \"shortcut-buttons-flatpickr.min.js\");\nvar isIEBrowser = (0, _utils.getBrowserInfo)().ie;\n\nvar CalendarWidget = /*#__PURE__*/function (_InputWidget) {\n _inherits(CalendarWidget, _InputWidget);\n\n var _super = _createSuper(CalendarWidget);\n\n /* eslint-enable camelcase */\n function CalendarWidget(settings, component, instance, index) {\n var _this;\n\n _classCallCheck(this, CalendarWidget);\n\n _this = _super.call(this, settings, component, instance, index); // Change the format to map to the settings.\n\n if (_this.settings.noCalendar) {\n _this.settings.format = _this.settings.format.replace(/yyyy-MM-dd /g, '');\n }\n\n if (!_this.settings.enableTime) {\n _this.settings.format = _this.settings.format.replace(/ hh:mm a$/g, '');\n } else if (_this.settings.time_24hr) {\n _this.settings.format = _this.settings.format.replace(/hh:mm a$/g, 'HH:mm');\n }\n\n _this.zoneLoading = false;\n return _this;\n }\n /**\n * Load the timezones.\n *\n * @return {boolean} TRUE if the zones are loading, FALSE otherwise.\n */\n\n\n _createClass(CalendarWidget, [{\n key: \"loadZones\",\n value: function loadZones() {\n var _this2 = this;\n\n var timezone = this.timezone;\n\n if (this.zoneLoading) {\n return true;\n }\n\n if (!(0, _utils.zonesLoaded)() && (0, _utils.shouldLoadZones)(timezone)) {\n this.zoneLoading = true;\n (0, _utils.loadZones)(timezone).then(function () {\n _this2.zoneLoading = false;\n\n _this2.emit('redraw');\n }); // Return zones are loading.\n\n return true;\n } // Zones are already loaded.\n\n\n return false;\n }\n }, {\n key: \"attach\",\n value: function attach(input) {\n var _this3 = this,\n _this$component$short;\n\n var superAttach = _get(_getPrototypeOf(CalendarWidget.prototype), \"attach\", this).call(this, input);\n\n var dateFormatInfo = (0, _utils.getLocaleDateFormatInfo)(this.settings.language);\n this.defaultFormat = {\n date: dateFormatInfo.dayFirst ? 'd/m/Y ' : 'm/d/Y ',\n time: 'G:i K'\n };\n this.closedOn = 0;\n this.valueFormat = this.settings.saveAs === 'date' ? ISO_8601_FORMAT : this.settings.dateFormat || ISO_8601_FORMAT;\n this.valueMomentFormat = (0, _utils.convertFormatToMoment)(this.valueFormat);\n var isReadOnly = this.settings.readOnly;\n this.settings.minDate = isReadOnly ? null : (0, _utils.getDateSetting)(this.settings.minDate);\n this.settings.maxDate = isReadOnly ? null : (0, _utils.getDateSetting)(this.settings.maxDate);\n this.settings.disable = this.disabledDates;\n this.settings.disableWeekends ? this.settings.disable.push(this.disableWeekends) : '';\n this.settings.disableWeekdays ? this.settings.disable.push(this.disableWeekdays) : '';\n this.settings.disableFunction ? this.settings.disable.push(this.disableFunction) : '';\n this.settings.wasDefaultValueChanged = false;\n this.settings.defaultValue = '';\n this.settings.manualInputValue = '';\n this.settings.isManuallyOverriddenValue = false;\n this.settings.currentValue = '';\n this.settings.altFormat = (0, _utils.convertFormatToFlatpickr)(this.settings.format);\n this.settings.dateFormat = (0, _utils.convertFormatToFlatpickr)(this.settings.dateFormat);\n this.settings.position = 'auto center';\n\n this.settings.onChange = function () {\n if (_this3.settings.allowInput) {\n if (_this3.settings.isManuallyOverriddenValue && _this3.settings.enableTime) {\n _this3.calendar._input.value = _this3.settings.manualInputValue;\n } else {\n _this3.settings.manualInputValue = '';\n }\n\n _this3.settings.isManuallyOverriddenValue = false;\n }\n\n _this3.emit('update');\n };\n\n this.settings.onOpen = function () {\n return _this3.hook('onCalendarOpen');\n };\n\n this.settings.onClose = function () {\n _this3.hook('onCalendarClose');\n\n _this3.closedOn = Date.now();\n\n if (_this3.settings.allowInput && _this3.settings.enableTime) {\n _this3.calendar._input.value = _this3.settings.manualInputValue || _this3.calendar._input.value;\n _this3.settings.isManuallyOverriddenValue = false;\n\n _this3.emit('update');\n }\n\n if (_this3.settings.wasDefaultValueChanged) {\n _this3.calendar._input.value = _this3.settings.defaultValue;\n _this3.settings.wasDefaultValueChanged = false;\n }\n\n if (_this3.calendar) {\n _this3.emit('blur');\n }\n };\n\n _Formio.GlobalFormio.requireLibrary('flatpickr-css', 'flatpickr', [{\n type: 'styles',\n src: \"\".concat(CDN_URL, \"/flatpickr.min.css\")\n }], true);\n\n var flatpickr = _lodash.default.get(window, 'flatpickr');\n\n if (flatpickr && this._input) {\n return this.initFlatpickr(flatpickr);\n }\n\n if (this.component.shortcutButtons) {\n this.component.shortcutButtons = this.component.shortcutButtons.filter(function (btn) {\n return btn.label && btn.onClick;\n });\n }\n\n if ((_this$component$short = this.component.shortcutButtons) !== null && _this$component$short !== void 0 && _this$component$short.length) {\n _Formio.GlobalFormio.requireLibrary('shortcut-buttons-flatpickr-css', 'ShortcutButtonsPlugin', [{\n type: 'styles',\n src: SHORTCUT_BUTTONS_CSS\n }], true);\n }\n\n return superAttach.then(function () {\n var _this3$component$shor;\n\n if ((_this3$component$shor = _this3.component.shortcutButtons) !== null && _this3$component$shor !== void 0 && _this3$component$shor.length) {\n return _Formio.GlobalFormio.requireLibrary('shortcut-buttons-flatpickr', 'ShortcutButtonsPlugin', SHORTCUT_BUTTONS_PLUGIN, true);\n }\n }).then(function (ShortcutButtonsPlugin) {\n return _Formio.GlobalFormio.requireLibrary('flatpickr', 'flatpickr', \"\".concat(CDN_URL, \"/flatpickr.min.js\"), true).then(function (Flatpickr) {\n var _this3$component$shor2;\n\n if ((_this3$component$shor2 = _this3.component.shortcutButtons) !== null && _this3$component$shor2 !== void 0 && _this3$component$shor2.length && ShortcutButtonsPlugin) {\n _this3.initShortcutButtonsPlugin(ShortcutButtonsPlugin);\n }\n\n _this3.settings.formatDate = _this3.getFlatpickrFormatDate(Flatpickr);\n\n if (_this3._input) {\n var locale = _this3.settings.locale;\n\n if (locale && locale.length >= 2 && locale !== 'en') {\n return _Formio.GlobalFormio.requireLibrary(\"flatpickr-\".concat(locale), \"flatpickr-\".concat(locale), \"\".concat(CDN_URL, \"/l10n/flatpickr-\").concat(locale, \".js\"), true).then(function () {\n return _this3.initFlatpickr(Flatpickr);\n });\n } else {\n _this3.initFlatpickr(Flatpickr);\n }\n }\n });\n }).catch(function (err) {\n console.warn(err);\n });\n }\n }, {\n key: \"disableWeekends\",\n get: function get() {\n return function (date) {\n return date.getDay() === 0 || date.getDay() === 6;\n };\n }\n }, {\n key: \"disableWeekdays\",\n get: function get() {\n var _this4 = this;\n\n return function (date) {\n return !_this4.disableWeekends(date);\n };\n }\n }, {\n key: \"disableFunction\",\n get: function get() {\n var _this5 = this;\n\n return function (date) {\n return _this5.evaluate(\"return \".concat(_this5.settings.disableFunction), {\n date: date\n });\n };\n }\n }, {\n key: \"defineTimezone\",\n value: function defineTimezone() {\n if (this.settings.timezone) {\n return this.settings.timezone;\n }\n\n if (this.settings.displayInTimezone === 'submission' && this.settings.submissionTimezone) {\n return this.settings.submissionTimezone;\n }\n\n if (this.settings.displayInTimezone === 'utc') {\n return 'UTC';\n } // Return current timezone if none are provided.\n\n\n return (0, _utils.currentTimezone)();\n }\n }, {\n key: \"timezone\",\n get: function get() {\n return this.defineTimezone();\n }\n }, {\n key: \"defaultSettings\",\n get: function get() {\n return CalendarWidget.defaultSettings;\n }\n }, {\n key: \"addSuffix\",\n value: function addSuffix(suffix) {\n var _this6 = this;\n\n this.addEventListener(suffix, 'click', function () {\n setTimeout(function () {\n if (_this6.calendar) {\n if (!_this6.calendar.isOpen && Date.now() - _this6.closedOn > 200) {\n _this6.calendar.open();\n } else if (_this6.calendar.isOpen) {\n _this6.calendar.close();\n }\n }\n }, 0);\n });\n return suffix;\n }\n }, {\n key: \"disabled\",\n set: function set(disabled) {\n _set(_getPrototypeOf(CalendarWidget.prototype), \"disabled\", disabled, this, true);\n\n if (this.calendar) {\n if (disabled) {\n this.calendar._input.setAttribute('disabled', 'disabled');\n } else {\n this.calendar._input.removeAttribute('disabled');\n }\n\n this.calendar.close();\n this.calendar.redraw();\n }\n }\n }, {\n key: \"input\",\n get: function get() {\n return this.calendar ? this.calendar.altInput : null;\n }\n }, {\n key: \"disabledDates\",\n get: function get() {\n if (this.settings.disabledDates) {\n var disabledDates = this.settings.disabledDates.split(',');\n return disabledDates.map(function (item) {\n var dateMask = /\\d{4}-\\d{2}-\\d{2}/g;\n var dates = item.match(dateMask);\n\n if (dates && dates.length) {\n return dates.length === 1 ? item.match(dateMask)[0] : {\n from: item.match(dateMask)[0],\n to: item.match(dateMask)[1]\n };\n }\n });\n }\n\n return [];\n }\n }, {\n key: \"localeFormat\",\n get: function get() {\n var format = '';\n\n if (this.settings.enableDate) {\n format += this.defaultFormat.date;\n }\n\n if (this.settings.enableTime) {\n format += this.defaultFormat.time;\n }\n\n return format;\n }\n }, {\n key: \"dateTimeFormat\",\n get: function get() {\n return this.settings.useLocaleSettings ? this.localeFormat : (0, _utils.convertFormatToFlatpickr)(this.dateFormat);\n }\n }, {\n key: \"dateFormat\",\n get: function get() {\n return _lodash.default.get(this.settings, 'format', DEFAULT_FORMAT);\n }\n /**\n * Return the date value.\n *\n * @param date\n * @param format\n * @return {string}\n */\n\n }, {\n key: \"getDateValue\",\n value: function getDateValue(date, format, useTimezone) {\n if (useTimezone) {\n return (0, _utils.momentDate)(date, this.valueFormat, this.timezone).format((0, _utils.convertFormatToMoment)(format));\n }\n\n return (0, _moment.default)(date).format((0, _utils.convertFormatToMoment)(format));\n }\n /**\n * Return the value of the selected date.\n *\n * @return {*}\n */\n\n }, {\n key: \"getValue\",\n value: function getValue() {\n // Standard output format.\n if (!this.calendar) {\n return _get(_getPrototypeOf(CalendarWidget.prototype), \"getValue\", this).call(this);\n } // Get the selected dates from the calendar widget.\n\n\n var dates = this.calendar.selectedDates;\n\n if (!dates || !dates.length) {\n return _get(_getPrototypeOf(CalendarWidget.prototype), \"getValue\", this).call(this);\n }\n\n if (!(dates[0] instanceof Date)) {\n return 'Invalid Date';\n }\n\n return this.getDateValue(dates[0], this.valueFormat, this.settings.saveAs === 'date');\n }\n }, {\n key: \"isValueISO8601\",\n value: function isValueISO8601(value) {\n return value && typeof value === 'string' && value.match(/-[0-9]{2}T[0-9]{2}:/);\n }\n /**\n * Set the selected date value.\n *\n * @param value\n */\n\n }, {\n key: \"setValue\",\n value: function setValue(value) {\n var saveAsText = this.settings.saveAs === 'text';\n\n if (!this.calendar) {\n value = value ? (0, _utils.formatDate)(value, (0, _utils.convertFormatToMoment)(this.settings.format), this.timezone, (0, _utils.convertFormatToMoment)(this.valueMomentFormat)) : value;\n return _get(_getPrototypeOf(CalendarWidget.prototype), \"setValue\", this).call(this, value);\n }\n\n var zonesLoading = this.loadZones();\n\n if (this.isValueISO8601(value)) {\n this.calendar.setDate((0, _moment.default)(value).toDate(), false);\n } else if (value) {\n if (!saveAsText && this.settings.readOnly && !zonesLoading) {\n this.calendar.setDate((0, _utils.momentDate)(value, this.valueFormat, this.timezone).toDate(), false);\n } else {\n this.calendar.setDate((0, _moment.default)(value, this.valueMomentFormat).toDate(), false);\n }\n } else {\n this.calendar.clear(false);\n }\n }\n }, {\n key: \"getValueAsString\",\n value: function getValueAsString(value, format) {\n var inputFormat = format || this.dateFormat;\n var valueFormat = this.calendar ? this.valueFormat : this.settings.dateFormat;\n\n if (this.settings.saveAs === 'text' && this.componentInstance.parent && !this.settings.readOnly) {\n return (0, _moment.default)(value, (0, _utils.convertFormatToMoment)(valueFormat)).format((0, _utils.convertFormatToMoment)(valueFormat));\n }\n\n return (0, _utils.formatDate)(value, inputFormat, this.timezone, (0, _utils.convertFormatToMoment)(valueFormat));\n }\n }, {\n key: \"setErrorClasses\",\n value: function setErrorClasses(hasErrors) {\n if (!this.input) {\n return;\n }\n\n if (hasErrors) {\n this.addClass(this.input, 'is-invalid');\n this.input.setAttribute('aria-invalid', 'true');\n } else {\n this.removeClass(this.input, 'is-invalid');\n this.input.setAttribute('aria-invalid', 'false');\n }\n }\n }, {\n key: \"validationValue\",\n value: function validationValue(value) {\n if (typeof value === 'string') {\n return new Date(value);\n }\n\n return value.map(function (val) {\n return new Date(val);\n });\n }\n }, {\n key: \"isCalendarElement\",\n value: function isCalendarElement(element) {\n var _this$calendar, _this$calendar$config, _this$calendar$config2, _this$calendar2, _this$calendar2$calen;\n\n if (!element) {\n return true;\n }\n\n if ((_this$calendar = this.calendar) !== null && _this$calendar !== void 0 && (_this$calendar$config = _this$calendar.config) !== null && _this$calendar$config !== void 0 && (_this$calendar$config2 = _this$calendar$config.appendTo) !== null && _this$calendar$config2 !== void 0 && _this$calendar$config2.contains(element)) {\n return true;\n }\n\n return (_this$calendar2 = this.calendar) === null || _this$calendar2 === void 0 ? void 0 : (_this$calendar2$calen = _this$calendar2.calendarContainer) === null || _this$calendar2$calen === void 0 ? void 0 : _this$calendar2$calen.contains(element);\n }\n }, {\n key: \"initFlatpickr\",\n value: function initFlatpickr(Flatpickr) {\n var _this7 = this;\n\n var dateValue = this._input.value; // Create a new flatpickr.\n\n this.calendar = new Flatpickr(this._input, _objectSpread(_objectSpread({}, this.settings), {}, {\n disableMobile: true\n }));\n\n if (dateValue) {\n if (this.isValueISO8601(dateValue)) {\n this.calendar.setDate((0, _moment.default)(dateValue).toDate(), false, this.settings.altFormat);\n } else {\n this.calendar.setDate((0, _moment.default)(dateValue, (0, _utils.convertFormatToMoment)(this.dateFormat)).toDate(), false, this.settings.altFormat);\n }\n }\n\n this.calendar.altInput.addEventListener('input', function (event) {\n if (_this7.settings.allowInput && _this7.settings.currentValue !== event.target.value) {\n _this7.settings.manualInputValue = event.target.value;\n _this7.settings.isManuallyOverriddenValue = true;\n _this7.settings.currentValue = event.target.value;\n }\n\n if (event.target.value === '' && _this7.calendar.selectedDates.length > 0) {\n _this7.settings.wasDefaultValueChanged = true;\n _this7.settings.defaultValue = event.target.value;\n\n _this7.calendar.clear();\n } else {\n _this7.settings.wasDefaultValueChanged = false;\n }\n });\n\n if (!this.settings.readOnly) {\n // Enforce the input mask of the format.\n this.setInputMask(this.calendar._input, (0, _utils.convertFormatToMask)(this.settings.format));\n } // Fixes an issue with IE11 where value is set only after the second click\n // TODO: Remove when the issue is solved in the flatpickr library\n\n\n if (isIEBrowser) {\n // Remove the original blur listener, because value will be set to empty since relatedTarget is null in IE11\n var originalBlurListener = this.calendar._handlers.find(function (_ref) {\n var event = _ref.event,\n element = _ref.element;\n return event === 'blur' && element === _this7.calendar._input;\n });\n\n this.calendar._input.removeEventListener('blur', originalBlurListener.handler); // Add the same event listener as in the original library, but with workaround for IE11 issue\n\n\n this.addEventListener(this.calendar._input, 'blur', function (event) {\n var activeElement = _this7.settings.shadowRoot ? _this7.settings.shadowRoot.activeElement : document.activeElement;\n var relatedTarget = event.relatedTarget ? event.relatedTarget : activeElement;\n var isInput = event.target === _this7.calendar._input;\n\n if (isInput && !_this7.isCalendarElement(relatedTarget)) {\n _this7.calendar.setDate(_this7.calendar._input.value, true, event.target === _this7.calendar.altInput ? _this7.calendar.config.altFormat : _this7.calendar.config.dateFormat);\n }\n });\n } // Make sure we commit the value after a blur event occurs.\n\n\n this.addEventListener(this.calendar._input, 'blur', function (event) {\n var activeElement = _this7.settings.shadowRoot ? _this7.settings.shadowRoot.activeElement : document.activeElement;\n var relatedTarget = event.relatedTarget ? event.relatedTarget : activeElement;\n\n if (!(isIEBrowser && !relatedTarget) && !_this7.isCalendarElement(relatedTarget)) {\n var inputValue = _this7.calendar.input.value;\n\n var _dateValue = inputValue && _this7.settings.enableTime ? (0, _moment.default)(_this7.calendar.input.value, (0, _utils.convertFormatToMoment)(_this7.valueFormat)).toDate() : inputValue;\n\n _this7.calendar.setDate(_dateValue, true, _this7.settings.altFormat);\n } else if (!_this7.calendar.input.value && _this7.calendar.config.noCalendar) {\n var _this7$calendar, _this7$calendar$confi, _this7$calendar2, _this7$calendar2$conf;\n\n var value = (0, _moment.default)({\n hour: (_this7$calendar = _this7.calendar) === null || _this7$calendar === void 0 ? void 0 : (_this7$calendar$confi = _this7$calendar.config) === null || _this7$calendar$confi === void 0 ? void 0 : _this7$calendar$confi.defaultHour,\n minute: (_this7$calendar2 = _this7.calendar) === null || _this7$calendar2 === void 0 ? void 0 : (_this7$calendar2$conf = _this7$calendar2.config) === null || _this7$calendar2$conf === void 0 ? void 0 : _this7$calendar2$conf.defaultMinute\n }).toDate();\n\n _this7.calendar.setDate(value, true, _this7.settings.format);\n }\n }); // FJS-1103: When hit the enter button, the field not saving the year correctly\n\n this.addEventListener(this.calendar.altInput, 'keydown', function (event) {\n if (event.keyCode === 13) {\n if (_this7.calendar.isOpen) {\n _this7.calendar.close();\n\n event.stopPropagation();\n }\n }\n });\n }\n }, {\n key: \"initShortcutButtonsPlugin\",\n value: function initShortcutButtonsPlugin(ShortcutButtonsPlugin) {\n var _this8 = this;\n\n this.settings.plugins = [// eslint-disable-next-line new-cap\n ShortcutButtonsPlugin({\n button: this.component.shortcutButtons.map(function (btn) {\n return {\n label: btn.label,\n attributes: btn.attribute\n };\n }),\n onClick: function onClick(index) {\n var getValue = _this8.component.shortcutButtons[index].onClick;\n\n var date = _this8.evaluate(getValue, {\n date: new Date()\n }, 'date');\n\n _this8.calendar.setDate(date, true);\n }\n })];\n }\n }, {\n key: \"getFlatpickrFormatDate\",\n value: function getFlatpickrFormatDate(Flatpickr) {\n var _this9 = this;\n\n return function (date, format) {\n // Only format this if this is the altFormat and the form is readOnly.\n if (_this9.settings.readOnly && format === _this9.settings.altFormat) {\n if (_this9.loadZones()) {\n return Flatpickr.formatDate(date, format);\n }\n\n var currentValue = new Date(_this9.getValue());\n\n if (currentValue.toString() === date.toString()) {\n var compValue = _this9.componentInstance.dataValue;\n\n if (Array.isArray(compValue)) {\n compValue = compValue[_this9.valueIndex];\n }\n\n return (0, _utils.formatOffset)(Flatpickr.formatDate.bind(Flatpickr), new Date(compValue), format, _this9.timezone);\n }\n\n return (0, _utils.formatOffset)(Flatpickr.formatDate.bind(Flatpickr), date, format, _this9.timezone);\n }\n\n return Flatpickr.formatDate(date, format);\n };\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n _get(_getPrototypeOf(CalendarWidget.prototype), \"destroy\", this).call(this);\n\n if (this.calendar) {\n this.calendar.destroy();\n }\n }\n }], [{\n key: \"defaultSettings\",\n get:\n /* eslint-disable camelcase */\n function get() {\n return {\n type: 'calendar',\n altInput: true,\n allowInput: true,\n clickOpens: true,\n enableDate: true,\n enableTime: true,\n mode: 'single',\n noCalendar: false,\n format: DEFAULT_FORMAT,\n dateFormat: ISO_8601_FORMAT,\n useLocaleSettings: false,\n language: 'us-en',\n hourIncrement: 1,\n minuteIncrement: 5,\n time_24hr: false,\n saveAs: 'date',\n displayInTimezone: '',\n timezone: '',\n disable: [],\n minDate: '',\n maxDate: ''\n };\n }\n }]);\n\n return CalendarWidget;\n}(_InputWidget2.default);\n\nexports[\"default\"] = CalendarWidget;\n\n//# sourceURL=webpack://Formio/./lib/widgets/CalendarWidget.js?"); +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.set.js */ \"./node_modules/core-js/modules/es.reflect.set.js\");\n__webpack_require__(/*! core-js/modules/es.object.keys.js */ \"./node_modules/core-js/modules/es.object.keys.js\");\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.for-each.js */ \"./node_modules/core-js/modules/web.dom-collections.for-each.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptors.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptors.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-properties.js */ \"./node_modules/core-js/modules/es.object.define-properties.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.regexp.exec.js */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\n__webpack_require__(/*! core-js/modules/es.string.replace.js */ \"./node_modules/core-js/modules/es.string.replace.js\");\n__webpack_require__(/*! core-js/modules/es.date.now.js */ \"./node_modules/core-js/modules/es.date.now.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-string.js */ \"./node_modules/core-js/modules/es.date.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.array.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n__webpack_require__(/*! core-js/modules/web.timers.js */ \"./node_modules/core-js/modules/web.timers.js\");\n__webpack_require__(/*! core-js/modules/es.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n__webpack_require__(/*! core-js/modules/es.string.match.js */ \"./node_modules/core-js/modules/es.string.match.js\");\n__webpack_require__(/*! core-js/modules/es.array.some.js */ \"./node_modules/core-js/modules/es.array.some.js\");\n__webpack_require__(/*! core-js/modules/es.array.includes.js */ \"./node_modules/core-js/modules/es.array.includes.js\");\n__webpack_require__(/*! core-js/modules/es.string.includes.js */ \"./node_modules/core-js/modules/es.string.includes.js\");\n__webpack_require__(/*! core-js/modules/es.array.find.js */ \"./node_modules/core-js/modules/es.array.find.js\");\n__webpack_require__(/*! core-js/modules/es.array.is-array.js */ \"./node_modules/core-js/modules/es.array.is-array.js\");\n__webpack_require__(/*! core-js/modules/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _Formio = __webpack_require__(/*! ../Formio */ \"./lib/Formio.js\");\nvar _InputWidget2 = _interopRequireDefault(__webpack_require__(/*! ./InputWidget */ \"./lib/widgets/InputWidget.js\"));\nvar _utils = __webpack_require__(/*! ../utils/utils */ \"./lib/utils/utils.js\");\nvar _moment = _interopRequireDefault(__webpack_require__(/*! moment */ \"./node_modules/moment/moment.js\"));\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction set(target, property, value, receiver) { if (typeof Reflect !== \"undefined\" && Reflect.set) { set = Reflect.set; } else { set = function set(target, property, value, receiver) { var base = _superPropBase(target, property); var desc; if (base) { desc = Object.getOwnPropertyDescriptor(base, property); if (desc.set) { desc.set.call(receiver, value); return true; } else if (!desc.writable) { return false; } } desc = Object.getOwnPropertyDescriptor(receiver, property); if (desc) { if (!desc.writable) { return false; } desc.value = value; Object.defineProperty(receiver, property, desc); } else { _defineProperty(receiver, property, value); } return true; }; } return set(target, property, value, receiver); }\nfunction _set(target, property, value, receiver, isStrict) { var s = set(target, property, value, receiver || target); if (!s && isStrict) { throw new Error('failed to set property'); } return value; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar DEFAULT_FORMAT = 'yyyy-MM-dd hh:mm a';\nvar ISO_8601_FORMAT = 'yyyy-MM-ddTHH:mm:ssZ';\nvar isIEBrowser = (0, _utils.getBrowserInfo)().ie;\nvar CalendarWidget = /*#__PURE__*/function (_InputWidget) {\n _inherits(CalendarWidget, _InputWidget);\n var _super = _createSuper(CalendarWidget);\n /* eslint-enable camelcase */\n\n function CalendarWidget(settings, component, instance, index) {\n var _this;\n _classCallCheck(this, CalendarWidget);\n _this = _super.call(this, settings, component, instance, index);\n // Change the format to map to the settings.\n if (_this.settings.noCalendar) {\n _this.settings.format = _this.settings.format.replace(/yyyy-MM-dd /g, '');\n }\n if (!_this.settings.enableTime) {\n _this.settings.format = _this.settings.format.replace(/ hh:mm a$/g, '');\n } else if (_this.settings.time_24hr) {\n _this.settings.format = _this.settings.format.replace(/hh:mm a$/g, 'HH:mm');\n }\n _this.zoneLoading = false;\n _this.timezonesUrl = \"\".concat(_Formio.GlobalFormio.cdn['moment-timezone'], \"/data/packed/latest.json\");\n return _this;\n }\n\n /**\n * Load the timezones.\n *\n * @return {boolean} TRUE if the zones are loading, FALSE otherwise.\n */\n _createClass(CalendarWidget, [{\n key: \"loadZones\",\n value: function loadZones() {\n var _this2 = this;\n var timezone = this.timezone;\n if (this.zoneLoading) {\n return true;\n }\n if (!(0, _utils.zonesLoaded)() && (0, _utils.shouldLoadZones)(timezone)) {\n this.zoneLoading = true;\n (0, _utils.loadZones)(this.timezonesUrl, timezone).then(function () {\n _this2.zoneLoading = false;\n _this2.emit('redraw');\n });\n\n // Return zones are loading.\n return true;\n }\n\n // Zones are already loaded.\n return false;\n }\n }, {\n key: \"attach\",\n value: function attach(input) {\n var _this3 = this,\n _this$component$short;\n var superAttach = _get(_getPrototypeOf(CalendarWidget.prototype), \"attach\", this).call(this, input);\n var dateFormatInfo = (0, _utils.getLocaleDateFormatInfo)(this.settings.language);\n this.defaultFormat = {\n date: dateFormatInfo.dayFirst ? 'd/m/Y ' : 'm/d/Y ',\n time: 'G:i K'\n };\n this.closedOn = 0;\n this.valueFormat = this.settings.saveAs === 'date' ? ISO_8601_FORMAT : this.settings.dateFormat || ISO_8601_FORMAT;\n this.valueMomentFormat = (0, _utils.convertFormatToMoment)(this.valueFormat);\n var isReadOnly = this.settings.readOnly;\n this.settings.minDate = isReadOnly ? null : (0, _utils.getDateSetting)(this.settings.minDate);\n this.settings.maxDate = isReadOnly ? null : (0, _utils.getDateSetting)(this.settings.maxDate);\n this.settings.disable = this.disabledDates;\n this.settings.disableWeekends ? this.settings.disable.push(this.disableWeekends) : '';\n this.settings.disableWeekdays ? this.settings.disable.push(this.disableWeekdays) : '';\n this.settings.disableFunction ? this.settings.disable.push(this.disableFunction) : '';\n this.settings.wasDefaultValueChanged = false;\n this.settings.defaultValue = '';\n this.settings.manualInputValue = '';\n this.settings.isManuallyOverriddenValue = false;\n this.settings.currentValue = '';\n this.settings.altFormat = (0, _utils.convertFormatToFlatpickr)(this.settings.format);\n this.settings.dateFormat = (0, _utils.convertFormatToFlatpickr)(this.settings.dateFormat);\n this.settings.position = 'auto center';\n this.settings.onChange = function () {\n if (_this3.settings.allowInput) {\n if (_this3.settings.isManuallyOverriddenValue && _this3.settings.enableTime) {\n _this3.calendar._input.value = _this3.settings.manualInputValue;\n } else {\n _this3.settings.manualInputValue = '';\n }\n _this3.settings.isManuallyOverriddenValue = false;\n }\n _this3.emit('update');\n };\n this.settings.onOpen = function () {\n return _this3.hook('onCalendarOpen');\n };\n this.settings.onClose = function () {\n _this3.hook('onCalendarClose');\n _this3.closedOn = Date.now();\n if (_this3.settings.allowInput && _this3.settings.enableTime) {\n _this3.calendar._input.value = _this3.settings.manualInputValue || _this3.calendar._input.value;\n _this3.settings.isManuallyOverriddenValue = false;\n _this3.emit('update');\n }\n if (_this3.settings.wasDefaultValueChanged) {\n _this3.calendar._input.value = _this3.settings.defaultValue;\n _this3.settings.wasDefaultValueChanged = false;\n }\n if (_this3.calendar) {\n _this3.emit('blur');\n }\n };\n _Formio.GlobalFormio.requireLibrary('flatpickr-css', 'flatpickr', [{\n type: 'styles',\n src: \"\".concat(_Formio.GlobalFormio.cdn['flatpickr-formio'], \"/flatpickr.min.css\")\n }], true);\n if (this.component.shortcutButtons) {\n this.component.shortcutButtons = this.component.shortcutButtons.filter(function (btn) {\n return btn.label && btn.onClick;\n });\n }\n if ((_this$component$short = this.component.shortcutButtons) !== null && _this$component$short !== void 0 && _this$component$short.length) {\n _Formio.GlobalFormio.requireLibrary('shortcut-buttons-flatpickr-css', 'ShortcutButtonsPlugin', [{\n type: 'styles',\n src: \"\".concat(_Formio.GlobalFormio.cdn['shortcut-buttons-flatpickr'], \"/themes/light.min.css\")\n }], true);\n }\n return superAttach.then(function () {\n var _this3$component$shor;\n if ((_this3$component$shor = _this3.component.shortcutButtons) !== null && _this3$component$shor !== void 0 && _this3$component$shor.length) {\n return _Formio.GlobalFormio.requireLibrary('shortcut-buttons-flatpickr', 'ShortcutButtonsPlugin', \"\".concat(_Formio.GlobalFormio.cdn['shortcut-buttons-flatpickr'], \"/shortcut-buttons-flatpickr.min.js\"), true);\n }\n }).then(function (ShortcutButtonsPlugin) {\n return _Formio.GlobalFormio.requireLibrary('flatpickr', 'flatpickr', \"\".concat(_Formio.GlobalFormio.cdn['flatpickr-formio'], \"/flatpickr.min.js\"), true).then(function (Flatpickr) {\n var _this3$component$shor2;\n if ((_this3$component$shor2 = _this3.component.shortcutButtons) !== null && _this3$component$shor2 !== void 0 && _this3$component$shor2.length && ShortcutButtonsPlugin) {\n _this3.initShortcutButtonsPlugin(ShortcutButtonsPlugin);\n }\n _this3.settings.formatDate = _this3.getFlatpickrFormatDate(Flatpickr);\n if (_this3._input) {\n var locale = _this3.settings.locale;\n if (locale && locale.length >= 2 && locale !== 'en') {\n return _Formio.GlobalFormio.requireLibrary(\"flatpickr-\".concat(locale), \"flatpickr-\".concat(locale), \"\".concat(_Formio.GlobalFormio.cdn['flatpickr-formio'], \"/l10n/flatpickr-\").concat(locale, \".js\"), false, function () {\n return _this3.initFlatpickr(Flatpickr);\n });\n } else {\n _this3.initFlatpickr(Flatpickr);\n }\n }\n });\n })[\"catch\"](function (err) {\n console.warn(err);\n });\n }\n }, {\n key: \"disableWeekends\",\n get: function get() {\n return function (date) {\n return date.getDay() === 0 || date.getDay() === 6;\n };\n }\n }, {\n key: \"disableWeekdays\",\n get: function get() {\n var _this4 = this;\n return function (date) {\n return !_this4.disableWeekends(date);\n };\n }\n }, {\n key: \"disableFunction\",\n get: function get() {\n var _this5 = this;\n return function (date) {\n return _this5.evaluate(\"return \".concat(_this5.settings.disableFunction), {\n date: date\n });\n };\n }\n }, {\n key: \"timezone\",\n get: function get() {\n return this.componentInstance.getTimezone(this.settings);\n }\n }, {\n key: \"defaultSettings\",\n get: function get() {\n return CalendarWidget.defaultSettings;\n }\n }, {\n key: \"addSuffix\",\n value: function addSuffix(suffix) {\n var _this6 = this;\n this.addEventListener(suffix, 'click', function () {\n setTimeout(function () {\n if (_this6.calendar) {\n if (!_this6.calendar.isOpen && Date.now() - _this6.closedOn > 200) {\n _this6.calendar.open();\n } else if (_this6.calendar.isOpen) {\n _this6.calendar.close();\n }\n }\n }, 0);\n });\n return suffix;\n }\n }, {\n key: \"disabled\",\n set: function set(disabled) {\n _set(_getPrototypeOf(CalendarWidget.prototype), \"disabled\", disabled, this, true);\n if (this.calendar) {\n if (disabled) {\n this.calendar._input.setAttribute('disabled', 'disabled');\n } else {\n this.calendar._input.removeAttribute('disabled');\n }\n this.calendar.close();\n this.calendar.redraw();\n }\n }\n }, {\n key: \"input\",\n get: function get() {\n return this.calendar ? this.calendar.altInput : null;\n }\n }, {\n key: \"disabledDates\",\n get: function get() {\n if (this.settings.disabledDates) {\n var disabledDates = this.settings.disabledDates.split(',');\n return disabledDates.map(function (item) {\n var dateMask = /\\d{4}-\\d{2}-\\d{2}/g;\n var dates = item.match(dateMask);\n if (dates && dates.length) {\n return dates.length === 1 ? item.match(dateMask)[0] : {\n from: item.match(dateMask)[0],\n to: item.match(dateMask)[1]\n };\n }\n });\n }\n return [];\n }\n }, {\n key: \"localeFormat\",\n get: function get() {\n var format = '';\n if (this.settings.enableDate) {\n format += this.defaultFormat.date;\n }\n if (this.settings.enableTime) {\n format += this.defaultFormat.time;\n }\n return format;\n }\n }, {\n key: \"dateTimeFormat\",\n get: function get() {\n return this.settings.useLocaleSettings ? this.localeFormat : (0, _utils.convertFormatToFlatpickr)(this.dateFormat);\n }\n }, {\n key: \"dateFormat\",\n get: function get() {\n return _lodash[\"default\"].get(this.settings, 'format', DEFAULT_FORMAT);\n }\n\n /**\n * Return the date value.\n *\n * @param date\n * @param format\n * @return {string}\n */\n }, {\n key: \"getDateValue\",\n value: function getDateValue(date, format, useTimezone) {\n if (useTimezone) {\n return (0, _utils.momentDate)(date, this.valueFormat, this.timezone).format((0, _utils.convertFormatToMoment)(format));\n }\n return (0, _moment[\"default\"])(date).format((0, _utils.convertFormatToMoment)(format));\n }\n\n /**\n * Return the value of the selected date.\n *\n * @return {*}\n */\n }, {\n key: \"getValue\",\n value: function getValue() {\n // Standard output format.\n if (!this.calendar) {\n return _get(_getPrototypeOf(CalendarWidget.prototype), \"getValue\", this).call(this);\n }\n\n // Get the selected dates from the calendar widget.\n var dates = this.calendar.selectedDates;\n if (!dates || !dates.length) {\n return _get(_getPrototypeOf(CalendarWidget.prototype), \"getValue\", this).call(this);\n }\n if (!(dates[0] instanceof Date)) {\n return 'Invalid Date';\n }\n return this.getDateValue(dates[0], this.valueFormat, this.settings.saveAs === 'date');\n }\n }, {\n key: \"isValueISO8601\",\n value: function isValueISO8601(value) {\n return value && typeof value === 'string' && value.match(/-[0-9]{2}T[0-9]{2}:/);\n }\n\n /**\n * Set the selected date value.\n *\n * @param value\n */\n }, {\n key: \"setValue\",\n value: function setValue(value) {\n var saveAsText = this.settings.saveAs === 'text';\n if (!this.calendar) {\n value = value ? (0, _utils.formatDate)(this.timezonesUrl, value, (0, _utils.convertFormatToMoment)(this.settings.format), this.timezone, (0, _utils.convertFormatToMoment)(this.valueMomentFormat)) : value;\n return _get(_getPrototypeOf(CalendarWidget.prototype), \"setValue\", this).call(this, value);\n }\n var zonesLoading = this.loadZones();\n if (value) {\n if (!saveAsText && this.settings.readOnly && !zonesLoading) {\n this.calendar.setDate((0, _utils.momentDate)(value, this.valueFormat, this.timezone).format(), false);\n } else if (this.isValueISO8601(value)) {\n this.calendar.setDate(value, false);\n } else {\n this.calendar.setDate((0, _moment[\"default\"])(value, this.valueMomentFormat).toDate(), false);\n }\n } else {\n this.calendar.clear(false);\n }\n }\n }, {\n key: \"getValueAsString\",\n value: function getValueAsString(value, format) {\n var inputFormat = format || this.dateFormat;\n var valueFormat = this.calendar ? this.valueFormat : this.settings.dateFormat;\n if (this.settings.saveAs === 'text' && this.componentInstance.parent && !this.settings.readOnly) {\n return (0, _moment[\"default\"])(value, (0, _utils.convertFormatToMoment)(valueFormat)).format((0, _utils.convertFormatToMoment)(valueFormat));\n }\n return (0, _utils.formatDate)(this.timezonesUrl, value, inputFormat, this.timezone, (0, _utils.convertFormatToMoment)(valueFormat));\n }\n }, {\n key: \"setErrorClasses\",\n value: function setErrorClasses(hasErrors) {\n if (!this.input) {\n return;\n }\n if (hasErrors) {\n this.addClass(this.input, 'is-invalid');\n this.input.setAttribute('aria-invalid', 'true');\n } else {\n this.removeClass(this.input, 'is-invalid');\n this.input.setAttribute('aria-invalid', 'false');\n }\n }\n }, {\n key: \"validationValue\",\n value: function validationValue(value) {\n if (typeof value === 'string') {\n return new Date(value);\n }\n return value.map(function (val) {\n return new Date(val);\n });\n }\n }, {\n key: \"isCalendarElement\",\n value: function isCalendarElement(element) {\n var _this$calendar, _this$calendar$config, _this$calendar$config2, _this$calendar2, _this$calendar2$calen;\n if (!element) {\n return true;\n }\n if ((_this$calendar = this.calendar) !== null && _this$calendar !== void 0 && (_this$calendar$config = _this$calendar.config) !== null && _this$calendar$config !== void 0 && (_this$calendar$config2 = _this$calendar$config.appendTo) !== null && _this$calendar$config2 !== void 0 && _this$calendar$config2.contains(element)) {\n return true;\n }\n return (_this$calendar2 = this.calendar) === null || _this$calendar2 === void 0 ? void 0 : (_this$calendar2$calen = _this$calendar2.calendarContainer) === null || _this$calendar2$calen === void 0 ? void 0 : _this$calendar2$calen.contains(element);\n }\n }, {\n key: \"initFlatpickr\",\n value: function initFlatpickr(Flatpickr) {\n var _this7 = this;\n // Create a new flatpickr.\n this.calendar = new Flatpickr(this._input, _objectSpread(_objectSpread({}, this.settings), {}, {\n disableMobile: true\n }));\n this.calendar.altInput.addEventListener('input', function (event) {\n if (_this7.settings.allowInput && _this7.settings.currentValue !== event.target.value) {\n _this7.settings.manualInputValue = event.target.value;\n _this7.settings.isManuallyOverriddenValue = true;\n _this7.settings.currentValue = event.target.value;\n }\n if (event.target.value === '' && _this7.calendar.selectedDates.length > 0) {\n _this7.settings.wasDefaultValueChanged = true;\n _this7.settings.defaultValue = event.target.value;\n _this7.calendar.clear();\n } else {\n _this7.settings.wasDefaultValueChanged = false;\n }\n });\n var excludedFromMaskFormats = ['MMMM'];\n if (!this.settings.readOnly && !_lodash[\"default\"].some(excludedFromMaskFormats, function (format) {\n return _lodash[\"default\"].includes(_this7.settings.format, format);\n })) {\n // Enforce the input mask of the format.\n this.setInputMask(this.calendar._input, (0, _utils.convertFormatToMask)(this.settings.format));\n }\n\n // Fixes an issue with IE11 where value is set only after the second click\n // TODO: Remove when the issue is solved in the flatpickr library\n if (isIEBrowser) {\n // Remove the original blur listener, because value will be set to empty since relatedTarget is null in IE11\n var originalBlurListener = this.calendar._handlers.find(function (_ref) {\n var event = _ref.event,\n element = _ref.element;\n return event === 'blur' && element === _this7.calendar._input;\n });\n this.calendar._input.removeEventListener('blur', originalBlurListener.handler);\n // Add the same event listener as in the original library, but with workaround for IE11 issue\n this.addEventListener(this.calendar._input, 'blur', function (event) {\n var activeElement = _this7.settings.shadowRoot ? _this7.settings.shadowRoot.activeElement : document.activeElement;\n var relatedTarget = event.relatedTarget ? event.relatedTarget : activeElement;\n var isInput = event.target === _this7.calendar._input;\n if (isInput && !_this7.isCalendarElement(relatedTarget)) {\n _this7.calendar.setDate(_this7.calendar._input.value, true, event.target === _this7.calendar.altInput ? _this7.calendar.config.altFormat : _this7.calendar.config.dateFormat);\n }\n });\n }\n // Make sure we commit the value after a blur event occurs.\n this.addEventListener(this.calendar._input, 'blur', function (event) {\n var activeElement = _this7.settings.shadowRoot ? _this7.settings.shadowRoot.activeElement : document.activeElement;\n var relatedTarget = event.relatedTarget ? event.relatedTarget : activeElement;\n if (!(isIEBrowser && !relatedTarget) && !_this7.isCalendarElement(relatedTarget)) {\n var inputValue = _this7.calendar.input.value;\n var dateValue = inputValue ? (0, _moment[\"default\"])(_this7.calendar.input.value, (0, _utils.convertFormatToMoment)(_this7.valueFormat)).toDate() : inputValue;\n _this7.calendar.setDate(dateValue, true, _this7.settings.altFormat);\n } else if (!_this7.calendar.input.value && _this7.calendar.config.noCalendar) {\n var _this7$calendar, _this7$calendar$confi, _this7$calendar2, _this7$calendar2$conf;\n var value = (0, _moment[\"default\"])({\n hour: (_this7$calendar = _this7.calendar) === null || _this7$calendar === void 0 ? void 0 : (_this7$calendar$confi = _this7$calendar.config) === null || _this7$calendar$confi === void 0 ? void 0 : _this7$calendar$confi.defaultHour,\n minute: (_this7$calendar2 = _this7.calendar) === null || _this7$calendar2 === void 0 ? void 0 : (_this7$calendar2$conf = _this7$calendar2.config) === null || _this7$calendar2$conf === void 0 ? void 0 : _this7$calendar2$conf.defaultMinute\n }).toDate();\n _this7.calendar.setDate(value, true, _this7.settings.format);\n }\n });\n\n // FJS-1103: When hit the enter button, the field not saving the year correctly\n this.addEventListener(this.calendar.altInput, 'keydown', function (event) {\n if (event.keyCode === 13) {\n if (_this7.calendar.isOpen) {\n _this7.calendar.close();\n event.stopPropagation();\n }\n }\n });\n\n // Restore the calendar value from the component value.\n this.setValue(this.componentValue);\n }\n }, {\n key: \"initShortcutButtonsPlugin\",\n value: function initShortcutButtonsPlugin(ShortcutButtonsPlugin) {\n var _this8 = this;\n this.settings.plugins = [\n // eslint-disable-next-line new-cap\n ShortcutButtonsPlugin({\n button: this.component.shortcutButtons.map(function (btn) {\n return {\n label: btn.label,\n attributes: btn.attribute\n };\n }),\n onClick: function onClick(index) {\n var getValue = _this8.component.shortcutButtons[index].onClick;\n var date = _this8.evaluate(getValue, {\n date: new Date()\n }, 'date');\n _this8.calendar.setDate(date, true);\n }\n })];\n }\n }, {\n key: \"componentValue\",\n get: function get() {\n var compValue = this.componentInstance.dataValue;\n if (Array.isArray(compValue)) {\n compValue = compValue[this.valueIndex];\n }\n return compValue;\n }\n }, {\n key: \"getFlatpickrFormatDate\",\n value: function getFlatpickrFormatDate(Flatpickr) {\n var _this9 = this;\n return function (date, format) {\n // Only format this if this is the altFormat and the form is readOnly.\n if (_this9.settings.readOnly && format === _this9.settings.altFormat) {\n if (_this9.loadZones()) {\n return Flatpickr.formatDate(date, format);\n }\n var currentValue = new Date(_this9.getValue());\n if (currentValue.toString() === date.toString()) {\n return (0, _utils.formatOffset)(_this9.timezonesUrl, Flatpickr.formatDate.bind(Flatpickr), new Date(_this9.componentValue), format, _this9.timezone);\n }\n return (0, _utils.formatOffset)(_this9.timezonesUrl, Flatpickr.formatDate.bind(Flatpickr), date, format, _this9.timezone);\n }\n return Flatpickr.formatDate(date, format);\n };\n }\n }, {\n key: \"destroy\",\n value: function destroy() {\n _get(_getPrototypeOf(CalendarWidget.prototype), \"destroy\", this).call(this);\n if (this.calendar) {\n this.calendar.destroy();\n }\n }\n }], [{\n key: \"defaultSettings\",\n get: /* eslint-disable camelcase */\n function get() {\n return {\n type: 'calendar',\n altInput: true,\n allowInput: true,\n clickOpens: true,\n enableDate: true,\n enableTime: true,\n mode: 'single',\n noCalendar: false,\n format: DEFAULT_FORMAT,\n dateFormat: ISO_8601_FORMAT,\n useLocaleSettings: false,\n language: 'us-en',\n hourIncrement: 1,\n minuteIncrement: 5,\n time_24hr: false,\n saveAs: 'date',\n displayInTimezone: '',\n timezone: '',\n disable: [],\n minDate: '',\n maxDate: ''\n };\n }\n }]);\n return CalendarWidget;\n}(_InputWidget2[\"default\"]);\nexports[\"default\"] = CalendarWidget;\n\n//# sourceURL=webpack://Formio/./lib/widgets/CalendarWidget.js?"); /***/ }), @@ -4598,7 +5135,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.object.assign.js */ \"./node_modules/core-js/modules/es.object.assign.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\n\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\n\nvar _Element2 = _interopRequireDefault(__webpack_require__(/*! ../Element */ \"./lib/Element.js\"));\n\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar InputWidget = /*#__PURE__*/function (_Element) {\n _inherits(InputWidget, _Element);\n\n var _super = _createSuper(InputWidget);\n\n function InputWidget(settings, component, instance, index) {\n var _this;\n\n _classCallCheck(this, InputWidget);\n\n _this = _super.call(this, settings);\n _this.valueIndex = index || 0;\n _this.componentInstance = instance;\n _this.namespace = 'formio.widget';\n _this.component = component || {};\n _this.settings = _lodash.default.merge({}, _this.defaultSettings, settings || {});\n return _this;\n }\n\n _createClass(InputWidget, [{\n key: \"attach\",\n value: function attach(input) {\n this._input = input;\n return _nativePromiseOnly.default.resolve();\n }\n }, {\n key: \"defaultSettings\",\n get: function get() {\n return {};\n }\n }, {\n key: \"disabled\",\n set: function set(disabled) {\n if (disabled) {\n this._input.setAttribute('disabled', 'disabled');\n } else {\n this._input.removeAttribute('disabled');\n }\n }\n }, {\n key: \"input\",\n get: function get() {\n return this._input;\n }\n }, {\n key: \"getValue\",\n value: function getValue() {\n return this._input.value;\n }\n }, {\n key: \"getValueAsString\",\n value: function getValueAsString(value) {\n return value;\n }\n }, {\n key: \"validationValue\",\n value: function validationValue(value) {\n return value;\n }\n }, {\n key: \"addPrefix\",\n value: function addPrefix() {\n return null;\n }\n }, {\n key: \"addSuffix\",\n value: function addSuffix() {\n return null;\n }\n }, {\n key: \"setValue\",\n value: function setValue(value) {\n this._input.value = value;\n }\n }, {\n key: \"evalContext\",\n value: function evalContext(additional) {\n return _get(_getPrototypeOf(InputWidget.prototype), \"evalContext\", this).call(this, Object.assign({\n component: this.component,\n row: this.componentInstance.data,\n rowIndex: this.componentInstance.rowIndex,\n data: this.componentInstance.rootValue,\n value: this.componentInstance.dataValue,\n t: this.t.bind(this),\n submission: this.componentInstance.root ? this.componentInstance.root._submission : {\n data: this.componentInstance.rootValue\n },\n form: this.componentInstance.root ? this.componentInstance.root._form : {},\n options: this.options\n }, additional));\n }\n }], [{\n key: \"defaultSettings\",\n get: function get() {\n return {\n type: 'input'\n };\n }\n }]);\n\n return InputWidget;\n}(_Element2.default);\n\nexports[\"default\"] = InputWidget;\n\n//# sourceURL=webpack://Formio/./lib/widgets/InputWidget.js?"); +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./node_modules/core-js/modules/es.object.to-string.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.construct.js */ \"./node_modules/core-js/modules/es.reflect.construct.js\");\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n__webpack_require__(/*! core-js/modules/es.reflect.get.js */ \"./node_modules/core-js/modules/es.reflect.get.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-own-property-descriptor.js */ \"./node_modules/core-js/modules/es.object.get-own-property-descriptor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.to-primitive.js */ \"./node_modules/core-js/modules/es.symbol.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.date.to-primitive.js */ \"./node_modules/core-js/modules/es.date.to-primitive.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modules/core-js/modules/es.symbol.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.description.js */ \"./node_modules/core-js/modules/es.symbol.description.js\");\n__webpack_require__(/*! core-js/modules/es.number.constructor.js */ \"./node_modules/core-js/modules/es.number.constructor.js\");\n__webpack_require__(/*! core-js/modules/es.symbol.iterator.js */ \"./node_modules/core-js/modules/es.symbol.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.array.iterator.js */ \"./node_modules/core-js/modules/es.array.iterator.js\");\n__webpack_require__(/*! core-js/modules/es.string.iterator.js */ \"./node_modules/core-js/modules/es.string.iterator.js\");\n__webpack_require__(/*! core-js/modules/web.dom-collections.iterator.js */ \"./node_modules/core-js/modules/web.dom-collections.iterator.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n__webpack_require__(/*! core-js/modules/es.object.assign.js */ \"./node_modules/core-js/modules/es.object.assign.js\");\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.js\");\n__webpack_require__(/*! core-js/modules/es.object.get-prototype-of.js */ \"./node_modules/core-js/modules/es.object.get-prototype-of.js\");\nvar _lodash = _interopRequireDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nvar _Element2 = _interopRequireDefault(__webpack_require__(/*! ../Element */ \"./lib/Element.js\"));\nvar _nativePromiseOnly = _interopRequireDefault(__webpack_require__(/*! native-promise-only */ \"./node_modules/native-promise-only/lib/npo.src.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar InputWidget = /*#__PURE__*/function (_Element) {\n _inherits(InputWidget, _Element);\n var _super = _createSuper(InputWidget);\n function InputWidget(settings, component, instance, index) {\n var _this;\n _classCallCheck(this, InputWidget);\n _this = _super.call(this, settings);\n _this.valueIndex = index || 0;\n _this.componentInstance = instance;\n _this.namespace = 'formio.widget';\n _this.component = component || {};\n _this.settings = _lodash[\"default\"].merge({}, _this.defaultSettings, settings || {});\n return _this;\n }\n _createClass(InputWidget, [{\n key: \"attach\",\n value: function attach(input) {\n this._input = input;\n return _nativePromiseOnly[\"default\"].resolve();\n }\n }, {\n key: \"defaultSettings\",\n get: function get() {\n return {};\n }\n }, {\n key: \"disabled\",\n set: function set(disabled) {\n if (disabled) {\n this._input.setAttribute('disabled', 'disabled');\n } else {\n this._input.removeAttribute('disabled');\n }\n }\n }, {\n key: \"input\",\n get: function get() {\n return this._input;\n }\n }, {\n key: \"getValue\",\n value: function getValue() {\n return this._input.value;\n }\n }, {\n key: \"getValueAsString\",\n value: function getValueAsString(value) {\n return value;\n }\n }, {\n key: \"validationValue\",\n value: function validationValue(value) {\n return value;\n }\n }, {\n key: \"addPrefix\",\n value: function addPrefix() {\n return null;\n }\n }, {\n key: \"addSuffix\",\n value: function addSuffix() {\n return null;\n }\n }, {\n key: \"setValue\",\n value: function setValue(value) {\n this._input.value = value;\n }\n }, {\n key: \"evalContext\",\n value: function evalContext(additional) {\n return _get(_getPrototypeOf(InputWidget.prototype), \"evalContext\", this).call(this, Object.assign({\n component: this.component,\n row: this.componentInstance.data,\n rowIndex: this.componentInstance.rowIndex,\n data: this.componentInstance.rootValue,\n value: this.componentInstance.dataValue,\n t: this.t.bind(this),\n submission: this.componentInstance.root ? this.componentInstance.root._submission : {\n data: this.componentInstance.rootValue\n },\n form: this.componentInstance.root ? this.componentInstance.root._form : {},\n options: this.options\n }, additional));\n }\n }], [{\n key: \"defaultSettings\",\n get: function get() {\n return {\n type: 'input'\n };\n }\n }]);\n return InputWidget;\n}(_Element2[\"default\"]);\nexports[\"default\"] = InputWidget;\n\n//# sourceURL=webpack://Formio/./lib/widgets/InputWidget.js?"); /***/ }), @@ -4609,7 +5146,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\nvar _InputWidget = _interopRequireDefault(__webpack_require__(/*! ./InputWidget */ \"./lib/widgets/InputWidget.js\"));\n\nvar _CalendarWidget = _interopRequireDefault(__webpack_require__(/*! ./CalendarWidget */ \"./lib/widgets/CalendarWidget.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n input: _InputWidget.default,\n calendar: _CalendarWidget.default\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/widgets/index.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _InputWidget = _interopRequireDefault(__webpack_require__(/*! ./InputWidget */ \"./lib/widgets/InputWidget.js\"));\nvar _CalendarWidget = _interopRequireDefault(__webpack_require__(/*! ./CalendarWidget */ \"./lib/widgets/CalendarWidget.js\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar _default = {\n input: _InputWidget[\"default\"],\n calendar: _CalendarWidget[\"default\"]\n};\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/widgets/index.js?"); /***/ }), @@ -4830,7 +5367,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo \***************************************************************************************/ /***/ (function(__unused_webpack_module, exports) { -eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"]=function(ctx) {\nvar __t, __p = '', __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n__p += '\\n ' +\n((__t = ( col.hideLabel ? '' : ctx.t(col.label || col.title, { _userInput: true }) )) == null ? '' : __t) +\n'\\n ';\n if (col.tooltip) { ;\n__p += ' ';\n } ;\n__p += '\\n \\n ';\n }) ;\n__p += '\\n ';\n if (ctx.hasExtraColumn) { ;\n__p += '\\n \\n ';\n } ;\n__p += '\\n \\n \\n ';\n } ;\n__p += '\\n \\n ';\n ctx.rows.forEach(function(row, index) { ;\n__p += '\\n ';\n if (ctx.hasGroups && ctx.groups[index]) { ;\n__p += '\\n \\n ' +\n((__t = (ctx.groups[index].label)) == null ? '' : __t) +\n'\\n \\n ';\n } ;\n__p += '\\n \\n ';\n if (ctx.component.reorder) { ;\n__p += '\\n \\n ';\n } ;\n__p += '\\n ';\n ctx.columns.forEach(function(col) { ;\n__p += '\\n \\n ';\n }) ;\n__p += '\\n ';\n if (ctx.hasExtraColumn) { ;\n__p += '\\n ';\n if (ctx.hasRemoveButtons) { ;\n__p += '\\n \\n ';\n } ;\n__p += '\\n ';\n if (ctx.canAddColumn) { ;\n__p += '\\n \\n ';\n } ;\n__p += '\\n ';\n } ;\n__p += '\\n \\n ';\n }) ;\n__p += '\\n \\n ';\n if (ctx.hasAddButton && ctx.hasBottomSubmit) { ;\n__p += '\\n \\n \\n \\n \\n \\n ';\n } ;\n__p += '\\n
\\n ';\n if (!ctx.builder && ctx.hasAddButton && ctx.hasTopSubmit) { ;\n__p += '\\n \\n ';\n } ;\n__p += '\\n
\\n \\n \\n ' +\n((__t = (row[col.key])) == null ? '' : __t) +\n'\\n \\n \\n \\n ' +\n((__t = (ctx.placeholder)) == null ? '' : __t) +\n'\\n
\\n \\n
\\n';\nreturn __p\n}\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/bootstrap3/lib/templates/bootstrap3/datagrid/form.ejs.js?"); +eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"]=function(ctx) {\nvar __t, __p = '', __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n__p += '\\n ' +\n((__t = ( col.hideLabel ? '' : ctx.t(col.label || col.title, { _userInput: true }) )) == null ? '' : __t) +\n'\\n ';\n if (col.tooltip) { ;\n__p += ' ';\n } ;\n__p += '\\n \\n ';\n }) ;\n__p += '\\n ';\n if (ctx.hasExtraColumn) { ;\n__p += '\\n \\n ';\n } ;\n__p += '\\n \\n \\n ';\n } ;\n__p += '\\n \\n ';\n ctx.rows.forEach(function(row, index) { ;\n__p += '\\n ';\n if (ctx.hasGroups && ctx.groups[index]) { ;\n__p += '\\n \\n ' +\n((__t = (ctx.groups[index].label)) == null ? '' : __t) +\n'\\n \\n ';\n } ;\n__p += '\\n \\n ';\n if (ctx.component.reorder) { ;\n__p += '\\n \\n ';\n } ;\n__p += '\\n ';\n ctx.columns.forEach(function(col) { ;\n__p += '\\n \\n ';\n }) ;\n__p += '\\n ';\n if (ctx.hasExtraColumn) { ;\n__p += '\\n ';\n if (ctx.hasRemoveButtons) { ;\n__p += '\\n \\n ';\n } ;\n__p += '\\n ';\n if (ctx.canAddColumn) { ;\n__p += '\\n \\n ';\n } ;\n__p += '\\n ';\n } ;\n__p += '\\n \\n ';\n }) ;\n__p += '\\n \\n ';\n if (ctx.hasAddButton && ctx.hasBottomSubmit) { ;\n__p += '\\n \\n \\n \\n \\n \\n ';\n } ;\n__p += '\\n
\\n ';\n if (!ctx.builder && ctx.hasAddButton && ctx.hasTopSubmit) { ;\n__p += '\\n \\n ';\n } ;\n__p += '\\n
\\n \\n \\n ' +\n((__t = (row[col.key])) == null ? '' : __t) +\n'\\n \\n \\n \\n ' +\n((__t = (ctx.placeholder)) == null ? '' : __t) +\n'\\n
\\n \\n
\\n';\nreturn __p\n}\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/bootstrap3/lib/templates/bootstrap3/datagrid/form.ejs.js?"); /***/ }), @@ -5541,7 +6078,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nvar \**************************************************************************/ /***/ (function(module) { -eval("/*! @formio/choices.js v9.0.1 | © 2021 Josh Johnson | https://github.com/jshjohnson/Choices#readme */\n(function webpackUniversalModuleDefinition(root, factory) {\n\tif(true)\n\t\tmodule.exports = factory();\n\telse {}\n})(window, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __nested_webpack_require_641__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __nested_webpack_require_641__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__nested_webpack_require_641__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__nested_webpack_require_641__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__nested_webpack_require_641__.d = function(exports, name, getter) {\n/******/ \t\tif(!__nested_webpack_require_641__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// define __esModule on exports\n/******/ \t__nested_webpack_require_641__.r = function(exports) {\n/******/ \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n/******/ \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n/******/ \t\t}\n/******/ \t\tObject.defineProperty(exports, '__esModule', { value: true });\n/******/ \t};\n/******/\n/******/ \t// create a fake namespace object\n/******/ \t// mode & 1: value is a module id, require it\n/******/ \t// mode & 2: merge all properties of value into the ns\n/******/ \t// mode & 4: return value when already ns object\n/******/ \t// mode & 8|1: behave like require\n/******/ \t__nested_webpack_require_641__.t = function(value, mode) {\n/******/ \t\tif(mode & 1) value = __nested_webpack_require_641__(value);\n/******/ \t\tif(mode & 8) return value;\n/******/ \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n/******/ \t\tvar ns = Object.create(null);\n/******/ \t\t__nested_webpack_require_641__.r(ns);\n/******/ \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n/******/ \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __nested_webpack_require_641__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n/******/ \t\treturn ns;\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__nested_webpack_require_641__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__nested_webpack_require_641__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__nested_webpack_require_641__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__nested_webpack_require_641__.p = \"/public/assets/scripts/\";\n/******/\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __nested_webpack_require_641__(__nested_webpack_require_641__.s = 4);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar isMergeableObject = function isMergeableObject(value) {\n\treturn isNonNullObject(value)\n\t\t&& !isSpecial(value)\n};\n\nfunction isNonNullObject(value) {\n\treturn !!value && typeof value === 'object'\n}\n\nfunction isSpecial(value) {\n\tvar stringValue = Object.prototype.toString.call(value);\n\n\treturn stringValue === '[object RegExp]'\n\t\t|| stringValue === '[object Date]'\n\t\t|| isReactElement(value)\n}\n\n// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25\nvar canUseSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;\n\nfunction isReactElement(value) {\n\treturn value.$$typeof === REACT_ELEMENT_TYPE\n}\n\nfunction emptyTarget(val) {\n\treturn Array.isArray(val) ? [] : {}\n}\n\nfunction cloneUnlessOtherwiseSpecified(value, options) {\n\treturn (options.clone !== false && options.isMergeableObject(value))\n\t\t? deepmerge(emptyTarget(value), value, options)\n\t\t: value\n}\n\nfunction defaultArrayMerge(target, source, options) {\n\treturn target.concat(source).map(function(element) {\n\t\treturn cloneUnlessOtherwiseSpecified(element, options)\n\t})\n}\n\nfunction getMergeFunction(key, options) {\n\tif (!options.customMerge) {\n\t\treturn deepmerge\n\t}\n\tvar customMerge = options.customMerge(key);\n\treturn typeof customMerge === 'function' ? customMerge : deepmerge\n}\n\nfunction getEnumerableOwnPropertySymbols(target) {\n\treturn Object.getOwnPropertySymbols\n\t\t? Object.getOwnPropertySymbols(target).filter(function(symbol) {\n\t\t\treturn target.propertyIsEnumerable(symbol)\n\t\t})\n\t\t: []\n}\n\nfunction getKeys(target) {\n\treturn Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))\n}\n\n// Protects from prototype poisoning and unexpected merging up the prototype chain.\nfunction propertyIsUnsafe(target, key) {\n\ttry {\n\t\treturn (key in target) // Properties are safe to merge if they don't exist in the target yet,\n\t\t\t&& !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,\n\t\t\t\t&& Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable.\n\t} catch (unused) {\n\t\t// Counterintuitively, it's safe to merge any property on a target that causes the `in` operator to throw.\n\t\t// This happens when trying to copy an object in the source over a plain string in the target.\n\t\treturn false\n\t}\n}\n\nfunction mergeObject(target, source, options) {\n\tvar destination = {};\n\tif (options.isMergeableObject(target)) {\n\t\tgetKeys(target).forEach(function(key) {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(target[key], options);\n\t\t});\n\t}\n\tgetKeys(source).forEach(function(key) {\n\t\tif (propertyIsUnsafe(target, key)) {\n\t\t\treturn\n\t\t}\n\n\t\tif (!options.isMergeableObject(source[key]) || !target[key]) {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(source[key], options);\n\t\t} else {\n\t\t\tdestination[key] = getMergeFunction(key, options)(target[key], source[key], options);\n\t\t}\n\t});\n\treturn destination\n}\n\nfunction deepmerge(target, source, options) {\n\toptions = options || {};\n\toptions.arrayMerge = options.arrayMerge || defaultArrayMerge;\n\toptions.isMergeableObject = options.isMergeableObject || isMergeableObject;\n\t// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()\n\t// implementations can use it. The caller may not replace it.\n\toptions.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;\n\n\tvar sourceIsArray = Array.isArray(source);\n\tvar targetIsArray = Array.isArray(target);\n\tvar sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;\n\n\tif (!sourceAndTargetTypesMatch) {\n\t\treturn cloneUnlessOtherwiseSpecified(source, options)\n\t} else if (sourceIsArray) {\n\t\treturn options.arrayMerge(target, source, options)\n\t} else {\n\t\treturn mergeObject(target, source, options)\n\t}\n}\n\ndeepmerge.all = function deepmergeAll(array, options) {\n\tif (!Array.isArray(array)) {\n\t\tthrow new Error('first argument should be an array')\n\t}\n\n\treturn array.reduce(function(prev, next) {\n\t\treturn deepmerge(prev, next, options)\n\t}, {})\n};\n\nvar deepmerge_1 = deepmerge;\n\nmodule.exports = deepmerge_1;\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, __webpack_exports__, __nested_webpack_require_8355__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(global, module) {/* harmony import */ var _ponyfill_js__WEBPACK_IMPORTED_MODULE_0__ = __nested_webpack_require_8355__(3);\n/* global window */\n\n\nvar root;\n\nif (typeof self !== 'undefined') {\n root = self;\n} else if (typeof window !== 'undefined') {\n root = window;\n} else if (typeof global !== 'undefined') {\n root = global;\n} else if (true) {\n root = module;\n} else {}\n\nvar result = Object(_ponyfill_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(root);\n/* harmony default export */ __webpack_exports__[\"a\"] = (result);\n\n/* WEBPACK VAR INJECTION */}.call(this, __nested_webpack_require_8355__(5), __nested_webpack_require_8355__(6)(module)))\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/*!\n * Fuse.js v3.4.5 - Lightweight fuzzy-search (http://fusejs.io)\n * \n * Copyright (c) 2012-2017 Kirollos Risk (http://kiro.me)\n * All Rights Reserved. Apache Software License 2.0\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n */\n!function(e,t){ true?module.exports=t():0}(this,function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&\"object\"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,\"default\",{enumerable:!0,value:e}),2&t&&\"string\"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,\"a\",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=\"\",n(n.s=1)}([function(e,t){e.exports=function(e){return Array.isArray?Array.isArray(e):\"[object Array]\"===Object.prototype.toString.call(e)}},function(e,t,n){function r(e){return(r=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e})(e)}function o(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{limit:!1};this._log('---------\\nSearch pattern: \"'.concat(e,'\"'));var n=this._prepareSearchers(e),r=n.tokenSearchers,o=n.fullSearcher,i=this._search(r,o),a=i.weights,s=i.results;return this._computeScore(a,s),this.options.shouldSort&&this._sort(s),t.limit&&\"number\"==typeof t.limit&&(s=s.slice(0,t.limit)),this._format(s)}},{key:\"_prepareSearchers\",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:\"\",t=[];if(this.options.tokenize)for(var n=e.split(this.options.tokenSeparator),r=0,o=n.length;r0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=this.list,r={},o=[];if(\"string\"==typeof n[0]){for(var i=0,a=n.length;i1)throw new Error(\"Key weight has to be > 0 and <= 1\");d=d.name}else s[d]={weight:1};this._analyze({key:d,value:this.options.getFn(l,d),record:l,index:c},{resultMap:r,results:o,tokenSearchers:e,fullSearcher:t})}return{weights:s,results:o}}},{key:\"_analyze\",value:function(e,t){var n=e.key,r=e.arrayIndex,o=void 0===r?-1:r,i=e.value,a=e.record,c=e.index,h=t.tokenSearchers,l=void 0===h?[]:h,u=t.fullSearcher,f=void 0===u?[]:u,d=t.resultMap,v=void 0===d?{}:d,p=t.results,g=void 0===p?[]:p;if(null!=i){var y=!1,m=-1,k=0;if(\"string\"==typeof i){this._log(\"\\nKey: \".concat(\"\"===n?\"-\":n));var S=f.search(i);if(this._log('Full text: \"'.concat(i,'\", score: ').concat(S.score)),this.options.tokenize){for(var x=i.split(this.options.tokenSeparator),b=[],M=0;M-1&&(P=(P+m)/2),this._log(\"Score average:\",P);var F=!this.options.tokenize||!this.options.matchAllTokens||k>=l.length;if(this._log(\"\\nCheck Matches: \".concat(F)),(y||S.isMatch)&&F){var T=v[c];T?T.output.push({key:n,arrayIndex:o,value:i,score:P,matchedIndices:S.matchedIndices}):(v[c]={item:a,output:[{key:n,arrayIndex:o,value:i,score:P,matchedIndices:S.matchedIndices}]},g.push(v[c]))}}else if(s(i))for(var z=0,E=i.length;z-1&&(a.arrayIndex=i.arrayIndex),t.matches.push(a)}}}),this.options.includeScore&&o.push(function(e,t){t.score=e.score});for(var i=0,a=e.length;in)return o(e,this.pattern,r);var a=this.options,s=a.location,c=a.distance,h=a.threshold,l=a.findAllMatches,u=a.minMatchCharLength;return i(e,this.pattern,this.patternAlphabet,{location:s,distance:c,threshold:h,findAllMatches:l,minMatchCharLength:u})}}])&&r(t.prototype,n),s&&r(t,s),e}();e.exports=s},function(e,t){var n=/[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g;e.exports=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:/ +/g,o=new RegExp(t.replace(n,\"\\\\$&\").replace(r,\"|\")),i=e.match(o),a=!!i,s=[];if(a)for(var c=0,h=i.length;c=P;z-=1){var E=z-1,K=n[e.charAt(E)];if(K&&(x[E]=1),T[z]=(T[z+1]<<1|1)&K,0!==I&&(T[z]|=(L[z+1]|L[z])<<1|1|L[z+1]),T[z]&C&&(w=r(t,{errors:I,currentLocation:E,expectedLocation:g,distance:h}))<=m){if(m=w,(k=E)<=g)break;P=Math.max(1,2*g-k)}}if(r(t,{errors:I+1,currentLocation:g,expectedLocation:g,distance:h})>m)break;L=T}return{isMatch:k>=0,score:0===w?.001:w,matchedIndices:o(x,p)}}},function(e,t){e.exports=function(e,t){var n=t.errors,r=void 0===n?0:n,o=t.currentLocation,i=void 0===o?0:o,a=t.expectedLocation,s=void 0===a?0:a,c=t.distance,h=void 0===c?100:c,l=r/e.length,u=Math.abs(s-i);return h?l+u/h:u?1:l}},function(e,t){e.exports=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=[],r=-1,o=-1,i=0,a=e.length;i=t&&n.push([r,o]),r=-1)}return e[i-1]&&i-r>=t&&n.push([r,i-1]),n}},function(e,t){e.exports=function(e){for(var t={},n=e.length,r=0;r 0) {\n return \"Unexpected \" + (unexpectedKeys.length > 1 ? 'keys' : 'key') + \" \" + (\"\\\"\" + unexpectedKeys.join('\", \"') + \"\\\" found in \" + argumentName + \". \") + \"Expected to find one of the known reducer keys instead: \" + (\"\\\"\" + reducerKeys.join('\", \"') + \"\\\". Unexpected keys will be ignored.\");\n }\n}\n\nfunction assertReducerShape(reducers) {\n Object.keys(reducers).forEach(function (key) {\n var reducer = reducers[key];\n var initialState = reducer(undefined, {\n type: ActionTypes.INIT\n });\n\n if (typeof initialState === 'undefined') {\n throw new Error(\"Reducer \\\"\" + key + \"\\\" returned undefined during initialization. \" + \"If the state passed to the reducer is undefined, you must \" + \"explicitly return the initial state. The initial state may \" + \"not be undefined. If you don't want to set a value for this reducer, \" + \"you can use null instead of undefined.\");\n }\n\n if (typeof reducer(undefined, {\n type: ActionTypes.PROBE_UNKNOWN_ACTION()\n }) === 'undefined') {\n throw new Error(\"Reducer \\\"\" + key + \"\\\" returned undefined when probed with a random type. \" + (\"Don't try to handle \" + ActionTypes.INIT + \" or other actions in \\\"redux/*\\\" \") + \"namespace. They are considered private. Instead, you must return the \" + \"current state for any unknown actions, unless it is undefined, \" + \"in which case you must return the initial state, regardless of the \" + \"action type. The initial state may not be undefined, but can be null.\");\n }\n });\n}\n/**\n * Turns an object whose values are different reducer functions, into a single\n * reducer function. It will call every child reducer, and gather their results\n * into a single state object, whose keys correspond to the keys of the passed\n * reducer functions.\n *\n * @param {Object} reducers An object whose values correspond to different\n * reducer functions that need to be combined into one. One handy way to obtain\n * it is to use ES6 `import * as reducers` syntax. The reducers may never return\n * undefined for any action. Instead, they should return their initial state\n * if the state passed to them was undefined, and the current state for any\n * unrecognized action.\n *\n * @returns {Function} A reducer function that invokes every reducer inside the\n * passed object, and builds a state object with the same shape.\n */\n\n\nfunction combineReducers(reducers) {\n var reducerKeys = Object.keys(reducers);\n var finalReducers = {};\n\n for (var i = 0; i < reducerKeys.length; i++) {\n var key = reducerKeys[i];\n\n if (false) {}\n\n if (typeof reducers[key] === 'function') {\n finalReducers[key] = reducers[key];\n }\n }\n\n var finalReducerKeys = Object.keys(finalReducers); // This is used to make sure we don't warn about the same\n // keys multiple times.\n\n var unexpectedKeyCache;\n\n if (false) {}\n\n var shapeAssertionError;\n\n try {\n assertReducerShape(finalReducers);\n } catch (e) {\n shapeAssertionError = e;\n }\n\n return function combination(state, action) {\n if (state === void 0) {\n state = {};\n }\n\n if (shapeAssertionError) {\n throw shapeAssertionError;\n }\n\n if (false) { var warningMessage; }\n\n var hasChanged = false;\n var nextState = {};\n\n for (var _i = 0; _i < finalReducerKeys.length; _i++) {\n var _key = finalReducerKeys[_i];\n var reducer = finalReducers[_key];\n var previousStateForKey = state[_key];\n var nextStateForKey = reducer(previousStateForKey, action);\n\n if (typeof nextStateForKey === 'undefined') {\n var errorMessage = getUndefinedStateErrorMessage(_key, action);\n throw new Error(errorMessage);\n }\n\n nextState[_key] = nextStateForKey;\n hasChanged = hasChanged || nextStateForKey !== previousStateForKey;\n }\n\n return hasChanged ? nextState : state;\n };\n}\n\nfunction bindActionCreator(actionCreator, dispatch) {\n return function () {\n return dispatch(actionCreator.apply(this, arguments));\n };\n}\n/**\n * Turns an object whose values are action creators, into an object with the\n * same keys, but with every function wrapped into a `dispatch` call so they\n * may be invoked directly. This is just a convenience method, as you can call\n * `store.dispatch(MyActionCreators.doSomething())` yourself just fine.\n *\n * For convenience, you can also pass an action creator as the first argument,\n * and get a dispatch wrapped function in return.\n *\n * @param {Function|Object} actionCreators An object whose values are action\n * creator functions. One handy way to obtain it is to use ES6 `import * as`\n * syntax. You may also pass a single function.\n *\n * @param {Function} dispatch The `dispatch` function available on your Redux\n * store.\n *\n * @returns {Function|Object} The object mimicking the original object, but with\n * every action creator wrapped into the `dispatch` call. If you passed a\n * function as `actionCreators`, the return value will also be a single\n * function.\n */\n\n\nfunction bindActionCreators(actionCreators, dispatch) {\n if (typeof actionCreators === 'function') {\n return bindActionCreator(actionCreators, dispatch);\n }\n\n if (typeof actionCreators !== 'object' || actionCreators === null) {\n throw new Error(\"bindActionCreators expected an object or a function, instead received \" + (actionCreators === null ? 'null' : typeof actionCreators) + \". \" + \"Did you write \\\"import ActionCreators from\\\" instead of \\\"import * as ActionCreators from\\\"?\");\n }\n\n var boundActionCreators = {};\n\n for (var key in actionCreators) {\n var actionCreator = actionCreators[key];\n\n if (typeof actionCreator === 'function') {\n boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);\n }\n }\n\n return boundActionCreators;\n}\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n keys.push.apply(keys, Object.getOwnPropertySymbols(object));\n }\n\n if (enumerableOnly) keys = keys.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(source, true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(source).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\n/**\n * Composes single-argument functions from right to left. The rightmost\n * function can take multiple arguments as it provides the signature for\n * the resulting composite function.\n *\n * @param {...Function} funcs The functions to compose.\n * @returns {Function} A function obtained by composing the argument functions\n * from right to left. For example, compose(f, g, h) is identical to doing\n * (...args) => f(g(h(...args))).\n */\nfunction compose() {\n for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {\n funcs[_key] = arguments[_key];\n }\n\n if (funcs.length === 0) {\n return function (arg) {\n return arg;\n };\n }\n\n if (funcs.length === 1) {\n return funcs[0];\n }\n\n return funcs.reduce(function (a, b) {\n return function () {\n return a(b.apply(void 0, arguments));\n };\n });\n}\n\n/**\n * Creates a store enhancer that applies middleware to the dispatch method\n * of the Redux store. This is handy for a variety of tasks, such as expressing\n * asynchronous actions in a concise manner, or logging every action payload.\n *\n * See `redux-thunk` package as an example of the Redux middleware.\n *\n * Because middleware is potentially asynchronous, this should be the first\n * store enhancer in the composition chain.\n *\n * Note that each middleware will be given the `dispatch` and `getState` functions\n * as named arguments.\n *\n * @param {...Function} middlewares The middleware chain to be applied.\n * @returns {Function} A store enhancer applying the middleware.\n */\n\nfunction applyMiddleware() {\n for (var _len = arguments.length, middlewares = new Array(_len), _key = 0; _key < _len; _key++) {\n middlewares[_key] = arguments[_key];\n }\n\n return function (createStore) {\n return function () {\n var store = createStore.apply(void 0, arguments);\n\n var _dispatch = function dispatch() {\n throw new Error('Dispatching while constructing your middleware is not allowed. ' + 'Other middleware would not be applied to this dispatch.');\n };\n\n var middlewareAPI = {\n getState: store.getState,\n dispatch: function dispatch() {\n return _dispatch.apply(void 0, arguments);\n }\n };\n var chain = middlewares.map(function (middleware) {\n return middleware(middlewareAPI);\n });\n _dispatch = compose.apply(void 0, chain)(store.dispatch);\n return _objectSpread2({}, store, {\n dispatch: _dispatch\n });\n };\n };\n}\n\n/*\n * This is a dummy function to check if the function name has been altered by minification.\n * If the function has been minified and NODE_ENV !== 'production', warn the user.\n */\n\nfunction isCrushed() {}\n\nif (false) {}\n\n\n\n// CONCATENATED MODULE: ./src/scripts/reducers/items.js\nvar defaultState = [];\nfunction items_items(state, action) {\n if (state === void 0) {\n state = defaultState;\n }\n\n switch (action.type) {\n case 'ADD_ITEM':\n {\n // Add object to items array\n var newState = [].concat(state, [{\n id: action.id,\n choiceId: action.choiceId,\n groupId: action.groupId,\n value: action.value,\n label: action.label,\n active: true,\n highlighted: false,\n customProperties: action.customProperties,\n placeholder: action.placeholder || false,\n keyCode: null\n }]);\n return newState.map(function (obj) {\n var item = obj;\n item.highlighted = false;\n return item;\n });\n }\n\n case 'REMOVE_ITEM':\n {\n // Set item to inactive\n return state.map(function (obj) {\n var item = obj;\n\n if (item.id === action.id) {\n item.active = false;\n }\n\n return item;\n });\n }\n\n case 'HIGHLIGHT_ITEM':\n {\n return state.map(function (obj) {\n var item = obj;\n\n if (item.id === action.id) {\n item.highlighted = action.highlighted;\n }\n\n return item;\n });\n }\n\n default:\n {\n return state;\n }\n }\n}\n// CONCATENATED MODULE: ./src/scripts/reducers/groups.js\nvar groups_defaultState = [];\nfunction groups(state, action) {\n if (state === void 0) {\n state = groups_defaultState;\n }\n\n switch (action.type) {\n case 'ADD_GROUP':\n {\n return [].concat(state, [{\n id: action.id,\n value: action.value,\n active: action.active,\n disabled: action.disabled\n }]);\n }\n\n case 'CLEAR_CHOICES':\n {\n return [];\n }\n\n default:\n {\n return state;\n }\n }\n}\n// CONCATENATED MODULE: ./src/scripts/reducers/choices.js\nvar choices_defaultState = [];\nfunction choices_choices(state, action) {\n if (state === void 0) {\n state = choices_defaultState;\n }\n\n switch (action.type) {\n case 'ADD_CHOICE':\n {\n /*\n A disabled choice appears in the choice dropdown but cannot be selected\n A selected choice has been added to the passed input's value (added as an item)\n An active choice appears within the choice dropdown\n */\n return [].concat(state, [{\n id: action.id,\n elementId: action.elementId,\n groupId: action.groupId,\n value: action.value,\n label: action.label || action.value,\n disabled: action.disabled || false,\n selected: false,\n active: true,\n score: 9999,\n customProperties: action.customProperties,\n placeholder: action.placeholder || false,\n keyCode: null\n }]);\n }\n\n case 'ADD_ITEM':\n {\n // If all choices need to be activated\n if (action.activateOptions) {\n return state.map(function (obj) {\n var choice = obj;\n choice.active = action.active;\n return choice;\n });\n } // When an item is added and it has an associated choice,\n // we want to disable it so it can't be chosen again\n\n\n if (action.choiceId > -1) {\n return state.map(function (obj) {\n var choice = obj;\n\n if (choice.id === parseInt(action.choiceId, 10)) {\n choice.selected = true;\n }\n\n return choice;\n });\n }\n\n return state;\n }\n\n case 'REMOVE_ITEM':\n {\n // When an item is removed and it has an associated choice,\n // we want to re-enable it so it can be chosen again\n if (action.choiceId > -1) {\n return state.map(function (obj) {\n var choice = obj;\n\n if (choice.id === parseInt(action.choiceId, 10)) {\n choice.selected = false;\n }\n\n return choice;\n });\n }\n\n return state;\n }\n\n case 'FILTER_CHOICES':\n {\n return state.map(function (obj) {\n var choice = obj; // Set active state based on whether choice is\n // within filtered results\n\n choice.active = action.results.some(function (_ref) {\n var item = _ref.item,\n score = _ref.score;\n\n if (item.id === choice.id) {\n choice.score = score;\n return true;\n }\n\n return false;\n });\n return choice;\n });\n }\n\n case 'ACTIVATE_CHOICES':\n {\n return state.map(function (obj) {\n var choice = obj;\n choice.active = action.active;\n return choice;\n });\n }\n\n case 'CLEAR_CHOICES':\n {\n return choices_defaultState;\n }\n\n default:\n {\n return state;\n }\n }\n}\n// CONCATENATED MODULE: ./src/scripts/reducers/general.js\nvar general_defaultState = {\n loading: false\n};\n\nvar general = function general(state, action) {\n if (state === void 0) {\n state = general_defaultState;\n }\n\n switch (action.type) {\n case 'SET_IS_LOADING':\n {\n return {\n loading: action.isLoading\n };\n }\n\n default:\n {\n return state;\n }\n }\n};\n\n/* harmony default export */ var reducers_general = (general);\n// CONCATENATED MODULE: ./src/scripts/lib/utils.js\n/**\n * @param {number} min\n * @param {number} max\n * @returns {number}\n */\nvar getRandomNumber = function getRandomNumber(min, max) {\n return Math.floor(Math.random() * (max - min) + min);\n};\n/**\n * @param {number} length\n * @returns {string}\n */\n\nvar generateChars = function generateChars(length) {\n return Array.from({\n length: length\n }, function () {\n return getRandomNumber(0, 36).toString(36);\n }).join('');\n};\n/**\n * @param {HTMLInputElement | HTMLSelectElement} element\n * @param {string} prefix\n * @returns {string}\n */\n\nvar generateId = function generateId(element, prefix) {\n var id = element.id || element.name && element.name + \"-\" + generateChars(2) || generateChars(4);\n id = id.replace(/(:|\\.|\\[|\\]|,)/g, '');\n id = prefix + \"-\" + id;\n return id;\n};\n/**\n * @param {any} obj\n * @returns {string}\n */\n\nvar getType = function getType(obj) {\n return Object.prototype.toString.call(obj).slice(8, -1);\n};\n/**\n * @param {string} type\n * @param {any} obj\n * @returns {boolean}\n */\n\nvar isType = function isType(type, obj) {\n return obj !== undefined && obj !== null && getType(obj) === type;\n};\n/**\n * @param {HTMLElement} element\n * @param {HTMLElement} [wrapper={HTMLDivElement}]\n * @returns {HTMLElement}\n */\n\nvar utils_wrap = function wrap(element, wrapper) {\n if (wrapper === void 0) {\n wrapper = document.createElement('div');\n }\n\n if (element.nextSibling) {\n element.parentNode.insertBefore(wrapper, element.nextSibling);\n } else {\n element.parentNode.appendChild(wrapper);\n }\n\n return wrapper.appendChild(element);\n};\n/**\n * @param {Element} startEl\n * @param {string} selector\n * @param {1 | -1} direction\n * @returns {Element | undefined}\n */\n\nvar getAdjacentEl = function getAdjacentEl(startEl, selector, direction) {\n if (direction === void 0) {\n direction = 1;\n }\n\n if (!(startEl instanceof Element) || typeof selector !== 'string') {\n return undefined;\n }\n\n var prop = (direction > 0 ? 'next' : 'previous') + \"ElementSibling\";\n var sibling = startEl[prop];\n\n while (sibling) {\n if (sibling.matches(selector)) {\n return sibling;\n }\n\n sibling = sibling[prop];\n }\n\n return sibling;\n};\n/**\n * @param {Element} element\n * @param {Element} parent\n * @param {-1 | 1} direction\n * @returns {boolean}\n */\n\nvar isScrolledIntoView = function isScrolledIntoView(element, parent, direction) {\n if (direction === void 0) {\n direction = 1;\n }\n\n if (!element) {\n return false;\n }\n\n var isVisible;\n\n if (direction > 0) {\n // In view from bottom\n isVisible = parent.scrollTop + parent.offsetHeight >= element.offsetTop + element.offsetHeight;\n } else {\n // In view from top\n isVisible = element.offsetTop >= parent.scrollTop;\n }\n\n return isVisible;\n};\n/**\n * @param {any} value\n * @returns {any}\n */\n\nvar sanitise = function sanitise(value) {\n if (typeof value !== 'string') {\n return value;\n }\n\n return value.replace(/&/g, '&').replace(/>/g, '&rt;').replace(/ (str: string) => Element}\n */\n\nvar strToEl = function () {\n var tmpEl = document.createElement('div');\n return function (str) {\n var cleanedInput = str.trim();\n tmpEl.innerHTML = cleanedInput;\n var firldChild = tmpEl.children[0];\n\n while (tmpEl.firstChild) {\n tmpEl.removeChild(tmpEl.firstChild);\n }\n\n return firldChild;\n };\n}();\n/**\n * @param {{ label?: string, value: string }} a\n * @param {{ label?: string, value: string }} b\n * @returns {number}\n */\n\nvar sortByAlpha = function sortByAlpha(_ref, _ref2) {\n var value = _ref.value,\n _ref$label = _ref.label,\n label = _ref$label === void 0 ? value : _ref$label;\n var value2 = _ref2.value,\n _ref2$label = _ref2.label,\n label2 = _ref2$label === void 0 ? value2 : _ref2$label;\n return label.localeCompare(label2, [], {\n sensitivity: 'base',\n ignorePunctuation: true,\n numeric: true\n });\n};\n/**\n * @param {{ score: number }} a\n * @param {{ score: number }} b\n */\n\nvar sortByScore = function sortByScore(a, b) {\n return a.score - b.score;\n};\n/**\n * @param {HTMLElement} element\n * @param {string} type\n * @param {object} customArgs\n */\n\nvar dispatchEvent = function dispatchEvent(element, type, customArgs) {\n if (customArgs === void 0) {\n customArgs = null;\n }\n\n var event = new CustomEvent(type, {\n detail: customArgs,\n bubbles: true,\n cancelable: true\n });\n return element.dispatchEvent(event);\n};\n/**\n * @param {array} array\n * @param {any} value\n * @param {string} [key=\"value\"]\n * @returns {boolean}\n */\n\nvar existsInArray = function existsInArray(array, value, key) {\n if (key === void 0) {\n key = 'value';\n }\n\n return array.some(function (item) {\n if (typeof value === 'string') {\n return item[key] === value.trim();\n }\n\n return item[key] === value;\n });\n};\n/**\n * @param {any} obj\n * @returns {any}\n */\n\nvar cloneObject = function cloneObject(obj) {\n return JSON.parse(JSON.stringify(obj));\n};\n/**\n * Returns an array of keys present on the first but missing on the second object\n * @param {object} a\n * @param {object} b\n * @returns {string[]}\n */\n\nvar diff = function diff(a, b) {\n var aKeys = Object.keys(a).sort();\n var bKeys = Object.keys(b).sort();\n return aKeys.filter(function (i) {\n return bKeys.indexOf(i) < 0;\n });\n};\n// CONCATENATED MODULE: ./src/scripts/reducers/index.js\n\n\n\n\n\n\nvar appReducer = combineReducers({\n items: items_items,\n groups: groups,\n choices: choices_choices,\n general: reducers_general\n});\n\nvar reducers_rootReducer = function rootReducer(passedState, action) {\n var state = passedState; // If we are clearing all items, groups and options we reassign\n // state and then pass that state to our proper reducer. This isn't\n // mutating our actual state\n // See: http://stackoverflow.com/a/35641992\n\n if (action.type === 'CLEAR_ALL') {\n state = undefined;\n } else if (action.type === 'RESET_TO') {\n return cloneObject(action.state);\n }\n\n return appReducer(state, action);\n};\n\n/* harmony default export */ var reducers = (reducers_rootReducer);\n// CONCATENATED MODULE: ./src/scripts/store/store.js\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\n\n\n/**\n * @typedef {import('../../../types/index').Choices.Choice} Choice\n * @typedef {import('../../../types/index').Choices.Group} Group\n * @typedef {import('../../../types/index').Choices.Item} Item\n */\n\nvar store_Store =\n/*#__PURE__*/\nfunction () {\n function Store() {\n this._store = createStore(reducers, window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__());\n }\n /**\n * Subscribe store to function call (wrapped Redux method)\n * @param {Function} onChange Function to trigger when state changes\n * @return\n */\n\n\n var _proto = Store.prototype;\n\n _proto.subscribe = function subscribe(onChange) {\n this._store.subscribe(onChange);\n }\n /**\n * Dispatch event to store (wrapped Redux method)\n * @param {{ type: string, [x: string]: any }} action Action to trigger\n * @return\n */\n ;\n\n _proto.dispatch = function dispatch(action) {\n this._store.dispatch(action);\n }\n /**\n * Get store object (wrapping Redux method)\n * @returns {object} State\n */\n ;\n\n /**\n * Get loading state from store\n * @returns {boolean} Loading State\n */\n _proto.isLoading = function isLoading() {\n return this.state.general.loading;\n }\n /**\n * Get single choice by it's ID\n * @param {string} id\n * @returns {Choice | undefined} Found choice\n */\n ;\n\n _proto.getChoiceById = function getChoiceById(id) {\n return this.activeChoices.find(function (choice) {\n return choice.id === parseInt(id, 10);\n });\n }\n /**\n * Get group by group id\n * @param {number} id Group ID\n * @returns {Group | undefined} Group data\n */\n ;\n\n _proto.getGroupById = function getGroupById(id) {\n return this.groups.find(function (group) {\n return group.id === id;\n });\n };\n\n _createClass(Store, [{\n key: \"state\",\n get: function get() {\n return this._store.getState();\n }\n /**\n * Get items from store\n * @returns {Item[]} Item objects\n */\n\n }, {\n key: \"items\",\n get: function get() {\n return this.state.items;\n }\n /**\n * Get active items from store\n * @returns {Item[]} Item objects\n */\n\n }, {\n key: \"activeItems\",\n get: function get() {\n return this.items.filter(function (item) {\n return item.active === true;\n });\n }\n /**\n * Get highlighted items from store\n * @returns {Item[]} Item objects\n */\n\n }, {\n key: \"highlightedActiveItems\",\n get: function get() {\n return this.items.filter(function (item) {\n return item.active && item.highlighted;\n });\n }\n /**\n * Get choices from store\n * @returns {Choice[]} Option objects\n */\n\n }, {\n key: \"choices\",\n get: function get() {\n return this.state.choices;\n }\n /**\n * Get active choices from store\n * @returns {Choice[]} Option objects\n */\n\n }, {\n key: \"activeChoices\",\n get: function get() {\n return this.choices.filter(function (choice) {\n return choice.active === true;\n });\n }\n /**\n * Get selectable choices from store\n * @returns {Choice[]} Option objects\n */\n\n }, {\n key: \"selectableChoices\",\n get: function get() {\n return this.choices.filter(function (choice) {\n return choice.disabled !== true;\n });\n }\n /**\n * Get choices that can be searched (excluding placeholders)\n * @returns {Choice[]} Option objects\n */\n\n }, {\n key: \"searchableChoices\",\n get: function get() {\n return this.selectableChoices.filter(function (choice) {\n return choice.placeholder !== true;\n });\n }\n /**\n * Get placeholder choice from store\n * @returns {Choice | undefined} Found placeholder\n */\n\n }, {\n key: \"placeholderChoice\",\n get: function get() {\n return [].concat(this.choices).reverse().find(function (choice) {\n return choice.placeholder === true;\n });\n }\n /**\n * Get groups from store\n * @returns {Group[]} Group objects\n */\n\n }, {\n key: \"groups\",\n get: function get() {\n return this.state.groups;\n }\n /**\n * Get active groups from store\n * @returns {Group[]} Group objects\n */\n\n }, {\n key: \"activeGroups\",\n get: function get() {\n var groups = this.groups,\n choices = this.choices;\n return groups.filter(function (group) {\n var isActive = group.active === true && group.disabled === false;\n var hasActiveOptions = choices.some(function (choice) {\n return choice.active === true && choice.disabled === false;\n });\n return isActive && hasActiveOptions;\n }, []);\n }\n }]);\n\n return Store;\n}();\n\n\n// CONCATENATED MODULE: ./src/scripts/components/dropdown.js\nfunction dropdown_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction dropdown_createClass(Constructor, protoProps, staticProps) { if (protoProps) dropdown_defineProperties(Constructor.prototype, protoProps); if (staticProps) dropdown_defineProperties(Constructor, staticProps); return Constructor; }\n\n/**\n * @typedef {import('../../../types/index').Choices.passedElement} passedElement\n * @typedef {import('../../../types/index').Choices.ClassNames} ClassNames\n */\nvar Dropdown =\n/*#__PURE__*/\nfunction () {\n /**\n * @param {{\n * element: HTMLElement,\n * type: passedElement['type'],\n * classNames: ClassNames,\n * }} args\n */\n function Dropdown(_ref) {\n var element = _ref.element,\n type = _ref.type,\n classNames = _ref.classNames;\n this.element = element;\n this.classNames = classNames;\n this.type = type;\n this.isActive = false;\n }\n /**\n * Bottom position of dropdown in viewport coordinates\n * @returns {number} Vertical position\n */\n\n\n var _proto = Dropdown.prototype;\n\n /**\n * Find element that matches passed selector\n * @param {string} selector\n * @returns {HTMLElement | null}\n */\n _proto.getChild = function getChild(selector) {\n return this.element.querySelector(selector);\n }\n /**\n * Show dropdown to user by adding active state class\n * @returns {this}\n */\n ;\n\n _proto.show = function show() {\n this.element.classList.add(this.classNames.activeState);\n this.element.setAttribute('aria-expanded', 'true');\n this.isActive = true;\n return this;\n }\n /**\n * Hide dropdown from user\n * @returns {this}\n */\n ;\n\n _proto.hide = function hide() {\n this.element.classList.remove(this.classNames.activeState);\n this.element.setAttribute('aria-expanded', 'false');\n this.isActive = false;\n return this;\n };\n\n dropdown_createClass(Dropdown, [{\n key: \"distanceFromTopWindow\",\n get: function get() {\n return this.element.getBoundingClientRect().bottom;\n }\n }]);\n\n return Dropdown;\n}();\n\n\n// CONCATENATED MODULE: ./src/scripts/constants.js\n\n/**\n * @typedef {import('../../types/index').Choices.ClassNames} ClassNames\n * @typedef {import('../../types/index').Choices.Options} Options\n */\n\n/** @type {ClassNames} */\n\nvar DEFAULT_CLASSNAMES = {\n containerOuter: 'choices',\n containerInner: 'choices__inner',\n input: 'choices__input',\n inputCloned: 'choices__input--cloned',\n list: 'choices__list',\n listItems: 'choices__list--multiple',\n listSingle: 'choices__list--single',\n listDropdown: 'choices__list--dropdown',\n item: 'choices__item',\n itemSelectable: 'choices__item--selectable',\n itemDisabled: 'choices__item--disabled',\n itemChoice: 'choices__item--choice',\n placeholder: 'choices__placeholder',\n group: 'choices__group',\n groupHeading: 'choices__heading',\n button: 'choices__button',\n activeState: 'is-active',\n focusState: 'is-focused',\n openState: 'is-open',\n disabledState: 'is-disabled',\n highlightedState: 'is-highlighted',\n selectedState: 'is-selected',\n flippedState: 'is-flipped',\n loadingState: 'is-loading',\n noResults: 'has-no-results',\n noChoices: 'has-no-choices'\n};\n/** @type {Options} */\n\nvar DEFAULT_CONFIG = {\n items: [],\n choices: [],\n silent: false,\n renderChoiceLimit: -1,\n maxItemCount: -1,\n addItems: true,\n addItemFilter: null,\n removeItems: true,\n removeItemButton: false,\n editItems: false,\n duplicateItemsAllowed: true,\n delimiter: ',',\n paste: true,\n searchEnabled: true,\n searchChoices: true,\n searchFloor: 1,\n searchResultLimit: 4,\n searchFields: ['label', 'value'],\n position: 'auto',\n resetScrollPosition: true,\n shouldSort: true,\n shouldSortItems: false,\n sorter: sortByAlpha,\n shadowRoot: null,\n placeholder: true,\n placeholderValue: null,\n searchPlaceholderValue: null,\n prependValue: null,\n appendValue: null,\n renderSelectedChoices: 'auto',\n loadingText: 'Loading...',\n noResultsText: 'No results found',\n noChoicesText: 'No choices to choose from',\n itemSelectText: 'Press to select',\n uniqueItemText: 'Only unique values can be added',\n customAddItemText: 'Only values matching specific conditions can be added',\n addItemText: function addItemText(value) {\n return \"Press Enter to add \\\"\" + sanitise(value) + \"\\\"\";\n },\n maxItemText: function maxItemText(maxItemCount) {\n return \"Only \" + maxItemCount + \" values can be added\";\n },\n valueComparer: function valueComparer(value1, value2) {\n return value1 === value2;\n },\n fuseOptions: {\n includeScore: true\n },\n callbackOnInit: null,\n callbackOnCreateTemplates: null,\n classNames: DEFAULT_CLASSNAMES\n};\nvar EVENTS = {\n showDropdown: 'showDropdown',\n hideDropdown: 'hideDropdown',\n change: 'change',\n choice: 'choice',\n search: 'search',\n addItem: 'addItem',\n removeItem: 'removeItem',\n highlightItem: 'highlightItem',\n highlightChoice: 'highlightChoice'\n};\nvar ACTION_TYPES = {\n ADD_CHOICE: 'ADD_CHOICE',\n FILTER_CHOICES: 'FILTER_CHOICES',\n ACTIVATE_CHOICES: 'ACTIVATE_CHOICES',\n CLEAR_CHOICES: 'CLEAR_CHOICES',\n ADD_GROUP: 'ADD_GROUP',\n ADD_ITEM: 'ADD_ITEM',\n REMOVE_ITEM: 'REMOVE_ITEM',\n HIGHLIGHT_ITEM: 'HIGHLIGHT_ITEM',\n CLEAR_ALL: 'CLEAR_ALL'\n};\nvar KEY_CODES = {\n BACK_KEY: 46,\n DELETE_KEY: 8,\n ENTER_KEY: 13,\n A_KEY: 65,\n ESC_KEY: 27,\n UP_KEY: 38,\n DOWN_KEY: 40,\n PAGE_UP_KEY: 33,\n PAGE_DOWN_KEY: 34\n};\nvar TEXT_TYPE = 'text';\nvar SELECT_ONE_TYPE = 'select-one';\nvar SELECT_MULTIPLE_TYPE = 'select-multiple';\nvar SCROLLING_SPEED = 4;\n// CONCATENATED MODULE: ./src/scripts/components/container.js\n\n\n/**\n * @typedef {import('../../../types/index').Choices.passedElement} passedElement\n * @typedef {import('../../../types/index').Choices.ClassNames} ClassNames\n */\n\nvar container_Container =\n/*#__PURE__*/\nfunction () {\n /**\n * @param {{\n * element: HTMLElement,\n * type: passedElement['type'],\n * classNames: ClassNames,\n * position\n * }} args\n */\n function Container(_ref) {\n var element = _ref.element,\n type = _ref.type,\n classNames = _ref.classNames,\n position = _ref.position;\n this.element = element;\n this.classNames = classNames;\n this.type = type;\n this.position = position;\n this.isOpen = false;\n this.isFlipped = false;\n this.isFocussed = false;\n this.isDisabled = false;\n this.isLoading = false;\n this._onFocus = this._onFocus.bind(this);\n this._onBlur = this._onBlur.bind(this);\n }\n\n var _proto = Container.prototype;\n\n _proto.addEventListeners = function addEventListeners() {\n this.element.addEventListener('focus', this._onFocus);\n this.element.addEventListener('blur', this._onBlur);\n };\n\n _proto.removeEventListeners = function removeEventListeners() {\n this.element.removeEventListener('focus', this._onFocus);\n this.element.removeEventListener('blur', this._onBlur);\n }\n /**\n * Determine whether container should be flipped based on passed\n * dropdown position\n * @param {number} dropdownPos\n * @returns {boolean}\n */\n ;\n\n _proto.shouldFlip = function shouldFlip(dropdownPos) {\n if (typeof dropdownPos !== 'number') {\n return false;\n } // If flip is enabled and the dropdown bottom position is\n // greater than the window height flip the dropdown.\n\n\n var shouldFlip = false;\n\n if (this.position === 'auto') {\n shouldFlip = !window.matchMedia(\"(min-height: \" + (dropdownPos + 1) + \"px)\").matches;\n } else if (this.position === 'top') {\n shouldFlip = true;\n }\n\n return shouldFlip;\n }\n /**\n * @param {string} activeDescendantID\n */\n ;\n\n _proto.setActiveDescendant = function setActiveDescendant(activeDescendantID) {\n this.element.setAttribute('aria-activedescendant', activeDescendantID);\n };\n\n _proto.removeActiveDescendant = function removeActiveDescendant() {\n this.element.removeAttribute('aria-activedescendant');\n }\n /**\n * @param {number} dropdownPos\n */\n ;\n\n _proto.open = function open(dropdownPos) {\n this.element.classList.add(this.classNames.openState);\n this.element.setAttribute('aria-expanded', 'true');\n this.isOpen = true;\n\n if (this.shouldFlip(dropdownPos)) {\n this.element.classList.add(this.classNames.flippedState);\n this.isFlipped = true;\n }\n };\n\n _proto.close = function close() {\n this.element.classList.remove(this.classNames.openState);\n this.element.setAttribute('aria-expanded', 'false');\n this.removeActiveDescendant();\n this.isOpen = false; // A dropdown flips if it does not have space within the page\n\n if (this.isFlipped) {\n this.element.classList.remove(this.classNames.flippedState);\n this.isFlipped = false;\n }\n };\n\n _proto.focus = function focus() {\n if (!this.isFocussed) {\n this.element.focus();\n }\n };\n\n _proto.addFocusState = function addFocusState() {\n this.element.classList.add(this.classNames.focusState);\n };\n\n _proto.removeFocusState = function removeFocusState() {\n this.element.classList.remove(this.classNames.focusState);\n };\n\n _proto.enable = function enable() {\n this.element.classList.remove(this.classNames.disabledState);\n this.element.removeAttribute('aria-disabled');\n\n if (this.type === SELECT_ONE_TYPE) {\n this.element.setAttribute('tabindex', '0');\n }\n\n this.isDisabled = false;\n };\n\n _proto.disable = function disable() {\n this.element.classList.add(this.classNames.disabledState);\n this.element.setAttribute('aria-disabled', 'true');\n\n if (this.type === SELECT_ONE_TYPE) {\n this.element.setAttribute('tabindex', '-1');\n }\n\n this.isDisabled = true;\n }\n /**\n * @param {HTMLElement} element\n */\n ;\n\n _proto.wrap = function wrap(element) {\n utils_wrap(element, this.element);\n }\n /**\n * @param {Element} element\n */\n ;\n\n _proto.unwrap = function unwrap(element) {\n // Move passed element outside this element\n this.element.parentNode.insertBefore(element, this.element); // Remove this element\n\n this.element.parentNode.removeChild(this.element);\n };\n\n _proto.addLoadingState = function addLoadingState() {\n this.element.classList.add(this.classNames.loadingState);\n this.element.setAttribute('aria-busy', 'true');\n this.isLoading = true;\n };\n\n _proto.removeLoadingState = function removeLoadingState() {\n this.element.classList.remove(this.classNames.loadingState);\n this.element.removeAttribute('aria-busy');\n this.isLoading = false;\n };\n\n _proto._onFocus = function _onFocus() {\n this.isFocussed = true;\n };\n\n _proto._onBlur = function _onBlur() {\n this.isFocussed = false;\n };\n\n return Container;\n}();\n\n\n// CONCATENATED MODULE: ./src/scripts/components/input.js\nfunction input_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction input_createClass(Constructor, protoProps, staticProps) { if (protoProps) input_defineProperties(Constructor.prototype, protoProps); if (staticProps) input_defineProperties(Constructor, staticProps); return Constructor; }\n\n\n\n/**\n * @typedef {import('../../../types/index').Choices.passedElement} passedElement\n * @typedef {import('../../../types/index').Choices.ClassNames} ClassNames\n */\n\nvar input_Input =\n/*#__PURE__*/\nfunction () {\n /**\n * @param {{\n * element: HTMLInputElement,\n * type: passedElement['type'],\n * classNames: ClassNames,\n * preventPaste: boolean\n * }} args\n */\n function Input(_ref) {\n var element = _ref.element,\n type = _ref.type,\n classNames = _ref.classNames,\n preventPaste = _ref.preventPaste;\n this.element = element;\n this.type = type;\n this.classNames = classNames;\n this.preventPaste = preventPaste;\n this.isFocussed = this.element === document.activeElement;\n this.isDisabled = element.disabled;\n this._onPaste = this._onPaste.bind(this);\n this._onInput = this._onInput.bind(this);\n this._onFocus = this._onFocus.bind(this);\n this._onBlur = this._onBlur.bind(this);\n }\n /**\n * @param {string} placeholder\n */\n\n\n var _proto = Input.prototype;\n\n _proto.addEventListeners = function addEventListeners() {\n this.element.addEventListener('paste', this._onPaste);\n this.element.addEventListener('input', this._onInput, {\n passive: true\n });\n this.element.addEventListener('focus', this._onFocus, {\n passive: true\n });\n this.element.addEventListener('blur', this._onBlur, {\n passive: true\n });\n };\n\n _proto.removeEventListeners = function removeEventListeners() {\n this.element.removeEventListener('input', this._onInput, {\n passive: true\n });\n this.element.removeEventListener('paste', this._onPaste);\n this.element.removeEventListener('focus', this._onFocus, {\n passive: true\n });\n this.element.removeEventListener('blur', this._onBlur, {\n passive: true\n });\n };\n\n _proto.enable = function enable() {\n this.element.removeAttribute('disabled');\n this.isDisabled = false;\n };\n\n _proto.disable = function disable() {\n this.element.setAttribute('disabled', '');\n this.isDisabled = true;\n };\n\n _proto.focus = function focus() {\n if (!this.isFocussed) {\n this.element.focus();\n }\n };\n\n _proto.blur = function blur() {\n if (this.isFocussed) {\n this.element.blur();\n }\n }\n /**\n * Set value of input to blank\n * @param {boolean} setWidth\n * @returns {this}\n */\n ;\n\n _proto.clear = function clear(setWidth) {\n if (setWidth === void 0) {\n setWidth = true;\n }\n\n if (this.element.value) {\n this.element.value = '';\n }\n\n if (setWidth) {\n this.setWidth();\n }\n\n return this;\n }\n /**\n * Set the correct input width based on placeholder\n * value or input value\n */\n ;\n\n _proto.setWidth = function setWidth() {\n // Resize input to contents or placeholder\n var _this$element = this.element,\n style = _this$element.style,\n value = _this$element.value,\n placeholder = _this$element.placeholder;\n style.minWidth = placeholder.length + 1 + \"ch\";\n style.width = value.length + 1 + \"ch\";\n }\n /**\n * @param {string} activeDescendantID\n */\n ;\n\n _proto.setActiveDescendant = function setActiveDescendant(activeDescendantID) {\n this.element.setAttribute('aria-activedescendant', activeDescendantID);\n };\n\n _proto.removeActiveDescendant = function removeActiveDescendant() {\n this.element.removeAttribute('aria-activedescendant');\n };\n\n _proto._onInput = function _onInput() {\n if (this.type !== SELECT_ONE_TYPE) {\n this.setWidth();\n }\n }\n /**\n * @param {Event} event\n */\n ;\n\n _proto._onPaste = function _onPaste(event) {\n if (this.preventPaste) {\n event.preventDefault();\n }\n };\n\n _proto._onFocus = function _onFocus() {\n this.isFocussed = true;\n };\n\n _proto._onBlur = function _onBlur() {\n this.isFocussed = false;\n };\n\n input_createClass(Input, [{\n key: \"placeholder\",\n set: function set(placeholder) {\n this.element.placeholder = placeholder;\n }\n /**\n * @returns {string}\n */\n\n }, {\n key: \"value\",\n get: function get() {\n return sanitise(this.element.value);\n }\n /**\n * @param {string} value\n */\n ,\n set: function set(value) {\n this.element.value = value;\n }\n }]);\n\n return Input;\n}();\n\n\n// CONCATENATED MODULE: ./src/scripts/components/list.js\n\n/**\n * @typedef {import('../../../types/index').Choices.Choice} Choice\n */\n\nvar list_List =\n/*#__PURE__*/\nfunction () {\n /**\n * @param {{ element: HTMLElement }} args\n */\n function List(_ref) {\n var element = _ref.element;\n this.element = element;\n this.scrollPos = this.element.scrollTop;\n this.height = this.element.offsetHeight;\n }\n\n var _proto = List.prototype;\n\n _proto.clear = function clear() {\n this.element.innerHTML = '';\n }\n /**\n * @param {Element | DocumentFragment} node\n */\n ;\n\n _proto.append = function append(node) {\n this.element.appendChild(node);\n }\n /**\n * @param {string} selector\n * @returns {Element | null}\n */\n ;\n\n _proto.getChild = function getChild(selector) {\n return this.element.querySelector(selector);\n }\n /**\n * @returns {boolean}\n */\n ;\n\n _proto.hasChildren = function hasChildren() {\n return this.element.hasChildNodes();\n };\n\n _proto.scrollToTop = function scrollToTop() {\n this.element.scrollTop = 0;\n }\n /**\n * @param {Element} element\n * @param {1 | -1} direction\n */\n ;\n\n _proto.scrollToChildElement = function scrollToChildElement(element, direction) {\n var _this = this;\n\n if (!element) {\n return;\n }\n\n var listHeight = this.element.offsetHeight; // Scroll position of dropdown\n\n var listScrollPosition = this.element.scrollTop + listHeight;\n var elementHeight = element.offsetHeight; // Distance from bottom of element to top of parent\n\n var elementPos = element.offsetTop + elementHeight; // Difference between the element and scroll position\n\n var destination = direction > 0 ? this.element.scrollTop + elementPos - listScrollPosition : element.offsetTop;\n requestAnimationFrame(function () {\n _this._animateScroll(destination, direction);\n });\n }\n /**\n * @param {number} scrollPos\n * @param {number} strength\n * @param {number} destination\n */\n ;\n\n _proto._scrollDown = function _scrollDown(scrollPos, strength, destination) {\n var easing = (destination - scrollPos) / strength;\n var distance = easing > 1 ? easing : 1;\n this.element.scrollTop = scrollPos + distance;\n }\n /**\n * @param {number} scrollPos\n * @param {number} strength\n * @param {number} destination\n */\n ;\n\n _proto._scrollUp = function _scrollUp(scrollPos, strength, destination) {\n var easing = (scrollPos - destination) / strength;\n var distance = easing > 1 ? easing : 1;\n this.element.scrollTop = scrollPos - distance;\n }\n /**\n * @param {*} destination\n * @param {*} direction\n */\n ;\n\n _proto._animateScroll = function _animateScroll(destination, direction) {\n var _this2 = this;\n\n var strength = SCROLLING_SPEED;\n var choiceListScrollTop = this.element.scrollTop;\n var continueAnimation = false;\n\n if (direction > 0) {\n this._scrollDown(choiceListScrollTop, strength, destination);\n\n if (choiceListScrollTop < destination) {\n continueAnimation = true;\n }\n } else {\n this._scrollUp(choiceListScrollTop, strength, destination);\n\n if (choiceListScrollTop > destination) {\n continueAnimation = true;\n }\n }\n\n if (continueAnimation) {\n requestAnimationFrame(function () {\n _this2._animateScroll(destination, direction);\n });\n }\n };\n\n return List;\n}();\n\n\n// CONCATENATED MODULE: ./src/scripts/components/wrapped-element.js\nfunction wrapped_element_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction wrapped_element_createClass(Constructor, protoProps, staticProps) { if (protoProps) wrapped_element_defineProperties(Constructor.prototype, protoProps); if (staticProps) wrapped_element_defineProperties(Constructor, staticProps); return Constructor; }\n\n\n/**\n * @typedef {import('../../../types/index').Choices.passedElement} passedElement\n * @typedef {import('../../../types/index').Choices.ClassNames} ClassNames\n */\n\nvar wrapped_element_WrappedElement =\n/*#__PURE__*/\nfunction () {\n /**\n * @param {{\n * element: HTMLInputElement | HTMLSelectElement,\n * classNames: ClassNames,\n * }} args\n */\n function WrappedElement(_ref) {\n var element = _ref.element,\n classNames = _ref.classNames;\n this.element = element;\n this.classNames = classNames;\n\n if (!(element instanceof HTMLInputElement) && !(element instanceof HTMLSelectElement)) {\n throw new TypeError('Invalid element passed');\n }\n\n this.isDisabled = false;\n }\n\n var _proto = WrappedElement.prototype;\n\n _proto.conceal = function conceal() {\n // Hide passed input\n this.element.classList.add(this.classNames.input);\n this.element.hidden = true; // Remove element from tab index\n\n this.element.tabIndex = -1; // Backup original styles if any\n\n var origStyle = this.element.getAttribute('style');\n\n if (origStyle) {\n this.element.setAttribute('data-choice-orig-style', origStyle);\n }\n\n this.element.setAttribute('data-choice', 'active');\n };\n\n _proto.reveal = function reveal() {\n // Reinstate passed element\n this.element.classList.remove(this.classNames.input);\n this.element.hidden = false;\n this.element.removeAttribute('tabindex'); // Recover original styles if any\n\n var origStyle = this.element.getAttribute('data-choice-orig-style');\n\n if (origStyle) {\n this.element.removeAttribute('data-choice-orig-style');\n this.element.setAttribute('style', origStyle);\n } else {\n this.element.removeAttribute('style');\n }\n\n this.element.removeAttribute('data-choice'); // Re-assign values - this is weird, I know\n // @todo Figure out why we need to do this\n\n this.element.value = this.element.value; // eslint-disable-line no-self-assign\n };\n\n _proto.enable = function enable() {\n this.element.removeAttribute('disabled');\n this.element.disabled = false;\n this.isDisabled = false;\n };\n\n _proto.disable = function disable() {\n this.element.setAttribute('disabled', '');\n this.element.disabled = true;\n this.isDisabled = true;\n };\n\n _proto.triggerEvent = function triggerEvent(eventType, data) {\n dispatchEvent(this.element, eventType, data);\n };\n\n wrapped_element_createClass(WrappedElement, [{\n key: \"isActive\",\n get: function get() {\n return this.element.dataset.choice === 'active';\n }\n }, {\n key: \"dir\",\n get: function get() {\n return this.element.dir;\n }\n }, {\n key: \"value\",\n get: function get() {\n return this.element.value;\n },\n set: function set(value) {\n // you must define setter here otherwise it will be readonly property\n this.element.value = value;\n }\n }]);\n\n return WrappedElement;\n}();\n\n\n// CONCATENATED MODULE: ./src/scripts/components/wrapped-input.js\nfunction wrapped_input_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction wrapped_input_createClass(Constructor, protoProps, staticProps) { if (protoProps) wrapped_input_defineProperties(Constructor.prototype, protoProps); if (staticProps) wrapped_input_defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\n\n/**\n * @typedef {import('../../../types/index').Choices.ClassNames} ClassNames\n * @typedef {import('../../../types/index').Choices.Item} Item\n */\n\nvar WrappedInput =\n/*#__PURE__*/\nfunction (_WrappedElement) {\n _inheritsLoose(WrappedInput, _WrappedElement);\n\n /**\n * @param {{\n * element: HTMLInputElement,\n * classNames: ClassNames,\n * delimiter: string\n * }} args\n */\n function WrappedInput(_ref) {\n var _this;\n\n var element = _ref.element,\n classNames = _ref.classNames,\n delimiter = _ref.delimiter;\n _this = _WrappedElement.call(this, {\n element: element,\n classNames: classNames\n }) || this;\n _this.delimiter = delimiter;\n return _this;\n }\n /**\n * @returns {string}\n */\n\n\n wrapped_input_createClass(WrappedInput, [{\n key: \"value\",\n get: function get() {\n return this.element.value;\n }\n /**\n * @param {Item[]} items\n */\n ,\n set: function set(items) {\n var itemValues = items.map(function (_ref2) {\n var value = _ref2.value;\n return value;\n });\n var joinedValues = itemValues.join(this.delimiter);\n this.element.setAttribute('value', joinedValues);\n this.element.value = joinedValues;\n }\n }]);\n\n return WrappedInput;\n}(wrapped_element_WrappedElement);\n\n\n// CONCATENATED MODULE: ./src/scripts/components/wrapped-select.js\nfunction wrapped_select_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction wrapped_select_createClass(Constructor, protoProps, staticProps) { if (protoProps) wrapped_select_defineProperties(Constructor.prototype, protoProps); if (staticProps) wrapped_select_defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction wrapped_select_inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\n\n/**\n * @typedef {import('../../../types/index').Choices.ClassNames} ClassNames\n * @typedef {import('../../../types/index').Choices.Item} Item\n * @typedef {import('../../../types/index').Choices.Choice} Choice\n */\n\nvar WrappedSelect =\n/*#__PURE__*/\nfunction (_WrappedElement) {\n wrapped_select_inheritsLoose(WrappedSelect, _WrappedElement);\n\n /**\n * @param {{\n * element: HTMLSelectElement,\n * classNames: ClassNames,\n * delimiter: string\n * template: function\n * }} args\n */\n function WrappedSelect(_ref) {\n var _this;\n\n var element = _ref.element,\n classNames = _ref.classNames,\n template = _ref.template;\n _this = _WrappedElement.call(this, {\n element: element,\n classNames: classNames\n }) || this;\n _this.template = template;\n return _this;\n }\n\n var _proto = WrappedSelect.prototype;\n\n /**\n * @param {DocumentFragment} fragment\n */\n _proto.appendDocFragment = function appendDocFragment(fragment) {\n this.element.innerHTML = '';\n this.element.appendChild(fragment);\n };\n\n wrapped_select_createClass(WrappedSelect, [{\n key: \"placeholderOption\",\n get: function get() {\n return this.element.querySelector('option[value=\"\"]') || // Backward compatibility layer for the non-standard placeholder attribute supported in older versions.\n this.element.querySelector('option[placeholder]');\n }\n /**\n * @returns {Element[]}\n */\n\n }, {\n key: \"optionGroups\",\n get: function get() {\n return Array.from(this.element.getElementsByTagName('OPTGROUP'));\n }\n /**\n * @returns {Item[] | Choice[]}\n */\n\n }, {\n key: \"options\",\n get: function get() {\n return Array.from(this.element.options);\n }\n /**\n * @param {Item[] | Choice[]} options\n */\n ,\n set: function set(options) {\n var _this2 = this;\n\n var fragment = document.createDocumentFragment();\n\n var addOptionToFragment = function addOptionToFragment(data) {\n // Create a standard select option\n var option = _this2.template(data); // Append it to fragment\n\n\n fragment.appendChild(option);\n }; // Add each list item to list\n\n\n options.forEach(function (optionData) {\n return addOptionToFragment(optionData);\n });\n this.appendDocFragment(fragment);\n }\n }]);\n\n return WrappedSelect;\n}(wrapped_element_WrappedElement);\n\n\n// CONCATENATED MODULE: ./src/scripts/components/index.js\n\n\n\n\n\n\n\n// CONCATENATED MODULE: ./src/scripts/templates.js\n/**\n * Helpers to create HTML elements used by Choices\n * Can be overridden by providing `callbackOnCreateTemplates` option\n * @typedef {import('../../types/index').Choices.Templates} Templates\n * @typedef {import('../../types/index').Choices.ClassNames} ClassNames\n * @typedef {import('../../types/index').Choices.Options} Options\n * @typedef {import('../../types/index').Choices.Item} Item\n * @typedef {import('../../types/index').Choices.Choice} Choice\n * @typedef {import('../../types/index').Choices.Group} Group\n */\nvar TEMPLATES =\n/** @type {Templates} */\n{\n /**\n * @param {Partial} classNames\n * @param {\"ltr\" | \"rtl\" | \"auto\"} dir\n * @param {boolean} isSelectElement\n * @param {boolean} isSelectOneElement\n * @param {boolean} searchEnabled\n * @param {\"select-one\" | \"select-multiple\" | \"text\"} passedElementType\n */\n containerOuter: function containerOuter(_ref, dir, isSelectElement, isSelectOneElement, searchEnabled, passedElementType) {\n var _containerOuter = _ref.containerOuter;\n var div = Object.assign(document.createElement('div'), {\n className: _containerOuter\n });\n div.dataset.type = passedElementType;\n\n if (dir) {\n div.dir = dir;\n }\n\n if (isSelectOneElement) {\n div.tabIndex = 0;\n }\n\n if (isSelectElement) {\n div.setAttribute('role', searchEnabled ? 'combobox' : 'listbox');\n\n if (searchEnabled) {\n div.setAttribute('aria-autocomplete', 'list');\n }\n }\n\n div.setAttribute('aria-haspopup', 'true');\n div.setAttribute('aria-expanded', 'false');\n return div;\n },\n\n /**\n * @param {Partial} classNames\n */\n containerInner: function containerInner(_ref2) {\n var _containerInner = _ref2.containerInner;\n return Object.assign(document.createElement('div'), {\n className: _containerInner\n });\n },\n\n /**\n * @param {Partial} classNames\n * @param {boolean} isSelectOneElement\n */\n itemList: function itemList(_ref3, isSelectOneElement) {\n var list = _ref3.list,\n listSingle = _ref3.listSingle,\n listItems = _ref3.listItems;\n return Object.assign(document.createElement('div'), {\n className: list + \" \" + (isSelectOneElement ? listSingle : listItems)\n });\n },\n\n /**\n * @param {Partial} classNames\n * @param {string} value\n */\n placeholder: function placeholder(_ref4, value) {\n var _placeholder = _ref4.placeholder;\n return Object.assign(document.createElement('div'), {\n className: _placeholder,\n innerHTML: value\n });\n },\n\n /**\n * @param {Partial} classNames\n * @param {Item} item\n * @param {boolean} removeItemButton\n */\n item: function item(_ref5, _ref6, removeItemButton) {\n var _item = _ref5.item,\n button = _ref5.button,\n highlightedState = _ref5.highlightedState,\n itemSelectable = _ref5.itemSelectable,\n placeholder = _ref5.placeholder;\n var id = _ref6.id,\n value = _ref6.value,\n label = _ref6.label,\n customProperties = _ref6.customProperties,\n active = _ref6.active,\n disabled = _ref6.disabled,\n highlighted = _ref6.highlighted,\n isPlaceholder = _ref6.placeholder;\n var div = Object.assign(document.createElement('div'), {\n className: _item,\n innerHTML: label\n });\n Object.assign(div.dataset, {\n item: '',\n id: id,\n value: value,\n customProperties: customProperties\n });\n\n if (active) {\n div.setAttribute('aria-selected', 'true');\n }\n\n if (disabled) {\n div.setAttribute('aria-disabled', 'true');\n }\n\n if (isPlaceholder) {\n div.classList.add(placeholder);\n }\n\n div.classList.add(highlighted ? highlightedState : itemSelectable);\n\n if (removeItemButton) {\n if (disabled) {\n div.classList.remove(itemSelectable);\n }\n\n div.dataset.deletable = '';\n /** @todo This MUST be localizable, not hardcoded! */\n\n var REMOVE_ITEM_TEXT = 'Remove item';\n var removeButton = Object.assign(document.createElement('button'), {\n type: 'button',\n className: button,\n innerHTML: REMOVE_ITEM_TEXT\n });\n removeButton.setAttribute('aria-label', REMOVE_ITEM_TEXT + \": '\" + value + \"'\");\n removeButton.dataset.button = '';\n div.appendChild(removeButton);\n }\n\n return div;\n },\n\n /**\n * @param {Partial} classNames\n * @param {boolean} isSelectOneElement\n */\n choiceList: function choiceList(_ref7, isSelectOneElement) {\n var list = _ref7.list;\n var div = Object.assign(document.createElement('div'), {\n className: list\n });\n\n if (!isSelectOneElement) {\n div.setAttribute('aria-multiselectable', 'true');\n }\n\n div.setAttribute('role', 'listbox');\n return div;\n },\n\n /**\n * @param {Partial} classNames\n * @param {Group} group\n */\n choiceGroup: function choiceGroup(_ref8, _ref9) {\n var group = _ref8.group,\n groupHeading = _ref8.groupHeading,\n itemDisabled = _ref8.itemDisabled;\n var id = _ref9.id,\n value = _ref9.value,\n disabled = _ref9.disabled;\n var div = Object.assign(document.createElement('div'), {\n className: group + \" \" + (disabled ? itemDisabled : '')\n });\n div.setAttribute('role', 'group');\n Object.assign(div.dataset, {\n group: '',\n id: id,\n value: value\n });\n\n if (disabled) {\n div.setAttribute('aria-disabled', 'true');\n }\n\n div.appendChild(Object.assign(document.createElement('div'), {\n className: groupHeading,\n innerHTML: value\n }));\n return div;\n },\n\n /**\n * @param {Partial} classNames\n * @param {Choice} choice\n * @param {Options['itemSelectText']} selectText\n */\n choice: function choice(_ref10, _ref11, selectText) {\n var item = _ref10.item,\n itemChoice = _ref10.itemChoice,\n itemSelectable = _ref10.itemSelectable,\n selectedState = _ref10.selectedState,\n itemDisabled = _ref10.itemDisabled,\n placeholder = _ref10.placeholder;\n var id = _ref11.id,\n value = _ref11.value,\n label = _ref11.label,\n groupId = _ref11.groupId,\n elementId = _ref11.elementId,\n isDisabled = _ref11.disabled,\n isSelected = _ref11.selected,\n isPlaceholder = _ref11.placeholder;\n var div = Object.assign(document.createElement('div'), {\n id: elementId,\n innerHTML: label,\n className: item + \" \" + itemChoice\n });\n\n if (isSelected) {\n div.classList.add(selectedState);\n }\n\n if (isPlaceholder) {\n div.classList.add(placeholder);\n }\n\n div.setAttribute('role', groupId > 0 ? 'treeitem' : 'option');\n Object.assign(div.dataset, {\n choice: '',\n id: id,\n value: value,\n selectText: selectText\n });\n\n if (isDisabled) {\n div.classList.add(itemDisabled);\n div.dataset.choiceDisabled = '';\n div.setAttribute('aria-disabled', 'true');\n } else {\n div.classList.add(itemSelectable);\n div.dataset.choiceSelectable = '';\n }\n\n return div;\n },\n\n /**\n * @param {Partial} classNames\n * @param {string} placeholderValue\n */\n input: function input(_ref12, placeholderValue) {\n var _input = _ref12.input,\n inputCloned = _ref12.inputCloned;\n var inp = Object.assign(document.createElement('input'), {\n type: 'text',\n className: _input + \" \" + inputCloned,\n autocomplete: 'off',\n autocapitalize: 'off',\n spellcheck: false\n });\n inp.setAttribute('role', 'textbox');\n inp.setAttribute('aria-autocomplete', 'list');\n inp.setAttribute('aria-label', placeholderValue);\n return inp;\n },\n\n /**\n * @param {Partial} classNames\n */\n dropdown: function dropdown(_ref13) {\n var list = _ref13.list,\n listDropdown = _ref13.listDropdown;\n var div = document.createElement('div');\n div.classList.add(list, listDropdown);\n div.setAttribute('aria-expanded', 'false');\n return div;\n },\n\n /**\n *\n * @param {Partial} classNames\n * @param {string} innerHTML\n * @param {\"no-choices\" | \"no-results\" | \"\"} type\n */\n notice: function notice(_ref14, innerHTML, type) {\n var item = _ref14.item,\n itemChoice = _ref14.itemChoice,\n noResults = _ref14.noResults,\n noChoices = _ref14.noChoices;\n\n if (type === void 0) {\n type = '';\n }\n\n var classes = [item, itemChoice];\n\n if (type === 'no-choices') {\n classes.push(noChoices);\n } else if (type === 'no-results') {\n classes.push(noResults);\n }\n\n return Object.assign(document.createElement('div'), {\n innerHTML: innerHTML,\n className: classes.join(' ')\n });\n },\n\n /**\n * @param {Item} option\n */\n option: function option(_ref15) {\n var label = _ref15.label,\n value = _ref15.value,\n customProperties = _ref15.customProperties,\n active = _ref15.active,\n disabled = _ref15.disabled;\n var opt = new Option(label, value, false, active);\n\n if (customProperties) {\n opt.dataset.customProperties = customProperties;\n }\n\n opt.disabled = disabled;\n return opt;\n }\n};\n/* harmony default export */ var templates = (TEMPLATES);\n// CONCATENATED MODULE: ./src/scripts/actions/choices.js\n/**\n * @typedef {import('redux').Action} Action\n * @typedef {import('../../../types/index').Choices.Choice} Choice\n */\n\n/**\n * @argument {Choice} choice\n * @returns {Action & Choice}\n */\n\nvar choices_addChoice = function addChoice(_ref) {\n var value = _ref.value,\n label = _ref.label,\n id = _ref.id,\n groupId = _ref.groupId,\n disabled = _ref.disabled,\n elementId = _ref.elementId,\n customProperties = _ref.customProperties,\n placeholder = _ref.placeholder,\n keyCode = _ref.keyCode;\n return {\n type: ACTION_TYPES.ADD_CHOICE,\n value: value,\n label: label,\n id: id,\n groupId: groupId,\n disabled: disabled,\n elementId: elementId,\n customProperties: customProperties,\n placeholder: placeholder,\n keyCode: keyCode\n };\n};\n/**\n * @argument {Choice[]} results\n * @returns {Action & { results: Choice[] }}\n */\n\nvar choices_filterChoices = function filterChoices(results) {\n return {\n type: ACTION_TYPES.FILTER_CHOICES,\n results: results\n };\n};\n/**\n * @argument {boolean} active\n * @returns {Action & { active: boolean }}\n */\n\nvar choices_activateChoices = function activateChoices(active) {\n if (active === void 0) {\n active = true;\n }\n\n return {\n type: ACTION_TYPES.ACTIVATE_CHOICES,\n active: active\n };\n};\n/**\n * @returns {Action}\n */\n\nvar choices_clearChoices = function clearChoices() {\n return {\n type: ACTION_TYPES.CLEAR_CHOICES\n };\n};\n// CONCATENATED MODULE: ./src/scripts/actions/items.js\n\n/**\n * @typedef {import('redux').Action} Action\n * @typedef {import('../../../types/index').Choices.Item} Item\n */\n\n/**\n * @param {Item} item\n * @returns {Action & Item}\n */\n\nvar items_addItem = function addItem(_ref) {\n var value = _ref.value,\n label = _ref.label,\n id = _ref.id,\n choiceId = _ref.choiceId,\n groupId = _ref.groupId,\n customProperties = _ref.customProperties,\n placeholder = _ref.placeholder,\n keyCode = _ref.keyCode;\n return {\n type: ACTION_TYPES.ADD_ITEM,\n value: value,\n label: label,\n id: id,\n choiceId: choiceId,\n groupId: groupId,\n customProperties: customProperties,\n placeholder: placeholder,\n keyCode: keyCode\n };\n};\n/**\n * @param {string} id\n * @param {string} choiceId\n * @returns {Action & { id: string, choiceId: string }}\n */\n\nvar items_removeItem = function removeItem(id, choiceId) {\n return {\n type: ACTION_TYPES.REMOVE_ITEM,\n id: id,\n choiceId: choiceId\n };\n};\n/**\n * @param {string} id\n * @param {boolean} highlighted\n * @returns {Action & { id: string, highlighted: boolean }}\n */\n\nvar items_highlightItem = function highlightItem(id, highlighted) {\n return {\n type: ACTION_TYPES.HIGHLIGHT_ITEM,\n id: id,\n highlighted: highlighted\n };\n};\n// CONCATENATED MODULE: ./src/scripts/actions/groups.js\n\n/**\n * @typedef {import('redux').Action} Action\n * @typedef {import('../../../types/index').Choices.Group} Group\n */\n\n/**\n * @param {Group} group\n * @returns {Action & Group}\n */\n\nvar groups_addGroup = function addGroup(_ref) {\n var value = _ref.value,\n id = _ref.id,\n active = _ref.active,\n disabled = _ref.disabled;\n return {\n type: ACTION_TYPES.ADD_GROUP,\n value: value,\n id: id,\n active: active,\n disabled: disabled\n };\n};\n// CONCATENATED MODULE: ./src/scripts/actions/misc.js\n/**\n * @typedef {import('redux').Action} Action\n */\n\n/**\n * @returns {Action}\n */\nvar clearAll = function clearAll() {\n return {\n type: 'CLEAR_ALL'\n };\n};\n/**\n * @param {any} state\n * @returns {Action & { state: object }}\n */\n\nvar resetTo = function resetTo(state) {\n return {\n type: 'RESET_TO',\n state: state\n };\n};\n/**\n * @param {boolean} isLoading\n * @returns {Action & { isLoading: boolean }}\n */\n\nvar setIsLoading = function setIsLoading(isLoading) {\n return {\n type: 'SET_IS_LOADING',\n isLoading: isLoading\n };\n};\n// CONCATENATED MODULE: ./src/scripts/choices.js\nfunction choices_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction choices_createClass(Constructor, protoProps, staticProps) { if (protoProps) choices_defineProperties(Constructor.prototype, protoProps); if (staticProps) choices_defineProperties(Constructor, staticProps); return Constructor; }\n\n\n\n\n\n\n\n\n\n\n\n\n/** @see {@link http://browserhacks.com/#hack-acea075d0ac6954f275a70023906050c} */\n\nvar IS_IE11 = '-ms-scroll-limit' in document.documentElement.style && '-ms-ime-align' in document.documentElement.style;\n/**\n * @typedef {import('../../types/index').Choices.Choice} Choice\n * @typedef {import('../../types/index').Choices.Item} Item\n * @typedef {import('../../types/index').Choices.Group} Group\n * @typedef {import('../../types/index').Choices.Options} Options\n */\n\n/** @type {Partial} */\n\nvar USER_DEFAULTS = {};\n/**\n * Choices\n * @author Josh Johnson\n */\n\nvar choices_Choices =\n/*#__PURE__*/\nfunction () {\n choices_createClass(Choices, null, [{\n key: \"defaults\",\n get: function get() {\n return Object.preventExtensions({\n get options() {\n return USER_DEFAULTS;\n },\n\n get templates() {\n return TEMPLATES;\n }\n\n });\n }\n /**\n * @param {string | HTMLInputElement | HTMLSelectElement} element\n * @param {Partial} userConfig\n */\n\n }]);\n\n function Choices(element, userConfig) {\n var _this = this;\n\n if (element === void 0) {\n element = '[data-choice]';\n }\n\n if (userConfig === void 0) {\n userConfig = {};\n }\n\n /** @type {Partial} */\n this.config = cjs_default.a.all([DEFAULT_CONFIG, Choices.defaults.options, userConfig], // When merging array configs, replace with a copy of the userConfig array,\n // instead of concatenating with the default array\n {\n arrayMerge: function arrayMerge(_, sourceArray) {\n return [].concat(sourceArray);\n }\n }); // Restore the shadowRoot if provided. deeperge converts it into an empty object.\n\n if (userConfig.shadowRoot) {\n this.config.shadowRoot = userConfig.shadowRoot;\n }\n\n var invalidConfigOptions = diff(this.config, DEFAULT_CONFIG);\n\n if (invalidConfigOptions.length) {\n console.warn('Unknown config option(s) passed', invalidConfigOptions.join(', '));\n }\n\n var passedElement = typeof element === 'string' ? document.querySelector(element) : element;\n\n if (!(passedElement instanceof HTMLInputElement || passedElement instanceof HTMLSelectElement)) {\n throw TypeError('Expected one of the following types text|select-one|select-multiple');\n }\n\n this._isTextElement = passedElement.type === TEXT_TYPE;\n this._isSelectOneElement = passedElement.type === SELECT_ONE_TYPE;\n this._isSelectMultipleElement = passedElement.type === SELECT_MULTIPLE_TYPE;\n this._isSelectElement = this._isSelectOneElement || this._isSelectMultipleElement;\n this.config.searchEnabled = this._isSelectMultipleElement || this.config.searchEnabled;\n\n if (!['auto', 'always'].includes(this.config.renderSelectedChoices)) {\n this.config.renderSelectedChoices = 'auto';\n }\n\n if (userConfig.addItemFilter && typeof userConfig.addItemFilter !== 'function') {\n var re = userConfig.addItemFilter instanceof RegExp ? userConfig.addItemFilter : new RegExp(userConfig.addItemFilter);\n this.config.addItemFilter = re.test.bind(re);\n }\n\n if (this._isTextElement) {\n this.passedElement = new WrappedInput({\n element: passedElement,\n classNames: this.config.classNames,\n delimiter: this.config.delimiter\n });\n } else {\n this.passedElement = new WrappedSelect({\n element: passedElement,\n classNames: this.config.classNames,\n template: function template(data) {\n return _this._templates.option(data);\n }\n });\n }\n\n this.initialised = false;\n this._store = new store_Store();\n this._initialState = {};\n this._currentState = {};\n this._prevState = {};\n this._currentValue = '';\n this._canSearch = this.config.searchEnabled;\n this._isScrollingOnIe = false;\n this._highlightPosition = 0;\n this._wasTap = true;\n this._placeholderValue = this._generatePlaceholderValue();\n this._baseId = generateId(this.passedElement.element, 'choices-');\n /**\n * setting direction in cases where it's explicitly set on passedElement\n * or when calculated direction is different from the document\n * @type {HTMLElement['dir']}\n */\n\n this._direction = this.passedElement.dir;\n\n if (!this._direction) {\n var _window$getComputedSt = window.getComputedStyle(this.passedElement.element),\n elementDirection = _window$getComputedSt.direction;\n\n var _window$getComputedSt2 = window.getComputedStyle(document.documentElement),\n documentDirection = _window$getComputedSt2.direction;\n\n if (elementDirection !== documentDirection) {\n this._direction = elementDirection;\n }\n }\n\n this._idNames = {\n itemChoice: 'item-choice'\n }; // Assign preset groups from passed element\n\n this._presetGroups = this.passedElement.optionGroups; // Assign preset options from passed element\n\n this._presetOptions = this.passedElement.options; // Assign preset choices from passed object\n\n this._presetChoices = this.config.choices; // Assign preset items from passed object first\n\n this._presetItems = this.config.items; // Add any values passed from attribute\n\n if (this.passedElement.value) {\n this._presetItems = this._presetItems.concat(this.passedElement.value.split(this.config.delimiter));\n } // Create array of choices from option elements\n\n\n if (this.passedElement.options) {\n this.passedElement.options.forEach(function (o) {\n _this._presetChoices.push({\n value: o.value,\n label: o.innerHTML,\n selected: o.selected,\n disabled: o.disabled || o.parentNode.disabled,\n placeholder: o.value === '' || o.hasAttribute('placeholder'),\n customProperties: o.getAttribute('data-custom-properties')\n });\n });\n }\n\n this._render = this._render.bind(this);\n this._onFocus = this._onFocus.bind(this);\n this._onBlur = this._onBlur.bind(this);\n this._onKeyUp = this._onKeyUp.bind(this);\n this._onKeyDown = this._onKeyDown.bind(this);\n this._onClick = this._onClick.bind(this);\n this._onTouchMove = this._onTouchMove.bind(this);\n this._onTouchEnd = this._onTouchEnd.bind(this);\n this._onMouseDown = this._onMouseDown.bind(this);\n this._onMouseOver = this._onMouseOver.bind(this);\n this._onFormReset = this._onFormReset.bind(this);\n this._onAKey = this._onAKey.bind(this);\n this._onEnterKey = this._onEnterKey.bind(this);\n this._onEscapeKey = this._onEscapeKey.bind(this);\n this._onDirectionKey = this._onDirectionKey.bind(this);\n this._onDeleteKey = this._onDeleteKey.bind(this); // If element has already been initialised with Choices, fail silently\n\n if (this.passedElement.isActive) {\n if (!this.config.silent) {\n console.warn('Trying to initialise Choices on element already initialised');\n }\n\n this.initialised = true;\n return;\n } // Let's go\n\n\n this.init();\n }\n\n var _proto = Choices.prototype;\n\n _proto.init = function init() {\n if (this.initialised) {\n return;\n }\n\n this._createTemplates();\n\n this._createElements();\n\n this._createStructure(); // Set initial state (We need to clone the state because some reducers\n // modify the inner objects properties in the state) 🤢\n\n\n this._initialState = cloneObject(this._store.state);\n\n this._store.subscribe(this._render);\n\n this._render();\n\n this._addEventListeners();\n\n var shouldDisable = !this.config.addItems || this.passedElement.element.hasAttribute('disabled');\n\n if (shouldDisable) {\n this.disable();\n }\n\n this.initialised = true;\n var callbackOnInit = this.config.callbackOnInit; // Run callback if it is a function\n\n if (callbackOnInit && typeof callbackOnInit === 'function') {\n callbackOnInit.call(this);\n }\n };\n\n _proto.destroy = function destroy() {\n if (!this.initialised) {\n return;\n }\n\n this._removeEventListeners();\n\n this.passedElement.reveal();\n this.containerOuter.unwrap(this.passedElement.element);\n this.clearStore();\n\n if (this._isSelectElement) {\n this.passedElement.options = this._presetOptions;\n }\n\n this._templates = null;\n this.initialised = false;\n };\n\n _proto.enable = function enable() {\n if (this.passedElement.isDisabled) {\n this.passedElement.enable();\n }\n\n if (this.containerOuter.isDisabled) {\n this._addEventListeners();\n\n this.input.enable();\n this.containerOuter.enable();\n }\n\n return this;\n };\n\n _proto.disable = function disable() {\n if (!this.passedElement.isDisabled) {\n this.passedElement.disable();\n }\n\n if (!this.containerOuter.isDisabled) {\n this._removeEventListeners();\n\n this.input.disable();\n this.containerOuter.disable();\n }\n\n return this;\n };\n\n _proto.highlightItem = function highlightItem(item, runEvent) {\n if (runEvent === void 0) {\n runEvent = true;\n }\n\n if (!item) {\n return this;\n }\n\n var id = item.id,\n _item$groupId = item.groupId,\n groupId = _item$groupId === void 0 ? -1 : _item$groupId,\n _item$value = item.value,\n value = _item$value === void 0 ? '' : _item$value,\n _item$label = item.label,\n label = _item$label === void 0 ? '' : _item$label;\n var group = groupId >= 0 ? this._store.getGroupById(groupId) : null;\n\n this._store.dispatch(items_highlightItem(id, true));\n\n if (runEvent) {\n this.passedElement.triggerEvent(EVENTS.highlightItem, {\n id: id,\n value: value,\n label: label,\n groupValue: group && group.value ? group.value : null\n });\n }\n\n return this;\n };\n\n _proto.unhighlightItem = function unhighlightItem(item) {\n if (!item) {\n return this;\n }\n\n var id = item.id,\n _item$groupId2 = item.groupId,\n groupId = _item$groupId2 === void 0 ? -1 : _item$groupId2,\n _item$value2 = item.value,\n value = _item$value2 === void 0 ? '' : _item$value2,\n _item$label2 = item.label,\n label = _item$label2 === void 0 ? '' : _item$label2;\n var group = groupId >= 0 ? this._store.getGroupById(groupId) : null;\n\n this._store.dispatch(items_highlightItem(id, false));\n\n this.passedElement.triggerEvent(EVENTS.highlightItem, {\n id: id,\n value: value,\n label: label,\n groupValue: group && group.value ? group.value : null\n });\n return this;\n };\n\n _proto.highlightAll = function highlightAll() {\n var _this2 = this;\n\n this._store.items.forEach(function (item) {\n return _this2.highlightItem(item);\n });\n\n return this;\n };\n\n _proto.unhighlightAll = function unhighlightAll() {\n var _this3 = this;\n\n this._store.items.forEach(function (item) {\n return _this3.unhighlightItem(item);\n });\n\n return this;\n };\n\n _proto.removeActiveItemsByValue = function removeActiveItemsByValue(value) {\n var _this4 = this;\n\n this._store.activeItems.filter(function (item) {\n return item.value === value;\n }).forEach(function (item) {\n return _this4._removeItem(item);\n });\n\n return this;\n };\n\n _proto.removeActiveItems = function removeActiveItems(excludedId) {\n var _this5 = this;\n\n this._store.activeItems.filter(function (_ref) {\n var id = _ref.id;\n return id !== excludedId;\n }).forEach(function (item) {\n return _this5._removeItem(item);\n });\n\n return this;\n };\n\n _proto.removeHighlightedItems = function removeHighlightedItems(runEvent) {\n var _this6 = this;\n\n if (runEvent === void 0) {\n runEvent = false;\n }\n\n this._store.highlightedActiveItems.forEach(function (item) {\n _this6._removeItem(item); // If this action was performed by the user\n // trigger the event\n\n\n if (runEvent) {\n _this6._triggerChange(item.value);\n }\n });\n\n return this;\n };\n\n _proto.showDropdown = function showDropdown(preventInputFocus) {\n var _this7 = this;\n\n if (this.dropdown.isActive) {\n return this;\n }\n\n requestAnimationFrame(function () {\n _this7.dropdown.show();\n\n _this7.containerOuter.open(_this7.dropdown.distanceFromTopWindow);\n\n if (!preventInputFocus && _this7._canSearch) {\n _this7.input.focus();\n }\n\n _this7.passedElement.triggerEvent(EVENTS.showDropdown, {});\n });\n return this;\n };\n\n _proto.hideDropdown = function hideDropdown(preventInputBlur) {\n var _this8 = this;\n\n if (!this.dropdown.isActive) {\n return this;\n }\n\n requestAnimationFrame(function () {\n _this8.dropdown.hide();\n\n _this8.containerOuter.close();\n\n if (!preventInputBlur && _this8._canSearch) {\n _this8.input.removeActiveDescendant();\n\n _this8.input.blur();\n }\n\n _this8.passedElement.triggerEvent(EVENTS.hideDropdown, {});\n });\n return this;\n };\n\n _proto.getValue = function getValue(valueOnly) {\n if (valueOnly === void 0) {\n valueOnly = false;\n }\n\n var values = this._store.activeItems.reduce(function (selectedItems, item) {\n var itemValue = valueOnly ? item.value : item;\n selectedItems.push(itemValue);\n return selectedItems;\n }, []);\n\n return this._isSelectOneElement ? values[0] : values;\n }\n /**\n * @param {string[] | import('../../types/index').Choices.Item[]} items\n */\n ;\n\n _proto.setValue = function setValue(items) {\n var _this9 = this;\n\n if (!this.initialised) {\n return this;\n }\n\n items.forEach(function (value) {\n return _this9._setChoiceOrItem(value);\n });\n return this;\n };\n\n _proto.setChoiceByValue = function setChoiceByValue(value) {\n var _this10 = this;\n\n if (!this.initialised || this._isTextElement) {\n return this;\n } // If only one value has been passed, convert to array\n\n\n var choiceValue = Array.isArray(value) ? value : [value]; // Loop through each value and\n\n choiceValue.forEach(function (val) {\n return _this10._findAndSelectChoiceByValue(val);\n });\n return this;\n }\n /**\n * Set choices of select input via an array of objects (or function that returns array of object or promise of it),\n * a value field name and a label field name.\n * This behaves the same as passing items via the choices option but can be called after initialising Choices.\n * This can also be used to add groups of choices (see example 2); Optionally pass a true `replaceChoices` value to remove any existing choices.\n * Optionally pass a `customProperties` object to add additional data to your choices (useful when searching/filtering etc).\n *\n * **Input types affected:** select-one, select-multiple\n *\n * @template {Choice[] | ((instance: Choices) => object[] | Promise)} T\n * @param {T} [choicesArrayOrFetcher]\n * @param {string} [value = 'value'] - name of `value` field\n * @param {string} [label = 'label'] - name of 'label' field\n * @param {boolean} [replaceChoices = false] - whether to replace of add choices\n * @returns {this | Promise}\n *\n * @example\n * ```js\n * const example = new Choices(element);\n *\n * example.setChoices([\n * {value: 'One', label: 'Label One', disabled: true},\n * {value: 'Two', label: 'Label Two', selected: true},\n * {value: 'Three', label: 'Label Three'},\n * ], 'value', 'label', false);\n * ```\n *\n * @example\n * ```js\n * const example = new Choices(element);\n *\n * example.setChoices(async () => {\n * try {\n * const items = await fetch('/items');\n * return items.json()\n * } catch(err) {\n * console.error(err)\n * }\n * });\n * ```\n *\n * @example\n * ```js\n * const example = new Choices(element);\n *\n * example.setChoices([{\n * label: 'Group one',\n * id: 1,\n * disabled: false,\n * choices: [\n * {value: 'Child One', label: 'Child One', selected: true},\n * {value: 'Child Two', label: 'Child Two', disabled: true},\n * {value: 'Child Three', label: 'Child Three'},\n * ]\n * },\n * {\n * label: 'Group two',\n * id: 2,\n * disabled: false,\n * choices: [\n * {value: 'Child Four', label: 'Child Four', disabled: true},\n * {value: 'Child Five', label: 'Child Five'},\n * {value: 'Child Six', label: 'Child Six', customProperties: {\n * description: 'Custom description about child six',\n * random: 'Another random custom property'\n * }},\n * ]\n * }], 'value', 'label', false);\n * ```\n */\n ;\n\n _proto.setChoices = function setChoices(choicesArrayOrFetcher, value, label, replaceChoices) {\n var _this11 = this;\n\n if (choicesArrayOrFetcher === void 0) {\n choicesArrayOrFetcher = [];\n }\n\n if (value === void 0) {\n value = 'value';\n }\n\n if (label === void 0) {\n label = 'label';\n }\n\n if (replaceChoices === void 0) {\n replaceChoices = false;\n }\n\n if (!this.initialised) {\n throw new ReferenceError(\"setChoices was called on a non-initialized instance of Choices\");\n }\n\n if (!this._isSelectElement) {\n throw new TypeError(\"setChoices can't be used with INPUT based Choices\");\n }\n\n if (typeof value !== 'string' || !value) {\n throw new TypeError(\"value parameter must be a name of 'value' field in passed objects\");\n } // Clear choices if needed\n\n\n if (replaceChoices) {\n this.clearChoices();\n }\n\n if (typeof choicesArrayOrFetcher === 'function') {\n // it's a choices fetcher function\n var fetcher = choicesArrayOrFetcher(this);\n\n if (typeof Promise === 'function' && fetcher instanceof Promise) {\n // that's a promise\n // eslint-disable-next-line compat/compat\n return new Promise(function (resolve) {\n return requestAnimationFrame(resolve);\n }).then(function () {\n return _this11._handleLoadingState(true);\n }).then(function () {\n return fetcher;\n }).then(function (data) {\n return _this11.setChoices(data, value, label, replaceChoices);\n }).catch(function (err) {\n if (!_this11.config.silent) {\n console.error(err);\n }\n }).then(function () {\n return _this11._handleLoadingState(false);\n }).then(function () {\n return _this11;\n });\n } // function returned something else than promise, let's check if it's an array of choices\n\n\n if (!Array.isArray(fetcher)) {\n throw new TypeError(\".setChoices first argument function must return either array of choices or Promise, got: \" + typeof fetcher);\n } // recursion with results, it's sync and choices were cleared already\n\n\n return this.setChoices(fetcher, value, label, false);\n }\n\n if (!Array.isArray(choicesArrayOrFetcher)) {\n throw new TypeError(\".setChoices must be called either with array of choices with a function resulting into Promise of array of choices\");\n }\n\n this.containerOuter.removeLoadingState();\n\n this._startLoading();\n\n choicesArrayOrFetcher.forEach(function (groupOrChoice) {\n if (groupOrChoice.choices) {\n _this11._addGroup({\n id: parseInt(groupOrChoice.id, 10) || null,\n group: groupOrChoice,\n valueKey: value,\n labelKey: label\n });\n } else {\n _this11._addChoice({\n value: groupOrChoice[value],\n label: groupOrChoice[label],\n isSelected: groupOrChoice.selected,\n isDisabled: groupOrChoice.disabled,\n customProperties: groupOrChoice.customProperties,\n placeholder: groupOrChoice.placeholder\n });\n }\n });\n\n this._stopLoading();\n\n return this;\n };\n\n _proto.clearChoices = function clearChoices() {\n this._store.dispatch(choices_clearChoices());\n\n return this;\n };\n\n _proto.clearStore = function clearStore() {\n this._store.dispatch(clearAll());\n\n return this;\n };\n\n _proto.clearInput = function clearInput() {\n var shouldSetInputWidth = !this._isSelectOneElement;\n this.input.clear(shouldSetInputWidth);\n\n if (!this._isTextElement && this._canSearch) {\n this._isSearching = false;\n\n this._store.dispatch(choices_activateChoices(true));\n }\n\n return this;\n };\n\n _proto._render = function _render() {\n if (this._store.isLoading()) {\n return;\n }\n\n this._currentState = this._store.state;\n var stateChanged = this._currentState.choices !== this._prevState.choices || this._currentState.groups !== this._prevState.groups || this._currentState.items !== this._prevState.items;\n var shouldRenderChoices = this._isSelectElement;\n var shouldRenderItems = this._currentState.items !== this._prevState.items;\n\n if (!stateChanged) {\n return;\n }\n\n if (shouldRenderChoices) {\n this._renderChoices();\n }\n\n if (shouldRenderItems) {\n this._renderItems();\n }\n\n this._prevState = this._currentState;\n };\n\n _proto._renderChoices = function _renderChoices() {\n var _this12 = this;\n\n var _this$_store = this._store,\n activeGroups = _this$_store.activeGroups,\n activeChoices = _this$_store.activeChoices;\n var choiceListFragment = document.createDocumentFragment();\n this.choiceList.clear();\n\n if (this.config.resetScrollPosition) {\n requestAnimationFrame(function () {\n return _this12.choiceList.scrollToTop();\n });\n } // If we have grouped options\n\n\n if (activeGroups.length >= 1 && !this._isSearching) {\n // If we have a placeholder choice along with groups\n var activePlaceholders = activeChoices.filter(function (activeChoice) {\n return activeChoice.placeholder === true && activeChoice.groupId === -1;\n });\n\n if (activePlaceholders.length >= 1) {\n choiceListFragment = this._createChoicesFragment(activePlaceholders, choiceListFragment);\n }\n\n choiceListFragment = this._createGroupsFragment(activeGroups, activeChoices, choiceListFragment);\n } else if (activeChoices.length >= 1) {\n choiceListFragment = this._createChoicesFragment(activeChoices, choiceListFragment);\n } // If we have choices to show\n\n\n if (choiceListFragment.childNodes && choiceListFragment.childNodes.length > 0) {\n var activeItems = this._store.activeItems;\n\n var canAddItem = this._canAddItem(activeItems, this.input.value); // ...and we can select them\n\n\n if (canAddItem.response) {\n // ...append them and highlight the first choice\n this.choiceList.append(choiceListFragment);\n\n this._highlightChoice();\n } else {\n // ...otherwise show a notice\n this.choiceList.append(this._getTemplate('notice', canAddItem.notice));\n }\n } else {\n // Otherwise show a notice\n var dropdownItem;\n var notice;\n\n if (this._isSearching) {\n notice = typeof this.config.noResultsText === 'function' ? this.config.noResultsText() : this.config.noResultsText;\n dropdownItem = this._getTemplate('notice', notice, 'no-results');\n } else {\n notice = typeof this.config.noChoicesText === 'function' ? this.config.noChoicesText() : this.config.noChoicesText;\n dropdownItem = this._getTemplate('notice', notice, 'no-choices');\n }\n\n this.choiceList.append(dropdownItem);\n }\n };\n\n _proto._renderItems = function _renderItems() {\n var activeItems = this._store.activeItems || [];\n this.itemList.clear(); // Create a fragment to store our list items\n // (so we don't have to update the DOM for each item)\n\n var itemListFragment = this._createItemsFragment(activeItems); // If we have items to add, append them\n\n\n if (itemListFragment.childNodes) {\n this.itemList.append(itemListFragment);\n }\n };\n\n _proto._createGroupsFragment = function _createGroupsFragment(groups, choices, fragment) {\n var _this13 = this;\n\n if (fragment === void 0) {\n fragment = document.createDocumentFragment();\n }\n\n var getGroupChoices = function getGroupChoices(group) {\n return choices.filter(function (choice) {\n if (_this13._isSelectOneElement) {\n return choice.groupId === group.id;\n }\n\n return choice.groupId === group.id && (_this13.config.renderSelectedChoices === 'always' || !choice.selected);\n });\n }; // If sorting is enabled, filter groups\n\n\n if (this.config.shouldSort) {\n groups.sort(this.config.sorter);\n }\n\n groups.forEach(function (group) {\n var groupChoices = getGroupChoices(group);\n\n if (groupChoices.length >= 1) {\n var dropdownGroup = _this13._getTemplate('choiceGroup', group);\n\n fragment.appendChild(dropdownGroup);\n\n _this13._createChoicesFragment(groupChoices, fragment, true);\n }\n });\n return fragment;\n };\n\n _proto._createChoicesFragment = function _createChoicesFragment(choices, fragment, withinGroup) {\n var _this14 = this;\n\n if (fragment === void 0) {\n fragment = document.createDocumentFragment();\n }\n\n if (withinGroup === void 0) {\n withinGroup = false;\n }\n\n // Create a fragment to store our list items (so we don't have to update the DOM for each item)\n var _this$config = this.config,\n renderSelectedChoices = _this$config.renderSelectedChoices,\n searchResultLimit = _this$config.searchResultLimit,\n renderChoiceLimit = _this$config.renderChoiceLimit;\n var filter = this._isSearching ? sortByScore : this.config.sorter;\n\n var appendChoice = function appendChoice(choice) {\n var shouldRender = renderSelectedChoices === 'auto' ? _this14._isSelectOneElement || !choice.selected : true;\n\n if (shouldRender) {\n var dropdownItem = _this14._getTemplate('choice', choice, _this14.config.itemSelectText);\n\n fragment.appendChild(dropdownItem);\n }\n };\n\n var rendererableChoices = choices;\n\n if (renderSelectedChoices === 'auto' && !this._isSelectOneElement) {\n rendererableChoices = choices.filter(function (choice) {\n return !choice.selected;\n });\n } // Split array into placeholders and \"normal\" choices\n\n\n var _rendererableChoices$ = rendererableChoices.reduce(function (acc, choice) {\n if (choice.placeholder) {\n acc.placeholderChoices.push(choice);\n } else {\n acc.normalChoices.push(choice);\n }\n\n return acc;\n }, {\n placeholderChoices: [],\n normalChoices: []\n }),\n placeholderChoices = _rendererableChoices$.placeholderChoices,\n normalChoices = _rendererableChoices$.normalChoices; // If sorting is enabled or the user is searching, filter choices\n\n\n if (this.config.shouldSort || this._isSearching) {\n normalChoices.sort(filter);\n }\n\n var choiceLimit = rendererableChoices.length; // Prepend placeholeder\n\n var sortedChoices = this._isSelectOneElement ? [].concat(placeholderChoices, normalChoices) : normalChoices;\n\n if (this._isSearching) {\n choiceLimit = searchResultLimit;\n } else if (renderChoiceLimit && renderChoiceLimit > 0 && !withinGroup) {\n choiceLimit = renderChoiceLimit;\n } // Add each choice to dropdown within range\n\n\n for (var i = 0; i < choiceLimit; i += 1) {\n if (sortedChoices[i]) {\n appendChoice(sortedChoices[i]);\n }\n }\n\n return fragment;\n };\n\n _proto._createItemsFragment = function _createItemsFragment(items, fragment) {\n var _this15 = this;\n\n if (fragment === void 0) {\n fragment = document.createDocumentFragment();\n }\n\n // Create fragment to add elements to\n var _this$config2 = this.config,\n shouldSortItems = _this$config2.shouldSortItems,\n sorter = _this$config2.sorter,\n removeItemButton = _this$config2.removeItemButton; // If sorting is enabled, filter items\n\n if (shouldSortItems && !this._isSelectOneElement) {\n items.sort(sorter);\n }\n\n if (this._isTextElement) {\n // Update the value of the hidden input\n this.passedElement.value = items;\n } else {\n // Update the options of the hidden input\n this.passedElement.options = items;\n }\n\n var addItemToFragment = function addItemToFragment(item) {\n // Create new list element\n var listItem = _this15._getTemplate('item', item, removeItemButton); // Append it to list\n\n\n fragment.appendChild(listItem);\n }; // Add each list item to list\n\n\n items.forEach(addItemToFragment);\n return fragment;\n };\n\n _proto._triggerChange = function _triggerChange(value) {\n if (value === undefined || value === null) {\n return;\n }\n\n this.passedElement.triggerEvent(EVENTS.change, {\n value: value\n });\n };\n\n _proto._selectPlaceholderChoice = function _selectPlaceholderChoice() {\n var placeholderChoice = this._store.placeholderChoice;\n\n if (placeholderChoice) {\n this._addItem({\n value: placeholderChoice.value,\n label: placeholderChoice.label,\n choiceId: placeholderChoice.id,\n groupId: placeholderChoice.groupId,\n placeholder: placeholderChoice.placeholder\n });\n\n this._triggerChange(placeholderChoice.value);\n }\n };\n\n _proto._handleButtonAction = function _handleButtonAction(activeItems, element) {\n if (!activeItems || !element || !this.config.removeItems || !this.config.removeItemButton) {\n return;\n }\n\n var itemId = element.parentNode.getAttribute('data-id');\n var itemToRemove = activeItems.find(function (item) {\n return item.id === parseInt(itemId, 10);\n }); // Remove item associated with button\n\n this._removeItem(itemToRemove);\n\n this._triggerChange(itemToRemove.value);\n\n if (this._isSelectOneElement) {\n this._selectPlaceholderChoice();\n }\n };\n\n _proto._handleItemAction = function _handleItemAction(activeItems, element, hasShiftKey) {\n var _this16 = this;\n\n if (hasShiftKey === void 0) {\n hasShiftKey = false;\n }\n\n if (!activeItems || !element || !this.config.removeItems || this._isSelectOneElement) {\n return;\n }\n\n var passedId = element.getAttribute('data-id'); // We only want to select one item with a click\n // so we deselect any items that aren't the target\n // unless shift is being pressed\n\n activeItems.forEach(function (item) {\n if (item.id === parseInt(passedId, 10) && !item.highlighted) {\n _this16.highlightItem(item);\n } else if (!hasShiftKey && item.highlighted) {\n _this16.unhighlightItem(item);\n }\n }); // Focus input as without focus, a user cannot do anything with a\n // highlighted item\n\n this.input.focus();\n };\n\n _proto._handleChoiceAction = function _handleChoiceAction(activeItems, element) {\n if (!activeItems || !element) {\n return;\n } // If we are clicking on an option\n\n\n var id = element.dataset.id;\n\n var choice = this._store.getChoiceById(id);\n\n if (!choice) {\n return;\n }\n\n var passedKeyCode = activeItems[0] && activeItems[0].keyCode ? activeItems[0].keyCode : null;\n var hasActiveDropdown = this.dropdown.isActive; // Update choice keyCode\n\n choice.keyCode = passedKeyCode;\n this.passedElement.triggerEvent(EVENTS.choice, {\n choice: choice\n });\n\n if (!choice.selected && !choice.disabled) {\n var canAddItem = this._canAddItem(activeItems, choice.value);\n\n if (canAddItem.response) {\n this._addItem({\n value: choice.value,\n label: choice.label,\n choiceId: choice.id,\n groupId: choice.groupId,\n customProperties: choice.customProperties,\n placeholder: choice.placeholder,\n keyCode: choice.keyCode\n });\n\n this._triggerChange(choice.value);\n }\n }\n\n this.clearInput(); // We want to close the dropdown if we are dealing with a single select box\n\n if (hasActiveDropdown && this._isSelectOneElement) {\n this.hideDropdown(true);\n this.containerOuter.focus();\n }\n };\n\n _proto._handleBackspace = function _handleBackspace(activeItems) {\n if (!this.config.removeItems || !activeItems) {\n return;\n }\n\n var lastItem = activeItems[activeItems.length - 1];\n var hasHighlightedItems = activeItems.some(function (item) {\n return item.highlighted;\n }); // If editing the last item is allowed and there are not other selected items,\n // we can edit the item value. Otherwise if we can remove items, remove all selected items\n\n if (this.config.editItems && !hasHighlightedItems && lastItem) {\n this.input.value = lastItem.value;\n this.input.setWidth();\n\n this._removeItem(lastItem);\n\n this._triggerChange(lastItem.value);\n } else {\n if (!hasHighlightedItems) {\n // Highlight last item if none already highlighted\n this.highlightItem(lastItem, false);\n }\n\n this.removeHighlightedItems(true);\n }\n };\n\n _proto._startLoading = function _startLoading() {\n this._store.dispatch(setIsLoading(true));\n };\n\n _proto._stopLoading = function _stopLoading() {\n this._store.dispatch(setIsLoading(false));\n };\n\n _proto._handleLoadingState = function _handleLoadingState(setLoading) {\n if (setLoading === void 0) {\n setLoading = true;\n }\n\n var placeholderItem = this.itemList.getChild(\".\" + this.config.classNames.placeholder);\n\n if (setLoading) {\n this.disable();\n this.containerOuter.addLoadingState();\n\n if (this._isSelectOneElement) {\n if (!placeholderItem) {\n placeholderItem = this._getTemplate('placeholder', this.config.loadingText);\n this.itemList.append(placeholderItem);\n } else {\n placeholderItem.innerHTML = this.config.loadingText;\n }\n } else {\n this.input.placeholder = this.config.loadingText;\n }\n } else {\n this.enable();\n this.containerOuter.removeLoadingState();\n\n if (this._isSelectOneElement) {\n placeholderItem.innerHTML = this._placeholderValue || '';\n } else {\n this.input.placeholder = this._placeholderValue || '';\n }\n }\n };\n\n _proto._handleSearch = function _handleSearch(value) {\n if (!value || !this.input.isFocussed) {\n return;\n }\n\n var choices = this._store.choices;\n var _this$config3 = this.config,\n searchFloor = _this$config3.searchFloor,\n searchChoices = _this$config3.searchChoices;\n var hasUnactiveChoices = choices.some(function (option) {\n return !option.active;\n }); // Check that we have a value to search and the input was an alphanumeric character\n\n if (value && value.length >= searchFloor) {\n var resultCount = searchChoices ? this._searchChoices(value) : 0; // Trigger search event\n\n this.passedElement.triggerEvent(EVENTS.search, {\n value: value,\n resultCount: resultCount\n });\n } else if (hasUnactiveChoices) {\n // Otherwise reset choices to active\n this._isSearching = false;\n\n this._store.dispatch(choices_activateChoices(true));\n }\n };\n\n _proto._canAddItem = function _canAddItem(activeItems, value) {\n var canAddItem = true;\n var notice = typeof this.config.addItemText === 'function' ? this.config.addItemText(value) : this.config.addItemText;\n\n if (!this._isSelectOneElement) {\n var isDuplicateValue = existsInArray(activeItems, value);\n\n if (this.config.maxItemCount > 0 && this.config.maxItemCount <= activeItems.length) {\n // If there is a max entry limit and we have reached that limit\n // don't update\n canAddItem = false;\n notice = typeof this.config.maxItemText === 'function' ? this.config.maxItemText(this.config.maxItemCount) : this.config.maxItemText;\n }\n\n if (!this.config.duplicateItemsAllowed && isDuplicateValue && canAddItem) {\n canAddItem = false;\n notice = typeof this.config.uniqueItemText === 'function' ? this.config.uniqueItemText(value) : this.config.uniqueItemText;\n }\n\n if (this._isTextElement && this.config.addItems && canAddItem && typeof this.config.addItemFilter === 'function' && !this.config.addItemFilter(value)) {\n canAddItem = false;\n notice = typeof this.config.customAddItemText === 'function' ? this.config.customAddItemText(value) : this.config.customAddItemText;\n }\n }\n\n return {\n response: canAddItem,\n notice: notice\n };\n };\n\n _proto._searchChoices = function _searchChoices(value) {\n var newValue = typeof value === 'string' ? value.trim() : value;\n var currentValue = typeof this._currentValue === 'string' ? this._currentValue.trim() : this._currentValue;\n\n if (newValue.length < 1 && newValue === currentValue + \" \") {\n return 0;\n } // If new value matches the desired length and is not the same as the current value with a space\n\n\n var haystack = this._store.searchableChoices;\n var needle = newValue;\n var keys = [].concat(this.config.searchFields);\n var options = Object.assign(this.config.fuseOptions, {\n keys: keys\n });\n var fuse = new fuse_default.a(haystack, options);\n var results = fuse.search(needle);\n this._currentValue = newValue;\n this._highlightPosition = 0;\n this._isSearching = true;\n\n this._store.dispatch(choices_filterChoices(results));\n\n return results.length;\n };\n\n _proto._addEventListeners = function _addEventListeners() {\n var documentElement = this.config.shadowRoot || document.documentElement; // capture events - can cancel event processing or propagation\n\n documentElement.addEventListener('touchend', this._onTouchEnd, true);\n this.containerOuter.element.addEventListener('keydown', this._onKeyDown, true);\n this.containerOuter.element.addEventListener('mousedown', this._onMouseDown, true); // passive events - doesn't call `preventDefault` or `stopPropagation`\n\n documentElement.addEventListener('click', this._onClick, {\n passive: true\n });\n documentElement.addEventListener('touchmove', this._onTouchMove, {\n passive: true\n });\n this.dropdown.element.addEventListener('mouseover', this._onMouseOver, {\n passive: true\n });\n\n if (this._isSelectOneElement) {\n this.containerOuter.element.addEventListener('focus', this._onFocus, {\n passive: true\n });\n this.containerOuter.element.addEventListener('blur', this._onBlur, {\n passive: true\n });\n }\n\n this.input.element.addEventListener('keyup', this._onKeyUp, {\n passive: true\n });\n this.input.element.addEventListener('focus', this._onFocus, {\n passive: true\n });\n this.input.element.addEventListener('blur', this._onBlur, {\n passive: true\n });\n\n if (this.input.element.form) {\n this.input.element.form.addEventListener('reset', this._onFormReset, {\n passive: true\n });\n }\n\n this.input.addEventListeners();\n };\n\n _proto._removeEventListeners = function _removeEventListeners() {\n var documentElement = this.config.shadowRoot || document.documentElement;\n documentElement.removeEventListener('touchend', this._onTouchEnd, true);\n this.containerOuter.element.removeEventListener('keydown', this._onKeyDown, true);\n this.containerOuter.element.removeEventListener('mousedown', this._onMouseDown, true);\n documentElement.removeEventListener('click', this._onClick);\n documentElement.removeEventListener('touchmove', this._onTouchMove);\n this.dropdown.element.removeEventListener('mouseover', this._onMouseOver);\n\n if (this._isSelectOneElement) {\n this.containerOuter.element.removeEventListener('focus', this._onFocus);\n this.containerOuter.element.removeEventListener('blur', this._onBlur);\n }\n\n this.input.element.removeEventListener('keyup', this._onKeyUp);\n this.input.element.removeEventListener('focus', this._onFocus);\n this.input.element.removeEventListener('blur', this._onBlur);\n\n if (this.input.element.form) {\n this.input.element.form.removeEventListener('reset', this._onFormReset);\n }\n\n this.input.removeEventListeners();\n }\n /**\n * @param {KeyboardEvent} event\n */\n ;\n\n _proto._onKeyDown = function _onKeyDown(event) {\n var _keyDownActions;\n\n var target = event.target,\n keyCode = event.keyCode,\n ctrlKey = event.ctrlKey,\n metaKey = event.metaKey;\n var activeItems = this._store.activeItems;\n var hasFocusedInput = this.input.isFocussed;\n var hasActiveDropdown = this.dropdown.isActive;\n var hasItems = this.itemList.hasChildren();\n var keyString = String.fromCharCode(keyCode);\n var BACK_KEY = KEY_CODES.BACK_KEY,\n DELETE_KEY = KEY_CODES.DELETE_KEY,\n ENTER_KEY = KEY_CODES.ENTER_KEY,\n A_KEY = KEY_CODES.A_KEY,\n ESC_KEY = KEY_CODES.ESC_KEY,\n UP_KEY = KEY_CODES.UP_KEY,\n DOWN_KEY = KEY_CODES.DOWN_KEY,\n PAGE_UP_KEY = KEY_CODES.PAGE_UP_KEY,\n PAGE_DOWN_KEY = KEY_CODES.PAGE_DOWN_KEY;\n var hasCtrlDownKeyPressed = ctrlKey || metaKey; // If a user is typing and the dropdown is not active\n\n if (!this._isTextElement && /[a-zA-Z0-9-_ ]/.test(keyString)) {\n this.showDropdown();\n } // Map keys to key actions\n\n\n var keyDownActions = (_keyDownActions = {}, _keyDownActions[A_KEY] = this._onAKey, _keyDownActions[ENTER_KEY] = this._onEnterKey, _keyDownActions[ESC_KEY] = this._onEscapeKey, _keyDownActions[UP_KEY] = this._onDirectionKey, _keyDownActions[PAGE_UP_KEY] = this._onDirectionKey, _keyDownActions[DOWN_KEY] = this._onDirectionKey, _keyDownActions[PAGE_DOWN_KEY] = this._onDirectionKey, _keyDownActions[DELETE_KEY] = this._onDeleteKey, _keyDownActions[BACK_KEY] = this._onDeleteKey, _keyDownActions); // If keycode has a function, run it\n\n if (keyDownActions[keyCode]) {\n keyDownActions[keyCode]({\n event: event,\n target: target,\n keyCode: keyCode,\n metaKey: metaKey,\n activeItems: activeItems,\n hasFocusedInput: hasFocusedInput,\n hasActiveDropdown: hasActiveDropdown,\n hasItems: hasItems,\n hasCtrlDownKeyPressed: hasCtrlDownKeyPressed\n });\n }\n };\n\n _proto._onKeyUp = function _onKeyUp(_ref2) {\n var target = _ref2.target,\n keyCode = _ref2.keyCode;\n var value = this.input.value;\n var activeItems = this._store.activeItems;\n\n var canAddItem = this._canAddItem(activeItems, value);\n\n var backKey = KEY_CODES.BACK_KEY,\n deleteKey = KEY_CODES.DELETE_KEY; // We are typing into a text input and have a value, we want to show a dropdown\n // notice. Otherwise hide the dropdown\n\n if (this._isTextElement) {\n var canShowDropdownNotice = canAddItem.notice && value;\n\n if (canShowDropdownNotice) {\n var dropdownItem = this._getTemplate('notice', canAddItem.notice);\n\n this.dropdown.element.innerHTML = dropdownItem.outerHTML;\n this.showDropdown(true);\n } else {\n this.hideDropdown(true);\n }\n } else {\n var userHasRemovedValue = (keyCode === backKey || keyCode === deleteKey) && !target.value;\n var canReactivateChoices = !this._isTextElement && this._isSearching;\n var canSearch = this._canSearch && canAddItem.response;\n\n if (userHasRemovedValue && canReactivateChoices) {\n this._isSearching = false;\n\n this._store.dispatch(choices_activateChoices(true));\n } else if (canSearch) {\n this._handleSearch(this.input.value);\n }\n }\n\n this._canSearch = this.config.searchEnabled;\n };\n\n _proto._onAKey = function _onAKey(_ref3) {\n var hasItems = _ref3.hasItems,\n hasCtrlDownKeyPressed = _ref3.hasCtrlDownKeyPressed;\n\n // If CTRL + A or CMD + A have been pressed and there are items to select\n if (hasCtrlDownKeyPressed && hasItems) {\n this._canSearch = false;\n var shouldHightlightAll = this.config.removeItems && !this.input.value && this.input.element === document.activeElement;\n\n if (shouldHightlightAll) {\n this.highlightAll();\n }\n }\n };\n\n _proto._onEnterKey = function _onEnterKey(_ref4) {\n var event = _ref4.event,\n target = _ref4.target,\n activeItems = _ref4.activeItems,\n hasActiveDropdown = _ref4.hasActiveDropdown;\n var enterKey = KEY_CODES.ENTER_KEY;\n var targetWasButton = target.hasAttribute('data-button');\n\n if (this._isTextElement && target.value) {\n var value = this.input.value;\n\n var canAddItem = this._canAddItem(activeItems, value);\n\n if (canAddItem.response) {\n this.hideDropdown(true);\n\n this._addItem({\n value: value\n });\n\n this._triggerChange(value);\n\n this.clearInput();\n }\n }\n\n if (targetWasButton) {\n this._handleButtonAction(activeItems, target);\n\n event.preventDefault();\n }\n\n if (hasActiveDropdown) {\n var highlightedChoice = this.dropdown.getChild(\".\" + this.config.classNames.highlightedState);\n\n if (highlightedChoice) {\n // add enter keyCode value\n if (activeItems[0]) {\n activeItems[0].keyCode = enterKey; // eslint-disable-line no-param-reassign\n }\n\n this._handleChoiceAction(activeItems, highlightedChoice);\n }\n\n event.preventDefault();\n } else if (this._isSelectOneElement) {\n this.showDropdown();\n event.preventDefault();\n }\n };\n\n _proto._onEscapeKey = function _onEscapeKey(_ref5) {\n var hasActiveDropdown = _ref5.hasActiveDropdown;\n\n if (hasActiveDropdown) {\n this.hideDropdown(true);\n this.containerOuter.focus();\n }\n };\n\n _proto._onDirectionKey = function _onDirectionKey(_ref6) {\n var event = _ref6.event,\n hasActiveDropdown = _ref6.hasActiveDropdown,\n keyCode = _ref6.keyCode,\n metaKey = _ref6.metaKey;\n var downKey = KEY_CODES.DOWN_KEY,\n pageUpKey = KEY_CODES.PAGE_UP_KEY,\n pageDownKey = KEY_CODES.PAGE_DOWN_KEY; // If up or down key is pressed, traverse through options\n\n if (hasActiveDropdown || this._isSelectOneElement) {\n this.showDropdown();\n this._canSearch = false;\n var directionInt = keyCode === downKey || keyCode === pageDownKey ? 1 : -1;\n var skipKey = metaKey || keyCode === pageDownKey || keyCode === pageUpKey;\n var selectableChoiceIdentifier = '[data-choice-selectable]';\n var nextEl;\n\n if (skipKey) {\n if (directionInt > 0) {\n nextEl = this.dropdown.element.querySelector(selectableChoiceIdentifier + \":last-of-type\");\n } else {\n nextEl = this.dropdown.element.querySelector(selectableChoiceIdentifier);\n }\n } else {\n var currentEl = this.dropdown.element.querySelector(\".\" + this.config.classNames.highlightedState);\n\n if (currentEl) {\n nextEl = getAdjacentEl(currentEl, selectableChoiceIdentifier, directionInt);\n } else {\n nextEl = this.dropdown.element.querySelector(selectableChoiceIdentifier);\n }\n }\n\n if (nextEl) {\n // We prevent default to stop the cursor moving\n // when pressing the arrow\n if (!isScrolledIntoView(nextEl, this.choiceList.element, directionInt)) {\n this.choiceList.scrollToChildElement(nextEl, directionInt);\n }\n\n this._highlightChoice(nextEl);\n } // Prevent default to maintain cursor position whilst\n // traversing dropdown options\n\n\n event.preventDefault();\n }\n };\n\n _proto._onDeleteKey = function _onDeleteKey(_ref7) {\n var event = _ref7.event,\n target = _ref7.target,\n hasFocusedInput = _ref7.hasFocusedInput,\n activeItems = _ref7.activeItems;\n\n // If backspace or delete key is pressed and the input has no value\n if (hasFocusedInput && !target.value && !this._isSelectOneElement) {\n this._handleBackspace(activeItems);\n\n event.preventDefault();\n }\n };\n\n _proto._onTouchMove = function _onTouchMove() {\n if (this._wasTap) {\n this._wasTap = false;\n }\n };\n\n _proto._onTouchEnd = function _onTouchEnd(event) {\n var _ref8 = event || event.touches[0],\n target = _ref8.target;\n\n var touchWasWithinContainer = this._wasTap && this.containerOuter.element.contains(target);\n\n if (touchWasWithinContainer) {\n var containerWasExactTarget = target === this.containerOuter.element || target === this.containerInner.element;\n\n if (containerWasExactTarget) {\n if (this._isTextElement) {\n this.input.focus();\n } else if (this._isSelectMultipleElement) {\n this.showDropdown();\n }\n } // Prevents focus event firing\n\n\n event.stopPropagation();\n }\n\n this._wasTap = true;\n }\n /**\n * Handles mousedown event in capture mode for containetOuter.element\n * @param {MouseEvent} event\n */\n ;\n\n _proto._onMouseDown = function _onMouseDown(event) {\n var target = event.target;\n\n if (!(target instanceof HTMLElement)) {\n return;\n } // If we have our mouse down on the scrollbar and are on IE11...\n\n\n if (IS_IE11 && this.choiceList.element.contains(target)) {\n // check if click was on a scrollbar area\n var firstChoice =\n /** @type {HTMLElement} */\n this.choiceList.element.firstElementChild;\n var isOnScrollbar = this._direction === 'ltr' ? event.offsetX >= firstChoice.offsetWidth : event.offsetX < firstChoice.offsetLeft;\n this._isScrollingOnIe = isOnScrollbar;\n }\n\n if (target === this.input.element) {\n return;\n }\n\n var item = target.closest('[data-button],[data-item],[data-choice]');\n\n if (item instanceof HTMLElement) {\n var hasShiftKey = event.shiftKey;\n var activeItems = this._store.activeItems;\n var dataset = item.dataset;\n\n if ('button' in dataset) {\n this._handleButtonAction(activeItems, item);\n } else if ('item' in dataset) {\n this._handleItemAction(activeItems, item, hasShiftKey);\n } else if ('choice' in dataset) {\n this._handleChoiceAction(activeItems, item);\n }\n }\n\n event.preventDefault();\n }\n /**\n * Handles mouseover event over this.dropdown\n * @param {MouseEvent} event\n */\n ;\n\n _proto._onMouseOver = function _onMouseOver(_ref9) {\n var target = _ref9.target;\n\n if (target instanceof HTMLElement && 'choice' in target.dataset) {\n this._highlightChoice(target);\n }\n };\n\n _proto._onClick = function _onClick(_ref10) {\n var target = _ref10.target;\n var clickWasWithinContainer = this.containerOuter.element.contains(target);\n\n if (clickWasWithinContainer) {\n if (!this.dropdown.isActive && !this.containerOuter.isDisabled) {\n if (this._isTextElement) {\n if (document.activeElement !== this.input.element) {\n this.input.focus();\n }\n } else {\n this.showDropdown();\n this.containerOuter.focus();\n }\n } else if (this._isSelectOneElement && target !== this.input.element && !this.dropdown.element.contains(target)) {\n this.hideDropdown();\n }\n } else {\n var hasHighlightedItems = this._store.highlightedActiveItems.length > 0;\n\n if (hasHighlightedItems) {\n this.unhighlightAll();\n }\n\n this.containerOuter.removeFocusState();\n this.hideDropdown(true);\n }\n };\n\n _proto._onFocus = function _onFocus(_ref11) {\n var _this17 = this,\n _focusActions;\n\n var target = _ref11.target;\n var focusWasWithinContainer = this.containerOuter.element.contains(target);\n\n if (!focusWasWithinContainer) {\n return;\n }\n\n var focusActions = (_focusActions = {}, _focusActions[TEXT_TYPE] = function () {\n if (target === _this17.input.element) {\n _this17.containerOuter.addFocusState();\n }\n }, _focusActions[SELECT_ONE_TYPE] = function () {\n _this17.containerOuter.addFocusState();\n\n if (target === _this17.input.element) {\n _this17.showDropdown(true);\n }\n }, _focusActions[SELECT_MULTIPLE_TYPE] = function () {\n if (target === _this17.input.element) {\n _this17.showDropdown(true); // If element is a select box, the focused element is the container and the dropdown\n // isn't already open, focus and show dropdown\n\n\n _this17.containerOuter.addFocusState();\n }\n }, _focusActions);\n focusActions[this.passedElement.element.type]();\n };\n\n _proto._onBlur = function _onBlur(_ref12) {\n var _this18 = this;\n\n var target = _ref12.target;\n var blurWasWithinContainer = this.containerOuter.element.contains(target);\n\n if (blurWasWithinContainer && !this._isScrollingOnIe) {\n var _blurActions;\n\n var activeItems = this._store.activeItems;\n var hasHighlightedItems = activeItems.some(function (item) {\n return item.highlighted;\n });\n var blurActions = (_blurActions = {}, _blurActions[TEXT_TYPE] = function () {\n if (target === _this18.input.element) {\n _this18.containerOuter.removeFocusState();\n\n if (hasHighlightedItems) {\n _this18.unhighlightAll();\n }\n\n _this18.hideDropdown(true);\n }\n }, _blurActions[SELECT_ONE_TYPE] = function () {\n _this18.containerOuter.removeFocusState();\n\n if (target === _this18.input.element || target === _this18.containerOuter.element && !_this18._canSearch) {\n _this18.hideDropdown(true);\n }\n }, _blurActions[SELECT_MULTIPLE_TYPE] = function () {\n if (target === _this18.input.element) {\n _this18.containerOuter.removeFocusState();\n\n _this18.hideDropdown(true);\n\n if (hasHighlightedItems) {\n _this18.unhighlightAll();\n }\n }\n }, _blurActions);\n blurActions[this.passedElement.element.type]();\n } else {\n // On IE11, clicking the scollbar blurs our input and thus\n // closes the dropdown. To stop this, we refocus our input\n // if we know we are on IE *and* are scrolling.\n this._isScrollingOnIe = false;\n this.input.element.focus();\n }\n };\n\n _proto._onFormReset = function _onFormReset() {\n this._store.dispatch(resetTo(this._initialState));\n };\n\n _proto._highlightChoice = function _highlightChoice(el) {\n var _this19 = this;\n\n if (el === void 0) {\n el = null;\n }\n\n var choices = Array.from(this.dropdown.element.querySelectorAll('[data-choice-selectable]'));\n\n if (!choices.length) {\n return;\n }\n\n var passedEl = el;\n var highlightedChoices = Array.from(this.dropdown.element.querySelectorAll(\".\" + this.config.classNames.highlightedState)); // Remove any highlighted choices\n\n highlightedChoices.forEach(function (choice) {\n choice.classList.remove(_this19.config.classNames.highlightedState);\n choice.setAttribute('aria-selected', 'false');\n });\n\n if (passedEl) {\n this._highlightPosition = choices.indexOf(passedEl);\n } else {\n // Highlight choice based on last known highlight location\n if (choices.length > this._highlightPosition) {\n // If we have an option to highlight\n passedEl = choices[this._highlightPosition];\n } else {\n // Otherwise highlight the option before\n passedEl = choices[choices.length - 1];\n }\n\n if (!passedEl) {\n passedEl = choices[0];\n }\n }\n\n passedEl.classList.add(this.config.classNames.highlightedState);\n passedEl.setAttribute('aria-selected', 'true');\n this.passedElement.triggerEvent(EVENTS.highlightChoice, {\n el: passedEl\n });\n\n if (this.dropdown.isActive) {\n // IE11 ignores aria-label and blocks virtual keyboard\n // if aria-activedescendant is set without a dropdown\n this.input.setActiveDescendant(passedEl.id);\n this.containerOuter.setActiveDescendant(passedEl.id);\n }\n };\n\n _proto._addItem = function _addItem(_ref13) {\n var value = _ref13.value,\n _ref13$label = _ref13.label,\n label = _ref13$label === void 0 ? null : _ref13$label,\n _ref13$choiceId = _ref13.choiceId,\n choiceId = _ref13$choiceId === void 0 ? -1 : _ref13$choiceId,\n _ref13$groupId = _ref13.groupId,\n groupId = _ref13$groupId === void 0 ? -1 : _ref13$groupId,\n _ref13$customProperti = _ref13.customProperties,\n customProperties = _ref13$customProperti === void 0 ? null : _ref13$customProperti,\n _ref13$placeholder = _ref13.placeholder,\n placeholder = _ref13$placeholder === void 0 ? false : _ref13$placeholder,\n _ref13$keyCode = _ref13.keyCode,\n keyCode = _ref13$keyCode === void 0 ? null : _ref13$keyCode;\n var passedValue = typeof value === 'string' ? value.trim() : value;\n var passedKeyCode = keyCode;\n var passedCustomProperties = customProperties;\n var items = this._store.items;\n var passedLabel = label || passedValue;\n var passedOptionId = choiceId || -1;\n var group = groupId >= 0 ? this._store.getGroupById(groupId) : null;\n var id = items ? items.length + 1 : 1; // If a prepended value has been passed, prepend it\n\n if (this.config.prependValue) {\n passedValue = this.config.prependValue + passedValue.toString();\n } // If an appended value has been passed, append it\n\n\n if (this.config.appendValue) {\n passedValue += this.config.appendValue.toString();\n }\n\n this._store.dispatch(items_addItem({\n value: passedValue,\n label: passedLabel,\n id: id,\n choiceId: passedOptionId,\n groupId: groupId,\n customProperties: customProperties,\n placeholder: placeholder,\n keyCode: passedKeyCode\n }));\n\n if (this._isSelectOneElement) {\n this.removeActiveItems(id);\n } // Trigger change event\n\n\n this.passedElement.triggerEvent(EVENTS.addItem, {\n id: id,\n value: passedValue,\n label: passedLabel,\n customProperties: passedCustomProperties,\n groupValue: group && group.value ? group.value : undefined,\n keyCode: passedKeyCode\n });\n return this;\n };\n\n _proto._removeItem = function _removeItem(item) {\n if (!item || !isType('Object', item)) {\n return this;\n }\n\n var id = item.id,\n value = item.value,\n label = item.label,\n choiceId = item.choiceId,\n groupId = item.groupId;\n var group = groupId >= 0 ? this._store.getGroupById(groupId) : null;\n\n this._store.dispatch(items_removeItem(id, choiceId));\n\n if (group && group.value) {\n this.passedElement.triggerEvent(EVENTS.removeItem, {\n id: id,\n value: value,\n label: label,\n groupValue: group.value\n });\n } else {\n this.passedElement.triggerEvent(EVENTS.removeItem, {\n id: id,\n value: value,\n label: label\n });\n }\n\n return this;\n };\n\n _proto._addChoice = function _addChoice(_ref14) {\n var value = _ref14.value,\n _ref14$label = _ref14.label,\n label = _ref14$label === void 0 ? null : _ref14$label,\n _ref14$isSelected = _ref14.isSelected,\n isSelected = _ref14$isSelected === void 0 ? false : _ref14$isSelected,\n _ref14$isDisabled = _ref14.isDisabled,\n isDisabled = _ref14$isDisabled === void 0 ? false : _ref14$isDisabled,\n _ref14$groupId = _ref14.groupId,\n groupId = _ref14$groupId === void 0 ? -1 : _ref14$groupId,\n _ref14$customProperti = _ref14.customProperties,\n customProperties = _ref14$customProperti === void 0 ? null : _ref14$customProperti,\n _ref14$placeholder = _ref14.placeholder,\n placeholder = _ref14$placeholder === void 0 ? false : _ref14$placeholder,\n _ref14$keyCode = _ref14.keyCode,\n keyCode = _ref14$keyCode === void 0 ? null : _ref14$keyCode;\n\n if (typeof value === 'undefined' || value === null) {\n return;\n } // Generate unique id\n\n\n var choices = this._store.choices;\n var choiceLabel = label || value;\n var choiceId = choices ? choices.length + 1 : 1;\n var choiceElementId = this._baseId + \"-\" + this._idNames.itemChoice + \"-\" + choiceId;\n\n this._store.dispatch(choices_addChoice({\n id: choiceId,\n groupId: groupId,\n elementId: choiceElementId,\n value: value,\n label: choiceLabel,\n disabled: isDisabled,\n customProperties: customProperties,\n placeholder: placeholder,\n keyCode: keyCode\n }));\n\n if (isSelected) {\n this._addItem({\n value: value,\n label: choiceLabel,\n choiceId: choiceId,\n customProperties: customProperties,\n placeholder: placeholder,\n keyCode: keyCode\n });\n }\n };\n\n _proto._addGroup = function _addGroup(_ref15) {\n var _this20 = this;\n\n var group = _ref15.group,\n id = _ref15.id,\n _ref15$valueKey = _ref15.valueKey,\n valueKey = _ref15$valueKey === void 0 ? 'value' : _ref15$valueKey,\n _ref15$labelKey = _ref15.labelKey,\n labelKey = _ref15$labelKey === void 0 ? 'label' : _ref15$labelKey;\n var groupChoices = isType('Object', group) ? group.choices : Array.from(group.getElementsByTagName('OPTION'));\n var groupId = id || Math.floor(new Date().valueOf() * Math.random());\n var isDisabled = group.disabled ? group.disabled : false;\n\n if (groupChoices) {\n this._store.dispatch(groups_addGroup({\n value: group.label,\n id: groupId,\n active: true,\n disabled: isDisabled\n }));\n\n var addGroupChoices = function addGroupChoices(choice) {\n var isOptDisabled = choice.disabled || choice.parentNode && choice.parentNode.disabled;\n\n _this20._addChoice({\n value: choice[valueKey],\n label: isType('Object', choice) ? choice[labelKey] : choice.innerHTML,\n isSelected: choice.selected,\n isDisabled: isOptDisabled,\n groupId: groupId,\n customProperties: choice.customProperties,\n placeholder: choice.placeholder\n });\n };\n\n groupChoices.forEach(addGroupChoices);\n } else {\n this._store.dispatch(groups_addGroup({\n value: group.label,\n id: group.id,\n active: false,\n disabled: group.disabled\n }));\n }\n };\n\n _proto._getTemplate = function _getTemplate(template) {\n var _this$_templates$temp;\n\n if (!template) {\n return null;\n }\n\n var classNames = this.config.classNames;\n\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\n return (_this$_templates$temp = this._templates[template]).call.apply(_this$_templates$temp, [this, classNames].concat(args));\n };\n\n _proto._createTemplates = function _createTemplates() {\n var callbackOnCreateTemplates = this.config.callbackOnCreateTemplates;\n var userTemplates = {};\n\n if (callbackOnCreateTemplates && typeof callbackOnCreateTemplates === 'function') {\n userTemplates = callbackOnCreateTemplates.call(this, strToEl);\n }\n\n this._templates = cjs_default()(TEMPLATES, userTemplates);\n };\n\n _proto._createElements = function _createElements() {\n this.containerOuter = new container_Container({\n element: this._getTemplate('containerOuter', this._direction, this._isSelectElement, this._isSelectOneElement, this.config.searchEnabled, this.passedElement.element.type),\n classNames: this.config.classNames,\n type: this.passedElement.element.type,\n position: this.config.position\n });\n this.containerInner = new container_Container({\n element: this._getTemplate('containerInner'),\n classNames: this.config.classNames,\n type: this.passedElement.element.type,\n position: this.config.position\n });\n this.input = new input_Input({\n element: this._getTemplate('input', this._placeholderValue),\n classNames: this.config.classNames,\n type: this.passedElement.element.type,\n preventPaste: !this.config.paste\n });\n this.choiceList = new list_List({\n element: this._getTemplate('choiceList', this._isSelectOneElement)\n });\n this.itemList = new list_List({\n element: this._getTemplate('itemList', this._isSelectOneElement)\n });\n this.dropdown = new Dropdown({\n element: this._getTemplate('dropdown'),\n classNames: this.config.classNames,\n type: this.passedElement.element.type\n });\n };\n\n _proto._createStructure = function _createStructure() {\n // Hide original element\n this.passedElement.conceal(); // Wrap input in container preserving DOM ordering\n\n this.containerInner.wrap(this.passedElement.element); // Wrapper inner container with outer container\n\n this.containerOuter.wrap(this.containerInner.element);\n\n if (this._isSelectOneElement) {\n this.input.placeholder = this.config.searchPlaceholderValue || '';\n } else if (this._placeholderValue) {\n this.input.placeholder = this._placeholderValue;\n this.input.setWidth();\n }\n\n this.containerOuter.element.appendChild(this.containerInner.element);\n this.containerOuter.element.appendChild(this.dropdown.element);\n this.containerInner.element.appendChild(this.itemList.element);\n\n if (!this._isTextElement) {\n this.dropdown.element.appendChild(this.choiceList.element);\n }\n\n if (!this._isSelectOneElement) {\n this.containerInner.element.appendChild(this.input.element);\n } else if (this.config.searchEnabled) {\n this.dropdown.element.insertBefore(this.input.element, this.dropdown.element.firstChild);\n }\n\n if (this._isSelectElement) {\n this._highlightPosition = 0;\n this._isSearching = false;\n\n this._startLoading();\n\n if (this._presetGroups.length) {\n this._addPredefinedGroups(this._presetGroups);\n } else {\n this._addPredefinedChoices(this._presetChoices);\n }\n\n this._stopLoading();\n }\n\n if (this._isTextElement) {\n this._addPredefinedItems(this._presetItems);\n }\n };\n\n _proto._addPredefinedGroups = function _addPredefinedGroups(groups) {\n var _this21 = this;\n\n // If we have a placeholder option\n var placeholderChoice = this.passedElement.placeholderOption;\n\n if (placeholderChoice && placeholderChoice.parentNode.tagName === 'SELECT') {\n this._addChoice({\n value: placeholderChoice.value,\n label: placeholderChoice.innerHTML,\n isSelected: placeholderChoice.selected,\n isDisabled: placeholderChoice.disabled,\n placeholder: true\n });\n }\n\n groups.forEach(function (group) {\n return _this21._addGroup({\n group: group,\n id: group.id || null\n });\n });\n };\n\n _proto._addPredefinedChoices = function _addPredefinedChoices(choices) {\n var _this22 = this;\n\n // If sorting is enabled or the user is searching, filter choices\n if (this.config.shouldSort) {\n choices.sort(this.config.sorter);\n }\n\n var hasSelectedChoice = choices.some(function (choice) {\n return choice.selected;\n });\n var firstEnabledChoiceIndex = choices.findIndex(function (choice) {\n return choice.disabled === undefined || !choice.disabled;\n });\n choices.forEach(function (choice, index) {\n var value = choice.value,\n label = choice.label,\n customProperties = choice.customProperties,\n placeholder = choice.placeholder;\n\n if (_this22._isSelectElement) {\n // If the choice is actually a group\n if (choice.choices) {\n _this22._addGroup({\n group: choice,\n id: choice.id || null\n });\n } else {\n /**\n * If there is a selected choice already or the choice is not the first in\n * the array, add each choice normally.\n *\n * Otherwise we pre-select the first enabled choice in the array (\"select-one\" only)\n */\n var shouldPreselect = _this22._isSelectOneElement && !hasSelectedChoice && index === firstEnabledChoiceIndex;\n var isSelected = shouldPreselect ? true : choice.selected;\n var isDisabled = choice.disabled;\n\n _this22._addChoice({\n value: value,\n label: label,\n isSelected: isSelected,\n isDisabled: isDisabled,\n customProperties: customProperties,\n placeholder: placeholder\n });\n }\n } else {\n _this22._addChoice({\n value: value,\n label: label,\n isSelected: choice.selected,\n isDisabled: choice.disabled,\n customProperties: customProperties,\n placeholder: placeholder\n });\n }\n });\n }\n /**\n * @param {Item[]} items\n */\n ;\n\n _proto._addPredefinedItems = function _addPredefinedItems(items) {\n var _this23 = this;\n\n items.forEach(function (item) {\n if (typeof item === 'object' && item.value) {\n _this23._addItem({\n value: item.value,\n label: item.label,\n choiceId: item.id,\n customProperties: item.customProperties,\n placeholder: item.placeholder\n });\n }\n\n if (typeof item === 'string') {\n _this23._addItem({\n value: item\n });\n }\n });\n };\n\n _proto._setChoiceOrItem = function _setChoiceOrItem(item) {\n var _this24 = this;\n\n var itemType = getType(item).toLowerCase();\n var handleType = {\n object: function object() {\n if (!item.value) {\n return;\n } // If we are dealing with a select input, we need to create an option first\n // that is then selected. For text inputs we can just add items normally.\n\n\n if (!_this24._isTextElement) {\n _this24._addChoice({\n value: item.value,\n label: item.label,\n isSelected: true,\n isDisabled: false,\n customProperties: item.customProperties,\n placeholder: item.placeholder\n });\n } else {\n _this24._addItem({\n value: item.value,\n label: item.label,\n choiceId: item.id,\n customProperties: item.customProperties,\n placeholder: item.placeholder\n });\n }\n },\n string: function string() {\n if (!_this24._isTextElement) {\n _this24._addChoice({\n value: item,\n label: item,\n isSelected: true,\n isDisabled: false\n });\n } else {\n _this24._addItem({\n value: item\n });\n }\n }\n };\n handleType[itemType]();\n };\n\n _proto._findAndSelectChoiceByValue = function _findAndSelectChoiceByValue(val) {\n var _this25 = this;\n\n var choices = this._store.choices; // Check 'value' property exists and the choice isn't already selected\n\n var foundChoice = choices.find(function (choice) {\n return _this25.config.valueComparer(choice.value, val);\n });\n\n if (foundChoice && !foundChoice.selected) {\n this._addItem({\n value: foundChoice.value,\n label: foundChoice.label,\n choiceId: foundChoice.id,\n groupId: foundChoice.groupId,\n customProperties: foundChoice.customProperties,\n placeholder: foundChoice.placeholder,\n keyCode: foundChoice.keyCode\n });\n }\n };\n\n _proto._generatePlaceholderValue = function _generatePlaceholderValue() {\n if (this._isSelectElement) {\n var placeholderOption = this.passedElement.placeholderOption;\n return placeholderOption ? placeholderOption.text : false;\n }\n\n var _this$config4 = this.config,\n placeholder = _this$config4.placeholder,\n placeholderValue = _this$config4.placeholderValue;\n var dataset = this.passedElement.element.dataset;\n\n if (placeholder) {\n if (placeholderValue) {\n return placeholderValue;\n }\n\n if (dataset.placeholder) {\n return dataset.placeholder;\n }\n }\n\n return false;\n };\n\n return Choices;\n}();\n\n/* harmony default export */ var scripts_choices = __webpack_exports__[\"default\"] = (choices_Choices);\n\n/***/ })\n/******/ ])[\"default\"];\n});\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/choices.js/public/assets/scripts/choices.js?"); +eval("/*! @formio/choices.js v10.2.0 | © 2023 Josh Johnson | https://github.com/jshjohnson/Choices#readme */\n(function webpackUniversalModuleDefinition(root, factory) {\n\tif(true)\n\t\tmodule.exports = factory();\n\telse {}\n})(window, () => {\nreturn /******/ (() => { // webpackBootstrap\n/******/ \t\"use strict\";\n/******/ \tvar __webpack_modules__ = ({\n\n/***/ 282:\n/***/ ((__unused_webpack_module, exports, __nested_webpack_require_622__) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.clearChoices = exports.activateChoices = exports.filterChoices = exports.addChoice = void 0;\nvar constants_1 = __nested_webpack_require_622__(883);\nvar addChoice = function (_a) {\n var value = _a.value,\n label = _a.label,\n id = _a.id,\n groupId = _a.groupId,\n disabled = _a.disabled,\n elementId = _a.elementId,\n customProperties = _a.customProperties,\n placeholder = _a.placeholder,\n keyCode = _a.keyCode;\n return {\n type: constants_1.ACTION_TYPES.ADD_CHOICE,\n value: value,\n label: label,\n id: id,\n groupId: groupId,\n disabled: disabled,\n elementId: elementId,\n customProperties: customProperties,\n placeholder: placeholder,\n keyCode: keyCode\n };\n};\nexports.addChoice = addChoice;\nvar filterChoices = function (results) {\n return {\n type: constants_1.ACTION_TYPES.FILTER_CHOICES,\n results: results\n };\n};\nexports.filterChoices = filterChoices;\nvar activateChoices = function (active) {\n if (active === void 0) {\n active = true;\n }\n return {\n type: constants_1.ACTION_TYPES.ACTIVATE_CHOICES,\n active: active\n };\n};\nexports.activateChoices = activateChoices;\nvar clearChoices = function () {\n return {\n type: constants_1.ACTION_TYPES.CLEAR_CHOICES\n };\n};\nexports.clearChoices = clearChoices;\n\n/***/ }),\n\n/***/ 783:\n/***/ ((__unused_webpack_module, exports, __nested_webpack_require_2053__) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.addGroup = void 0;\nvar constants_1 = __nested_webpack_require_2053__(883);\nvar addGroup = function (_a) {\n var value = _a.value,\n id = _a.id,\n active = _a.active,\n disabled = _a.disabled;\n return {\n type: constants_1.ACTION_TYPES.ADD_GROUP,\n value: value,\n id: id,\n active: active,\n disabled: disabled\n };\n};\nexports.addGroup = addGroup;\n\n/***/ }),\n\n/***/ 464:\n/***/ ((__unused_webpack_module, exports, __nested_webpack_require_2575__) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.highlightItem = exports.removeItem = exports.addItem = void 0;\nvar constants_1 = __nested_webpack_require_2575__(883);\nvar addItem = function (_a) {\n var value = _a.value,\n label = _a.label,\n id = _a.id,\n choiceId = _a.choiceId,\n groupId = _a.groupId,\n customProperties = _a.customProperties,\n placeholder = _a.placeholder,\n keyCode = _a.keyCode;\n return {\n type: constants_1.ACTION_TYPES.ADD_ITEM,\n value: value,\n label: label,\n id: id,\n choiceId: choiceId,\n groupId: groupId,\n customProperties: customProperties,\n placeholder: placeholder,\n keyCode: keyCode\n };\n};\nexports.addItem = addItem;\nvar removeItem = function (id, choiceId) {\n return {\n type: constants_1.ACTION_TYPES.REMOVE_ITEM,\n id: id,\n choiceId: choiceId\n };\n};\nexports.removeItem = removeItem;\nvar highlightItem = function (id, highlighted) {\n return {\n type: constants_1.ACTION_TYPES.HIGHLIGHT_ITEM,\n id: id,\n highlighted: highlighted\n };\n};\nexports.highlightItem = highlightItem;\n\n/***/ }),\n\n/***/ 137:\n/***/ ((__unused_webpack_module, exports, __nested_webpack_require_3754__) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.setIsLoading = exports.resetTo = exports.clearAll = void 0;\nvar constants_1 = __nested_webpack_require_3754__(883);\nvar clearAll = function () {\n return {\n type: constants_1.ACTION_TYPES.CLEAR_ALL\n };\n};\nexports.clearAll = clearAll;\nvar resetTo = function (state) {\n return {\n type: constants_1.ACTION_TYPES.RESET_TO,\n state: state\n };\n};\nexports.resetTo = resetTo;\nvar setIsLoading = function (isLoading) {\n return {\n type: constants_1.ACTION_TYPES.SET_IS_LOADING,\n isLoading: isLoading\n };\n};\nexports.setIsLoading = setIsLoading;\n\n/***/ }),\n\n/***/ 373:\n/***/ (function(__unused_webpack_module, exports, __nested_webpack_require_4472__) {\n\n\n\nvar __spreadArray = this && this.__spreadArray || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nvar __importDefault = this && this.__importDefault || function (mod) {\n return mod && mod.__esModule ? mod : {\n \"default\": mod\n };\n};\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nvar deepmerge_1 = __importDefault(__nested_webpack_require_4472__(996));\n/* eslint-disable @typescript-eslint/no-explicit-any */\nvar fuse_js_1 = __importDefault(__nested_webpack_require_4472__(221));\nvar choices_1 = __nested_webpack_require_4472__(282);\nvar groups_1 = __nested_webpack_require_4472__(783);\nvar items_1 = __nested_webpack_require_4472__(464);\nvar misc_1 = __nested_webpack_require_4472__(137);\nvar components_1 = __nested_webpack_require_4472__(520);\nvar constants_1 = __nested_webpack_require_4472__(883);\nvar defaults_1 = __nested_webpack_require_4472__(789);\nvar utils_1 = __nested_webpack_require_4472__(799);\nvar reducers_1 = __nested_webpack_require_4472__(655);\nvar store_1 = __importDefault(__nested_webpack_require_4472__(744));\nvar templates_1 = __importDefault(__nested_webpack_require_4472__(686));\n/** @see {@link http://browserhacks.com/#hack-acea075d0ac6954f275a70023906050c} */\nvar IS_IE11 = '-ms-scroll-limit' in document.documentElement.style && '-ms-ime-align' in document.documentElement.style;\nvar USER_DEFAULTS = {};\n/**\n * Choices\n * @author Josh Johnson\n */\nvar Choices = /** @class */function () {\n function Choices(element, userConfig) {\n if (element === void 0) {\n element = '[data-choice]';\n }\n if (userConfig === void 0) {\n userConfig = {};\n }\n var _this = this;\n if (userConfig.allowHTML === undefined) {\n console.warn('Deprecation warning: allowHTML will default to false in a future release. To render HTML in Choices, you will need to set it to true. Setting allowHTML will suppress this message.');\n }\n this.config = deepmerge_1.default.all([defaults_1.DEFAULT_CONFIG, Choices.defaults.options, userConfig],\n // When merging array configs, replace with a copy of the userConfig array,\n // instead of concatenating with the default array\n {\n arrayMerge: function (_, sourceArray) {\n return __spreadArray([], sourceArray, true);\n }\n });\n // Restore the shadowRoot if provided. deeperge converts it into an empty object.\n if (userConfig.shadowRoot) {\n this.config.shadowRoot = userConfig.shadowRoot;\n }\n var invalidConfigOptions = (0, utils_1.diff)(this.config, defaults_1.DEFAULT_CONFIG);\n if (invalidConfigOptions.length) {\n console.warn('Unknown config option(s) passed', invalidConfigOptions.join(', '));\n }\n var passedElement = typeof element === 'string' ? document.querySelector(element) : element;\n if (!(passedElement instanceof HTMLInputElement || passedElement instanceof HTMLSelectElement)) {\n throw TypeError('Expected one of the following types text|select-one|select-multiple');\n }\n this._isTextElement = passedElement.type === constants_1.TEXT_TYPE;\n this._isSelectOneElement = passedElement.type === constants_1.SELECT_ONE_TYPE;\n this._isSelectMultipleElement = passedElement.type === constants_1.SELECT_MULTIPLE_TYPE;\n this._isSelectElement = this._isSelectOneElement || this._isSelectMultipleElement;\n this.config.searchEnabled = this._isSelectMultipleElement || this.config.searchEnabled;\n if (!['auto', 'always'].includes(\"\".concat(this.config.renderSelectedChoices))) {\n this.config.renderSelectedChoices = 'auto';\n }\n if (userConfig.addItemFilter && typeof userConfig.addItemFilter !== 'function') {\n var re = userConfig.addItemFilter instanceof RegExp ? userConfig.addItemFilter : new RegExp(userConfig.addItemFilter);\n this.config.addItemFilter = re.test.bind(re);\n }\n if (this._isTextElement) {\n this.passedElement = new components_1.WrappedInput({\n element: passedElement,\n classNames: this.config.classNames,\n delimiter: this.config.delimiter\n });\n } else {\n this.passedElement = new components_1.WrappedSelect({\n element: passedElement,\n classNames: this.config.classNames,\n template: function (data) {\n return _this._templates.option(data);\n }\n });\n }\n this.initialised = false;\n this._store = new store_1.default();\n this._initialState = reducers_1.defaultState;\n this._currentState = reducers_1.defaultState;\n this._prevState = reducers_1.defaultState;\n this._currentValue = '';\n this._canSearch = !!this.config.searchEnabled;\n this._isScrollingOnIe = false;\n this._highlightPosition = 0;\n this._wasTap = true;\n this._placeholderValue = this._generatePlaceholderValue();\n this._baseId = (0, utils_1.generateId)(this.passedElement.element, 'choices-');\n /**\n * setting direction in cases where it's explicitly set on passedElement\n * or when calculated direction is different from the document\n */\n this._direction = this.passedElement.dir;\n if (!this._direction) {\n var elementDirection = window.getComputedStyle(this.passedElement.element).direction;\n var documentDirection = window.getComputedStyle(document.documentElement).direction;\n if (elementDirection !== documentDirection) {\n this._direction = elementDirection;\n }\n }\n this._idNames = {\n itemChoice: 'item-choice'\n };\n if (this._isSelectElement) {\n // Assign preset groups from passed element\n this._presetGroups = this.passedElement.optionGroups;\n // Assign preset options from passed element\n this._presetOptions = this.passedElement.options;\n }\n // Assign preset choices from passed object\n this._presetChoices = this.config.choices;\n // Assign preset items from passed object first\n this._presetItems = this.config.items;\n // Add any values passed from attribute\n if (this.passedElement.value && this._isTextElement) {\n var splitValues = this.passedElement.value.split(this.config.delimiter);\n this._presetItems = this._presetItems.concat(splitValues);\n }\n // Create array of choices from option elements\n if (this.passedElement.options) {\n this.passedElement.options.forEach(function (option) {\n _this._presetChoices.push({\n value: option.value,\n label: option.innerHTML,\n selected: !!option.selected,\n disabled: option.disabled || option.parentNode.disabled,\n placeholder: option.value === '' || option.hasAttribute('placeholder'),\n customProperties: (0, utils_1.parseCustomProperties)(option.dataset.customProperties)\n });\n });\n }\n this._render = this._render.bind(this);\n this._onFocus = this._onFocus.bind(this);\n this._onBlur = this._onBlur.bind(this);\n this._onKeyUp = this._onKeyUp.bind(this);\n this._onKeyDown = this._onKeyDown.bind(this);\n this._onClick = this._onClick.bind(this);\n this._onTouchMove = this._onTouchMove.bind(this);\n this._onTouchEnd = this._onTouchEnd.bind(this);\n this._onMouseDown = this._onMouseDown.bind(this);\n this._onMouseOver = this._onMouseOver.bind(this);\n this._onFormReset = this._onFormReset.bind(this);\n this._onSelectKey = this._onSelectKey.bind(this);\n this._onEnterKey = this._onEnterKey.bind(this);\n this._onEscapeKey = this._onEscapeKey.bind(this);\n this._onDirectionKey = this._onDirectionKey.bind(this);\n this._onDeleteKey = this._onDeleteKey.bind(this);\n // If element has already been initialised with Choices, fail silently\n if (this.passedElement.isActive) {\n if (!this.config.silent) {\n console.warn('Trying to initialise Choices on element already initialised', {\n element: element\n });\n }\n this.initialised = true;\n return;\n }\n // Let's go\n this.init();\n }\n Object.defineProperty(Choices, \"defaults\", {\n get: function () {\n return Object.preventExtensions({\n get options() {\n return USER_DEFAULTS;\n },\n get templates() {\n return templates_1.default;\n }\n });\n },\n enumerable: false,\n configurable: true\n });\n Choices.prototype.init = function () {\n if (this.initialised) {\n return;\n }\n this._createTemplates();\n this._createElements();\n this._createStructure();\n this._store.subscribe(this._render);\n this._render();\n this._addEventListeners();\n var shouldDisable = !this.config.addItems || this.passedElement.element.hasAttribute('disabled');\n if (shouldDisable) {\n this.disable();\n }\n this.initialised = true;\n var callbackOnInit = this.config.callbackOnInit;\n // Run callback if it is a function\n if (callbackOnInit && typeof callbackOnInit === 'function') {\n callbackOnInit.call(this);\n }\n };\n Choices.prototype.destroy = function () {\n if (!this.initialised) {\n return;\n }\n this._removeEventListeners();\n this.passedElement.reveal();\n this.containerOuter.unwrap(this.passedElement.element);\n this.clearStore();\n if (this._isSelectElement) {\n this.passedElement.options = this._presetOptions;\n }\n this._templates = templates_1.default;\n this.initialised = false;\n };\n Choices.prototype.enable = function () {\n if (this.passedElement.isDisabled) {\n this.passedElement.enable();\n }\n if (this.containerOuter.isDisabled) {\n this._addEventListeners();\n this.input.enable();\n this.containerOuter.enable();\n }\n return this;\n };\n Choices.prototype.disable = function () {\n if (!this.passedElement.isDisabled) {\n this.passedElement.disable();\n }\n if (!this.containerOuter.isDisabled) {\n this._removeEventListeners();\n this.input.disable();\n this.containerOuter.disable();\n }\n return this;\n };\n Choices.prototype.highlightItem = function (item, runEvent) {\n if (runEvent === void 0) {\n runEvent = true;\n }\n if (!item || !item.id) {\n return this;\n }\n var id = item.id,\n _a = item.groupId,\n groupId = _a === void 0 ? -1 : _a,\n _b = item.value,\n value = _b === void 0 ? '' : _b,\n _c = item.label,\n label = _c === void 0 ? '' : _c;\n var group = groupId >= 0 ? this._store.getGroupById(groupId) : null;\n this._store.dispatch((0, items_1.highlightItem)(id, true));\n if (runEvent) {\n this.passedElement.triggerEvent(constants_1.EVENTS.highlightItem, {\n id: id,\n value: value,\n label: label,\n groupValue: group && group.value ? group.value : null\n });\n }\n return this;\n };\n Choices.prototype.unhighlightItem = function (item) {\n if (!item || !item.id) {\n return this;\n }\n var id = item.id,\n _a = item.groupId,\n groupId = _a === void 0 ? -1 : _a,\n _b = item.value,\n value = _b === void 0 ? '' : _b,\n _c = item.label,\n label = _c === void 0 ? '' : _c;\n var group = groupId >= 0 ? this._store.getGroupById(groupId) : null;\n this._store.dispatch((0, items_1.highlightItem)(id, false));\n this.passedElement.triggerEvent(constants_1.EVENTS.highlightItem, {\n id: id,\n value: value,\n label: label,\n groupValue: group && group.value ? group.value : null\n });\n return this;\n };\n Choices.prototype.highlightAll = function () {\n var _this = this;\n this._store.items.forEach(function (item) {\n return _this.highlightItem(item);\n });\n return this;\n };\n Choices.prototype.unhighlightAll = function () {\n var _this = this;\n this._store.items.forEach(function (item) {\n return _this.unhighlightItem(item);\n });\n return this;\n };\n Choices.prototype.removeActiveItemsByValue = function (value) {\n var _this = this;\n this._store.activeItems.filter(function (item) {\n return item.value === value;\n }).forEach(function (item) {\n return _this._removeItem(item);\n });\n return this;\n };\n Choices.prototype.removeActiveItems = function (excludedId) {\n var _this = this;\n this._store.activeItems.filter(function (_a) {\n var id = _a.id;\n return id !== excludedId;\n }).forEach(function (item) {\n return _this._removeItem(item);\n });\n return this;\n };\n Choices.prototype.removeHighlightedItems = function (runEvent) {\n var _this = this;\n if (runEvent === void 0) {\n runEvent = false;\n }\n this._store.highlightedActiveItems.forEach(function (item) {\n _this._removeItem(item);\n // If this action was performed by the user\n // trigger the event\n if (runEvent) {\n _this._triggerChange(item.value);\n }\n });\n return this;\n };\n Choices.prototype.showDropdown = function (preventInputFocus) {\n var _this = this;\n if (this.dropdown.isActive) {\n return this;\n }\n requestAnimationFrame(function () {\n _this.dropdown.show();\n _this.containerOuter.open(_this.dropdown.distanceFromTopWindow);\n if (!preventInputFocus && _this._canSearch) {\n _this.input.focus();\n }\n _this.passedElement.triggerEvent(constants_1.EVENTS.showDropdown, {});\n });\n return this;\n };\n Choices.prototype.hideDropdown = function (preventInputBlur) {\n var _this = this;\n if (!this.dropdown.isActive) {\n return this;\n }\n requestAnimationFrame(function () {\n _this.dropdown.hide();\n _this.containerOuter.close();\n if (!preventInputBlur && _this._canSearch) {\n _this.input.removeActiveDescendant();\n _this.input.blur();\n }\n _this.passedElement.triggerEvent(constants_1.EVENTS.hideDropdown, {});\n });\n return this;\n };\n Choices.prototype.getValue = function (valueOnly) {\n if (valueOnly === void 0) {\n valueOnly = false;\n }\n var values = this._store.activeItems.reduce(function (selectedItems, item) {\n var itemValue = valueOnly ? item.value : item;\n selectedItems.push(itemValue);\n return selectedItems;\n }, []);\n return this._isSelectOneElement ? values[0] : values;\n };\n Choices.prototype.setValue = function (items) {\n var _this = this;\n if (!this.initialised) {\n return this;\n }\n items.forEach(function (value) {\n return _this._setChoiceOrItem(value);\n });\n return this;\n };\n Choices.prototype.setChoiceByValue = function (value) {\n var _this = this;\n if (!this.initialised || this._isTextElement) {\n return this;\n }\n // If only one value has been passed, convert to array\n var choiceValue = Array.isArray(value) ? value : [value];\n // Loop through each value and\n choiceValue.forEach(function (val) {\n return _this._findAndSelectChoiceByValue(val);\n });\n return this;\n };\n /**\n * Set choices of select input via an array of objects (or function that returns array of object or promise of it),\n * a value field name and a label field name.\n * This behaves the same as passing items via the choices option but can be called after initialising Choices.\n * This can also be used to add groups of choices (see example 2); Optionally pass a true `replaceChoices` value to remove any existing choices.\n * Optionally pass a `customProperties` object to add additional data to your choices (useful when searching/filtering etc).\n *\n * **Input types affected:** select-one, select-multiple\n *\n * @example\n * ```js\n * const example = new Choices(element);\n *\n * example.setChoices([\n * {value: 'One', label: 'Label One', disabled: true},\n * {value: 'Two', label: 'Label Two', selected: true},\n * {value: 'Three', label: 'Label Three'},\n * ], 'value', 'label', false);\n * ```\n *\n * @example\n * ```js\n * const example = new Choices(element);\n *\n * example.setChoices(async () => {\n * try {\n * const items = await fetch('/items');\n * return items.json()\n * } catch(err) {\n * console.error(err)\n * }\n * });\n * ```\n *\n * @example\n * ```js\n * const example = new Choices(element);\n *\n * example.setChoices([{\n * label: 'Group one',\n * id: 1,\n * disabled: false,\n * choices: [\n * {value: 'Child One', label: 'Child One', selected: true},\n * {value: 'Child Two', label: 'Child Two', disabled: true},\n * {value: 'Child Three', label: 'Child Three'},\n * ]\n * },\n * {\n * label: 'Group two',\n * id: 2,\n * disabled: false,\n * choices: [\n * {value: 'Child Four', label: 'Child Four', disabled: true},\n * {value: 'Child Five', label: 'Child Five'},\n * {value: 'Child Six', label: 'Child Six', customProperties: {\n * description: 'Custom description about child six',\n * random: 'Another random custom property'\n * }},\n * ]\n * }], 'value', 'label', false);\n * ```\n */\n Choices.prototype.setChoices = function (choicesArrayOrFetcher, value, label, replaceChoices) {\n var _this = this;\n if (choicesArrayOrFetcher === void 0) {\n choicesArrayOrFetcher = [];\n }\n if (value === void 0) {\n value = 'value';\n }\n if (label === void 0) {\n label = 'label';\n }\n if (replaceChoices === void 0) {\n replaceChoices = false;\n }\n if (!this.initialised) {\n throw new ReferenceError(\"setChoices was called on a non-initialized instance of Choices\");\n }\n if (!this._isSelectElement) {\n throw new TypeError(\"setChoices can't be used with INPUT based Choices\");\n }\n if (typeof value !== 'string' || !value) {\n throw new TypeError(\"value parameter must be a name of 'value' field in passed objects\");\n }\n // Clear choices if needed\n if (replaceChoices) {\n this.clearChoices();\n }\n if (typeof choicesArrayOrFetcher === 'function') {\n // it's a choices fetcher function\n var fetcher_1 = choicesArrayOrFetcher(this);\n if (typeof Promise === 'function' && fetcher_1 instanceof Promise) {\n // that's a promise\n // eslint-disable-next-line no-promise-executor-return\n return new Promise(function (resolve) {\n return requestAnimationFrame(resolve);\n }).then(function () {\n return _this._handleLoadingState(true);\n }).then(function () {\n return fetcher_1;\n }).then(function (data) {\n return _this.setChoices(data, value, label, replaceChoices);\n }).catch(function (err) {\n if (!_this.config.silent) {\n console.error(err);\n }\n }).then(function () {\n return _this._handleLoadingState(false);\n }).then(function () {\n return _this;\n });\n }\n // function returned something else than promise, let's check if it's an array of choices\n if (!Array.isArray(fetcher_1)) {\n throw new TypeError(\".setChoices first argument function must return either array of choices or Promise, got: \".concat(typeof fetcher_1));\n }\n // recursion with results, it's sync and choices were cleared already\n return this.setChoices(fetcher_1, value, label, false);\n }\n if (!Array.isArray(choicesArrayOrFetcher)) {\n throw new TypeError(\".setChoices must be called either with array of choices with a function resulting into Promise of array of choices\");\n }\n this.containerOuter.removeLoadingState();\n this._startLoading();\n choicesArrayOrFetcher.forEach(function (groupOrChoice) {\n if (groupOrChoice.choices) {\n _this._addGroup({\n id: groupOrChoice.id ? parseInt(\"\".concat(groupOrChoice.id), 10) : null,\n group: groupOrChoice,\n valueKey: value,\n labelKey: label\n });\n } else {\n var choice = groupOrChoice;\n _this._addChoice({\n value: choice[value],\n label: choice[label],\n isSelected: !!choice.selected,\n isDisabled: !!choice.disabled,\n placeholder: !!choice.placeholder,\n customProperties: choice.customProperties\n });\n }\n });\n this._stopLoading();\n return this;\n };\n Choices.prototype.clearChoices = function () {\n this._store.dispatch((0, choices_1.clearChoices)());\n return this;\n };\n Choices.prototype.clearStore = function () {\n this._store.dispatch((0, misc_1.clearAll)());\n return this;\n };\n Choices.prototype.clearInput = function () {\n var shouldSetInputWidth = !this._isSelectOneElement;\n this.input.clear(shouldSetInputWidth);\n if (!this._isTextElement && this._canSearch) {\n this._isSearching = false;\n this._store.dispatch((0, choices_1.activateChoices)(true));\n }\n return this;\n };\n Choices.prototype._render = function () {\n if (this._store.isLoading()) {\n return;\n }\n this._currentState = this._store.state;\n var stateChanged = this._currentState.choices !== this._prevState.choices || this._currentState.groups !== this._prevState.groups || this._currentState.items !== this._prevState.items;\n var shouldRenderChoices = this._isSelectElement;\n var shouldRenderItems = this._currentState.items !== this._prevState.items;\n if (!stateChanged) {\n return;\n }\n if (shouldRenderChoices) {\n this._renderChoices();\n }\n if (shouldRenderItems) {\n this._renderItems();\n }\n this._prevState = this._currentState;\n };\n Choices.prototype._renderChoices = function () {\n var _this = this;\n var _a = this._store,\n activeGroups = _a.activeGroups,\n activeChoices = _a.activeChoices;\n var choiceListFragment = document.createDocumentFragment();\n this.choiceList.clear();\n if (this.config.resetScrollPosition) {\n requestAnimationFrame(function () {\n return _this.choiceList.scrollToTop();\n });\n }\n // If we have grouped options\n if (activeGroups.length >= 1 && !this._isSearching) {\n // If we have a placeholder choice along with groups\n var activePlaceholders = activeChoices.filter(function (activeChoice) {\n return activeChoice.placeholder === true && activeChoice.groupId === -1;\n });\n if (activePlaceholders.length >= 1) {\n choiceListFragment = this._createChoicesFragment(activePlaceholders, choiceListFragment);\n }\n choiceListFragment = this._createGroupsFragment(activeGroups, activeChoices, choiceListFragment);\n } else if (activeChoices.length >= 1) {\n choiceListFragment = this._createChoicesFragment(activeChoices, choiceListFragment);\n }\n // If we have choices to show\n if (choiceListFragment.childNodes && choiceListFragment.childNodes.length > 0) {\n var activeItems = this._store.activeItems;\n var canAddItem = this._canAddItem(activeItems, this.input.value);\n // ...and we can select them\n if (canAddItem.response) {\n // ...append them and highlight the first choice\n this.choiceList.append(choiceListFragment);\n this._highlightChoice();\n } else {\n var notice = this._getTemplate('notice', canAddItem.notice);\n this.choiceList.append(notice);\n }\n } else {\n // Otherwise show a notice\n var dropdownItem = void 0;\n var notice = void 0;\n if (this._isSearching) {\n notice = typeof this.config.noResultsText === 'function' ? this.config.noResultsText() : this.config.noResultsText;\n dropdownItem = this._getTemplate('notice', notice, 'no-results');\n } else {\n notice = typeof this.config.noChoicesText === 'function' ? this.config.noChoicesText() : this.config.noChoicesText;\n dropdownItem = this._getTemplate('notice', notice, 'no-choices');\n }\n this.choiceList.append(dropdownItem);\n }\n };\n Choices.prototype._renderItems = function () {\n var activeItems = this._store.activeItems || [];\n this.itemList.clear();\n // Create a fragment to store our list items\n // (so we don't have to update the DOM for each item)\n var itemListFragment = this._createItemsFragment(activeItems);\n // If we have items to add, append them\n if (itemListFragment.childNodes) {\n this.itemList.append(itemListFragment);\n }\n };\n Choices.prototype._createGroupsFragment = function (groups, choices, fragment) {\n var _this = this;\n if (fragment === void 0) {\n fragment = document.createDocumentFragment();\n }\n var getGroupChoices = function (group) {\n return choices.filter(function (choice) {\n if (_this._isSelectOneElement) {\n return choice.groupId === group.id;\n }\n return choice.groupId === group.id && (_this.config.renderSelectedChoices === 'always' || !choice.selected);\n });\n };\n // If sorting is enabled, filter groups\n if (this.config.shouldSort) {\n groups.sort(this.config.sorter);\n }\n groups.forEach(function (group) {\n var groupChoices = getGroupChoices(group);\n if (groupChoices.length >= 1) {\n var dropdownGroup = _this._getTemplate('choiceGroup', group);\n fragment.appendChild(dropdownGroup);\n _this._createChoicesFragment(groupChoices, fragment, true);\n }\n });\n return fragment;\n };\n Choices.prototype._createChoicesFragment = function (choices, fragment, withinGroup) {\n var _this = this;\n if (fragment === void 0) {\n fragment = document.createDocumentFragment();\n }\n if (withinGroup === void 0) {\n withinGroup = false;\n }\n // Create a fragment to store our list items (so we don't have to update the DOM for each item)\n var _a = this.config,\n renderSelectedChoices = _a.renderSelectedChoices,\n searchResultLimit = _a.searchResultLimit,\n renderChoiceLimit = _a.renderChoiceLimit;\n var filter = this._isSearching ? utils_1.sortByScore : this.config.sorter;\n var appendChoice = function (choice) {\n var shouldRender = renderSelectedChoices === 'auto' ? _this._isSelectOneElement || !choice.selected : true;\n if (shouldRender) {\n var dropdownItem = _this._getTemplate('choice', choice, _this.config.itemSelectText);\n fragment.appendChild(dropdownItem);\n }\n };\n var rendererableChoices = choices;\n if (renderSelectedChoices === 'auto' && !this._isSelectOneElement) {\n rendererableChoices = choices.filter(function (choice) {\n return !choice.selected;\n });\n }\n // Split array into placeholders and \"normal\" choices\n var _b = rendererableChoices.reduce(function (acc, choice) {\n if (choice.placeholder) {\n acc.placeholderChoices.push(choice);\n } else {\n acc.normalChoices.push(choice);\n }\n return acc;\n }, {\n placeholderChoices: [],\n normalChoices: []\n }),\n placeholderChoices = _b.placeholderChoices,\n normalChoices = _b.normalChoices;\n // If sorting is enabled or the user is searching, filter choices\n if (this.config.shouldSort || this._isSearching) {\n normalChoices.sort(filter);\n }\n var choiceLimit = rendererableChoices.length;\n // Prepend placeholeder\n var sortedChoices = this._isSelectOneElement ? __spreadArray(__spreadArray([], placeholderChoices, true), normalChoices, true) : normalChoices;\n if (this._isSearching) {\n choiceLimit = searchResultLimit;\n } else if (renderChoiceLimit && renderChoiceLimit > 0 && !withinGroup) {\n choiceLimit = renderChoiceLimit;\n }\n // Add each choice to dropdown within range\n for (var i = 0; i < choiceLimit; i += 1) {\n if (sortedChoices[i]) {\n appendChoice(sortedChoices[i]);\n }\n }\n return fragment;\n };\n Choices.prototype._createItemsFragment = function (items, fragment) {\n var _this = this;\n if (fragment === void 0) {\n fragment = document.createDocumentFragment();\n }\n // Create fragment to add elements to\n var _a = this.config,\n shouldSortItems = _a.shouldSortItems,\n sorter = _a.sorter,\n removeItemButton = _a.removeItemButton;\n // If sorting is enabled, filter items\n if (shouldSortItems && !this._isSelectOneElement) {\n items.sort(sorter);\n }\n if (this._isTextElement) {\n // Update the value of the hidden input\n this.passedElement.value = items.map(function (_a) {\n var value = _a.value;\n return value;\n }).join(this.config.delimiter);\n } else {\n // Update the options of the hidden input\n this.passedElement.options = items;\n }\n var addItemToFragment = function (item) {\n // Create new list element\n var listItem = _this._getTemplate('item', item, removeItemButton);\n // Append it to list\n fragment.appendChild(listItem);\n };\n // Add each list item to list\n items.forEach(addItemToFragment);\n return fragment;\n };\n Choices.prototype._triggerChange = function (value) {\n if (value === undefined || value === null) {\n return;\n }\n this.passedElement.triggerEvent(constants_1.EVENTS.change, {\n value: value\n });\n };\n Choices.prototype._selectPlaceholderChoice = function (placeholderChoice) {\n this._addItem({\n value: placeholderChoice.value,\n label: placeholderChoice.label,\n choiceId: placeholderChoice.id,\n groupId: placeholderChoice.groupId,\n placeholder: placeholderChoice.placeholder\n });\n this._triggerChange(placeholderChoice.value);\n };\n Choices.prototype._handleButtonAction = function (activeItems, element) {\n if (!activeItems || !element || !this.config.removeItems || !this.config.removeItemButton) {\n return;\n }\n var itemId = element.parentNode && element.parentNode.dataset.id;\n var itemToRemove = itemId && activeItems.find(function (item) {\n return item.id === parseInt(itemId, 10);\n });\n if (!itemToRemove) {\n return;\n }\n // Remove item associated with button\n this._removeItem(itemToRemove);\n this._triggerChange(itemToRemove.value);\n if (this._isSelectOneElement && this._store.placeholderChoice) {\n this._selectPlaceholderChoice(this._store.placeholderChoice);\n }\n };\n Choices.prototype._handleItemAction = function (activeItems, element, hasShiftKey) {\n var _this = this;\n if (hasShiftKey === void 0) {\n hasShiftKey = false;\n }\n if (!activeItems || !element || !this.config.removeItems || this._isSelectOneElement) {\n return;\n }\n var passedId = element.dataset.id;\n // We only want to select one item with a click\n // so we deselect any items that aren't the target\n // unless shift is being pressed\n activeItems.forEach(function (item) {\n if (item.id === parseInt(\"\".concat(passedId), 10) && !item.highlighted) {\n _this.highlightItem(item);\n } else if (!hasShiftKey && item.highlighted) {\n _this.unhighlightItem(item);\n }\n });\n // Focus input as without focus, a user cannot do anything with a\n // highlighted item\n this.input.focus();\n };\n Choices.prototype._handleChoiceAction = function (activeItems, element) {\n if (!activeItems || !element) {\n return;\n }\n // If we are clicking on an option\n var id = element.dataset.id;\n var choice = id && this._store.getChoiceById(id);\n if (!choice) {\n return;\n }\n var passedKeyCode = activeItems[0] && activeItems[0].keyCode ? activeItems[0].keyCode : undefined;\n var hasActiveDropdown = this.dropdown.isActive;\n // Update choice keyCode\n choice.keyCode = passedKeyCode;\n this.passedElement.triggerEvent(constants_1.EVENTS.choice, {\n choice: choice\n });\n if (!choice.selected && !choice.disabled) {\n var canAddItem = this._canAddItem(activeItems, choice.value);\n if (canAddItem.response) {\n this._addItem({\n value: choice.value,\n label: choice.label,\n choiceId: choice.id,\n groupId: choice.groupId,\n customProperties: choice.customProperties,\n placeholder: choice.placeholder,\n keyCode: choice.keyCode\n });\n this._triggerChange(choice.value);\n }\n }\n this.clearInput();\n // We want to close the dropdown if we are dealing with a single select box\n if (hasActiveDropdown && this._isSelectOneElement) {\n this.hideDropdown(true);\n this.containerOuter.focus();\n }\n };\n Choices.prototype._handleBackspace = function (activeItems) {\n if (!this.config.removeItems || !activeItems) {\n return;\n }\n var lastItem = activeItems[activeItems.length - 1];\n var hasHighlightedItems = activeItems.some(function (item) {\n return item.highlighted;\n });\n // If editing the last item is allowed and there are not other selected items,\n // we can edit the item value. Otherwise if we can remove items, remove all selected items\n if (this.config.editItems && !hasHighlightedItems && lastItem) {\n this.input.value = lastItem.value;\n this.input.setWidth();\n this._removeItem(lastItem);\n this._triggerChange(lastItem.value);\n } else {\n if (!hasHighlightedItems) {\n // Highlight last item if none already highlighted\n this.highlightItem(lastItem, false);\n }\n this.removeHighlightedItems(true);\n }\n };\n Choices.prototype._startLoading = function () {\n this._store.dispatch((0, misc_1.setIsLoading)(true));\n };\n Choices.prototype._stopLoading = function () {\n this._store.dispatch((0, misc_1.setIsLoading)(false));\n };\n Choices.prototype._handleLoadingState = function (setLoading) {\n if (setLoading === void 0) {\n setLoading = true;\n }\n var placeholderItem = this.itemList.getChild(\".\".concat(this.config.classNames.placeholder));\n if (setLoading) {\n this.disable();\n this.containerOuter.addLoadingState();\n if (this._isSelectOneElement) {\n if (!placeholderItem) {\n placeholderItem = this._getTemplate('placeholder', this.config.loadingText);\n if (placeholderItem) {\n this.itemList.append(placeholderItem);\n }\n } else {\n placeholderItem.innerHTML = this.config.loadingText;\n }\n } else {\n this.input.placeholder = this.config.loadingText;\n }\n } else {\n this.enable();\n this.containerOuter.removeLoadingState();\n if (this._isSelectOneElement) {\n if (placeholderItem) {\n placeholderItem.innerHTML = this._placeholderValue || '';\n }\n } else {\n this.input.placeholder = this._placeholderValue || '';\n }\n }\n };\n Choices.prototype._handleSearch = function (value) {\n if (!this.input.isFocussed) {\n return;\n }\n var choices = this._store.choices;\n var _a = this.config,\n searchFloor = _a.searchFloor,\n searchChoices = _a.searchChoices;\n var hasUnactiveChoices = choices.some(function (option) {\n return !option.active;\n });\n // Check that we have a value to search and the input was an alphanumeric character\n if (value !== null && typeof value !== 'undefined' && value.length >= searchFloor) {\n var resultCount = searchChoices ? this._searchChoices(value) : 0;\n // Trigger search event\n this.passedElement.triggerEvent(constants_1.EVENTS.search, {\n value: value,\n resultCount: resultCount\n });\n } else if (hasUnactiveChoices) {\n // Otherwise reset choices to active\n this._isSearching = false;\n this._store.dispatch((0, choices_1.activateChoices)(true));\n }\n };\n Choices.prototype._canAddItem = function (activeItems, value) {\n var canAddItem = true;\n var notice = typeof this.config.addItemText === 'function' ? this.config.addItemText(value) : this.config.addItemText;\n if (!this._isSelectOneElement) {\n var isDuplicateValue = (0, utils_1.existsInArray)(activeItems, value);\n if (this.config.maxItemCount > 0 && this.config.maxItemCount <= activeItems.length) {\n // If there is a max entry limit and we have reached that limit\n // don't update\n canAddItem = false;\n notice = typeof this.config.maxItemText === 'function' ? this.config.maxItemText(this.config.maxItemCount) : this.config.maxItemText;\n }\n if (!this.config.duplicateItemsAllowed && isDuplicateValue && canAddItem) {\n canAddItem = false;\n notice = typeof this.config.uniqueItemText === 'function' ? this.config.uniqueItemText(value) : this.config.uniqueItemText;\n }\n if (this._isTextElement && this.config.addItems && canAddItem && typeof this.config.addItemFilter === 'function' && !this.config.addItemFilter(value)) {\n canAddItem = false;\n notice = typeof this.config.customAddItemText === 'function' ? this.config.customAddItemText(value) : this.config.customAddItemText;\n }\n }\n return {\n response: canAddItem,\n notice: notice\n };\n };\n Choices.prototype._searchChoices = function (value) {\n var newValue = typeof value === 'string' ? value.trim() : value;\n var currentValue = typeof this._currentValue === 'string' ? this._currentValue.trim() : this._currentValue;\n if (newValue.length < 1 && newValue === \"\".concat(currentValue, \" \")) {\n return 0;\n }\n // If new value matches the desired length and is not the same as the current value with a space\n var haystack = this._store.searchableChoices;\n var needle = newValue;\n var options = Object.assign(this.config.fuseOptions, {\n keys: __spreadArray([], this.config.searchFields, true),\n includeMatches: true\n });\n var fuse = new fuse_js_1.default(haystack, options);\n var results = fuse.search(needle); // see https://github.com/krisk/Fuse/issues/303\n this._currentValue = newValue;\n this._highlightPosition = 0;\n this._isSearching = true;\n this._store.dispatch((0, choices_1.filterChoices)(results));\n return results.length;\n };\n Choices.prototype._addEventListeners = function () {\n var documentElement = this.config.shadowRoot || document.documentElement;\n // capture events - can cancel event processing or propagation\n documentElement.addEventListener('touchend', this._onTouchEnd, true);\n this.containerOuter.element.addEventListener('keydown', this._onKeyDown, true);\n this.containerOuter.element.addEventListener('mousedown', this._onMouseDown, true);\n // passive events - doesn't call `preventDefault` or `stopPropagation`\n documentElement.addEventListener('click', this._onClick, {\n passive: true\n });\n documentElement.addEventListener('touchmove', this._onTouchMove, {\n passive: true\n });\n this.dropdown.element.addEventListener('mouseover', this._onMouseOver, {\n passive: true\n });\n if (this._isSelectOneElement) {\n this.containerOuter.element.addEventListener('focus', this._onFocus, {\n passive: true\n });\n this.containerOuter.element.addEventListener('blur', this._onBlur, {\n passive: true\n });\n }\n this.input.element.addEventListener('keyup', this._onKeyUp, {\n passive: true\n });\n this.input.element.addEventListener('focus', this._onFocus, {\n passive: true\n });\n this.input.element.addEventListener('blur', this._onBlur, {\n passive: true\n });\n if (this.input.element.form) {\n this.input.element.form.addEventListener('reset', this._onFormReset, {\n passive: true\n });\n }\n this.input.addEventListeners();\n };\n Choices.prototype._removeEventListeners = function () {\n var documentElement = this.config.shadowRoot || document.documentElement;\n documentElement.removeEventListener('touchend', this._onTouchEnd, true);\n this.containerOuter.element.removeEventListener('keydown', this._onKeyDown, true);\n this.containerOuter.element.removeEventListener('mousedown', this._onMouseDown, true);\n documentElement.removeEventListener('click', this._onClick);\n documentElement.removeEventListener('touchmove', this._onTouchMove);\n this.dropdown.element.removeEventListener('mouseover', this._onMouseOver);\n if (this._isSelectOneElement) {\n this.containerOuter.element.removeEventListener('focus', this._onFocus);\n this.containerOuter.element.removeEventListener('blur', this._onBlur);\n }\n this.input.element.removeEventListener('keyup', this._onKeyUp);\n this.input.element.removeEventListener('focus', this._onFocus);\n this.input.element.removeEventListener('blur', this._onBlur);\n if (this.input.element.form) {\n this.input.element.form.removeEventListener('reset', this._onFormReset);\n }\n this.input.removeEventListeners();\n };\n Choices.prototype._onKeyDown = function (event) {\n var keyCode = event.keyCode;\n var activeItems = this._store.activeItems;\n var hasFocusedInput = this.input.isFocussed;\n var hasActiveDropdown = this.dropdown.isActive;\n var hasItems = this.itemList.hasChildren();\n var keyString = String.fromCharCode(keyCode);\n // eslint-disable-next-line no-control-regex\n var wasPrintableChar = /[^\\x00-\\x1F]/.test(keyString);\n var BACK_KEY = constants_1.KEY_CODES.BACK_KEY,\n DELETE_KEY = constants_1.KEY_CODES.DELETE_KEY,\n ENTER_KEY = constants_1.KEY_CODES.ENTER_KEY,\n A_KEY = constants_1.KEY_CODES.A_KEY,\n ESC_KEY = constants_1.KEY_CODES.ESC_KEY,\n UP_KEY = constants_1.KEY_CODES.UP_KEY,\n DOWN_KEY = constants_1.KEY_CODES.DOWN_KEY,\n PAGE_UP_KEY = constants_1.KEY_CODES.PAGE_UP_KEY,\n PAGE_DOWN_KEY = constants_1.KEY_CODES.PAGE_DOWN_KEY;\n if (!this._isTextElement && !hasActiveDropdown && wasPrintableChar) {\n this.showDropdown();\n if (!this.input.isFocussed) {\n /*\n We update the input value with the pressed key as\n the input was not focussed at the time of key press\n therefore does not have the value of the key.\n */\n this.input.value += event.key.toLowerCase();\n }\n }\n switch (keyCode) {\n case A_KEY:\n return this._onSelectKey(event, hasItems);\n case ENTER_KEY:\n return this._onEnterKey({\n event: event,\n activeItems: activeItems,\n hasActiveDropdown: hasActiveDropdown\n });\n case ESC_KEY:\n return this._onEscapeKey(hasActiveDropdown);\n case UP_KEY:\n case PAGE_UP_KEY:\n case DOWN_KEY:\n case PAGE_DOWN_KEY:\n return this._onDirectionKey({\n event: event,\n hasActiveDropdown: hasActiveDropdown\n });\n case DELETE_KEY:\n case BACK_KEY:\n return this._onDeleteKey(event, activeItems, hasFocusedInput);\n default:\n }\n };\n Choices.prototype._onKeyUp = function (_a) {\n var target = _a.target,\n keyCode = _a.keyCode;\n var value = this.input.value;\n var activeItems = this._store.activeItems;\n var canAddItem = this._canAddItem(activeItems, value);\n var backKey = constants_1.KEY_CODES.BACK_KEY,\n deleteKey = constants_1.KEY_CODES.DELETE_KEY;\n // We are typing into a text input and have a value, we want to show a dropdown\n // notice. Otherwise hide the dropdown\n if (this._isTextElement) {\n var canShowDropdownNotice = canAddItem.notice && value;\n if (canShowDropdownNotice) {\n var dropdownItem = this._getTemplate('notice', canAddItem.notice);\n this.dropdown.element.innerHTML = dropdownItem.outerHTML;\n this.showDropdown(true);\n } else {\n this.hideDropdown(true);\n }\n } else {\n var wasRemovalKeyCode = keyCode === backKey || keyCode === deleteKey;\n var userHasRemovedValue = wasRemovalKeyCode && target && !target.value;\n var canReactivateChoices = !this._isTextElement && this._isSearching;\n var canSearch = this._canSearch && canAddItem.response;\n if (userHasRemovedValue && canReactivateChoices) {\n this._isSearching = false;\n this._store.dispatch((0, choices_1.activateChoices)(true));\n } else if (canSearch) {\n this._handleSearch(this.input.rawValue);\n }\n }\n this._canSearch = this.config.searchEnabled;\n };\n Choices.prototype._onSelectKey = function (event, hasItems) {\n var ctrlKey = event.ctrlKey,\n metaKey = event.metaKey;\n var hasCtrlDownKeyPressed = ctrlKey || metaKey;\n // If CTRL + A or CMD + A have been pressed and there are items to select\n if (hasCtrlDownKeyPressed && hasItems) {\n this._canSearch = false;\n var shouldHightlightAll = this.config.removeItems && !this.input.value && this.input.element === document.activeElement;\n if (shouldHightlightAll) {\n this.highlightAll();\n }\n }\n };\n Choices.prototype._onEnterKey = function (eventArgs) {\n var event = eventArgs.event,\n activeItems = eventArgs.activeItems,\n hasActiveDropdown = eventArgs.hasActiveDropdown;\n var target = event.target;\n var enterKey = constants_1.KEY_CODES.ENTER_KEY;\n var targetWasButton = target && target.hasAttribute('data-button');\n if (this._isTextElement && target && target.value) {\n var value = this.input.value;\n var canAddItem = this._canAddItem(activeItems, value);\n if (canAddItem.response) {\n this.hideDropdown(true);\n this._addItem({\n value: value\n });\n this._triggerChange(value);\n this.clearInput();\n }\n }\n if (targetWasButton) {\n this._handleButtonAction(activeItems, target);\n event.preventDefault();\n }\n if (hasActiveDropdown) {\n var highlightedChoice = this.dropdown.getChild(\".\".concat(this.config.classNames.highlightedState));\n if (highlightedChoice) {\n // add enter keyCode value\n if (activeItems[0]) {\n activeItems[0].keyCode = enterKey; // eslint-disable-line no-param-reassign\n }\n\n this._handleChoiceAction(activeItems, highlightedChoice);\n }\n event.preventDefault();\n } else if (this._isSelectOneElement) {\n this.showDropdown();\n event.preventDefault();\n }\n };\n Choices.prototype._onEscapeKey = function (hasActiveDropdown) {\n if (hasActiveDropdown) {\n this.hideDropdown(true);\n this.containerOuter.focus();\n }\n };\n Choices.prototype._onDirectionKey = function (eventArgs) {\n var event = eventArgs.event,\n hasActiveDropdown = eventArgs.hasActiveDropdown;\n var keyCode = event.keyCode,\n metaKey = event.metaKey;\n var downKey = constants_1.KEY_CODES.DOWN_KEY,\n pageUpKey = constants_1.KEY_CODES.PAGE_UP_KEY,\n pageDownKey = constants_1.KEY_CODES.PAGE_DOWN_KEY;\n // If up or down key is pressed, traverse through options\n if (hasActiveDropdown || this._isSelectOneElement) {\n this.showDropdown();\n this._canSearch = false;\n var directionInt = keyCode === downKey || keyCode === pageDownKey ? 1 : -1;\n var skipKey = metaKey || keyCode === pageDownKey || keyCode === pageUpKey;\n var selectableChoiceIdentifier = '[data-choice-selectable]';\n var nextEl = void 0;\n if (skipKey) {\n if (directionInt > 0) {\n nextEl = this.dropdown.element.querySelector(\"\".concat(selectableChoiceIdentifier, \":last-of-type\"));\n } else {\n nextEl = this.dropdown.element.querySelector(selectableChoiceIdentifier);\n }\n } else {\n var currentEl = this.dropdown.element.querySelector(\".\".concat(this.config.classNames.highlightedState));\n if (currentEl) {\n nextEl = (0, utils_1.getAdjacentEl)(currentEl, selectableChoiceIdentifier, directionInt);\n } else {\n nextEl = this.dropdown.element.querySelector(selectableChoiceIdentifier);\n }\n }\n if (nextEl) {\n // We prevent default to stop the cursor moving\n // when pressing the arrow\n if (!(0, utils_1.isScrolledIntoView)(nextEl, this.choiceList.element, directionInt)) {\n this.choiceList.scrollToChildElement(nextEl, directionInt);\n }\n this._highlightChoice(nextEl);\n }\n // Prevent default to maintain cursor position whilst\n // traversing dropdown options\n event.preventDefault();\n }\n };\n Choices.prototype._onDeleteKey = function (event, activeItems, hasFocusedInput) {\n var target = event.target;\n // If backspace or delete key is pressed and the input has no value\n if (!this._isSelectOneElement && !target.value && hasFocusedInput) {\n this._handleBackspace(activeItems);\n event.preventDefault();\n }\n };\n Choices.prototype._onTouchMove = function () {\n if (this._wasTap) {\n this._wasTap = false;\n }\n };\n Choices.prototype._onTouchEnd = function (event) {\n var target = (event || event.touches[0]).target;\n var touchWasWithinContainer = this._wasTap && this.containerOuter.element.contains(target);\n if (touchWasWithinContainer) {\n var containerWasExactTarget = target === this.containerOuter.element || target === this.containerInner.element;\n if (containerWasExactTarget) {\n if (this._isTextElement) {\n this.input.focus();\n } else if (this._isSelectMultipleElement) {\n this.showDropdown();\n }\n }\n // Prevents focus event firing\n event.stopPropagation();\n }\n this._wasTap = true;\n };\n /**\n * Handles mousedown event in capture mode for containetOuter.element\n */\n Choices.prototype._onMouseDown = function (event) {\n var target = event.target;\n if (!(target instanceof HTMLElement)) {\n return;\n }\n // If we have our mouse down on the scrollbar and are on IE11...\n if (IS_IE11 && this.choiceList.element.contains(target)) {\n // check if click was on a scrollbar area\n var firstChoice = this.choiceList.element.firstElementChild;\n var isOnScrollbar = this._direction === 'ltr' ? event.offsetX >= firstChoice.offsetWidth : event.offsetX < firstChoice.offsetLeft;\n this._isScrollingOnIe = isOnScrollbar;\n }\n if (target === this.input.element) {\n return;\n }\n var item = target.closest('[data-button],[data-item],[data-choice]');\n if (item instanceof HTMLElement) {\n var hasShiftKey = event.shiftKey;\n var activeItems = this._store.activeItems;\n var dataset = item.dataset;\n if ('button' in dataset) {\n this._handleButtonAction(activeItems, item);\n } else if ('item' in dataset) {\n this._handleItemAction(activeItems, item, hasShiftKey);\n } else if ('choice' in dataset) {\n this._handleChoiceAction(activeItems, item);\n }\n }\n event.preventDefault();\n };\n /**\n * Handles mouseover event over this.dropdown\n * @param {MouseEvent} event\n */\n Choices.prototype._onMouseOver = function (_a) {\n var target = _a.target;\n if (target instanceof HTMLElement && 'choice' in target.dataset) {\n this._highlightChoice(target);\n }\n };\n Choices.prototype._onClick = function (_a) {\n var target = _a.target;\n var clickWasWithinContainer = this.containerOuter.element.contains(target);\n if (clickWasWithinContainer) {\n if (!this.dropdown.isActive && !this.containerOuter.isDisabled) {\n if (this._isTextElement) {\n if (document.activeElement !== this.input.element) {\n this.input.focus();\n }\n } else {\n this.showDropdown();\n this.containerOuter.focus();\n }\n } else if (this._isSelectOneElement && target !== this.input.element && !this.dropdown.element.contains(target)) {\n this.hideDropdown();\n }\n } else {\n var hasHighlightedItems = this._store.highlightedActiveItems.length > 0;\n if (hasHighlightedItems) {\n this.unhighlightAll();\n }\n this.containerOuter.removeFocusState();\n this.hideDropdown(true);\n }\n };\n Choices.prototype._onFocus = function (_a) {\n var _b;\n var _this = this;\n var target = _a.target;\n var focusWasWithinContainer = target && this.containerOuter.element.contains(target);\n if (!focusWasWithinContainer) {\n return;\n }\n var focusActions = (_b = {}, _b[constants_1.TEXT_TYPE] = function () {\n if (target === _this.input.element) {\n _this.containerOuter.addFocusState();\n }\n }, _b[constants_1.SELECT_ONE_TYPE] = function () {\n _this.containerOuter.addFocusState();\n if (target === _this.input.element) {\n _this.showDropdown(true);\n }\n }, _b[constants_1.SELECT_MULTIPLE_TYPE] = function () {\n if (target === _this.input.element) {\n _this.showDropdown(true);\n // If element is a select box, the focused element is the container and the dropdown\n // isn't already open, focus and show dropdown\n _this.containerOuter.addFocusState();\n }\n }, _b);\n focusActions[this.passedElement.element.type]();\n };\n Choices.prototype._onBlur = function (_a) {\n var _b;\n var _this = this;\n var target = _a.target;\n var blurWasWithinContainer = target && this.containerOuter.element.contains(target);\n if (blurWasWithinContainer && !this._isScrollingOnIe) {\n var activeItems = this._store.activeItems;\n var hasHighlightedItems_1 = activeItems.some(function (item) {\n return item.highlighted;\n });\n var blurActions = (_b = {}, _b[constants_1.TEXT_TYPE] = function () {\n if (target === _this.input.element) {\n _this.containerOuter.removeFocusState();\n if (hasHighlightedItems_1) {\n _this.unhighlightAll();\n }\n _this.hideDropdown(true);\n }\n }, _b[constants_1.SELECT_ONE_TYPE] = function () {\n _this.containerOuter.removeFocusState();\n if (target === _this.input.element || target === _this.containerOuter.element && !_this._canSearch) {\n _this.hideDropdown(true);\n }\n }, _b[constants_1.SELECT_MULTIPLE_TYPE] = function () {\n if (target === _this.input.element) {\n _this.containerOuter.removeFocusState();\n _this.hideDropdown(true);\n if (hasHighlightedItems_1) {\n _this.unhighlightAll();\n }\n }\n }, _b);\n blurActions[this.passedElement.element.type]();\n } else {\n // On IE11, clicking the scollbar blurs our input and thus\n // closes the dropdown. To stop this, we refocus our input\n // if we know we are on IE *and* are scrolling.\n this._isScrollingOnIe = false;\n this.input.element.focus();\n }\n };\n Choices.prototype._onFormReset = function () {\n this._store.dispatch((0, misc_1.resetTo)(this._initialState));\n };\n Choices.prototype._highlightChoice = function (el) {\n var _this = this;\n if (el === void 0) {\n el = null;\n }\n var choices = Array.from(this.dropdown.element.querySelectorAll('[data-choice-selectable]'));\n if (!choices.length) {\n return;\n }\n var passedEl = el;\n var highlightedChoices = Array.from(this.dropdown.element.querySelectorAll(\".\".concat(this.config.classNames.highlightedState)));\n // Remove any highlighted choices\n highlightedChoices.forEach(function (choice) {\n choice.classList.remove(_this.config.classNames.highlightedState);\n choice.setAttribute('aria-selected', 'false');\n });\n if (passedEl) {\n this._highlightPosition = choices.indexOf(passedEl);\n } else {\n // Highlight choice based on last known highlight location\n if (choices.length > this._highlightPosition) {\n // If we have an option to highlight\n passedEl = choices[this._highlightPosition];\n } else {\n // Otherwise highlight the option before\n passedEl = choices[choices.length - 1];\n }\n if (!passedEl) {\n passedEl = choices[0];\n }\n }\n passedEl.classList.add(this.config.classNames.highlightedState);\n passedEl.setAttribute('aria-selected', 'true');\n this.passedElement.triggerEvent(constants_1.EVENTS.highlightChoice, {\n el: passedEl\n });\n if (this.dropdown.isActive) {\n // IE11 ignores aria-label and blocks virtual keyboard\n // if aria-activedescendant is set without a dropdown\n this.input.setActiveDescendant(passedEl.id);\n this.containerOuter.setActiveDescendant(passedEl.id);\n }\n };\n Choices.prototype._addItem = function (_a) {\n var value = _a.value,\n _b = _a.label,\n label = _b === void 0 ? null : _b,\n _c = _a.choiceId,\n choiceId = _c === void 0 ? -1 : _c,\n _d = _a.groupId,\n groupId = _d === void 0 ? -1 : _d,\n _e = _a.customProperties,\n customProperties = _e === void 0 ? {} : _e,\n _f = _a.placeholder,\n placeholder = _f === void 0 ? false : _f,\n _g = _a.keyCode,\n keyCode = _g === void 0 ? -1 : _g;\n var passedValue = typeof value === 'string' ? value.trim() : value;\n var items = this._store.items;\n var passedLabel = label || passedValue;\n var passedOptionId = choiceId || -1;\n var group = groupId >= 0 ? this._store.getGroupById(groupId) : null;\n var id = items ? items.length + 1 : 1;\n // If a prepended value has been passed, prepend it\n if (this.config.prependValue) {\n passedValue = this.config.prependValue + passedValue.toString();\n }\n // If an appended value has been passed, append it\n if (this.config.appendValue) {\n passedValue += this.config.appendValue.toString();\n }\n this._store.dispatch((0, items_1.addItem)({\n value: passedValue,\n label: passedLabel,\n id: id,\n choiceId: passedOptionId,\n groupId: groupId,\n customProperties: customProperties,\n placeholder: placeholder,\n keyCode: keyCode\n }));\n if (this._isSelectOneElement) {\n this.removeActiveItems(id);\n }\n // Trigger change event\n this.passedElement.triggerEvent(constants_1.EVENTS.addItem, {\n id: id,\n value: passedValue,\n label: passedLabel,\n customProperties: customProperties,\n groupValue: group && group.value ? group.value : null,\n keyCode: keyCode\n });\n };\n Choices.prototype._removeItem = function (item) {\n var id = item.id,\n value = item.value,\n label = item.label,\n customProperties = item.customProperties,\n choiceId = item.choiceId,\n groupId = item.groupId;\n var group = groupId && groupId >= 0 ? this._store.getGroupById(groupId) : null;\n if (!id || !choiceId) {\n return;\n }\n this._store.dispatch((0, items_1.removeItem)(id, choiceId));\n this.passedElement.triggerEvent(constants_1.EVENTS.removeItem, {\n id: id,\n value: value,\n label: label,\n customProperties: customProperties,\n groupValue: group && group.value ? group.value : null\n });\n };\n Choices.prototype._addChoice = function (_a) {\n var value = _a.value,\n _b = _a.label,\n label = _b === void 0 ? null : _b,\n _c = _a.isSelected,\n isSelected = _c === void 0 ? false : _c,\n _d = _a.isDisabled,\n isDisabled = _d === void 0 ? false : _d,\n _e = _a.groupId,\n groupId = _e === void 0 ? -1 : _e,\n _f = _a.customProperties,\n customProperties = _f === void 0 ? {} : _f,\n _g = _a.placeholder,\n placeholder = _g === void 0 ? false : _g,\n _h = _a.keyCode,\n keyCode = _h === void 0 ? -1 : _h;\n if (typeof value === 'undefined' || value === null) {\n return;\n }\n // Generate unique id\n var choices = this._store.choices;\n var choiceLabel = label || value;\n var choiceId = choices ? choices.length + 1 : 1;\n var choiceElementId = \"\".concat(this._baseId, \"-\").concat(this._idNames.itemChoice, \"-\").concat(choiceId);\n this._store.dispatch((0, choices_1.addChoice)({\n id: choiceId,\n groupId: groupId,\n elementId: choiceElementId,\n value: value,\n label: choiceLabel,\n disabled: isDisabled,\n customProperties: customProperties,\n placeholder: placeholder,\n keyCode: keyCode\n }));\n if (isSelected) {\n this._addItem({\n value: value,\n label: choiceLabel,\n choiceId: choiceId,\n customProperties: customProperties,\n placeholder: placeholder,\n keyCode: keyCode\n });\n }\n };\n Choices.prototype._addGroup = function (_a) {\n var _this = this;\n var group = _a.group,\n id = _a.id,\n _b = _a.valueKey,\n valueKey = _b === void 0 ? 'value' : _b,\n _c = _a.labelKey,\n labelKey = _c === void 0 ? 'label' : _c;\n var groupChoices = (0, utils_1.isType)('Object', group) ? group.choices : Array.from(group.getElementsByTagName('OPTION'));\n var groupId = id || Math.floor(new Date().valueOf() * Math.random());\n var isDisabled = group.disabled ? group.disabled : false;\n if (groupChoices) {\n this._store.dispatch((0, groups_1.addGroup)({\n value: group.label,\n id: groupId,\n active: true,\n disabled: isDisabled\n }));\n var addGroupChoices = function (choice) {\n var isOptDisabled = choice.disabled || choice.parentNode && choice.parentNode.disabled;\n _this._addChoice({\n value: choice[valueKey],\n label: (0, utils_1.isType)('Object', choice) ? choice[labelKey] : choice.innerHTML,\n isSelected: choice.selected,\n isDisabled: isOptDisabled,\n groupId: groupId,\n customProperties: choice.customProperties,\n placeholder: choice.placeholder\n });\n };\n groupChoices.forEach(addGroupChoices);\n } else {\n this._store.dispatch((0, groups_1.addGroup)({\n value: group.label,\n id: group.id,\n active: false,\n disabled: group.disabled\n }));\n }\n };\n Choices.prototype._getTemplate = function (template) {\n var _a;\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n return (_a = this._templates[template]).call.apply(_a, __spreadArray([this, this.config], args, false));\n };\n Choices.prototype._createTemplates = function () {\n var callbackOnCreateTemplates = this.config.callbackOnCreateTemplates;\n var userTemplates = {};\n if (callbackOnCreateTemplates && typeof callbackOnCreateTemplates === 'function') {\n userTemplates = callbackOnCreateTemplates.call(this, utils_1.strToEl);\n }\n this._templates = (0, deepmerge_1.default)(templates_1.default, userTemplates);\n };\n Choices.prototype._createElements = function () {\n this.containerOuter = new components_1.Container({\n element: this._getTemplate('containerOuter', this._direction, this._isSelectElement, this._isSelectOneElement, this.config.searchEnabled, this.passedElement.element.type, this.config.labelId),\n classNames: this.config.classNames,\n type: this.passedElement.element.type,\n position: this.config.position\n });\n this.containerInner = new components_1.Container({\n element: this._getTemplate('containerInner'),\n classNames: this.config.classNames,\n type: this.passedElement.element.type,\n position: this.config.position\n });\n this.input = new components_1.Input({\n element: this._getTemplate('input', this._placeholderValue),\n classNames: this.config.classNames,\n type: this.passedElement.element.type,\n preventPaste: !this.config.paste\n });\n this.choiceList = new components_1.List({\n element: this._getTemplate('choiceList', this._isSelectOneElement)\n });\n this.itemList = new components_1.List({\n element: this._getTemplate('itemList', this._isSelectOneElement)\n });\n this.dropdown = new components_1.Dropdown({\n element: this._getTemplate('dropdown'),\n classNames: this.config.classNames,\n type: this.passedElement.element.type\n });\n };\n Choices.prototype._createStructure = function () {\n // Hide original element\n this.passedElement.conceal();\n // Wrap input in container preserving DOM ordering\n this.containerInner.wrap(this.passedElement.element);\n // Wrapper inner container with outer container\n this.containerOuter.wrap(this.containerInner.element);\n if (this._isSelectOneElement) {\n this.input.placeholder = this.config.searchPlaceholderValue || '';\n } else if (this._placeholderValue) {\n this.input.placeholder = this._placeholderValue;\n this.input.setWidth();\n }\n this.containerOuter.element.appendChild(this.containerInner.element);\n this.containerOuter.element.appendChild(this.dropdown.element);\n this.containerInner.element.appendChild(this.itemList.element);\n if (!this._isTextElement) {\n this.dropdown.element.appendChild(this.choiceList.element);\n }\n if (!this._isSelectOneElement) {\n this.containerInner.element.appendChild(this.input.element);\n } else if (this.config.searchEnabled) {\n this.dropdown.element.insertBefore(this.input.element, this.dropdown.element.firstChild);\n }\n if (this._isSelectElement) {\n this._highlightPosition = 0;\n this._isSearching = false;\n this._startLoading();\n if (this._presetGroups.length) {\n this._addPredefinedGroups(this._presetGroups);\n } else {\n this._addPredefinedChoices(this._presetChoices);\n }\n this._stopLoading();\n }\n if (this._isTextElement) {\n this._addPredefinedItems(this._presetItems);\n }\n };\n Choices.prototype._addPredefinedGroups = function (groups) {\n var _this = this;\n // If we have a placeholder option\n var placeholderChoice = this.passedElement.placeholderOption;\n if (placeholderChoice && placeholderChoice.parentNode && placeholderChoice.parentNode.tagName === 'SELECT') {\n this._addChoice({\n value: placeholderChoice.value,\n label: placeholderChoice.innerHTML,\n isSelected: placeholderChoice.selected,\n isDisabled: placeholderChoice.disabled,\n placeholder: true\n });\n }\n groups.forEach(function (group) {\n return _this._addGroup({\n group: group,\n id: group.id || null\n });\n });\n };\n Choices.prototype._addPredefinedChoices = function (choices) {\n var _this = this;\n // If sorting is enabled or the user is searching, filter choices\n if (this.config.shouldSort) {\n choices.sort(this.config.sorter);\n }\n var hasSelectedChoice = choices.some(function (choice) {\n return choice.selected;\n });\n var firstEnabledChoiceIndex = choices.findIndex(function (choice) {\n return choice.disabled === undefined || !choice.disabled;\n });\n choices.forEach(function (choice, index) {\n var _a = choice.value,\n value = _a === void 0 ? '' : _a,\n label = choice.label,\n customProperties = choice.customProperties,\n placeholder = choice.placeholder;\n if (_this._isSelectElement) {\n // If the choice is actually a group\n if (choice.choices) {\n _this._addGroup({\n group: choice,\n id: choice.id || null\n });\n } else {\n /**\n * If there is a selected choice already or the choice is not the first in\n * the array, add each choice normally.\n *\n * Otherwise we pre-select the first enabled choice in the array (\"select-one\" only)\n */\n var shouldPreselect = _this._isSelectOneElement && !hasSelectedChoice && index === firstEnabledChoiceIndex;\n var isSelected = shouldPreselect ? true : choice.selected;\n var isDisabled = choice.disabled;\n _this._addChoice({\n value: value,\n label: label,\n isSelected: !!isSelected,\n isDisabled: !!isDisabled,\n placeholder: !!placeholder,\n customProperties: customProperties\n });\n }\n } else {\n _this._addChoice({\n value: value,\n label: label,\n isSelected: !!choice.selected,\n isDisabled: !!choice.disabled,\n placeholder: !!choice.placeholder,\n customProperties: customProperties\n });\n }\n });\n };\n Choices.prototype._addPredefinedItems = function (items) {\n var _this = this;\n items.forEach(function (item) {\n if (typeof item === 'object' && item.value) {\n _this._addItem({\n value: item.value,\n label: item.label,\n choiceId: item.id,\n customProperties: item.customProperties,\n placeholder: item.placeholder\n });\n }\n if (typeof item === 'string') {\n _this._addItem({\n value: item\n });\n }\n });\n };\n Choices.prototype._setChoiceOrItem = function (item) {\n var _this = this;\n var itemType = (0, utils_1.getType)(item).toLowerCase();\n var handleType = {\n object: function () {\n if (!item.value) {\n return;\n }\n // If we are dealing with a select input, we need to create an option first\n // that is then selected. For text inputs we can just add items normally.\n if (!_this._isTextElement) {\n _this._addChoice({\n value: item.value,\n label: item.label,\n isSelected: true,\n isDisabled: false,\n customProperties: item.customProperties,\n placeholder: item.placeholder\n });\n } else {\n _this._addItem({\n value: item.value,\n label: item.label,\n choiceId: item.id,\n customProperties: item.customProperties,\n placeholder: item.placeholder\n });\n }\n },\n string: function () {\n if (!_this._isTextElement) {\n _this._addChoice({\n value: item,\n label: item,\n isSelected: true,\n isDisabled: false\n });\n } else {\n _this._addItem({\n value: item\n });\n }\n }\n };\n handleType[itemType]();\n };\n Choices.prototype._findAndSelectChoiceByValue = function (value) {\n var _this = this;\n var choices = this._store.choices;\n // Check 'value' property exists and the choice isn't already selected\n var foundChoice = choices.find(function (choice) {\n return _this.config.valueComparer(choice.value, value);\n });\n if (foundChoice && !foundChoice.selected) {\n this._addItem({\n value: foundChoice.value,\n label: foundChoice.label,\n choiceId: foundChoice.id,\n groupId: foundChoice.groupId,\n customProperties: foundChoice.customProperties,\n placeholder: foundChoice.placeholder,\n keyCode: foundChoice.keyCode\n });\n }\n };\n Choices.prototype._generatePlaceholderValue = function () {\n if (this._isSelectElement && this.passedElement.placeholderOption) {\n var placeholderOption = this.passedElement.placeholderOption;\n return placeholderOption ? placeholderOption.text : null;\n }\n var _a = this.config,\n placeholder = _a.placeholder,\n placeholderValue = _a.placeholderValue;\n var dataset = this.passedElement.element.dataset;\n if (placeholder) {\n if (placeholderValue) {\n return placeholderValue;\n }\n if (dataset.placeholder) {\n return dataset.placeholder;\n }\n }\n return null;\n };\n return Choices;\n}();\nexports[\"default\"] = Choices;\n\n/***/ }),\n\n/***/ 613:\n/***/ ((__unused_webpack_module, exports, __nested_webpack_require_75432__) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nvar utils_1 = __nested_webpack_require_75432__(799);\nvar constants_1 = __nested_webpack_require_75432__(883);\nvar Container = /** @class */function () {\n function Container(_a) {\n var element = _a.element,\n type = _a.type,\n classNames = _a.classNames,\n position = _a.position;\n this.element = element;\n this.classNames = classNames;\n this.type = type;\n this.position = position;\n this.isOpen = false;\n this.isFlipped = false;\n this.isFocussed = false;\n this.isDisabled = false;\n this.isLoading = false;\n this._onFocus = this._onFocus.bind(this);\n this._onBlur = this._onBlur.bind(this);\n }\n Container.prototype.addEventListeners = function () {\n this.element.addEventListener('focus', this._onFocus);\n this.element.addEventListener('blur', this._onBlur);\n };\n Container.prototype.removeEventListeners = function () {\n this.element.removeEventListener('focus', this._onFocus);\n this.element.removeEventListener('blur', this._onBlur);\n };\n /**\n * Determine whether container should be flipped based on passed\n * dropdown position\n */\n Container.prototype.shouldFlip = function (dropdownPos) {\n if (typeof dropdownPos !== 'number') {\n return false;\n }\n // If flip is enabled and the dropdown bottom position is\n // greater than the window height flip the dropdown.\n var shouldFlip = false;\n if (this.position === 'auto') {\n shouldFlip = !window.matchMedia(\"(min-height: \".concat(dropdownPos + 1, \"px)\")).matches;\n } else if (this.position === 'top') {\n shouldFlip = true;\n }\n return shouldFlip;\n };\n Container.prototype.setActiveDescendant = function (activeDescendantID) {\n this.element.setAttribute('aria-activedescendant', activeDescendantID);\n };\n Container.prototype.removeActiveDescendant = function () {\n this.element.removeAttribute('aria-activedescendant');\n };\n Container.prototype.open = function (dropdownPos) {\n this.element.classList.add(this.classNames.openState);\n this.element.setAttribute('aria-expanded', 'true');\n this.isOpen = true;\n if (this.shouldFlip(dropdownPos)) {\n this.element.classList.add(this.classNames.flippedState);\n this.isFlipped = true;\n }\n };\n Container.prototype.close = function () {\n this.element.classList.remove(this.classNames.openState);\n this.element.setAttribute('aria-expanded', 'false');\n this.removeActiveDescendant();\n this.isOpen = false;\n // A dropdown flips if it does not have space within the page\n if (this.isFlipped) {\n this.element.classList.remove(this.classNames.flippedState);\n this.isFlipped = false;\n }\n };\n Container.prototype.focus = function () {\n if (!this.isFocussed) {\n this.element.focus();\n }\n };\n Container.prototype.addFocusState = function () {\n this.element.classList.add(this.classNames.focusState);\n };\n Container.prototype.removeFocusState = function () {\n this.element.classList.remove(this.classNames.focusState);\n };\n Container.prototype.enable = function () {\n this.element.classList.remove(this.classNames.disabledState);\n this.element.removeAttribute('aria-disabled');\n if (this.type === constants_1.SELECT_ONE_TYPE) {\n this.element.setAttribute('tabindex', '0');\n }\n this.isDisabled = false;\n };\n Container.prototype.disable = function () {\n this.element.classList.add(this.classNames.disabledState);\n this.element.setAttribute('aria-disabled', 'true');\n if (this.type === constants_1.SELECT_ONE_TYPE) {\n this.element.setAttribute('tabindex', '-1');\n }\n this.isDisabled = true;\n };\n Container.prototype.wrap = function (element) {\n (0, utils_1.wrap)(element, this.element);\n };\n Container.prototype.unwrap = function (element) {\n if (this.element.parentNode) {\n // Move passed element outside this element\n this.element.parentNode.insertBefore(element, this.element);\n // Remove this element\n this.element.parentNode.removeChild(this.element);\n }\n };\n Container.prototype.addLoadingState = function () {\n this.element.classList.add(this.classNames.loadingState);\n this.element.setAttribute('aria-busy', 'true');\n this.isLoading = true;\n };\n Container.prototype.removeLoadingState = function () {\n this.element.classList.remove(this.classNames.loadingState);\n this.element.removeAttribute('aria-busy');\n this.isLoading = false;\n };\n Container.prototype._onFocus = function () {\n this.isFocussed = true;\n };\n Container.prototype._onBlur = function () {\n this.isFocussed = false;\n };\n return Container;\n}();\nexports[\"default\"] = Container;\n\n/***/ }),\n\n/***/ 217:\n/***/ ((__unused_webpack_module, exports) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nvar Dropdown = /** @class */function () {\n function Dropdown(_a) {\n var element = _a.element,\n type = _a.type,\n classNames = _a.classNames;\n this.element = element;\n this.classNames = classNames;\n this.type = type;\n this.isActive = false;\n }\n Object.defineProperty(Dropdown.prototype, \"distanceFromTopWindow\", {\n /**\n * Bottom position of dropdown in viewport coordinates\n */\n get: function () {\n return this.element.getBoundingClientRect().bottom;\n },\n enumerable: false,\n configurable: true\n });\n Dropdown.prototype.getChild = function (selector) {\n return this.element.querySelector(selector);\n };\n /**\n * Show dropdown to user by adding active state class\n */\n Dropdown.prototype.show = function () {\n this.element.classList.add(this.classNames.activeState);\n this.element.setAttribute('aria-expanded', 'true');\n this.isActive = true;\n return this;\n };\n /**\n * Hide dropdown from user\n */\n Dropdown.prototype.hide = function () {\n this.element.classList.remove(this.classNames.activeState);\n this.element.setAttribute('aria-expanded', 'false');\n this.isActive = false;\n return this;\n };\n return Dropdown;\n}();\nexports[\"default\"] = Dropdown;\n\n/***/ }),\n\n/***/ 520:\n/***/ (function(__unused_webpack_module, exports, __nested_webpack_require_81604__) {\n\n\n\nvar __importDefault = this && this.__importDefault || function (mod) {\n return mod && mod.__esModule ? mod : {\n \"default\": mod\n };\n};\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.WrappedSelect = exports.WrappedInput = exports.List = exports.Input = exports.Container = exports.Dropdown = void 0;\nvar dropdown_1 = __importDefault(__nested_webpack_require_81604__(217));\nexports.Dropdown = dropdown_1.default;\nvar container_1 = __importDefault(__nested_webpack_require_81604__(613));\nexports.Container = container_1.default;\nvar input_1 = __importDefault(__nested_webpack_require_81604__(11));\nexports.Input = input_1.default;\nvar list_1 = __importDefault(__nested_webpack_require_81604__(624));\nexports.List = list_1.default;\nvar wrapped_input_1 = __importDefault(__nested_webpack_require_81604__(541));\nexports.WrappedInput = wrapped_input_1.default;\nvar wrapped_select_1 = __importDefault(__nested_webpack_require_81604__(982));\nexports.WrappedSelect = wrapped_select_1.default;\n\n/***/ }),\n\n/***/ 11:\n/***/ ((__unused_webpack_module, exports, __nested_webpack_require_82631__) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nvar utils_1 = __nested_webpack_require_82631__(799);\nvar constants_1 = __nested_webpack_require_82631__(883);\nvar Input = /** @class */function () {\n function Input(_a) {\n var element = _a.element,\n type = _a.type,\n classNames = _a.classNames,\n preventPaste = _a.preventPaste;\n this.element = element;\n this.type = type;\n this.classNames = classNames;\n this.preventPaste = preventPaste;\n this.isFocussed = this.element.isEqualNode(document.activeElement);\n this.isDisabled = element.disabled;\n this._onPaste = this._onPaste.bind(this);\n this._onInput = this._onInput.bind(this);\n this._onFocus = this._onFocus.bind(this);\n this._onBlur = this._onBlur.bind(this);\n }\n Object.defineProperty(Input.prototype, \"placeholder\", {\n set: function (placeholder) {\n this.element.placeholder = placeholder;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Input.prototype, \"value\", {\n get: function () {\n return (0, utils_1.sanitise)(this.element.value);\n },\n set: function (value) {\n this.element.value = value;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Input.prototype, \"rawValue\", {\n get: function () {\n return this.element.value;\n },\n enumerable: false,\n configurable: true\n });\n Input.prototype.addEventListeners = function () {\n this.element.addEventListener('paste', this._onPaste);\n this.element.addEventListener('input', this._onInput, {\n passive: true\n });\n this.element.addEventListener('focus', this._onFocus, {\n passive: true\n });\n this.element.addEventListener('blur', this._onBlur, {\n passive: true\n });\n };\n Input.prototype.removeEventListeners = function () {\n this.element.removeEventListener('input', this._onInput);\n this.element.removeEventListener('paste', this._onPaste);\n this.element.removeEventListener('focus', this._onFocus);\n this.element.removeEventListener('blur', this._onBlur);\n };\n Input.prototype.enable = function () {\n this.element.removeAttribute('disabled');\n this.isDisabled = false;\n };\n Input.prototype.disable = function () {\n this.element.setAttribute('disabled', '');\n this.isDisabled = true;\n };\n Input.prototype.focus = function () {\n if (!this.isFocussed) {\n this.element.focus();\n }\n };\n Input.prototype.blur = function () {\n if (this.isFocussed) {\n this.element.blur();\n }\n };\n Input.prototype.clear = function (setWidth) {\n if (setWidth === void 0) {\n setWidth = true;\n }\n if (this.element.value) {\n this.element.value = '';\n }\n if (setWidth) {\n this.setWidth();\n }\n return this;\n };\n /**\n * Set the correct input width based on placeholder\n * value or input value\n */\n Input.prototype.setWidth = function () {\n // Resize input to contents or placeholder\n var _a = this.element,\n style = _a.style,\n value = _a.value,\n placeholder = _a.placeholder;\n style.minWidth = \"\".concat(placeholder.length + 1, \"ch\");\n style.width = \"\".concat(value.length + 1, \"ch\");\n };\n Input.prototype.setActiveDescendant = function (activeDescendantID) {\n this.element.setAttribute('aria-activedescendant', activeDescendantID);\n };\n Input.prototype.removeActiveDescendant = function () {\n this.element.removeAttribute('aria-activedescendant');\n };\n Input.prototype._onInput = function () {\n if (this.type !== constants_1.SELECT_ONE_TYPE) {\n this.setWidth();\n }\n };\n Input.prototype._onPaste = function (event) {\n if (this.preventPaste) {\n event.preventDefault();\n }\n };\n Input.prototype._onFocus = function () {\n this.isFocussed = true;\n };\n Input.prototype._onBlur = function () {\n this.isFocussed = false;\n };\n return Input;\n}();\nexports[\"default\"] = Input;\n\n/***/ }),\n\n/***/ 624:\n/***/ ((__unused_webpack_module, exports, __nested_webpack_require_86628__) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nvar constants_1 = __nested_webpack_require_86628__(883);\nvar List = /** @class */function () {\n function List(_a) {\n var element = _a.element;\n this.element = element;\n this.scrollPos = this.element.scrollTop;\n this.height = this.element.offsetHeight;\n }\n List.prototype.clear = function () {\n this.element.innerHTML = '';\n };\n List.prototype.append = function (node) {\n this.element.appendChild(node);\n };\n List.prototype.getChild = function (selector) {\n return this.element.querySelector(selector);\n };\n List.prototype.hasChildren = function () {\n return this.element.hasChildNodes();\n };\n List.prototype.scrollToTop = function () {\n this.element.scrollTop = 0;\n };\n List.prototype.scrollToChildElement = function (element, direction) {\n var _this = this;\n if (!element) {\n return;\n }\n var listHeight = this.element.offsetHeight;\n // Scroll position of dropdown\n var listScrollPosition = this.element.scrollTop + listHeight;\n var elementHeight = element.offsetHeight;\n // Distance from bottom of element to top of parent\n var elementPos = element.offsetTop + elementHeight;\n // Difference between the element and scroll position\n var destination = direction > 0 ? this.element.scrollTop + elementPos - listScrollPosition : element.offsetTop;\n requestAnimationFrame(function () {\n _this._animateScroll(destination, direction);\n });\n };\n List.prototype._scrollDown = function (scrollPos, strength, destination) {\n var easing = (destination - scrollPos) / strength;\n var distance = easing > 1 ? easing : 1;\n this.element.scrollTop = scrollPos + distance;\n };\n List.prototype._scrollUp = function (scrollPos, strength, destination) {\n var easing = (scrollPos - destination) / strength;\n var distance = easing > 1 ? easing : 1;\n this.element.scrollTop = scrollPos - distance;\n };\n List.prototype._animateScroll = function (destination, direction) {\n var _this = this;\n var strength = constants_1.SCROLLING_SPEED;\n var choiceListScrollTop = this.element.scrollTop;\n var continueAnimation = false;\n if (direction > 0) {\n this._scrollDown(choiceListScrollTop, strength, destination);\n if (choiceListScrollTop < destination) {\n continueAnimation = true;\n }\n } else {\n this._scrollUp(choiceListScrollTop, strength, destination);\n if (choiceListScrollTop > destination) {\n continueAnimation = true;\n }\n }\n if (continueAnimation) {\n requestAnimationFrame(function () {\n _this._animateScroll(destination, direction);\n });\n }\n };\n return List;\n}();\nexports[\"default\"] = List;\n\n/***/ }),\n\n/***/ 730:\n/***/ ((__unused_webpack_module, exports, __nested_webpack_require_89444__) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nvar utils_1 = __nested_webpack_require_89444__(799);\nvar WrappedElement = /** @class */function () {\n function WrappedElement(_a) {\n var element = _a.element,\n classNames = _a.classNames;\n this.element = element;\n this.classNames = classNames;\n if (!(element instanceof HTMLInputElement) && !(element instanceof HTMLSelectElement)) {\n throw new TypeError('Invalid element passed');\n }\n this.isDisabled = false;\n }\n Object.defineProperty(WrappedElement.prototype, \"isActive\", {\n get: function () {\n return this.element.dataset.choice === 'active';\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(WrappedElement.prototype, \"dir\", {\n get: function () {\n return this.element.dir;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(WrappedElement.prototype, \"value\", {\n get: function () {\n return this.element.value;\n },\n set: function (value) {\n // you must define setter here otherwise it will be readonly property\n this.element.value = value;\n },\n enumerable: false,\n configurable: true\n });\n WrappedElement.prototype.conceal = function () {\n // Hide passed input\n this.element.classList.add(this.classNames.input);\n this.element.hidden = true;\n // Remove element from tab index\n this.element.tabIndex = -1;\n // Backup original styles if any\n var origStyle = this.element.getAttribute('style');\n if (origStyle) {\n this.element.setAttribute('data-choice-orig-style', origStyle);\n }\n this.element.setAttribute('data-choice', 'active');\n };\n WrappedElement.prototype.reveal = function () {\n // Reinstate passed element\n this.element.classList.remove(this.classNames.input);\n this.element.hidden = false;\n this.element.removeAttribute('tabindex');\n // Recover original styles if any\n var origStyle = this.element.getAttribute('data-choice-orig-style');\n if (origStyle) {\n this.element.removeAttribute('data-choice-orig-style');\n this.element.setAttribute('style', origStyle);\n } else {\n this.element.removeAttribute('style');\n }\n this.element.removeAttribute('data-choice');\n // Re-assign values - this is weird, I know\n // @todo Figure out why we need to do this\n this.element.value = this.element.value; // eslint-disable-line no-self-assign\n };\n\n WrappedElement.prototype.enable = function () {\n this.element.removeAttribute('disabled');\n this.element.disabled = false;\n this.isDisabled = false;\n };\n WrappedElement.prototype.disable = function () {\n this.element.setAttribute('disabled', '');\n this.element.disabled = true;\n this.isDisabled = true;\n };\n WrappedElement.prototype.triggerEvent = function (eventType, data) {\n (0, utils_1.dispatchEvent)(this.element, eventType, data);\n };\n return WrappedElement;\n}();\nexports[\"default\"] = WrappedElement;\n\n/***/ }),\n\n/***/ 541:\n/***/ (function(__unused_webpack_module, exports, __nested_webpack_require_92520__) {\n\n\n\nvar __extends = this && this.__extends || function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\nvar __importDefault = this && this.__importDefault || function (mod) {\n return mod && mod.__esModule ? mod : {\n \"default\": mod\n };\n};\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nvar wrapped_element_1 = __importDefault(__nested_webpack_require_92520__(730));\nvar WrappedInput = /** @class */function (_super) {\n __extends(WrappedInput, _super);\n function WrappedInput(_a) {\n var element = _a.element,\n classNames = _a.classNames,\n delimiter = _a.delimiter;\n var _this = _super.call(this, {\n element: element,\n classNames: classNames\n }) || this;\n _this.delimiter = delimiter;\n return _this;\n }\n Object.defineProperty(WrappedInput.prototype, \"value\", {\n get: function () {\n return this.element.value;\n },\n set: function (value) {\n this.element.setAttribute('value', value);\n this.element.value = value;\n },\n enumerable: false,\n configurable: true\n });\n return WrappedInput;\n}(wrapped_element_1.default);\nexports[\"default\"] = WrappedInput;\n\n/***/ }),\n\n/***/ 982:\n/***/ (function(__unused_webpack_module, exports, __nested_webpack_require_94374__) {\n\n\n\nvar __extends = this && this.__extends || function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];\n };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null) throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() {\n this.constructor = d;\n }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\nvar __importDefault = this && this.__importDefault || function (mod) {\n return mod && mod.__esModule ? mod : {\n \"default\": mod\n };\n};\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nvar wrapped_element_1 = __importDefault(__nested_webpack_require_94374__(730));\nvar WrappedSelect = /** @class */function (_super) {\n __extends(WrappedSelect, _super);\n function WrappedSelect(_a) {\n var element = _a.element,\n classNames = _a.classNames,\n template = _a.template;\n var _this = _super.call(this, {\n element: element,\n classNames: classNames\n }) || this;\n _this.template = template;\n return _this;\n }\n Object.defineProperty(WrappedSelect.prototype, \"placeholderOption\", {\n get: function () {\n return this.element.querySelector('option[value=\"\"]') ||\n // Backward compatibility layer for the non-standard placeholder attribute supported in older versions.\n this.element.querySelector('option[placeholder]');\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(WrappedSelect.prototype, \"optionGroups\", {\n get: function () {\n return Array.from(this.element.getElementsByTagName('OPTGROUP'));\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(WrappedSelect.prototype, \"options\", {\n get: function () {\n return Array.from(this.element.options);\n },\n set: function (options) {\n var _this = this;\n var fragment = document.createDocumentFragment();\n var addOptionToFragment = function (data) {\n // Create a standard select option\n var option = _this.template(data);\n // Append it to fragment\n fragment.appendChild(option);\n };\n // Add each list item to list\n options.forEach(function (optionData) {\n return addOptionToFragment(optionData);\n });\n this.appendDocFragment(fragment);\n },\n enumerable: false,\n configurable: true\n });\n WrappedSelect.prototype.appendDocFragment = function (fragment) {\n this.element.innerHTML = '';\n this.element.appendChild(fragment);\n };\n return WrappedSelect;\n}(wrapped_element_1.default);\nexports[\"default\"] = WrappedSelect;\n\n/***/ }),\n\n/***/ 883:\n/***/ ((__unused_webpack_module, exports) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.SCROLLING_SPEED = exports.SELECT_MULTIPLE_TYPE = exports.SELECT_ONE_TYPE = exports.TEXT_TYPE = exports.KEY_CODES = exports.ACTION_TYPES = exports.EVENTS = void 0;\nexports.EVENTS = {\n showDropdown: 'showDropdown',\n hideDropdown: 'hideDropdown',\n change: 'change',\n choice: 'choice',\n search: 'search',\n addItem: 'addItem',\n removeItem: 'removeItem',\n highlightItem: 'highlightItem',\n highlightChoice: 'highlightChoice',\n unhighlightItem: 'unhighlightItem'\n};\nexports.ACTION_TYPES = {\n ADD_CHOICE: 'ADD_CHOICE',\n FILTER_CHOICES: 'FILTER_CHOICES',\n ACTIVATE_CHOICES: 'ACTIVATE_CHOICES',\n CLEAR_CHOICES: 'CLEAR_CHOICES',\n ADD_GROUP: 'ADD_GROUP',\n ADD_ITEM: 'ADD_ITEM',\n REMOVE_ITEM: 'REMOVE_ITEM',\n HIGHLIGHT_ITEM: 'HIGHLIGHT_ITEM',\n CLEAR_ALL: 'CLEAR_ALL',\n RESET_TO: 'RESET_TO',\n SET_IS_LOADING: 'SET_IS_LOADING'\n};\nexports.KEY_CODES = {\n BACK_KEY: 46,\n DELETE_KEY: 8,\n ENTER_KEY: 13,\n A_KEY: 65,\n ESC_KEY: 27,\n UP_KEY: 38,\n DOWN_KEY: 40,\n PAGE_UP_KEY: 33,\n PAGE_DOWN_KEY: 34\n};\nexports.TEXT_TYPE = 'text';\nexports.SELECT_ONE_TYPE = 'select-one';\nexports.SELECT_MULTIPLE_TYPE = 'select-multiple';\nexports.SCROLLING_SPEED = 4;\n\n/***/ }),\n\n/***/ 789:\n/***/ ((__unused_webpack_module, exports, __nested_webpack_require_98686__) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.DEFAULT_CONFIG = exports.DEFAULT_CLASSNAMES = void 0;\nvar utils_1 = __nested_webpack_require_98686__(799);\nexports.DEFAULT_CLASSNAMES = {\n containerOuter: 'choices',\n containerInner: 'choices__inner',\n input: 'choices__input',\n inputCloned: 'choices__input--cloned',\n list: 'choices__list',\n listItems: 'choices__list--multiple',\n listSingle: 'choices__list--single',\n listDropdown: 'choices__list--dropdown',\n item: 'choices__item',\n itemSelectable: 'choices__item--selectable',\n itemDisabled: 'choices__item--disabled',\n itemChoice: 'choices__item--choice',\n placeholder: 'choices__placeholder',\n group: 'choices__group',\n groupHeading: 'choices__heading',\n button: 'choices__button',\n activeState: 'is-active',\n focusState: 'is-focused',\n openState: 'is-open',\n disabledState: 'is-disabled',\n highlightedState: 'is-highlighted',\n selectedState: 'is-selected',\n flippedState: 'is-flipped',\n loadingState: 'is-loading',\n noResults: 'has-no-results',\n noChoices: 'has-no-choices'\n};\nexports.DEFAULT_CONFIG = {\n items: [],\n choices: [],\n silent: false,\n renderChoiceLimit: -1,\n maxItemCount: -1,\n addItems: true,\n addItemFilter: null,\n removeItems: true,\n removeItemButton: false,\n editItems: false,\n allowHTML: true,\n duplicateItemsAllowed: true,\n delimiter: ',',\n paste: true,\n searchEnabled: true,\n searchChoices: true,\n searchFloor: 1,\n searchResultLimit: 4,\n searchFields: ['label', 'value'],\n position: 'auto',\n resetScrollPosition: true,\n shouldSort: true,\n shouldSortItems: false,\n sorter: utils_1.sortByAlpha,\n shadowRoot: null,\n placeholder: true,\n placeholderValue: null,\n searchPlaceholderValue: null,\n prependValue: null,\n appendValue: null,\n renderSelectedChoices: 'auto',\n loadingText: 'Loading...',\n noResultsText: 'No results found',\n noChoicesText: 'No choices to choose from',\n itemSelectText: 'Press to select',\n uniqueItemText: 'Only unique values can be added',\n customAddItemText: 'Only values matching specific conditions can be added',\n addItemText: function (value) {\n return \"Press Enter to add \\\"\".concat((0, utils_1.sanitise)(value), \"\\\"\");\n },\n maxItemText: function (maxItemCount) {\n return \"Only \".concat(maxItemCount, \" values can be added\");\n },\n valueComparer: function (value1, value2) {\n return value1 === value2;\n },\n fuseOptions: {\n includeScore: true\n },\n labelId: '',\n callbackOnInit: null,\n callbackOnCreateTemplates: null,\n classNames: exports.DEFAULT_CLASSNAMES\n};\n\n/***/ }),\n\n/***/ 18:\n/***/ ((__unused_webpack_module, exports) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n\n/***/ }),\n\n/***/ 978:\n/***/ ((__unused_webpack_module, exports) => {\n\n\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n\n/***/ }),\n\n/***/ 948:\n/***/ ((__unused_webpack_module, exports) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n\n/***/ }),\n\n/***/ 359:\n/***/ ((__unused_webpack_module, exports) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n\n/***/ }),\n\n/***/ 285:\n/***/ ((__unused_webpack_module, exports) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n\n/***/ }),\n\n/***/ 533:\n/***/ ((__unused_webpack_module, exports) => {\n\n\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n\n/***/ }),\n\n/***/ 187:\n/***/ (function(__unused_webpack_module, exports, __nested_webpack_require_102303__) {\n\n\n\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 = {\n enumerable: true,\n get: function () {\n return m[k];\n }\n };\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\", ({\n value: true\n}));\n__exportStar(__nested_webpack_require_102303__(18), exports);\n__exportStar(__nested_webpack_require_102303__(978), exports);\n__exportStar(__nested_webpack_require_102303__(948), exports);\n__exportStar(__nested_webpack_require_102303__(359), exports);\n__exportStar(__nested_webpack_require_102303__(285), exports);\n__exportStar(__nested_webpack_require_102303__(533), exports);\n__exportStar(__nested_webpack_require_102303__(287), exports);\n__exportStar(__nested_webpack_require_102303__(132), exports);\n__exportStar(__nested_webpack_require_102303__(837), exports);\n__exportStar(__nested_webpack_require_102303__(598), exports);\n__exportStar(__nested_webpack_require_102303__(369), exports);\n__exportStar(__nested_webpack_require_102303__(37), exports);\n__exportStar(__nested_webpack_require_102303__(47), exports);\n__exportStar(__nested_webpack_require_102303__(923), exports);\n__exportStar(__nested_webpack_require_102303__(876), exports);\n\n/***/ }),\n\n/***/ 287:\n/***/ ((__unused_webpack_module, exports) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n\n/***/ }),\n\n/***/ 132:\n/***/ ((__unused_webpack_module, exports) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n\n/***/ }),\n\n/***/ 837:\n/***/ ((__unused_webpack_module, exports) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n\n/***/ }),\n\n/***/ 598:\n/***/ ((__unused_webpack_module, exports) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n\n/***/ }),\n\n/***/ 37:\n/***/ ((__unused_webpack_module, exports) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n\n/***/ }),\n\n/***/ 369:\n/***/ ((__unused_webpack_module, exports) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n\n/***/ }),\n\n/***/ 47:\n/***/ ((__unused_webpack_module, exports) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n\n/***/ }),\n\n/***/ 923:\n/***/ ((__unused_webpack_module, exports) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n\n/***/ }),\n\n/***/ 876:\n/***/ ((__unused_webpack_module, exports) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n\n/***/ }),\n\n/***/ 799:\n/***/ ((__unused_webpack_module, exports) => {\n\n\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.parseCustomProperties = exports.diff = exports.cloneObject = exports.existsInArray = exports.dispatchEvent = exports.sortByScore = exports.sortByAlpha = exports.strToEl = exports.sanitise = exports.isScrolledIntoView = exports.getAdjacentEl = exports.wrap = exports.isType = exports.getType = exports.generateId = exports.generateChars = exports.getRandomNumber = void 0;\nvar getRandomNumber = function (min, max) {\n return Math.floor(Math.random() * (max - min) + min);\n};\nexports.getRandomNumber = getRandomNumber;\nvar generateChars = function (length) {\n return Array.from({\n length: length\n }, function () {\n return (0, exports.getRandomNumber)(0, 36).toString(36);\n }).join('');\n};\nexports.generateChars = generateChars;\nvar generateId = function (element, prefix) {\n var id = element.id || element.name && \"\".concat(element.name, \"-\").concat((0, exports.generateChars)(2)) || (0, exports.generateChars)(4);\n id = id.replace(/(:|\\.|\\[|\\]|,)/g, '');\n id = \"\".concat(prefix, \"-\").concat(id);\n return id;\n};\nexports.generateId = generateId;\nvar getType = function (obj) {\n return Object.prototype.toString.call(obj).slice(8, -1);\n};\nexports.getType = getType;\nvar isType = function (type, obj) {\n return obj !== undefined && obj !== null && (0, exports.getType)(obj) === type;\n};\nexports.isType = isType;\nvar wrap = function (element, wrapper) {\n if (wrapper === void 0) {\n wrapper = document.createElement('div');\n }\n if (element.parentNode) {\n if (element.nextSibling) {\n element.parentNode.insertBefore(wrapper, element.nextSibling);\n } else {\n element.parentNode.appendChild(wrapper);\n }\n }\n return wrapper.appendChild(element);\n};\nexports.wrap = wrap;\nvar getAdjacentEl = function (startEl, selector, direction) {\n if (direction === void 0) {\n direction = 1;\n }\n var prop = \"\".concat(direction > 0 ? 'next' : 'previous', \"ElementSibling\");\n var sibling = startEl[prop];\n while (sibling) {\n if (sibling.matches(selector)) {\n return sibling;\n }\n sibling = sibling[prop];\n }\n return sibling;\n};\nexports.getAdjacentEl = getAdjacentEl;\nvar isScrolledIntoView = function (element, parent, direction) {\n if (direction === void 0) {\n direction = 1;\n }\n if (!element) {\n return false;\n }\n var isVisible;\n if (direction > 0) {\n // In view from bottom\n isVisible = parent.scrollTop + parent.offsetHeight >= element.offsetTop + element.offsetHeight;\n } else {\n // In view from top\n isVisible = element.offsetTop >= parent.scrollTop;\n }\n return isVisible;\n};\nexports.isScrolledIntoView = isScrolledIntoView;\nvar sanitise = function (value) {\n if (typeof value !== 'string') {\n return value;\n }\n return value.replace(/&/g, '&').replace(/>/g, '>').replace(/ -1) {\n return state.map(function (obj) {\n var choice = obj;\n if (choice.id === parseInt(\"\".concat(addItemAction_1.choiceId), 10)) {\n choice.selected = true;\n }\n return choice;\n });\n }\n return state;\n }\n case 'REMOVE_ITEM':\n {\n var removeItemAction_1 = action;\n // When an item is removed and it has an associated choice,\n // we want to re-enable it so it can be chosen again\n if (removeItemAction_1.choiceId && removeItemAction_1.choiceId > -1) {\n return state.map(function (obj) {\n var choice = obj;\n if (choice.id === parseInt(\"\".concat(removeItemAction_1.choiceId), 10)) {\n choice.selected = false;\n }\n return choice;\n });\n }\n return state;\n }\n case 'FILTER_CHOICES':\n {\n var filterChoicesAction_1 = action;\n return state.map(function (obj) {\n var choice = obj;\n // Set active state based on whether choice is\n // within filtered results\n choice.active = filterChoicesAction_1.results.some(function (_a) {\n var item = _a.item,\n score = _a.score;\n if (item.id === choice.id) {\n choice.score = score;\n return true;\n }\n return false;\n });\n return choice;\n });\n }\n case 'ACTIVATE_CHOICES':\n {\n var activateChoicesAction_1 = action;\n return state.map(function (obj) {\n var choice = obj;\n choice.active = activateChoicesAction_1.active;\n return choice;\n });\n }\n case 'CLEAR_CHOICES':\n {\n return exports.defaultState;\n }\n default:\n {\n return state;\n }\n }\n}\nexports[\"default\"] = choices;\n\n/***/ }),\n\n/***/ 871:\n/***/ (function(__unused_webpack_module, exports) {\n\n\n\nvar __spreadArray = this && this.__spreadArray || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.defaultState = void 0;\nexports.defaultState = [];\nfunction groups(state, action) {\n if (state === void 0) {\n state = exports.defaultState;\n }\n if (action === void 0) {\n action = {};\n }\n switch (action.type) {\n case 'ADD_GROUP':\n {\n var addGroupAction = action;\n return __spreadArray(__spreadArray([], state, true), [{\n id: addGroupAction.id,\n value: addGroupAction.value,\n active: addGroupAction.active,\n disabled: addGroupAction.disabled\n }], false);\n }\n case 'CLEAR_CHOICES':\n {\n return [];\n }\n default:\n {\n return state;\n }\n }\n}\nexports[\"default\"] = groups;\n\n/***/ }),\n\n/***/ 655:\n/***/ (function(__unused_webpack_module, exports, __nested_webpack_require_115345__) {\n\n\n\nvar __importDefault = this && this.__importDefault || function (mod) {\n return mod && mod.__esModule ? mod : {\n \"default\": mod\n };\n};\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.defaultState = void 0;\nvar redux_1 = __nested_webpack_require_115345__(791);\nvar items_1 = __importDefault(__nested_webpack_require_115345__(52));\nvar groups_1 = __importDefault(__nested_webpack_require_115345__(871));\nvar choices_1 = __importDefault(__nested_webpack_require_115345__(273));\nvar loading_1 = __importDefault(__nested_webpack_require_115345__(502));\nvar utils_1 = __nested_webpack_require_115345__(799);\nexports.defaultState = {\n groups: [],\n items: [],\n choices: [],\n loading: false\n};\nvar appReducer = (0, redux_1.combineReducers)({\n items: items_1.default,\n groups: groups_1.default,\n choices: choices_1.default,\n loading: loading_1.default\n});\nvar rootReducer = function (passedState, action) {\n var state = passedState;\n // If we are clearing all items, groups and options we reassign\n // state and then pass that state to our proper reducer. This isn't\n // mutating our actual state\n // See: http://stackoverflow.com/a/35641992\n if (action.type === 'CLEAR_ALL') {\n state = exports.defaultState;\n } else if (action.type === 'RESET_TO') {\n return (0, utils_1.cloneObject)(action.state);\n }\n return appReducer(state, action);\n};\nexports[\"default\"] = rootReducer;\n\n/***/ }),\n\n/***/ 52:\n/***/ (function(__unused_webpack_module, exports) {\n\n\n\nvar __spreadArray = this && this.__spreadArray || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.defaultState = void 0;\nexports.defaultState = [];\nfunction items(state, action) {\n if (state === void 0) {\n state = exports.defaultState;\n }\n if (action === void 0) {\n action = {};\n }\n switch (action.type) {\n case 'ADD_ITEM':\n {\n var addItemAction = action;\n // Add object to items array\n var newState = __spreadArray(__spreadArray([], state, true), [{\n id: addItemAction.id,\n choiceId: addItemAction.choiceId,\n groupId: addItemAction.groupId,\n value: addItemAction.value,\n label: addItemAction.label,\n active: true,\n highlighted: false,\n customProperties: addItemAction.customProperties,\n placeholder: addItemAction.placeholder || false,\n keyCode: null\n }], false);\n return newState.map(function (obj) {\n var item = obj;\n item.highlighted = false;\n return item;\n });\n }\n case 'REMOVE_ITEM':\n {\n // Set item to inactive\n return state.map(function (obj) {\n var item = obj;\n if (item.id === action.id) {\n item.active = false;\n }\n return item;\n });\n }\n case 'HIGHLIGHT_ITEM':\n {\n var highlightItemAction_1 = action;\n return state.map(function (obj) {\n var item = obj;\n if (item.id === highlightItemAction_1.id) {\n item.highlighted = highlightItemAction_1.highlighted;\n }\n return item;\n });\n }\n default:\n {\n return state;\n }\n }\n}\nexports[\"default\"] = items;\n\n/***/ }),\n\n/***/ 502:\n/***/ ((__unused_webpack_module, exports) => {\n\n\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.defaultState = void 0;\nexports.defaultState = false;\nvar general = function (state, action) {\n if (state === void 0) {\n state = exports.defaultState;\n }\n if (action === void 0) {\n action = {};\n }\n switch (action.type) {\n case 'SET_IS_LOADING':\n {\n return action.isLoading;\n }\n default:\n {\n return state;\n }\n }\n};\nexports[\"default\"] = general;\n\n/***/ }),\n\n/***/ 744:\n/***/ (function(__unused_webpack_module, exports, __nested_webpack_require_119446__) {\n\n\n\nvar __spreadArray = this && this.__spreadArray || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nvar __importDefault = this && this.__importDefault || function (mod) {\n return mod && mod.__esModule ? mod : {\n \"default\": mod\n };\n};\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\n/* eslint-disable @typescript-eslint/no-explicit-any */\nvar redux_1 = __nested_webpack_require_119446__(791);\nvar index_1 = __importDefault(__nested_webpack_require_119446__(655));\nvar Store = /** @class */function () {\n function Store() {\n this._store = (0, redux_1.createStore)(index_1.default, window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__());\n }\n /**\n * Subscribe store to function call (wrapped Redux method)\n */\n Store.prototype.subscribe = function (onChange) {\n this._store.subscribe(onChange);\n };\n /**\n * Dispatch event to store (wrapped Redux method)\n */\n Store.prototype.dispatch = function (action) {\n this._store.dispatch(action);\n };\n Object.defineProperty(Store.prototype, \"state\", {\n /**\n * Get store object (wrapping Redux method)\n */\n get: function () {\n return this._store.getState();\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Store.prototype, \"items\", {\n /**\n * Get items from store\n */\n get: function () {\n return this.state.items;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Store.prototype, \"activeItems\", {\n /**\n * Get active items from store\n */\n get: function () {\n return this.items.filter(function (item) {\n return item.active === true;\n });\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Store.prototype, \"highlightedActiveItems\", {\n /**\n * Get highlighted items from store\n */\n get: function () {\n return this.items.filter(function (item) {\n return item.active && item.highlighted;\n });\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Store.prototype, \"choices\", {\n /**\n * Get choices from store\n */\n get: function () {\n return this.state.choices;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Store.prototype, \"activeChoices\", {\n /**\n * Get active choices from store\n */\n get: function () {\n return this.choices.filter(function (choice) {\n return choice.active === true;\n });\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Store.prototype, \"selectableChoices\", {\n /**\n * Get selectable choices from store\n */\n get: function () {\n return this.choices.filter(function (choice) {\n return choice.disabled !== true;\n });\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Store.prototype, \"searchableChoices\", {\n /**\n * Get choices that can be searched (excluding placeholders)\n */\n get: function () {\n return this.selectableChoices.filter(function (choice) {\n return choice.placeholder !== true;\n });\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Store.prototype, \"placeholderChoice\", {\n /**\n * Get placeholder choice from store\n */\n get: function () {\n return __spreadArray([], this.choices, true).reverse().find(function (choice) {\n return choice.placeholder === true;\n });\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Store.prototype, \"groups\", {\n /**\n * Get groups from store\n */\n get: function () {\n return this.state.groups;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(Store.prototype, \"activeGroups\", {\n /**\n * Get active groups from store\n */\n get: function () {\n var _a = this,\n groups = _a.groups,\n choices = _a.choices;\n return groups.filter(function (group) {\n var isActive = group.active === true && group.disabled === false;\n var hasActiveOptions = choices.some(function (choice) {\n return choice.active === true && choice.disabled === false;\n });\n return isActive && hasActiveOptions;\n }, []);\n },\n enumerable: false,\n configurable: true\n });\n /**\n * Get loading state from store\n */\n Store.prototype.isLoading = function () {\n return this.state.loading;\n };\n /**\n * Get single choice by it's ID\n */\n Store.prototype.getChoiceById = function (id) {\n return this.activeChoices.find(function (choice) {\n return choice.id === parseInt(id, 10);\n });\n };\n /**\n * Get group by group id\n */\n Store.prototype.getGroupById = function (id) {\n return this.groups.find(function (group) {\n return group.id === id;\n });\n };\n return Store;\n}();\nexports[\"default\"] = Store;\n\n/***/ }),\n\n/***/ 686:\n/***/ ((__unused_webpack_module, exports) => {\n\n\n\n/**\n * Helpers to create HTML elements used by Choices\n * Can be overridden by providing `callbackOnCreateTemplates` option\n */\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nvar templates = {\n containerOuter: function (_a, dir, isSelectElement, isSelectOneElement, searchEnabled, passedElementType, labelId) {\n var containerOuter = _a.classNames.containerOuter;\n var div = Object.assign(document.createElement('div'), {\n className: containerOuter\n });\n div.dataset.type = passedElementType;\n if (dir) {\n div.dir = dir;\n }\n if (isSelectOneElement) {\n div.tabIndex = 0;\n }\n if (isSelectElement) {\n div.setAttribute('role', searchEnabled ? 'combobox' : 'listbox');\n if (searchEnabled) {\n div.setAttribute('aria-autocomplete', 'list');\n }\n }\n div.setAttribute('aria-haspopup', 'true');\n div.setAttribute('aria-expanded', 'false');\n if (labelId) {\n div.setAttribute('aria-labelledby', labelId);\n }\n return div;\n },\n containerInner: function (_a) {\n var containerInner = _a.classNames.containerInner;\n return Object.assign(document.createElement('div'), {\n className: containerInner\n });\n },\n itemList: function (_a, isSelectOneElement) {\n var _b = _a.classNames,\n list = _b.list,\n listSingle = _b.listSingle,\n listItems = _b.listItems;\n return Object.assign(document.createElement('div'), {\n className: \"\".concat(list, \" \").concat(isSelectOneElement ? listSingle : listItems)\n });\n },\n placeholder: function (_a, value) {\n var _b;\n var allowHTML = _a.allowHTML,\n placeholder = _a.classNames.placeholder;\n return Object.assign(document.createElement('div'), (_b = {\n className: placeholder\n }, _b[allowHTML ? 'innerHTML' : 'innerText'] = value, _b));\n },\n item: function (_a, _b, removeItemButton) {\n var _c, _d;\n var allowHTML = _a.allowHTML,\n _e = _a.classNames,\n item = _e.item,\n button = _e.button,\n highlightedState = _e.highlightedState,\n itemSelectable = _e.itemSelectable,\n placeholder = _e.placeholder;\n var id = _b.id,\n value = _b.value,\n label = _b.label,\n customProperties = _b.customProperties,\n active = _b.active,\n disabled = _b.disabled,\n highlighted = _b.highlighted,\n isPlaceholder = _b.placeholder;\n var div = Object.assign(document.createElement('div'), (_c = {\n className: item\n }, _c[allowHTML ? 'innerHTML' : 'innerText'] = label, _c));\n Object.assign(div.dataset, {\n item: '',\n id: id,\n value: value,\n customProperties: customProperties\n });\n if (active) {\n div.setAttribute('aria-selected', 'true');\n }\n if (disabled) {\n div.setAttribute('aria-disabled', 'true');\n }\n if (isPlaceholder) {\n div.classList.add(placeholder);\n }\n div.classList.add(highlighted ? highlightedState : itemSelectable);\n if (removeItemButton) {\n if (disabled) {\n div.classList.remove(itemSelectable);\n }\n div.dataset.deletable = '';\n /** @todo This MUST be localizable, not hardcoded! */\n var REMOVE_ITEM_TEXT = 'Remove item';\n var removeButton = Object.assign(document.createElement('button'), (_d = {\n type: 'button',\n className: button\n }, _d[allowHTML ? 'innerHTML' : 'innerText'] = REMOVE_ITEM_TEXT, _d));\n removeButton.setAttribute('aria-label', \"\".concat(REMOVE_ITEM_TEXT, \": '\").concat(value, \"'\"));\n removeButton.dataset.button = '';\n div.appendChild(removeButton);\n }\n return div;\n },\n choiceList: function (_a, isSelectOneElement) {\n var list = _a.classNames.list;\n var div = Object.assign(document.createElement('div'), {\n className: list\n });\n if (!isSelectOneElement) {\n div.setAttribute('aria-multiselectable', 'true');\n }\n div.setAttribute('role', 'listbox');\n return div;\n },\n choiceGroup: function (_a, _b) {\n var _c;\n var allowHTML = _a.allowHTML,\n _d = _a.classNames,\n group = _d.group,\n groupHeading = _d.groupHeading,\n itemDisabled = _d.itemDisabled;\n var id = _b.id,\n value = _b.value,\n disabled = _b.disabled;\n var div = Object.assign(document.createElement('div'), {\n className: \"\".concat(group, \" \").concat(disabled ? itemDisabled : '')\n });\n div.setAttribute('role', 'group');\n Object.assign(div.dataset, {\n group: '',\n id: id,\n value: value\n });\n if (disabled) {\n div.setAttribute('aria-disabled', 'true');\n }\n div.appendChild(Object.assign(document.createElement('div'), (_c = {\n className: groupHeading\n }, _c[allowHTML ? 'innerHTML' : 'innerText'] = value, _c)));\n return div;\n },\n choice: function (_a, _b, selectText) {\n var _c;\n var allowHTML = _a.allowHTML,\n _d = _a.classNames,\n item = _d.item,\n itemChoice = _d.itemChoice,\n itemSelectable = _d.itemSelectable,\n selectedState = _d.selectedState,\n itemDisabled = _d.itemDisabled,\n placeholder = _d.placeholder;\n var id = _b.id,\n value = _b.value,\n label = _b.label,\n groupId = _b.groupId,\n elementId = _b.elementId,\n isDisabled = _b.disabled,\n isSelected = _b.selected,\n isPlaceholder = _b.placeholder;\n var div = Object.assign(document.createElement('div'), (_c = {\n id: elementId\n }, _c[allowHTML ? 'innerHTML' : 'innerText'] = label, _c.className = \"\".concat(item, \" \").concat(itemChoice), _c));\n if (isSelected) {\n div.classList.add(selectedState);\n }\n if (isPlaceholder) {\n div.classList.add(placeholder);\n }\n div.setAttribute('role', groupId && groupId > 0 ? 'treeitem' : 'option');\n Object.assign(div.dataset, {\n choice: '',\n id: id,\n value: value,\n selectText: selectText\n });\n if (isDisabled) {\n div.classList.add(itemDisabled);\n div.dataset.choiceDisabled = '';\n div.setAttribute('aria-disabled', 'true');\n } else {\n div.classList.add(itemSelectable);\n div.dataset.choiceSelectable = '';\n }\n return div;\n },\n input: function (_a, placeholderValue) {\n var _b = _a.classNames,\n input = _b.input,\n inputCloned = _b.inputCloned;\n var inp = Object.assign(document.createElement('input'), {\n type: 'text',\n name: 'search_terms',\n className: \"\".concat(input, \" \").concat(inputCloned),\n autocomplete: 'off',\n autocapitalize: 'off',\n spellcheck: false\n });\n inp.setAttribute('role', 'textbox');\n inp.setAttribute('aria-autocomplete', 'list');\n inp.setAttribute('aria-label', placeholderValue);\n return inp;\n },\n dropdown: function (_a) {\n var _b = _a.classNames,\n list = _b.list,\n listDropdown = _b.listDropdown;\n var div = document.createElement('div');\n div.classList.add(list, listDropdown);\n div.setAttribute('aria-expanded', 'false');\n return div;\n },\n notice: function (_a, innerText, type) {\n var _b;\n var allowHTML = _a.allowHTML,\n _c = _a.classNames,\n item = _c.item,\n itemChoice = _c.itemChoice,\n noResults = _c.noResults,\n noChoices = _c.noChoices;\n if (type === void 0) {\n type = '';\n }\n var classes = [item, itemChoice];\n if (type === 'no-choices') {\n classes.push(noChoices);\n } else if (type === 'no-results') {\n classes.push(noResults);\n }\n return Object.assign(document.createElement('div'), (_b = {}, _b[allowHTML ? 'innerHTML' : 'innerText'] = innerText, _b.className = classes.join(' '), _b));\n },\n option: function (_a) {\n var label = _a.label,\n value = _a.value,\n customProperties = _a.customProperties,\n active = _a.active,\n disabled = _a.disabled;\n var opt = new Option(label, value, false, active);\n if (customProperties) {\n opt.dataset.customProperties = \"\".concat(customProperties);\n }\n opt.disabled = !!disabled;\n return opt;\n }\n};\nexports[\"default\"] = templates;\n\n/***/ }),\n\n/***/ 996:\n/***/ ((module) => {\n\n\n\nvar isMergeableObject = function isMergeableObject(value) {\n\treturn isNonNullObject(value)\n\t\t&& !isSpecial(value)\n};\n\nfunction isNonNullObject(value) {\n\treturn !!value && typeof value === 'object'\n}\n\nfunction isSpecial(value) {\n\tvar stringValue = Object.prototype.toString.call(value);\n\n\treturn stringValue === '[object RegExp]'\n\t\t|| stringValue === '[object Date]'\n\t\t|| isReactElement(value)\n}\n\n// see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25\nvar canUseSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;\n\nfunction isReactElement(value) {\n\treturn value.$$typeof === REACT_ELEMENT_TYPE\n}\n\nfunction emptyTarget(val) {\n\treturn Array.isArray(val) ? [] : {}\n}\n\nfunction cloneUnlessOtherwiseSpecified(value, options) {\n\treturn (options.clone !== false && options.isMergeableObject(value))\n\t\t? deepmerge(emptyTarget(value), value, options)\n\t\t: value\n}\n\nfunction defaultArrayMerge(target, source, options) {\n\treturn target.concat(source).map(function(element) {\n\t\treturn cloneUnlessOtherwiseSpecified(element, options)\n\t})\n}\n\nfunction getMergeFunction(key, options) {\n\tif (!options.customMerge) {\n\t\treturn deepmerge\n\t}\n\tvar customMerge = options.customMerge(key);\n\treturn typeof customMerge === 'function' ? customMerge : deepmerge\n}\n\nfunction getEnumerableOwnPropertySymbols(target) {\n\treturn Object.getOwnPropertySymbols\n\t\t? Object.getOwnPropertySymbols(target).filter(function(symbol) {\n\t\t\treturn target.propertyIsEnumerable(symbol)\n\t\t})\n\t\t: []\n}\n\nfunction getKeys(target) {\n\treturn Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))\n}\n\nfunction propertyIsOnObject(object, property) {\n\ttry {\n\t\treturn property in object\n\t} catch(_) {\n\t\treturn false\n\t}\n}\n\n// Protects from prototype poisoning and unexpected merging up the prototype chain.\nfunction propertyIsUnsafe(target, key) {\n\treturn propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,\n\t\t&& !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,\n\t\t\t&& Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable.\n}\n\nfunction mergeObject(target, source, options) {\n\tvar destination = {};\n\tif (options.isMergeableObject(target)) {\n\t\tgetKeys(target).forEach(function(key) {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(target[key], options);\n\t\t});\n\t}\n\tgetKeys(source).forEach(function(key) {\n\t\tif (propertyIsUnsafe(target, key)) {\n\t\t\treturn\n\t\t}\n\n\t\tif (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {\n\t\t\tdestination[key] = getMergeFunction(key, options)(target[key], source[key], options);\n\t\t} else {\n\t\t\tdestination[key] = cloneUnlessOtherwiseSpecified(source[key], options);\n\t\t}\n\t});\n\treturn destination\n}\n\nfunction deepmerge(target, source, options) {\n\toptions = options || {};\n\toptions.arrayMerge = options.arrayMerge || defaultArrayMerge;\n\toptions.isMergeableObject = options.isMergeableObject || isMergeableObject;\n\t// cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()\n\t// implementations can use it. The caller may not replace it.\n\toptions.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;\n\n\tvar sourceIsArray = Array.isArray(source);\n\tvar targetIsArray = Array.isArray(target);\n\tvar sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;\n\n\tif (!sourceAndTargetTypesMatch) {\n\t\treturn cloneUnlessOtherwiseSpecified(source, options)\n\t} else if (sourceIsArray) {\n\t\treturn options.arrayMerge(target, source, options)\n\t} else {\n\t\treturn mergeObject(target, source, options)\n\t}\n}\n\ndeepmerge.all = function deepmergeAll(array, options) {\n\tif (!Array.isArray(array)) {\n\t\tthrow new Error('first argument should be an array')\n\t}\n\n\treturn array.reduce(function(prev, next) {\n\t\treturn deepmerge(prev, next, options)\n\t}, {})\n};\n\nvar deepmerge_1 = deepmerge;\n\nmodule.exports = deepmerge_1;\n\n\n/***/ }),\n\n/***/ 221:\n/***/ ((__unused_webpack_module, __webpack_exports__, __nested_webpack_require_136845__) => {\n\n__nested_webpack_require_136845__.r(__webpack_exports__);\n/* harmony export */ __nested_webpack_require_136845__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (/* binding */ Fuse)\n/* harmony export */ });\n/**\n * Fuse.js v6.6.2 - Lightweight fuzzy-search (http://fusejs.io)\n *\n * Copyright (c) 2022 Kiro Risk (http://kiro.me)\n * All Rights Reserved. Apache Software License 2.0\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\nfunction isArray(value) {\n return !Array.isArray\n ? getTag(value) === '[object Array]'\n : Array.isArray(value)\n}\n\n// Adapted from: https://github.com/lodash/lodash/blob/master/.internal/baseToString.js\nconst INFINITY = 1 / 0;\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value\n }\n let result = value + '';\n return result == '0' && 1 / value == -INFINITY ? '-0' : result\n}\n\nfunction toString(value) {\n return value == null ? '' : baseToString(value)\n}\n\nfunction isString(value) {\n return typeof value === 'string'\n}\n\nfunction isNumber(value) {\n return typeof value === 'number'\n}\n\n// Adapted from: https://github.com/lodash/lodash/blob/master/isBoolean.js\nfunction isBoolean(value) {\n return (\n value === true ||\n value === false ||\n (isObjectLike(value) && getTag(value) == '[object Boolean]')\n )\n}\n\nfunction isObject(value) {\n return typeof value === 'object'\n}\n\n// Checks if `value` is object-like.\nfunction isObjectLike(value) {\n return isObject(value) && value !== null\n}\n\nfunction isDefined(value) {\n return value !== undefined && value !== null\n}\n\nfunction isBlank(value) {\n return !value.trim().length\n}\n\n// Gets the `toStringTag` of `value`.\n// Adapted from: https://github.com/lodash/lodash/blob/master/.internal/getTag.js\nfunction getTag(value) {\n return value == null\n ? value === undefined\n ? '[object Undefined]'\n : '[object Null]'\n : Object.prototype.toString.call(value)\n}\n\nconst EXTENDED_SEARCH_UNAVAILABLE = 'Extended search is not available';\n\nconst INCORRECT_INDEX_TYPE = \"Incorrect 'index' type\";\n\nconst LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY = (key) =>\n `Invalid value for key ${key}`;\n\nconst PATTERN_LENGTH_TOO_LARGE = (max) =>\n `Pattern length exceeds max of ${max}.`;\n\nconst MISSING_KEY_PROPERTY = (name) => `Missing ${name} property in key`;\n\nconst INVALID_KEY_WEIGHT_VALUE = (key) =>\n `Property 'weight' in key '${key}' must be a positive integer`;\n\nconst hasOwn = Object.prototype.hasOwnProperty;\n\nclass KeyStore {\n constructor(keys) {\n this._keys = [];\n this._keyMap = {};\n\n let totalWeight = 0;\n\n keys.forEach((key) => {\n let obj = createKey(key);\n\n totalWeight += obj.weight;\n\n this._keys.push(obj);\n this._keyMap[obj.id] = obj;\n\n totalWeight += obj.weight;\n });\n\n // Normalize weights so that their sum is equal to 1\n this._keys.forEach((key) => {\n key.weight /= totalWeight;\n });\n }\n get(keyId) {\n return this._keyMap[keyId]\n }\n keys() {\n return this._keys\n }\n toJSON() {\n return JSON.stringify(this._keys)\n }\n}\n\nfunction createKey(key) {\n let path = null;\n let id = null;\n let src = null;\n let weight = 1;\n let getFn = null;\n\n if (isString(key) || isArray(key)) {\n src = key;\n path = createKeyPath(key);\n id = createKeyId(key);\n } else {\n if (!hasOwn.call(key, 'name')) {\n throw new Error(MISSING_KEY_PROPERTY('name'))\n }\n\n const name = key.name;\n src = name;\n\n if (hasOwn.call(key, 'weight')) {\n weight = key.weight;\n\n if (weight <= 0) {\n throw new Error(INVALID_KEY_WEIGHT_VALUE(name))\n }\n }\n\n path = createKeyPath(name);\n id = createKeyId(name);\n getFn = key.getFn;\n }\n\n return { path, id, weight, src, getFn }\n}\n\nfunction createKeyPath(key) {\n return isArray(key) ? key : key.split('.')\n}\n\nfunction createKeyId(key) {\n return isArray(key) ? key.join('.') : key\n}\n\nfunction get(obj, path) {\n let list = [];\n let arr = false;\n\n const deepGet = (obj, path, index) => {\n if (!isDefined(obj)) {\n return\n }\n if (!path[index]) {\n // If there's no path left, we've arrived at the object we care about.\n list.push(obj);\n } else {\n let key = path[index];\n\n const value = obj[key];\n\n if (!isDefined(value)) {\n return\n }\n\n // If we're at the last value in the path, and if it's a string/number/bool,\n // add it to the list\n if (\n index === path.length - 1 &&\n (isString(value) || isNumber(value) || isBoolean(value))\n ) {\n list.push(toString(value));\n } else if (isArray(value)) {\n arr = true;\n // Search each item in the array.\n for (let i = 0, len = value.length; i < len; i += 1) {\n deepGet(value[i], path, index + 1);\n }\n } else if (path.length) {\n // An object. Recurse further.\n deepGet(value, path, index + 1);\n }\n }\n };\n\n // Backwards compatibility (since path used to be a string)\n deepGet(obj, isString(path) ? path.split('.') : path, 0);\n\n return arr ? list : list[0]\n}\n\nconst MatchOptions = {\n // Whether the matches should be included in the result set. When `true`, each record in the result\n // set will include the indices of the matched characters.\n // These can consequently be used for highlighting purposes.\n includeMatches: false,\n // When `true`, the matching function will continue to the end of a search pattern even if\n // a perfect match has already been located in the string.\n findAllMatches: false,\n // Minimum number of characters that must be matched before a result is considered a match\n minMatchCharLength: 1\n};\n\nconst BasicOptions = {\n // When `true`, the algorithm continues searching to the end of the input even if a perfect\n // match is found before the end of the same input.\n isCaseSensitive: false,\n // When true, the matching function will continue to the end of a search pattern even if\n includeScore: false,\n // List of properties that will be searched. This also supports nested properties.\n keys: [],\n // Whether to sort the result list, by score\n shouldSort: true,\n // Default sort function: sort by ascending score, ascending index\n sortFn: (a, b) =>\n a.score === b.score ? (a.idx < b.idx ? -1 : 1) : a.score < b.score ? -1 : 1\n};\n\nconst FuzzyOptions = {\n // Approximately where in the text is the pattern expected to be found?\n location: 0,\n // At what point does the match algorithm give up. A threshold of '0.0' requires a perfect match\n // (of both letters and location), a threshold of '1.0' would match anything.\n threshold: 0.6,\n // Determines how close the match must be to the fuzzy location (specified above).\n // An exact letter match which is 'distance' characters away from the fuzzy location\n // would score as a complete mismatch. A distance of '0' requires the match be at\n // the exact location specified, a threshold of '1000' would require a perfect match\n // to be within 800 characters of the fuzzy location to be found using a 0.8 threshold.\n distance: 100\n};\n\nconst AdvancedOptions = {\n // When `true`, it enables the use of unix-like search commands\n useExtendedSearch: false,\n // The get function to use when fetching an object's properties.\n // The default will search nested paths *ie foo.bar.baz*\n getFn: get,\n // When `true`, search will ignore `location` and `distance`, so it won't matter\n // where in the string the pattern appears.\n // More info: https://fusejs.io/concepts/scoring-theory.html#fuzziness-score\n ignoreLocation: false,\n // When `true`, the calculation for the relevance score (used for sorting) will\n // ignore the field-length norm.\n // More info: https://fusejs.io/concepts/scoring-theory.html#field-length-norm\n ignoreFieldNorm: false,\n // The weight to determine how much field length norm effects scoring.\n fieldNormWeight: 1\n};\n\nvar Config = {\n ...BasicOptions,\n ...MatchOptions,\n ...FuzzyOptions,\n ...AdvancedOptions\n};\n\nconst SPACE = /[^ ]+/g;\n\n// Field-length norm: the shorter the field, the higher the weight.\n// Set to 3 decimals to reduce index size.\nfunction norm(weight = 1, mantissa = 3) {\n const cache = new Map();\n const m = Math.pow(10, mantissa);\n\n return {\n get(value) {\n const numTokens = value.match(SPACE).length;\n\n if (cache.has(numTokens)) {\n return cache.get(numTokens)\n }\n\n // Default function is 1/sqrt(x), weight makes that variable\n const norm = 1 / Math.pow(numTokens, 0.5 * weight);\n\n // In place of `toFixed(mantissa)`, for faster computation\n const n = parseFloat(Math.round(norm * m) / m);\n\n cache.set(numTokens, n);\n\n return n\n },\n clear() {\n cache.clear();\n }\n }\n}\n\nclass FuseIndex {\n constructor({\n getFn = Config.getFn,\n fieldNormWeight = Config.fieldNormWeight\n } = {}) {\n this.norm = norm(fieldNormWeight, 3);\n this.getFn = getFn;\n this.isCreated = false;\n\n this.setIndexRecords();\n }\n setSources(docs = []) {\n this.docs = docs;\n }\n setIndexRecords(records = []) {\n this.records = records;\n }\n setKeys(keys = []) {\n this.keys = keys;\n this._keysMap = {};\n keys.forEach((key, idx) => {\n this._keysMap[key.id] = idx;\n });\n }\n create() {\n if (this.isCreated || !this.docs.length) {\n return\n }\n\n this.isCreated = true;\n\n // List is Array\n if (isString(this.docs[0])) {\n this.docs.forEach((doc, docIndex) => {\n this._addString(doc, docIndex);\n });\n } else {\n // List is Array\n this.docs.forEach((doc, docIndex) => {\n this._addObject(doc, docIndex);\n });\n }\n\n this.norm.clear();\n }\n // Adds a doc to the end of the index\n add(doc) {\n const idx = this.size();\n\n if (isString(doc)) {\n this._addString(doc, idx);\n } else {\n this._addObject(doc, idx);\n }\n }\n // Removes the doc at the specified index of the index\n removeAt(idx) {\n this.records.splice(idx, 1);\n\n // Change ref index of every subsquent doc\n for (let i = idx, len = this.size(); i < len; i += 1) {\n this.records[i].i -= 1;\n }\n }\n getValueForItemAtKeyId(item, keyId) {\n return item[this._keysMap[keyId]]\n }\n size() {\n return this.records.length\n }\n _addString(doc, docIndex) {\n if (!isDefined(doc) || isBlank(doc)) {\n return\n }\n\n let record = {\n v: doc,\n i: docIndex,\n n: this.norm.get(doc)\n };\n\n this.records.push(record);\n }\n _addObject(doc, docIndex) {\n let record = { i: docIndex, $: {} };\n\n // Iterate over every key (i.e, path), and fetch the value at that key\n this.keys.forEach((key, keyIndex) => {\n let value = key.getFn ? key.getFn(doc) : this.getFn(doc, key.path);\n\n if (!isDefined(value)) {\n return\n }\n\n if (isArray(value)) {\n let subRecords = [];\n const stack = [{ nestedArrIndex: -1, value }];\n\n while (stack.length) {\n const { nestedArrIndex, value } = stack.pop();\n\n if (!isDefined(value)) {\n continue\n }\n\n if (isString(value) && !isBlank(value)) {\n let subRecord = {\n v: value,\n i: nestedArrIndex,\n n: this.norm.get(value)\n };\n\n subRecords.push(subRecord);\n } else if (isArray(value)) {\n value.forEach((item, k) => {\n stack.push({\n nestedArrIndex: k,\n value: item\n });\n });\n } else ;\n }\n record.$[keyIndex] = subRecords;\n } else if (isString(value) && !isBlank(value)) {\n let subRecord = {\n v: value,\n n: this.norm.get(value)\n };\n\n record.$[keyIndex] = subRecord;\n }\n });\n\n this.records.push(record);\n }\n toJSON() {\n return {\n keys: this.keys,\n records: this.records\n }\n }\n}\n\nfunction createIndex(\n keys,\n docs,\n { getFn = Config.getFn, fieldNormWeight = Config.fieldNormWeight } = {}\n) {\n const myIndex = new FuseIndex({ getFn, fieldNormWeight });\n myIndex.setKeys(keys.map(createKey));\n myIndex.setSources(docs);\n myIndex.create();\n return myIndex\n}\n\nfunction parseIndex(\n data,\n { getFn = Config.getFn, fieldNormWeight = Config.fieldNormWeight } = {}\n) {\n const { keys, records } = data;\n const myIndex = new FuseIndex({ getFn, fieldNormWeight });\n myIndex.setKeys(keys);\n myIndex.setIndexRecords(records);\n return myIndex\n}\n\nfunction computeScore$1(\n pattern,\n {\n errors = 0,\n currentLocation = 0,\n expectedLocation = 0,\n distance = Config.distance,\n ignoreLocation = Config.ignoreLocation\n } = {}\n) {\n const accuracy = errors / pattern.length;\n\n if (ignoreLocation) {\n return accuracy\n }\n\n const proximity = Math.abs(expectedLocation - currentLocation);\n\n if (!distance) {\n // Dodge divide by zero error.\n return proximity ? 1.0 : accuracy\n }\n\n return accuracy + proximity / distance\n}\n\nfunction convertMaskToIndices(\n matchmask = [],\n minMatchCharLength = Config.minMatchCharLength\n) {\n let indices = [];\n let start = -1;\n let end = -1;\n let i = 0;\n\n for (let len = matchmask.length; i < len; i += 1) {\n let match = matchmask[i];\n if (match && start === -1) {\n start = i;\n } else if (!match && start !== -1) {\n end = i - 1;\n if (end - start + 1 >= minMatchCharLength) {\n indices.push([start, end]);\n }\n start = -1;\n }\n }\n\n // (i-1 - start) + 1 => i - start\n if (matchmask[i - 1] && i - start >= minMatchCharLength) {\n indices.push([start, i - 1]);\n }\n\n return indices\n}\n\n// Machine word size\nconst MAX_BITS = 32;\n\nfunction search(\n text,\n pattern,\n patternAlphabet,\n {\n location = Config.location,\n distance = Config.distance,\n threshold = Config.threshold,\n findAllMatches = Config.findAllMatches,\n minMatchCharLength = Config.minMatchCharLength,\n includeMatches = Config.includeMatches,\n ignoreLocation = Config.ignoreLocation\n } = {}\n) {\n if (pattern.length > MAX_BITS) {\n throw new Error(PATTERN_LENGTH_TOO_LARGE(MAX_BITS))\n }\n\n const patternLen = pattern.length;\n // Set starting location at beginning text and initialize the alphabet.\n const textLen = text.length;\n // Handle the case when location > text.length\n const expectedLocation = Math.max(0, Math.min(location, textLen));\n // Highest score beyond which we give up.\n let currentThreshold = threshold;\n // Is there a nearby exact match? (speedup)\n let bestLocation = expectedLocation;\n\n // Performance: only computer matches when the minMatchCharLength > 1\n // OR if `includeMatches` is true.\n const computeMatches = minMatchCharLength > 1 || includeMatches;\n // A mask of the matches, used for building the indices\n const matchMask = computeMatches ? Array(textLen) : [];\n\n let index;\n\n // Get all exact matches, here for speed up\n while ((index = text.indexOf(pattern, bestLocation)) > -1) {\n let score = computeScore$1(pattern, {\n currentLocation: index,\n expectedLocation,\n distance,\n ignoreLocation\n });\n\n currentThreshold = Math.min(score, currentThreshold);\n bestLocation = index + patternLen;\n\n if (computeMatches) {\n let i = 0;\n while (i < patternLen) {\n matchMask[index + i] = 1;\n i += 1;\n }\n }\n }\n\n // Reset the best location\n bestLocation = -1;\n\n let lastBitArr = [];\n let finalScore = 1;\n let binMax = patternLen + textLen;\n\n const mask = 1 << (patternLen - 1);\n\n for (let i = 0; i < patternLen; i += 1) {\n // Scan for the best match; each iteration allows for one more error.\n // Run a binary search to determine how far from the match location we can stray\n // at this error level.\n let binMin = 0;\n let binMid = binMax;\n\n while (binMin < binMid) {\n const score = computeScore$1(pattern, {\n errors: i,\n currentLocation: expectedLocation + binMid,\n expectedLocation,\n distance,\n ignoreLocation\n });\n\n if (score <= currentThreshold) {\n binMin = binMid;\n } else {\n binMax = binMid;\n }\n\n binMid = Math.floor((binMax - binMin) / 2 + binMin);\n }\n\n // Use the result from this iteration as the maximum for the next.\n binMax = binMid;\n\n let start = Math.max(1, expectedLocation - binMid + 1);\n let finish = findAllMatches\n ? textLen\n : Math.min(expectedLocation + binMid, textLen) + patternLen;\n\n // Initialize the bit array\n let bitArr = Array(finish + 2);\n\n bitArr[finish + 1] = (1 << i) - 1;\n\n for (let j = finish; j >= start; j -= 1) {\n let currentLocation = j - 1;\n let charMatch = patternAlphabet[text.charAt(currentLocation)];\n\n if (computeMatches) {\n // Speed up: quick bool to int conversion (i.e, `charMatch ? 1 : 0`)\n matchMask[currentLocation] = +!!charMatch;\n }\n\n // First pass: exact match\n bitArr[j] = ((bitArr[j + 1] << 1) | 1) & charMatch;\n\n // Subsequent passes: fuzzy match\n if (i) {\n bitArr[j] |=\n ((lastBitArr[j + 1] | lastBitArr[j]) << 1) | 1 | lastBitArr[j + 1];\n }\n\n if (bitArr[j] & mask) {\n finalScore = computeScore$1(pattern, {\n errors: i,\n currentLocation,\n expectedLocation,\n distance,\n ignoreLocation\n });\n\n // This match will almost certainly be better than any existing match.\n // But check anyway.\n if (finalScore <= currentThreshold) {\n // Indeed it is\n currentThreshold = finalScore;\n bestLocation = currentLocation;\n\n // Already passed `loc`, downhill from here on in.\n if (bestLocation <= expectedLocation) {\n break\n }\n\n // When passing `bestLocation`, don't exceed our current distance from `expectedLocation`.\n start = Math.max(1, 2 * expectedLocation - bestLocation);\n }\n }\n }\n\n // No hope for a (better) match at greater error levels.\n const score = computeScore$1(pattern, {\n errors: i + 1,\n currentLocation: expectedLocation,\n expectedLocation,\n distance,\n ignoreLocation\n });\n\n if (score > currentThreshold) {\n break\n }\n\n lastBitArr = bitArr;\n }\n\n const result = {\n isMatch: bestLocation >= 0,\n // Count exact matches (those with a score of 0) to be \"almost\" exact\n score: Math.max(0.001, finalScore)\n };\n\n if (computeMatches) {\n const indices = convertMaskToIndices(matchMask, minMatchCharLength);\n if (!indices.length) {\n result.isMatch = false;\n } else if (includeMatches) {\n result.indices = indices;\n }\n }\n\n return result\n}\n\nfunction createPatternAlphabet(pattern) {\n let mask = {};\n\n for (let i = 0, len = pattern.length; i < len; i += 1) {\n const char = pattern.charAt(i);\n mask[char] = (mask[char] || 0) | (1 << (len - i - 1));\n }\n\n return mask\n}\n\nclass BitapSearch {\n constructor(\n pattern,\n {\n location = Config.location,\n threshold = Config.threshold,\n distance = Config.distance,\n includeMatches = Config.includeMatches,\n findAllMatches = Config.findAllMatches,\n minMatchCharLength = Config.minMatchCharLength,\n isCaseSensitive = Config.isCaseSensitive,\n ignoreLocation = Config.ignoreLocation\n } = {}\n ) {\n this.options = {\n location,\n threshold,\n distance,\n includeMatches,\n findAllMatches,\n minMatchCharLength,\n isCaseSensitive,\n ignoreLocation\n };\n\n this.pattern = isCaseSensitive ? pattern : pattern.toLowerCase();\n\n this.chunks = [];\n\n if (!this.pattern.length) {\n return\n }\n\n const addChunk = (pattern, startIndex) => {\n this.chunks.push({\n pattern,\n alphabet: createPatternAlphabet(pattern),\n startIndex\n });\n };\n\n const len = this.pattern.length;\n\n if (len > MAX_BITS) {\n let i = 0;\n const remainder = len % MAX_BITS;\n const end = len - remainder;\n\n while (i < end) {\n addChunk(this.pattern.substr(i, MAX_BITS), i);\n i += MAX_BITS;\n }\n\n if (remainder) {\n const startIndex = len - MAX_BITS;\n addChunk(this.pattern.substr(startIndex), startIndex);\n }\n } else {\n addChunk(this.pattern, 0);\n }\n }\n\n searchIn(text) {\n const { isCaseSensitive, includeMatches } = this.options;\n\n if (!isCaseSensitive) {\n text = text.toLowerCase();\n }\n\n // Exact match\n if (this.pattern === text) {\n let result = {\n isMatch: true,\n score: 0\n };\n\n if (includeMatches) {\n result.indices = [[0, text.length - 1]];\n }\n\n return result\n }\n\n // Otherwise, use Bitap algorithm\n const {\n location,\n distance,\n threshold,\n findAllMatches,\n minMatchCharLength,\n ignoreLocation\n } = this.options;\n\n let allIndices = [];\n let totalScore = 0;\n let hasMatches = false;\n\n this.chunks.forEach(({ pattern, alphabet, startIndex }) => {\n const { isMatch, score, indices } = search(text, pattern, alphabet, {\n location: location + startIndex,\n distance,\n threshold,\n findAllMatches,\n minMatchCharLength,\n includeMatches,\n ignoreLocation\n });\n\n if (isMatch) {\n hasMatches = true;\n }\n\n totalScore += score;\n\n if (isMatch && indices) {\n allIndices = [...allIndices, ...indices];\n }\n });\n\n let result = {\n isMatch: hasMatches,\n score: hasMatches ? totalScore / this.chunks.length : 1\n };\n\n if (hasMatches && includeMatches) {\n result.indices = allIndices;\n }\n\n return result\n }\n}\n\nclass BaseMatch {\n constructor(pattern) {\n this.pattern = pattern;\n }\n static isMultiMatch(pattern) {\n return getMatch(pattern, this.multiRegex)\n }\n static isSingleMatch(pattern) {\n return getMatch(pattern, this.singleRegex)\n }\n search(/*text*/) {}\n}\n\nfunction getMatch(pattern, exp) {\n const matches = pattern.match(exp);\n return matches ? matches[1] : null\n}\n\n// Token: 'file\n\nclass ExactMatch extends BaseMatch {\n constructor(pattern) {\n super(pattern);\n }\n static get type() {\n return 'exact'\n }\n static get multiRegex() {\n return /^=\"(.*)\"$/\n }\n static get singleRegex() {\n return /^=(.*)$/\n }\n search(text) {\n const isMatch = text === this.pattern;\n\n return {\n isMatch,\n score: isMatch ? 0 : 1,\n indices: [0, this.pattern.length - 1]\n }\n }\n}\n\n// Token: !fire\n\nclass InverseExactMatch extends BaseMatch {\n constructor(pattern) {\n super(pattern);\n }\n static get type() {\n return 'inverse-exact'\n }\n static get multiRegex() {\n return /^!\"(.*)\"$/\n }\n static get singleRegex() {\n return /^!(.*)$/\n }\n search(text) {\n const index = text.indexOf(this.pattern);\n const isMatch = index === -1;\n\n return {\n isMatch,\n score: isMatch ? 0 : 1,\n indices: [0, text.length - 1]\n }\n }\n}\n\n// Token: ^file\n\nclass PrefixExactMatch extends BaseMatch {\n constructor(pattern) {\n super(pattern);\n }\n static get type() {\n return 'prefix-exact'\n }\n static get multiRegex() {\n return /^\\^\"(.*)\"$/\n }\n static get singleRegex() {\n return /^\\^(.*)$/\n }\n search(text) {\n const isMatch = text.startsWith(this.pattern);\n\n return {\n isMatch,\n score: isMatch ? 0 : 1,\n indices: [0, this.pattern.length - 1]\n }\n }\n}\n\n// Token: !^fire\n\nclass InversePrefixExactMatch extends BaseMatch {\n constructor(pattern) {\n super(pattern);\n }\n static get type() {\n return 'inverse-prefix-exact'\n }\n static get multiRegex() {\n return /^!\\^\"(.*)\"$/\n }\n static get singleRegex() {\n return /^!\\^(.*)$/\n }\n search(text) {\n const isMatch = !text.startsWith(this.pattern);\n\n return {\n isMatch,\n score: isMatch ? 0 : 1,\n indices: [0, text.length - 1]\n }\n }\n}\n\n// Token: .file$\n\nclass SuffixExactMatch extends BaseMatch {\n constructor(pattern) {\n super(pattern);\n }\n static get type() {\n return 'suffix-exact'\n }\n static get multiRegex() {\n return /^\"(.*)\"\\$$/\n }\n static get singleRegex() {\n return /^(.*)\\$$/\n }\n search(text) {\n const isMatch = text.endsWith(this.pattern);\n\n return {\n isMatch,\n score: isMatch ? 0 : 1,\n indices: [text.length - this.pattern.length, text.length - 1]\n }\n }\n}\n\n// Token: !.file$\n\nclass InverseSuffixExactMatch extends BaseMatch {\n constructor(pattern) {\n super(pattern);\n }\n static get type() {\n return 'inverse-suffix-exact'\n }\n static get multiRegex() {\n return /^!\"(.*)\"\\$$/\n }\n static get singleRegex() {\n return /^!(.*)\\$$/\n }\n search(text) {\n const isMatch = !text.endsWith(this.pattern);\n return {\n isMatch,\n score: isMatch ? 0 : 1,\n indices: [0, text.length - 1]\n }\n }\n}\n\nclass FuzzyMatch extends BaseMatch {\n constructor(\n pattern,\n {\n location = Config.location,\n threshold = Config.threshold,\n distance = Config.distance,\n includeMatches = Config.includeMatches,\n findAllMatches = Config.findAllMatches,\n minMatchCharLength = Config.minMatchCharLength,\n isCaseSensitive = Config.isCaseSensitive,\n ignoreLocation = Config.ignoreLocation\n } = {}\n ) {\n super(pattern);\n this._bitapSearch = new BitapSearch(pattern, {\n location,\n threshold,\n distance,\n includeMatches,\n findAllMatches,\n minMatchCharLength,\n isCaseSensitive,\n ignoreLocation\n });\n }\n static get type() {\n return 'fuzzy'\n }\n static get multiRegex() {\n return /^\"(.*)\"$/\n }\n static get singleRegex() {\n return /^(.*)$/\n }\n search(text) {\n return this._bitapSearch.searchIn(text)\n }\n}\n\n// Token: 'file\n\nclass IncludeMatch extends BaseMatch {\n constructor(pattern) {\n super(pattern);\n }\n static get type() {\n return 'include'\n }\n static get multiRegex() {\n return /^'\"(.*)\"$/\n }\n static get singleRegex() {\n return /^'(.*)$/\n }\n search(text) {\n let location = 0;\n let index;\n\n const indices = [];\n const patternLen = this.pattern.length;\n\n // Get all exact matches\n while ((index = text.indexOf(this.pattern, location)) > -1) {\n location = index + patternLen;\n indices.push([index, location - 1]);\n }\n\n const isMatch = !!indices.length;\n\n return {\n isMatch,\n score: isMatch ? 0 : 1,\n indices\n }\n }\n}\n\n// ❗Order is important. DO NOT CHANGE.\nconst searchers = [\n ExactMatch,\n IncludeMatch,\n PrefixExactMatch,\n InversePrefixExactMatch,\n InverseSuffixExactMatch,\n SuffixExactMatch,\n InverseExactMatch,\n FuzzyMatch\n];\n\nconst searchersLen = searchers.length;\n\n// Regex to split by spaces, but keep anything in quotes together\nconst SPACE_RE = / +(?=(?:[^\\\"]*\\\"[^\\\"]*\\\")*[^\\\"]*$)/;\nconst OR_TOKEN = '|';\n\n// Return a 2D array representation of the query, for simpler parsing.\n// Example:\n// \"^core go$ | rb$ | py$ xy$\" => [[\"^core\", \"go$\"], [\"rb$\"], [\"py$\", \"xy$\"]]\nfunction parseQuery(pattern, options = {}) {\n return pattern.split(OR_TOKEN).map((item) => {\n let query = item\n .trim()\n .split(SPACE_RE)\n .filter((item) => item && !!item.trim());\n\n let results = [];\n for (let i = 0, len = query.length; i < len; i += 1) {\n const queryItem = query[i];\n\n // 1. Handle multiple query match (i.e, once that are quoted, like `\"hello world\"`)\n let found = false;\n let idx = -1;\n while (!found && ++idx < searchersLen) {\n const searcher = searchers[idx];\n let token = searcher.isMultiMatch(queryItem);\n if (token) {\n results.push(new searcher(token, options));\n found = true;\n }\n }\n\n if (found) {\n continue\n }\n\n // 2. Handle single query matches (i.e, once that are *not* quoted)\n idx = -1;\n while (++idx < searchersLen) {\n const searcher = searchers[idx];\n let token = searcher.isSingleMatch(queryItem);\n if (token) {\n results.push(new searcher(token, options));\n break\n }\n }\n }\n\n return results\n })\n}\n\n// These extended matchers can return an array of matches, as opposed\n// to a singl match\nconst MultiMatchSet = new Set([FuzzyMatch.type, IncludeMatch.type]);\n\n/**\n * Command-like searching\n * ======================\n *\n * Given multiple search terms delimited by spaces.e.g. `^jscript .python$ ruby !java`,\n * search in a given text.\n *\n * Search syntax:\n *\n * | Token | Match type | Description |\n * | ----------- | -------------------------- | -------------------------------------- |\n * | `jscript` | fuzzy-match | Items that fuzzy match `jscript` |\n * | `=scheme` | exact-match | Items that are `scheme` |\n * | `'python` | include-match | Items that include `python` |\n * | `!ruby` | inverse-exact-match | Items that do not include `ruby` |\n * | `^java` | prefix-exact-match | Items that start with `java` |\n * | `!^earlang` | inverse-prefix-exact-match | Items that do not start with `earlang` |\n * | `.js$` | suffix-exact-match | Items that end with `.js` |\n * | `!.go$` | inverse-suffix-exact-match | Items that do not end with `.go` |\n *\n * A single pipe character acts as an OR operator. For example, the following\n * query matches entries that start with `core` and end with either`go`, `rb`,\n * or`py`.\n *\n * ```\n * ^core go$ | rb$ | py$\n * ```\n */\nclass ExtendedSearch {\n constructor(\n pattern,\n {\n isCaseSensitive = Config.isCaseSensitive,\n includeMatches = Config.includeMatches,\n minMatchCharLength = Config.minMatchCharLength,\n ignoreLocation = Config.ignoreLocation,\n findAllMatches = Config.findAllMatches,\n location = Config.location,\n threshold = Config.threshold,\n distance = Config.distance\n } = {}\n ) {\n this.query = null;\n this.options = {\n isCaseSensitive,\n includeMatches,\n minMatchCharLength,\n findAllMatches,\n ignoreLocation,\n location,\n threshold,\n distance\n };\n\n this.pattern = isCaseSensitive ? pattern : pattern.toLowerCase();\n this.query = parseQuery(this.pattern, this.options);\n }\n\n static condition(_, options) {\n return options.useExtendedSearch\n }\n\n searchIn(text) {\n const query = this.query;\n\n if (!query) {\n return {\n isMatch: false,\n score: 1\n }\n }\n\n const { includeMatches, isCaseSensitive } = this.options;\n\n text = isCaseSensitive ? text : text.toLowerCase();\n\n let numMatches = 0;\n let allIndices = [];\n let totalScore = 0;\n\n // ORs\n for (let i = 0, qLen = query.length; i < qLen; i += 1) {\n const searchers = query[i];\n\n // Reset indices\n allIndices.length = 0;\n numMatches = 0;\n\n // ANDs\n for (let j = 0, pLen = searchers.length; j < pLen; j += 1) {\n const searcher = searchers[j];\n const { isMatch, indices, score } = searcher.search(text);\n\n if (isMatch) {\n numMatches += 1;\n totalScore += score;\n if (includeMatches) {\n const type = searcher.constructor.type;\n if (MultiMatchSet.has(type)) {\n allIndices = [...allIndices, ...indices];\n } else {\n allIndices.push(indices);\n }\n }\n } else {\n totalScore = 0;\n numMatches = 0;\n allIndices.length = 0;\n break\n }\n }\n\n // OR condition, so if TRUE, return\n if (numMatches) {\n let result = {\n isMatch: true,\n score: totalScore / numMatches\n };\n\n if (includeMatches) {\n result.indices = allIndices;\n }\n\n return result\n }\n }\n\n // Nothing was matched\n return {\n isMatch: false,\n score: 1\n }\n }\n}\n\nconst registeredSearchers = [];\n\nfunction register(...args) {\n registeredSearchers.push(...args);\n}\n\nfunction createSearcher(pattern, options) {\n for (let i = 0, len = registeredSearchers.length; i < len; i += 1) {\n let searcherClass = registeredSearchers[i];\n if (searcherClass.condition(pattern, options)) {\n return new searcherClass(pattern, options)\n }\n }\n\n return new BitapSearch(pattern, options)\n}\n\nconst LogicalOperator = {\n AND: '$and',\n OR: '$or'\n};\n\nconst KeyType = {\n PATH: '$path',\n PATTERN: '$val'\n};\n\nconst isExpression = (query) =>\n !!(query[LogicalOperator.AND] || query[LogicalOperator.OR]);\n\nconst isPath = (query) => !!query[KeyType.PATH];\n\nconst isLeaf = (query) =>\n !isArray(query) && isObject(query) && !isExpression(query);\n\nconst convertToExplicit = (query) => ({\n [LogicalOperator.AND]: Object.keys(query).map((key) => ({\n [key]: query[key]\n }))\n});\n\n// When `auto` is `true`, the parse function will infer and initialize and add\n// the appropriate `Searcher` instance\nfunction parse(query, options, { auto = true } = {}) {\n const next = (query) => {\n let keys = Object.keys(query);\n\n const isQueryPath = isPath(query);\n\n if (!isQueryPath && keys.length > 1 && !isExpression(query)) {\n return next(convertToExplicit(query))\n }\n\n if (isLeaf(query)) {\n const key = isQueryPath ? query[KeyType.PATH] : keys[0];\n\n const pattern = isQueryPath ? query[KeyType.PATTERN] : query[key];\n\n if (!isString(pattern)) {\n throw new Error(LOGICAL_SEARCH_INVALID_QUERY_FOR_KEY(key))\n }\n\n const obj = {\n keyId: createKeyId(key),\n pattern\n };\n\n if (auto) {\n obj.searcher = createSearcher(pattern, options);\n }\n\n return obj\n }\n\n let node = {\n children: [],\n operator: keys[0]\n };\n\n keys.forEach((key) => {\n const value = query[key];\n\n if (isArray(value)) {\n value.forEach((item) => {\n node.children.push(next(item));\n });\n }\n });\n\n return node\n };\n\n if (!isExpression(query)) {\n query = convertToExplicit(query);\n }\n\n return next(query)\n}\n\n// Practical scoring function\nfunction computeScore(\n results,\n { ignoreFieldNorm = Config.ignoreFieldNorm }\n) {\n results.forEach((result) => {\n let totalScore = 1;\n\n result.matches.forEach(({ key, norm, score }) => {\n const weight = key ? key.weight : null;\n\n totalScore *= Math.pow(\n score === 0 && weight ? Number.EPSILON : score,\n (weight || 1) * (ignoreFieldNorm ? 1 : norm)\n );\n });\n\n result.score = totalScore;\n });\n}\n\nfunction transformMatches(result, data) {\n const matches = result.matches;\n data.matches = [];\n\n if (!isDefined(matches)) {\n return\n }\n\n matches.forEach((match) => {\n if (!isDefined(match.indices) || !match.indices.length) {\n return\n }\n\n const { indices, value } = match;\n\n let obj = {\n indices,\n value\n };\n\n if (match.key) {\n obj.key = match.key.src;\n }\n\n if (match.idx > -1) {\n obj.refIndex = match.idx;\n }\n\n data.matches.push(obj);\n });\n}\n\nfunction transformScore(result, data) {\n data.score = result.score;\n}\n\nfunction format(\n results,\n docs,\n {\n includeMatches = Config.includeMatches,\n includeScore = Config.includeScore\n } = {}\n) {\n const transformers = [];\n\n if (includeMatches) transformers.push(transformMatches);\n if (includeScore) transformers.push(transformScore);\n\n return results.map((result) => {\n const { idx } = result;\n\n const data = {\n item: docs[idx],\n refIndex: idx\n };\n\n if (transformers.length) {\n transformers.forEach((transformer) => {\n transformer(result, data);\n });\n }\n\n return data\n })\n}\n\nclass Fuse {\n constructor(docs, options = {}, index) {\n this.options = { ...Config, ...options };\n\n if (\n this.options.useExtendedSearch &&\n !true\n ) {}\n\n this._keyStore = new KeyStore(this.options.keys);\n\n this.setCollection(docs, index);\n }\n\n setCollection(docs, index) {\n this._docs = docs;\n\n if (index && !(index instanceof FuseIndex)) {\n throw new Error(INCORRECT_INDEX_TYPE)\n }\n\n this._myIndex =\n index ||\n createIndex(this.options.keys, this._docs, {\n getFn: this.options.getFn,\n fieldNormWeight: this.options.fieldNormWeight\n });\n }\n\n add(doc) {\n if (!isDefined(doc)) {\n return\n }\n\n this._docs.push(doc);\n this._myIndex.add(doc);\n }\n\n remove(predicate = (/* doc, idx */) => false) {\n const results = [];\n\n for (let i = 0, len = this._docs.length; i < len; i += 1) {\n const doc = this._docs[i];\n if (predicate(doc, i)) {\n this.removeAt(i);\n i -= 1;\n len -= 1;\n\n results.push(doc);\n }\n }\n\n return results\n }\n\n removeAt(idx) {\n this._docs.splice(idx, 1);\n this._myIndex.removeAt(idx);\n }\n\n getIndex() {\n return this._myIndex\n }\n\n search(query, { limit = -1 } = {}) {\n const {\n includeMatches,\n includeScore,\n shouldSort,\n sortFn,\n ignoreFieldNorm\n } = this.options;\n\n let results = isString(query)\n ? isString(this._docs[0])\n ? this._searchStringList(query)\n : this._searchObjectList(query)\n : this._searchLogical(query);\n\n computeScore(results, { ignoreFieldNorm });\n\n if (shouldSort) {\n results.sort(sortFn);\n }\n\n if (isNumber(limit) && limit > -1) {\n results = results.slice(0, limit);\n }\n\n return format(results, this._docs, {\n includeMatches,\n includeScore\n })\n }\n\n _searchStringList(query) {\n const searcher = createSearcher(query, this.options);\n const { records } = this._myIndex;\n const results = [];\n\n // Iterate over every string in the index\n records.forEach(({ v: text, i: idx, n: norm }) => {\n if (!isDefined(text)) {\n return\n }\n\n const { isMatch, score, indices } = searcher.searchIn(text);\n\n if (isMatch) {\n results.push({\n item: text,\n idx,\n matches: [{ score, value: text, norm, indices }]\n });\n }\n });\n\n return results\n }\n\n _searchLogical(query) {\n\n const expression = parse(query, this.options);\n\n const evaluate = (node, item, idx) => {\n if (!node.children) {\n const { keyId, searcher } = node;\n\n const matches = this._findMatches({\n key: this._keyStore.get(keyId),\n value: this._myIndex.getValueForItemAtKeyId(item, keyId),\n searcher\n });\n\n if (matches && matches.length) {\n return [\n {\n idx,\n item,\n matches\n }\n ]\n }\n\n return []\n }\n\n const res = [];\n for (let i = 0, len = node.children.length; i < len; i += 1) {\n const child = node.children[i];\n const result = evaluate(child, item, idx);\n if (result.length) {\n res.push(...result);\n } else if (node.operator === LogicalOperator.AND) {\n return []\n }\n }\n return res\n };\n\n const records = this._myIndex.records;\n const resultMap = {};\n const results = [];\n\n records.forEach(({ $: item, i: idx }) => {\n if (isDefined(item)) {\n let expResults = evaluate(expression, item, idx);\n\n if (expResults.length) {\n // Dedupe when adding\n if (!resultMap[idx]) {\n resultMap[idx] = { idx, item, matches: [] };\n results.push(resultMap[idx]);\n }\n expResults.forEach(({ matches }) => {\n resultMap[idx].matches.push(...matches);\n });\n }\n }\n });\n\n return results\n }\n\n _searchObjectList(query) {\n const searcher = createSearcher(query, this.options);\n const { keys, records } = this._myIndex;\n const results = [];\n\n // List is Array\n records.forEach(({ $: item, i: idx }) => {\n if (!isDefined(item)) {\n return\n }\n\n let matches = [];\n\n // Iterate over every key (i.e, path), and fetch the value at that key\n keys.forEach((key, keyIndex) => {\n matches.push(\n ...this._findMatches({\n key,\n value: item[keyIndex],\n searcher\n })\n );\n });\n\n if (matches.length) {\n results.push({\n idx,\n item,\n matches\n });\n }\n });\n\n return results\n }\n _findMatches({ key, value, searcher }) {\n if (!isDefined(value)) {\n return []\n }\n\n let matches = [];\n\n if (isArray(value)) {\n value.forEach(({ v: text, i: idx, n: norm }) => {\n if (!isDefined(text)) {\n return\n }\n\n const { isMatch, score, indices } = searcher.searchIn(text);\n\n if (isMatch) {\n matches.push({\n score,\n key,\n value: text,\n idx,\n norm,\n indices\n });\n }\n });\n } else {\n const { v: text, n: norm } = value;\n\n const { isMatch, score, indices } = searcher.searchIn(text);\n\n if (isMatch) {\n matches.push({ score, key, value: text, norm, indices });\n }\n }\n\n return matches\n }\n}\n\nFuse.version = '6.6.2';\nFuse.createIndex = createIndex;\nFuse.parseIndex = parseIndex;\nFuse.config = Config;\n\n{\n Fuse.parseQuery = parse;\n}\n\n{\n register(ExtendedSearch);\n}\n\n\n\n\n/***/ }),\n\n/***/ 791:\n/***/ ((__unused_webpack_module, __webpack_exports__, __nested_webpack_require_178383__) => {\n\n// ESM COMPAT FLAG\n__nested_webpack_require_178383__.r(__webpack_exports__);\n\n// EXPORTS\n__nested_webpack_require_178383__.d(__webpack_exports__, {\n \"__DO_NOT_USE__ActionTypes\": () => (/* binding */ ActionTypes),\n \"applyMiddleware\": () => (/* binding */ applyMiddleware),\n \"bindActionCreators\": () => (/* binding */ bindActionCreators),\n \"combineReducers\": () => (/* binding */ combineReducers),\n \"compose\": () => (/* binding */ compose),\n \"createStore\": () => (/* binding */ createStore),\n \"legacy_createStore\": () => (/* binding */ legacy_createStore)\n});\n\n;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js\nfunction _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n}\n;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toPrimitive.js\n\nfunction _toPrimitive(input, hint) {\n if (_typeof(input) !== \"object\" || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n if (prim !== undefined) {\n var res = prim.call(input, hint || \"default\");\n if (_typeof(res) !== \"object\") return res;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (hint === \"string\" ? String : Number)(input);\n}\n;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js\n\n\nfunction _toPropertyKey(arg) {\n var key = _toPrimitive(arg, \"string\");\n return _typeof(key) === \"symbol\" ? key : String(key);\n}\n;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js\n\nfunction _defineProperty(obj, key, value) {\n key = _toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}\n;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n enumerableOnly && (symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n })), keys.push.apply(keys, symbols);\n }\n return keys;\n}\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = null != arguments[i] ? arguments[i] : {};\n i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n return target;\n}\n;// CONCATENATED MODULE: ./node_modules/redux/es/redux.js\n\n\n/**\n * Adapted from React: https://github.com/facebook/react/blob/master/packages/shared/formatProdErrorMessage.js\n *\n * Do not require this module directly! Use normal throw error calls. These messages will be replaced with error codes\n * during build.\n * @param {number} code\n */\nfunction formatProdErrorMessage(code) {\n return \"Minified Redux error #\" + code + \"; visit https://redux.js.org/Errors?code=\" + code + \" for the full message or \" + 'use the non-minified dev environment for full errors. ';\n}\n\n// Inlined version of the `symbol-observable` polyfill\nvar $$observable = (function () {\n return typeof Symbol === 'function' && Symbol.observable || '@@observable';\n})();\n\n/**\n * These are private action types reserved by Redux.\n * For any unknown actions, you must return the current state.\n * If the current state is undefined, you must return the initial state.\n * Do not reference these action types directly in your code.\n */\nvar randomString = function randomString() {\n return Math.random().toString(36).substring(7).split('').join('.');\n};\n\nvar ActionTypes = {\n INIT: \"@@redux/INIT\" + randomString(),\n REPLACE: \"@@redux/REPLACE\" + randomString(),\n PROBE_UNKNOWN_ACTION: function PROBE_UNKNOWN_ACTION() {\n return \"@@redux/PROBE_UNKNOWN_ACTION\" + randomString();\n }\n};\n\n/**\n * @param {any} obj The object to inspect.\n * @returns {boolean} True if the argument appears to be a plain object.\n */\nfunction isPlainObject(obj) {\n if (typeof obj !== 'object' || obj === null) return false;\n var proto = obj;\n\n while (Object.getPrototypeOf(proto) !== null) {\n proto = Object.getPrototypeOf(proto);\n }\n\n return Object.getPrototypeOf(obj) === proto;\n}\n\n// Inlined / shortened version of `kindOf` from https://github.com/jonschlinkert/kind-of\nfunction miniKindOf(val) {\n if (val === void 0) return 'undefined';\n if (val === null) return 'null';\n var type = typeof val;\n\n switch (type) {\n case 'boolean':\n case 'string':\n case 'number':\n case 'symbol':\n case 'function':\n {\n return type;\n }\n }\n\n if (Array.isArray(val)) return 'array';\n if (isDate(val)) return 'date';\n if (isError(val)) return 'error';\n var constructorName = ctorName(val);\n\n switch (constructorName) {\n case 'Symbol':\n case 'Promise':\n case 'WeakMap':\n case 'WeakSet':\n case 'Map':\n case 'Set':\n return constructorName;\n } // other\n\n\n return type.slice(8, -1).toLowerCase().replace(/\\s/g, '');\n}\n\nfunction ctorName(val) {\n return typeof val.constructor === 'function' ? val.constructor.name : null;\n}\n\nfunction isError(val) {\n return val instanceof Error || typeof val.message === 'string' && val.constructor && typeof val.constructor.stackTraceLimit === 'number';\n}\n\nfunction isDate(val) {\n if (val instanceof Date) return true;\n return typeof val.toDateString === 'function' && typeof val.getDate === 'function' && typeof val.setDate === 'function';\n}\n\nfunction kindOf(val) {\n var typeOfVal = typeof val;\n\n if (false) {}\n\n return typeOfVal;\n}\n\n/**\n * @deprecated\n *\n * **We recommend using the `configureStore` method\n * of the `@reduxjs/toolkit` package**, which replaces `createStore`.\n *\n * Redux Toolkit is our recommended approach for writing Redux logic today,\n * including store setup, reducers, data fetching, and more.\n *\n * **For more details, please read this Redux docs page:**\n * **https://redux.js.org/introduction/why-rtk-is-redux-today**\n *\n * `configureStore` from Redux Toolkit is an improved version of `createStore` that\n * simplifies setup and helps avoid common bugs.\n *\n * You should not be using the `redux` core package by itself today, except for learning purposes.\n * The `createStore` method from the core `redux` package will not be removed, but we encourage\n * all users to migrate to using Redux Toolkit for all Redux code.\n *\n * If you want to use `createStore` without this visual deprecation warning, use\n * the `legacy_createStore` import instead:\n *\n * `import { legacy_createStore as createStore} from 'redux'`\n *\n */\n\nfunction createStore(reducer, preloadedState, enhancer) {\n var _ref2;\n\n if (typeof preloadedState === 'function' && typeof enhancer === 'function' || typeof enhancer === 'function' && typeof arguments[3] === 'function') {\n throw new Error( true ? formatProdErrorMessage(0) : 0);\n }\n\n if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') {\n enhancer = preloadedState;\n preloadedState = undefined;\n }\n\n if (typeof enhancer !== 'undefined') {\n if (typeof enhancer !== 'function') {\n throw new Error( true ? formatProdErrorMessage(1) : 0);\n }\n\n return enhancer(createStore)(reducer, preloadedState);\n }\n\n if (typeof reducer !== 'function') {\n throw new Error( true ? formatProdErrorMessage(2) : 0);\n }\n\n var currentReducer = reducer;\n var currentState = preloadedState;\n var currentListeners = [];\n var nextListeners = currentListeners;\n var isDispatching = false;\n /**\n * This makes a shallow copy of currentListeners so we can use\n * nextListeners as a temporary list while dispatching.\n *\n * This prevents any bugs around consumers calling\n * subscribe/unsubscribe in the middle of a dispatch.\n */\n\n function ensureCanMutateNextListeners() {\n if (nextListeners === currentListeners) {\n nextListeners = currentListeners.slice();\n }\n }\n /**\n * Reads the state tree managed by the store.\n *\n * @returns {any} The current state tree of your application.\n */\n\n\n function getState() {\n if (isDispatching) {\n throw new Error( true ? formatProdErrorMessage(3) : 0);\n }\n\n return currentState;\n }\n /**\n * Adds a change listener. It will be called any time an action is dispatched,\n * and some part of the state tree may potentially have changed. You may then\n * call `getState()` to read the current state tree inside the callback.\n *\n * You may call `dispatch()` from a change listener, with the following\n * caveats:\n *\n * 1. The subscriptions are snapshotted just before every `dispatch()` call.\n * If you subscribe or unsubscribe while the listeners are being invoked, this\n * will not have any effect on the `dispatch()` that is currently in progress.\n * However, the next `dispatch()` call, whether nested or not, will use a more\n * recent snapshot of the subscription list.\n *\n * 2. The listener should not expect to see all state changes, as the state\n * might have been updated multiple times during a nested `dispatch()` before\n * the listener is called. It is, however, guaranteed that all subscribers\n * registered before the `dispatch()` started will be called with the latest\n * state by the time it exits.\n *\n * @param {Function} listener A callback to be invoked on every dispatch.\n * @returns {Function} A function to remove this change listener.\n */\n\n\n function subscribe(listener) {\n if (typeof listener !== 'function') {\n throw new Error( true ? formatProdErrorMessage(4) : 0);\n }\n\n if (isDispatching) {\n throw new Error( true ? formatProdErrorMessage(5) : 0);\n }\n\n var isSubscribed = true;\n ensureCanMutateNextListeners();\n nextListeners.push(listener);\n return function unsubscribe() {\n if (!isSubscribed) {\n return;\n }\n\n if (isDispatching) {\n throw new Error( true ? formatProdErrorMessage(6) : 0);\n }\n\n isSubscribed = false;\n ensureCanMutateNextListeners();\n var index = nextListeners.indexOf(listener);\n nextListeners.splice(index, 1);\n currentListeners = null;\n };\n }\n /**\n * Dispatches an action. It is the only way to trigger a state change.\n *\n * The `reducer` function, used to create the store, will be called with the\n * current state tree and the given `action`. Its return value will\n * be considered the **next** state of the tree, and the change listeners\n * will be notified.\n *\n * The base implementation only supports plain object actions. If you want to\n * dispatch a Promise, an Observable, a thunk, or something else, you need to\n * wrap your store creating function into the corresponding middleware. For\n * example, see the documentation for the `redux-thunk` package. Even the\n * middleware will eventually dispatch plain object actions using this method.\n *\n * @param {Object} action A plain object representing “what changed”. It is\n * a good idea to keep actions serializable so you can record and replay user\n * sessions, or use the time travelling `redux-devtools`. An action must have\n * a `type` property which may not be `undefined`. It is a good idea to use\n * string constants for action types.\n *\n * @returns {Object} For convenience, the same action object you dispatched.\n *\n * Note that, if you use a custom middleware, it may wrap `dispatch()` to\n * return something else (for example, a Promise you can await).\n */\n\n\n function dispatch(action) {\n if (!isPlainObject(action)) {\n throw new Error( true ? formatProdErrorMessage(7) : 0);\n }\n\n if (typeof action.type === 'undefined') {\n throw new Error( true ? formatProdErrorMessage(8) : 0);\n }\n\n if (isDispatching) {\n throw new Error( true ? formatProdErrorMessage(9) : 0);\n }\n\n try {\n isDispatching = true;\n currentState = currentReducer(currentState, action);\n } finally {\n isDispatching = false;\n }\n\n var listeners = currentListeners = nextListeners;\n\n for (var i = 0; i < listeners.length; i++) {\n var listener = listeners[i];\n listener();\n }\n\n return action;\n }\n /**\n * Replaces the reducer currently used by the store to calculate the state.\n *\n * You might need this if your app implements code splitting and you want to\n * load some of the reducers dynamically. You might also need this if you\n * implement a hot reloading mechanism for Redux.\n *\n * @param {Function} nextReducer The reducer for the store to use instead.\n * @returns {void}\n */\n\n\n function replaceReducer(nextReducer) {\n if (typeof nextReducer !== 'function') {\n throw new Error( true ? formatProdErrorMessage(10) : 0);\n }\n\n currentReducer = nextReducer; // This action has a similiar effect to ActionTypes.INIT.\n // Any reducers that existed in both the new and old rootReducer\n // will receive the previous state. This effectively populates\n // the new state tree with any relevant data from the old one.\n\n dispatch({\n type: ActionTypes.REPLACE\n });\n }\n /**\n * Interoperability point for observable/reactive libraries.\n * @returns {observable} A minimal observable of state changes.\n * For more information, see the observable proposal:\n * https://github.com/tc39/proposal-observable\n */\n\n\n function observable() {\n var _ref;\n\n var outerSubscribe = subscribe;\n return _ref = {\n /**\n * The minimal observable subscription method.\n * @param {Object} observer Any object that can be used as an observer.\n * The observer object should have a `next` method.\n * @returns {subscription} An object with an `unsubscribe` method that can\n * be used to unsubscribe the observable from the store, and prevent further\n * emission of values from the observable.\n */\n subscribe: function subscribe(observer) {\n if (typeof observer !== 'object' || observer === null) {\n throw new Error( true ? formatProdErrorMessage(11) : 0);\n }\n\n function observeState() {\n if (observer.next) {\n observer.next(getState());\n }\n }\n\n observeState();\n var unsubscribe = outerSubscribe(observeState);\n return {\n unsubscribe: unsubscribe\n };\n }\n }, _ref[$$observable] = function () {\n return this;\n }, _ref;\n } // When a store is created, an \"INIT\" action is dispatched so that every\n // reducer returns their initial state. This effectively populates\n // the initial state tree.\n\n\n dispatch({\n type: ActionTypes.INIT\n });\n return _ref2 = {\n dispatch: dispatch,\n subscribe: subscribe,\n getState: getState,\n replaceReducer: replaceReducer\n }, _ref2[$$observable] = observable, _ref2;\n}\n/**\n * Creates a Redux store that holds the state tree.\n *\n * **We recommend using `configureStore` from the\n * `@reduxjs/toolkit` package**, which replaces `createStore`:\n * **https://redux.js.org/introduction/why-rtk-is-redux-today**\n *\n * The only way to change the data in the store is to call `dispatch()` on it.\n *\n * There should only be a single store in your app. To specify how different\n * parts of the state tree respond to actions, you may combine several reducers\n * into a single reducer function by using `combineReducers`.\n *\n * @param {Function} reducer A function that returns the next state tree, given\n * the current state tree and the action to handle.\n *\n * @param {any} [preloadedState] The initial state. You may optionally specify it\n * to hydrate the state from the server in universal apps, or to restore a\n * previously serialized user session.\n * If you use `combineReducers` to produce the root reducer function, this must be\n * an object with the same shape as `combineReducers` keys.\n *\n * @param {Function} [enhancer] The store enhancer. You may optionally specify it\n * to enhance the store with third-party capabilities such as middleware,\n * time travel, persistence, etc. The only store enhancer that ships with Redux\n * is `applyMiddleware()`.\n *\n * @returns {Store} A Redux store that lets you read the state, dispatch actions\n * and subscribe to changes.\n */\n\nvar legacy_createStore = createStore;\n\n/**\n * Prints a warning in the console if it exists.\n *\n * @param {String} message The warning message.\n * @returns {void}\n */\nfunction warning(message) {\n /* eslint-disable no-console */\n if (typeof console !== 'undefined' && typeof console.error === 'function') {\n console.error(message);\n }\n /* eslint-enable no-console */\n\n\n try {\n // This error was thrown as a convenience so that if you enable\n // \"break on all exceptions\" in your console,\n // it would pause the execution at this line.\n throw new Error(message);\n } catch (e) {} // eslint-disable-line no-empty\n\n}\n\nfunction getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {\n var reducerKeys = Object.keys(reducers);\n var argumentName = action && action.type === ActionTypes.INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer';\n\n if (reducerKeys.length === 0) {\n return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.';\n }\n\n if (!isPlainObject(inputState)) {\n return \"The \" + argumentName + \" has unexpected type of \\\"\" + kindOf(inputState) + \"\\\". Expected argument to be an object with the following \" + (\"keys: \\\"\" + reducerKeys.join('\", \"') + \"\\\"\");\n }\n\n var unexpectedKeys = Object.keys(inputState).filter(function (key) {\n return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key];\n });\n unexpectedKeys.forEach(function (key) {\n unexpectedKeyCache[key] = true;\n });\n if (action && action.type === ActionTypes.REPLACE) return;\n\n if (unexpectedKeys.length > 0) {\n return \"Unexpected \" + (unexpectedKeys.length > 1 ? 'keys' : 'key') + \" \" + (\"\\\"\" + unexpectedKeys.join('\", \"') + \"\\\" found in \" + argumentName + \". \") + \"Expected to find one of the known reducer keys instead: \" + (\"\\\"\" + reducerKeys.join('\", \"') + \"\\\". Unexpected keys will be ignored.\");\n }\n}\n\nfunction assertReducerShape(reducers) {\n Object.keys(reducers).forEach(function (key) {\n var reducer = reducers[key];\n var initialState = reducer(undefined, {\n type: ActionTypes.INIT\n });\n\n if (typeof initialState === 'undefined') {\n throw new Error( true ? formatProdErrorMessage(12) : 0);\n }\n\n if (typeof reducer(undefined, {\n type: ActionTypes.PROBE_UNKNOWN_ACTION()\n }) === 'undefined') {\n throw new Error( true ? formatProdErrorMessage(13) : 0);\n }\n });\n}\n/**\n * Turns an object whose values are different reducer functions, into a single\n * reducer function. It will call every child reducer, and gather their results\n * into a single state object, whose keys correspond to the keys of the passed\n * reducer functions.\n *\n * @param {Object} reducers An object whose values correspond to different\n * reducer functions that need to be combined into one. One handy way to obtain\n * it is to use ES6 `import * as reducers` syntax. The reducers may never return\n * undefined for any action. Instead, they should return their initial state\n * if the state passed to them was undefined, and the current state for any\n * unrecognized action.\n *\n * @returns {Function} A reducer function that invokes every reducer inside the\n * passed object, and builds a state object with the same shape.\n */\n\n\nfunction combineReducers(reducers) {\n var reducerKeys = Object.keys(reducers);\n var finalReducers = {};\n\n for (var i = 0; i < reducerKeys.length; i++) {\n var key = reducerKeys[i];\n\n if (false) {}\n\n if (typeof reducers[key] === 'function') {\n finalReducers[key] = reducers[key];\n }\n }\n\n var finalReducerKeys = Object.keys(finalReducers); // This is used to make sure we don't warn about the same\n // keys multiple times.\n\n var unexpectedKeyCache;\n\n if (false) {}\n\n var shapeAssertionError;\n\n try {\n assertReducerShape(finalReducers);\n } catch (e) {\n shapeAssertionError = e;\n }\n\n return function combination(state, action) {\n if (state === void 0) {\n state = {};\n }\n\n if (shapeAssertionError) {\n throw shapeAssertionError;\n }\n\n if (false) { var warningMessage; }\n\n var hasChanged = false;\n var nextState = {};\n\n for (var _i = 0; _i < finalReducerKeys.length; _i++) {\n var _key = finalReducerKeys[_i];\n var reducer = finalReducers[_key];\n var previousStateForKey = state[_key];\n var nextStateForKey = reducer(previousStateForKey, action);\n\n if (typeof nextStateForKey === 'undefined') {\n var actionType = action && action.type;\n throw new Error( true ? formatProdErrorMessage(14) : 0);\n }\n\n nextState[_key] = nextStateForKey;\n hasChanged = hasChanged || nextStateForKey !== previousStateForKey;\n }\n\n hasChanged = hasChanged || finalReducerKeys.length !== Object.keys(state).length;\n return hasChanged ? nextState : state;\n };\n}\n\nfunction bindActionCreator(actionCreator, dispatch) {\n return function () {\n return dispatch(actionCreator.apply(this, arguments));\n };\n}\n/**\n * Turns an object whose values are action creators, into an object with the\n * same keys, but with every function wrapped into a `dispatch` call so they\n * may be invoked directly. This is just a convenience method, as you can call\n * `store.dispatch(MyActionCreators.doSomething())` yourself just fine.\n *\n * For convenience, you can also pass an action creator as the first argument,\n * and get a dispatch wrapped function in return.\n *\n * @param {Function|Object} actionCreators An object whose values are action\n * creator functions. One handy way to obtain it is to use ES6 `import * as`\n * syntax. You may also pass a single function.\n *\n * @param {Function} dispatch The `dispatch` function available on your Redux\n * store.\n *\n * @returns {Function|Object} The object mimicking the original object, but with\n * every action creator wrapped into the `dispatch` call. If you passed a\n * function as `actionCreators`, the return value will also be a single\n * function.\n */\n\n\nfunction bindActionCreators(actionCreators, dispatch) {\n if (typeof actionCreators === 'function') {\n return bindActionCreator(actionCreators, dispatch);\n }\n\n if (typeof actionCreators !== 'object' || actionCreators === null) {\n throw new Error( true ? formatProdErrorMessage(16) : 0);\n }\n\n var boundActionCreators = {};\n\n for (var key in actionCreators) {\n var actionCreator = actionCreators[key];\n\n if (typeof actionCreator === 'function') {\n boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);\n }\n }\n\n return boundActionCreators;\n}\n\n/**\n * Composes single-argument functions from right to left. The rightmost\n * function can take multiple arguments as it provides the signature for\n * the resulting composite function.\n *\n * @param {...Function} funcs The functions to compose.\n * @returns {Function} A function obtained by composing the argument functions\n * from right to left. For example, compose(f, g, h) is identical to doing\n * (...args) => f(g(h(...args))).\n */\nfunction compose() {\n for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {\n funcs[_key] = arguments[_key];\n }\n\n if (funcs.length === 0) {\n return function (arg) {\n return arg;\n };\n }\n\n if (funcs.length === 1) {\n return funcs[0];\n }\n\n return funcs.reduce(function (a, b) {\n return function () {\n return a(b.apply(void 0, arguments));\n };\n });\n}\n\n/**\n * Creates a store enhancer that applies middleware to the dispatch method\n * of the Redux store. This is handy for a variety of tasks, such as expressing\n * asynchronous actions in a concise manner, or logging every action payload.\n *\n * See `redux-thunk` package as an example of the Redux middleware.\n *\n * Because middleware is potentially asynchronous, this should be the first\n * store enhancer in the composition chain.\n *\n * Note that each middleware will be given the `dispatch` and `getState` functions\n * as named arguments.\n *\n * @param {...Function} middlewares The middleware chain to be applied.\n * @returns {Function} A store enhancer applying the middleware.\n */\n\nfunction applyMiddleware() {\n for (var _len = arguments.length, middlewares = new Array(_len), _key = 0; _key < _len; _key++) {\n middlewares[_key] = arguments[_key];\n }\n\n return function (createStore) {\n return function () {\n var store = createStore.apply(void 0, arguments);\n\n var _dispatch = function dispatch() {\n throw new Error( true ? formatProdErrorMessage(15) : 0);\n };\n\n var middlewareAPI = {\n getState: store.getState,\n dispatch: function dispatch() {\n return _dispatch.apply(void 0, arguments);\n }\n };\n var chain = middlewares.map(function (middleware) {\n return middleware(middlewareAPI);\n });\n _dispatch = compose.apply(void 0, chain)(store.dispatch);\n return _objectSpread2(_objectSpread2({}, store), {}, {\n dispatch: _dispatch\n });\n };\n };\n}\n\n/*\n * This is a dummy function to check if the function name has been altered by minification.\n * If the function has been minified and NODE_ENV !== 'production', warn the user.\n */\n\nfunction isCrushed() {}\n\nif (false) {}\n\n\n\n\n/***/ })\n\n/******/ \t});\n/************************************************************************/\n/******/ \t// The module cache\n/******/ \tvar __webpack_module_cache__ = {};\n/******/ \t\n/******/ \t// The require function\n/******/ \tfunction __nested_webpack_require_204578__(moduleId) {\n/******/ \t\t// Check if module is in cache\n/******/ \t\tvar cachedModule = __webpack_module_cache__[moduleId];\n/******/ \t\tif (cachedModule !== undefined) {\n/******/ \t\t\treturn cachedModule.exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = __webpack_module_cache__[moduleId] = {\n/******/ \t\t\t// no module.id needed\n/******/ \t\t\t// no module.loaded needed\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/ \t\n/******/ \t\t// Execute the module function\n/******/ \t\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __nested_webpack_require_204578__);\n/******/ \t\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/ \t\n/************************************************************************/\n/******/ \t/* webpack/runtime/compat get default export */\n/******/ \t(() => {\n/******/ \t\t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t\t__nested_webpack_require_204578__.n = (module) => {\n/******/ \t\t\tvar getter = module && module.__esModule ?\n/******/ \t\t\t\t() => (module['default']) :\n/******/ \t\t\t\t() => (module);\n/******/ \t\t\t__nested_webpack_require_204578__.d(getter, { a: getter });\n/******/ \t\t\treturn getter;\n/******/ \t\t};\n/******/ \t})();\n/******/ \t\n/******/ \t/* webpack/runtime/define property getters */\n/******/ \t(() => {\n/******/ \t\t// define getter functions for harmony exports\n/******/ \t\t__nested_webpack_require_204578__.d = (exports, definition) => {\n/******/ \t\t\tfor(var key in definition) {\n/******/ \t\t\t\tif(__nested_webpack_require_204578__.o(definition, key) && !__nested_webpack_require_204578__.o(exports, key)) {\n/******/ \t\t\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n/******/ \t\t\t\t}\n/******/ \t\t\t}\n/******/ \t\t};\n/******/ \t})();\n/******/ \t\n/******/ \t/* webpack/runtime/hasOwnProperty shorthand */\n/******/ \t(() => {\n/******/ \t\t__nested_webpack_require_204578__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))\n/******/ \t})();\n/******/ \t\n/******/ \t/* webpack/runtime/make namespace object */\n/******/ \t(() => {\n/******/ \t\t// define __esModule on exports\n/******/ \t\t__nested_webpack_require_204578__.r = (exports) => {\n/******/ \t\t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n/******/ \t\t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n/******/ \t\t\t}\n/******/ \t\t\tObject.defineProperty(exports, '__esModule', { value: true });\n/******/ \t\t};\n/******/ \t})();\n/******/ \t\n/************************************************************************/\nvar __webpack_exports__ = {};\n// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.\n(() => {\n/* harmony export */ __nested_webpack_require_204578__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* harmony import */ var _scripts_choices__WEBPACK_IMPORTED_MODULE_0__ = __nested_webpack_require_204578__(373);\n/* harmony import */ var _scripts_choices__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__nested_webpack_require_204578__.n(_scripts_choices__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _scripts_interfaces__WEBPACK_IMPORTED_MODULE_1__ = __nested_webpack_require_204578__(187);\n/* harmony import */ var _scripts_interfaces__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__nested_webpack_require_204578__.n(_scripts_interfaces__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _scripts_constants__WEBPACK_IMPORTED_MODULE_2__ = __nested_webpack_require_204578__(883);\n/* harmony import */ var _scripts_defaults__WEBPACK_IMPORTED_MODULE_3__ = __nested_webpack_require_204578__(789);\n/* harmony import */ var _scripts_templates__WEBPACK_IMPORTED_MODULE_4__ = __nested_webpack_require_204578__(686);\n\n\n\n\n\n\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((_scripts_choices__WEBPACK_IMPORTED_MODULE_0___default()));\n\n})();\n\n__webpack_exports__ = __webpack_exports__[\"default\"];\n/******/ \treturn __webpack_exports__;\n/******/ })()\n;\n});\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/choices.js/public/assets/scripts/choices.js?"); /***/ }), @@ -5793,7 +6330,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nvar \***********************************************************************************/ /***/ (function(__unused_webpack_module, exports) { -eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"]=function(ctx) {\nvar __t, __p = '', __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n__p += '
\\n <' +\n((__t = (ctx.input.type)) == null ? '' : __t) +\n'\\n ref=\"input\"\\n id=\"' +\n((__t = (ctx.id)) == null ? '' : __t) +\n'\"\\n ';\n for (var attr in ctx.input.attr) { ;\n__p += '\\n ' +\n((__t = (attr)) == null ? '' : __t) +\n'=\"' +\n((__t = (ctx.input.attr[attr])) == null ? '' : __t) +\n'\"\\n ';\n } ;\n__p += '\\n ';\n if (ctx.checked) { ;\n__p += 'checked=true';\n } ;\n__p += '\\n >\\n \\n \\n
\\n';\nreturn __p\n}\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/semantic/lib/templates/semantic/checkbox/form.ejs.js?"); +eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"]=function(ctx) {\nvar __t, __p = '', __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n__p += '
\\n <' +\n((__t = (ctx.input.type)) == null ? '' : __t) +\n'\\n ref=\"input\"\\n id=\"' +\n((__t = (ctx.id)) == null ? '' : __t) +\n'\"\\n ';\n for (var attr in ctx.input.attr) { ;\n__p += '\\n ' +\n((__t = (attr)) == null ? '' : __t) +\n'=\"' +\n((__t = (ctx.input.attr[attr])) == null ? '' : __t) +\n'\"\\n ';\n } ;\n__p += '\\n ';\n if (ctx.checked) { ;\n__p += 'checked=true';\n } ;\n__p += '\\n >\\n \\n \\n ';\n if (ctx.component.tooltip) { ;\n__p += '\\n \\n ';\n } ;\n__p += '\\n
\\n';\nreturn __p\n}\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/semantic/lib/templates/semantic/checkbox/form.ejs.js?"); /***/ }), @@ -5845,7 +6382,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nvar \************************************************************************************/ /***/ (function(__unused_webpack_module, exports) { -eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"]=function(ctx) {\nvar __t, __p = '', __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n__p += '
\\n ';\n } ;\n__p += '\\n\\n';\nreturn __p\n}\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/semantic/lib/templates/semantic/component/form.ejs.js?"); +eval("Object.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"]=function(ctx) {\nvar __t, __p = '', __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n__p += '
\\n ';\n } ;\n__p += '\\n\\n';\nreturn __p\n}\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/semantic/lib/templates/semantic/component/form.ejs.js?"); /***/ }), @@ -6076,7 +6613,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nvar /***/ (function(__unused_webpack_module, exports) { "use strict"; -eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports[\"default\"] = (function (iconset, name, spinning) {\n var icons = {\n 'plus-squre-o': 'plus square outline',\n 'minus-squre-o': 'minus square outline',\n 'question-sign': 'question circle',\n 'remove-circle': 'trash alternate outline',\n 'new-window': 'external alternate',\n 'files-o': 'file outline',\n 'move': 'arrows alternate',\n 'link': 'linkify',\n };\n if (icons.hasOwnProperty(name)) {\n name = icons[name];\n }\n name = name || '';\n name = name.replace(/-/g, ' ');\n name = name.replace(/ o$/, ' outline');\n return spinning ? \"icon \" + name + \" loading\" : \"icon \" + name;\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/semantic/lib/templates/semantic/iconClass.js?"); +eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports[\"default\"] = (function (iconset, name, spinning) {\n var icons = {\n 'plus-squre-o': 'plus square outline',\n 'minus-squre-o': 'minus square outline',\n 'question-sign': 'question circle',\n 'remove-circle': 'trash alternate outline',\n 'new-window': 'external alternate',\n 'files-o': 'file outline',\n 'move': 'arrows alternate',\n 'link': 'linkify',\n };\n if (icons.hasOwnProperty(name)) {\n name = icons[name];\n }\n name = name || '';\n name = name.replace(/-/g, ' ');\n name = name.replace(/ o$/, ' outline');\n return spinning ? \"icon \".concat(name, \" loading\") : \"icon \".concat(name);\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/@formio/semantic/lib/templates/semantic/iconClass.js?"); /***/ }), @@ -7385,13 +7922,44 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac /***/ }), +/***/ "./node_modules/animation-frame-polyfill/lib/animation-frame-polyfill.module.js": +/*!**************************************************************************************!*\ + !*** ./node_modules/animation-frame-polyfill/lib/animation-frame-polyfill.module.js ***! + \**************************************************************************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"cancelAnimationFrame\": function() { return /* binding */ cancelAnimationFrame; },\n/* harmony export */ \"requestAnimationFrame\": function() { return /* binding */ requestAnimationFrame; }\n/* harmony export */ });\nvar prefix = ['webkit', 'moz', 'ms', 'o'];\nvar requestAnimationFrame = function () {\n for (var i = 0, limit = prefix.length; i < limit && !window.requestAnimationFrame; ++i) {\n window.requestAnimationFrame = window[prefix[i] + 'RequestAnimationFrame'];\n }\n\n if (!window.requestAnimationFrame) {\n var lastTime = 0;\n\n window.requestAnimationFrame = function (callback) {\n var now = new Date().getTime();\n var ttc = Math.max(0, 16 - now - lastTime);\n var timer = window.setTimeout(function () {\n return callback(now + ttc);\n }, ttc);\n lastTime = now + ttc;\n return timer;\n };\n }\n\n return window.requestAnimationFrame.bind(window);\n}();\nvar cancelAnimationFrame = function () {\n for (var i = 0, limit = prefix.length; i < limit && !window.cancelAnimationFrame; ++i) {\n window.cancelAnimationFrame = window[prefix[i] + 'CancelAnimationFrame'] || window[prefix[i] + 'CancelRequestAnimationFrame'];\n }\n\n if (!window.cancelAnimationFrame) {\n window.cancelAnimationFrame = function (timer) {\n window.clearTimeout(timer);\n };\n }\n\n return window.cancelAnimationFrame.bind(window);\n}();\n\n\n//# sourceURL=webpack://Formio/./node_modules/animation-frame-polyfill/lib/animation-frame-polyfill.module.js?"); + +/***/ }), + +/***/ "./node_modules/array-from/index.js": +/*!******************************************!*\ + !*** ./node_modules/array-from/index.js ***! + \******************************************/ +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +eval("module.exports = (typeof Array.from === 'function' ?\n Array.from :\n __webpack_require__(/*! ./polyfill */ \"./node_modules/array-from/polyfill.js\")\n);\n\n\n//# sourceURL=webpack://Formio/./node_modules/array-from/index.js?"); + +/***/ }), + +/***/ "./node_modules/array-from/polyfill.js": +/*!*********************************************!*\ + !*** ./node_modules/array-from/polyfill.js ***! + \*********************************************/ +/***/ (function(module) { + +eval("// Production steps of ECMA-262, Edition 6, 22.1.2.1\n// Reference: http://www.ecma-international.org/ecma-262/6.0/#sec-array.from\nmodule.exports = (function() {\n var isCallable = function(fn) {\n return typeof fn === 'function';\n };\n var toInteger = function (value) {\n var number = Number(value);\n if (isNaN(number)) { return 0; }\n if (number === 0 || !isFinite(number)) { return number; }\n return (number > 0 ? 1 : -1) * Math.floor(Math.abs(number));\n };\n var maxSafeInteger = Math.pow(2, 53) - 1;\n var toLength = function (value) {\n var len = toInteger(value);\n return Math.min(Math.max(len, 0), maxSafeInteger);\n };\n var iteratorProp = function(value) {\n if(value != null) {\n if(['string','number','boolean','symbol'].indexOf(typeof value) > -1){\n return Symbol.iterator;\n } else if (\n (typeof Symbol !== 'undefined') &&\n ('iterator' in Symbol) &&\n (Symbol.iterator in value)\n ) {\n return Symbol.iterator;\n }\n // Support \"@@iterator\" placeholder, Gecko 27 to Gecko 35\n else if ('@@iterator' in value) {\n return '@@iterator';\n }\n }\n };\n var getMethod = function(O, P) {\n // Assert: IsPropertyKey(P) is true.\n if (O != null && P != null) {\n // Let func be GetV(O, P).\n var func = O[P];\n // ReturnIfAbrupt(func).\n // If func is either undefined or null, return undefined.\n if(func == null) {\n return void 0;\n }\n // If IsCallable(func) is false, throw a TypeError exception.\n if (!isCallable(func)) {\n throw new TypeError(func + ' is not a function');\n }\n return func;\n }\n };\n var iteratorStep = function(iterator) {\n // Let result be IteratorNext(iterator).\n // ReturnIfAbrupt(result).\n var result = iterator.next();\n // Let done be IteratorComplete(result).\n // ReturnIfAbrupt(done).\n var done = Boolean(result.done);\n // If done is true, return false.\n if(done) {\n return false;\n }\n // Return result.\n return result;\n };\n\n // The length property of the from method is 1.\n return function from(items /*, mapFn, thisArg */ ) {\n 'use strict';\n\n // 1. Let C be the this value.\n var C = this;\n\n // 2. If mapfn is undefined, let mapping be false.\n var mapFn = arguments.length > 1 ? arguments[1] : void 0;\n\n var T;\n if (typeof mapFn !== 'undefined') {\n // 3. else\n // a. If IsCallable(mapfn) is false, throw a TypeError exception.\n if (!isCallable(mapFn)) {\n throw new TypeError(\n 'Array.from: when provided, the second argument must be a function'\n );\n }\n\n // b. If thisArg was supplied, let T be thisArg; else let T\n // be undefined.\n if (arguments.length > 2) {\n T = arguments[2];\n }\n // c. Let mapping be true (implied by mapFn)\n }\n\n var A, k;\n\n // 4. Let usingIterator be GetMethod(items, @@iterator).\n // 5. ReturnIfAbrupt(usingIterator).\n var usingIterator = getMethod(items, iteratorProp(items));\n\n // 6. If usingIterator is not undefined, then\n if (usingIterator !== void 0) {\n // a. If IsConstructor(C) is true, then\n // i. Let A be the result of calling the [[Construct]]\n // internal method of C with an empty argument list.\n // b. Else,\n // i. Let A be the result of the abstract operation ArrayCreate\n // with argument 0.\n // c. ReturnIfAbrupt(A).\n A = isCallable(C) ? Object(new C()) : [];\n\n // d. Let iterator be GetIterator(items, usingIterator).\n var iterator = usingIterator.call(items);\n\n // e. ReturnIfAbrupt(iterator).\n if (iterator == null) {\n throw new TypeError(\n 'Array.from requires an array-like or iterable object'\n );\n }\n\n // f. Let k be 0.\n k = 0;\n\n // g. Repeat\n var next, nextValue;\n while (true) {\n // i. Let Pk be ToString(k).\n // ii. Let next be IteratorStep(iterator).\n // iii. ReturnIfAbrupt(next).\n next = iteratorStep(iterator);\n\n // iv. If next is false, then\n if (!next) {\n\n // 1. Let setStatus be Set(A, \"length\", k, true).\n // 2. ReturnIfAbrupt(setStatus).\n A.length = k;\n\n // 3. Return A.\n return A;\n }\n // v. Let nextValue be IteratorValue(next).\n // vi. ReturnIfAbrupt(nextValue)\n nextValue = next.value;\n\n // vii. If mapping is true, then\n // 1. Let mappedValue be Call(mapfn, T, «nextValue, k»).\n // 2. If mappedValue is an abrupt completion, return\n // IteratorClose(iterator, mappedValue).\n // 3. Let mappedValue be mappedValue.[[value]].\n // viii. Else, let mappedValue be nextValue.\n // ix. Let defineStatus be the result of\n // CreateDataPropertyOrThrow(A, Pk, mappedValue).\n // x. [TODO] If defineStatus is an abrupt completion, return\n // IteratorClose(iterator, defineStatus).\n if (mapFn) {\n A[k] = mapFn.call(T, nextValue, k);\n }\n else {\n A[k] = nextValue;\n }\n // xi. Increase k by 1.\n k++;\n }\n // 7. Assert: items is not an Iterable so assume it is\n // an array-like object.\n } else {\n\n // 8. Let arrayLike be ToObject(items).\n var arrayLike = Object(items);\n\n // 9. ReturnIfAbrupt(items).\n if (items == null) {\n throw new TypeError(\n 'Array.from requires an array-like object - not null or undefined'\n );\n }\n\n // 10. Let len be ToLength(Get(arrayLike, \"length\")).\n // 11. ReturnIfAbrupt(len).\n var len = toLength(arrayLike.length);\n\n // 12. If IsConstructor(C) is true, then\n // a. Let A be Construct(C, «len»).\n // 13. Else\n // a. Let A be ArrayCreate(len).\n // 14. ReturnIfAbrupt(A).\n A = isCallable(C) ? Object(new C(len)) : new Array(len);\n\n // 15. Let k be 0.\n k = 0;\n // 16. Repeat, while k < len… (also steps a - h)\n var kValue;\n while (k < len) {\n kValue = arrayLike[k];\n if (mapFn) {\n A[k] = mapFn.call(T, kValue, k);\n }\n else {\n A[k] = kValue;\n }\n k++;\n }\n // 17. Let setStatus be Set(A, \"length\", len, true).\n // 18. ReturnIfAbrupt(setStatus).\n A.length = len;\n // 19. Return A.\n }\n return A;\n };\n})();\n\n\n//# sourceURL=webpack://Formio/./node_modules/array-from/polyfill.js?"); + +/***/ }), + /***/ "./node_modules/autocompleter/autocomplete.js": /*!****************************************************!*\ !*** ./node_modules/autocompleter/autocomplete.js ***! \****************************************************/ /***/ (function(module) { -eval("(function (global, factory) {\n true ? module.exports = factory() :\n 0;\n}(this, (function () { 'use strict';\n\n /*\r\n * https://github.com/kraaden/autocomplete\r\n * Copyright (c) 2016 Denys Krasnoshchok\r\n * MIT License\r\n */\r\n function autocomplete(settings) {\r\n // just an alias to minimize JS file size\r\n var doc = document;\r\n var container = settings.container || doc.createElement(\"div\");\r\n var containerStyle = container.style;\r\n var userAgent = navigator.userAgent;\r\n var mobileFirefox = ~userAgent.indexOf(\"Firefox\") && ~userAgent.indexOf(\"Mobile\");\r\n var debounceWaitMs = settings.debounceWaitMs || 0;\r\n var preventSubmit = settings.preventSubmit || false;\r\n var disableAutoSelect = settings.disableAutoSelect || false;\r\n // 'keyup' event will not be fired on Mobile Firefox, so we have to use 'input' event instead\r\n var keyUpEventName = mobileFirefox ? \"input\" : \"keyup\";\r\n var items = [];\r\n var inputValue = \"\";\r\n var minLen = 2;\r\n var showOnFocus = settings.showOnFocus;\r\n var selected;\r\n var keypressCounter = 0;\r\n var debounceTimer;\r\n if (settings.minLength !== undefined) {\r\n minLen = settings.minLength;\r\n }\r\n if (!settings.input) {\r\n throw new Error(\"input undefined\");\r\n }\r\n var input = settings.input;\r\n container.className = \"autocomplete \" + (settings.className || \"\");\r\n // IOS implementation for fixed positioning has many bugs, so we will use absolute positioning\r\n containerStyle.position = \"absolute\";\r\n /**\r\n * Detach the container from DOM\r\n */\r\n function detach() {\r\n var parent = container.parentNode;\r\n if (parent) {\r\n parent.removeChild(container);\r\n }\r\n }\r\n /**\r\n * Clear debouncing timer if assigned\r\n */\r\n function clearDebounceTimer() {\r\n if (debounceTimer) {\r\n window.clearTimeout(debounceTimer);\r\n }\r\n }\r\n /**\r\n * Attach the container to DOM\r\n */\r\n function attach() {\r\n if (!container.parentNode) {\r\n doc.body.appendChild(container);\r\n }\r\n }\r\n /**\r\n * Check if container for autocomplete is displayed\r\n */\r\n function containerDisplayed() {\r\n return !!container.parentNode;\r\n }\r\n /**\r\n * Clear autocomplete state and hide container\r\n */\r\n function clear() {\r\n // prevent the update call if there are pending AJAX requests\r\n keypressCounter++;\r\n items = [];\r\n inputValue = \"\";\r\n selected = undefined;\r\n detach();\r\n }\r\n /**\r\n * Update autocomplete position\r\n */\r\n function updatePosition() {\r\n if (!containerDisplayed()) {\r\n return;\r\n }\r\n containerStyle.height = \"auto\";\r\n containerStyle.width = input.offsetWidth + \"px\";\r\n var maxHeight = 0;\r\n var inputRect;\r\n function calc() {\r\n var docEl = doc.documentElement;\r\n var clientTop = docEl.clientTop || doc.body.clientTop || 0;\r\n var clientLeft = docEl.clientLeft || doc.body.clientLeft || 0;\r\n var scrollTop = window.pageYOffset || docEl.scrollTop;\r\n var scrollLeft = window.pageXOffset || docEl.scrollLeft;\r\n inputRect = input.getBoundingClientRect();\r\n var top = inputRect.top + input.offsetHeight + scrollTop - clientTop;\r\n var left = inputRect.left + scrollLeft - clientLeft;\r\n containerStyle.top = top + \"px\";\r\n containerStyle.left = left + \"px\";\r\n maxHeight = window.innerHeight - (inputRect.top + input.offsetHeight);\r\n if (maxHeight < 0) {\r\n maxHeight = 0;\r\n }\r\n containerStyle.top = top + \"px\";\r\n containerStyle.bottom = \"\";\r\n containerStyle.left = left + \"px\";\r\n containerStyle.maxHeight = maxHeight + \"px\";\r\n }\r\n // the calc method must be called twice, otherwise the calculation may be wrong on resize event (chrome browser)\r\n calc();\r\n calc();\r\n if (settings.customize && inputRect) {\r\n settings.customize(input, inputRect, container, maxHeight);\r\n }\r\n }\r\n /**\r\n * Redraw the autocomplete div element with suggestions\r\n */\r\n function update() {\r\n // delete all children from autocomplete DOM container\r\n while (container.firstChild) {\r\n container.removeChild(container.firstChild);\r\n }\r\n // function for rendering autocomplete suggestions\r\n var render = function (item, currentValue) {\r\n var itemElement = doc.createElement(\"div\");\r\n itemElement.textContent = item.label || \"\";\r\n return itemElement;\r\n };\r\n if (settings.render) {\r\n render = settings.render;\r\n }\r\n // function to render autocomplete groups\r\n var renderGroup = function (groupName, currentValue) {\r\n var groupDiv = doc.createElement(\"div\");\r\n groupDiv.textContent = groupName;\r\n return groupDiv;\r\n };\r\n if (settings.renderGroup) {\r\n renderGroup = settings.renderGroup;\r\n }\r\n var fragment = doc.createDocumentFragment();\r\n var prevGroup = \"#9?$\";\r\n items.forEach(function (item) {\r\n if (item.group && item.group !== prevGroup) {\r\n prevGroup = item.group;\r\n var groupDiv = renderGroup(item.group, inputValue);\r\n if (groupDiv) {\r\n groupDiv.className += \" group\";\r\n fragment.appendChild(groupDiv);\r\n }\r\n }\r\n var div = render(item, inputValue);\r\n if (div) {\r\n div.addEventListener(\"click\", function (ev) {\r\n settings.onSelect(item, input);\r\n clear();\r\n ev.preventDefault();\r\n ev.stopPropagation();\r\n });\r\n if (item === selected) {\r\n div.className += \" selected\";\r\n }\r\n fragment.appendChild(div);\r\n }\r\n });\r\n container.appendChild(fragment);\r\n if (items.length < 1) {\r\n if (settings.emptyMsg) {\r\n var empty = doc.createElement(\"div\");\r\n empty.className = \"empty\";\r\n empty.textContent = settings.emptyMsg;\r\n container.appendChild(empty);\r\n }\r\n else {\r\n clear();\r\n return;\r\n }\r\n }\r\n attach();\r\n updatePosition();\r\n updateScroll();\r\n }\r\n function updateIfDisplayed() {\r\n if (containerDisplayed()) {\r\n update();\r\n }\r\n }\r\n function resizeEventHandler() {\r\n updateIfDisplayed();\r\n }\r\n function scrollEventHandler(e) {\r\n if (e.target !== container) {\r\n updateIfDisplayed();\r\n }\r\n else {\r\n e.preventDefault();\r\n }\r\n }\r\n function keyupEventHandler(ev) {\r\n var keyCode = ev.which || ev.keyCode || 0;\r\n var ignore = settings.keysToIgnore || [38 /* Up */, 13 /* Enter */, 27 /* Esc */, 39 /* Right */, 37 /* Left */, 16 /* Shift */, 17 /* Ctrl */, 18 /* Alt */, 20 /* CapsLock */, 91 /* WindowsKey */, 9 /* Tab */];\r\n for (var _i = 0, ignore_1 = ignore; _i < ignore_1.length; _i++) {\r\n var key = ignore_1[_i];\r\n if (keyCode === key) {\r\n return;\r\n }\r\n }\r\n if (keyCode >= 112 /* F1 */ && keyCode <= 123 /* F12 */ && !settings.keysToIgnore) {\r\n return;\r\n }\r\n // the down key is used to open autocomplete\r\n if (keyCode === 40 /* Down */ && containerDisplayed()) {\r\n return;\r\n }\r\n startFetch(0 /* Keyboard */);\r\n }\r\n /**\r\n * Automatically move scroll bar if selected item is not visible\r\n */\r\n function updateScroll() {\r\n var elements = container.getElementsByClassName(\"selected\");\r\n if (elements.length > 0) {\r\n var element = elements[0];\r\n // make group visible\r\n var previous = element.previousElementSibling;\r\n if (previous && previous.className.indexOf(\"group\") !== -1 && !previous.previousElementSibling) {\r\n element = previous;\r\n }\r\n if (element.offsetTop < container.scrollTop) {\r\n container.scrollTop = element.offsetTop;\r\n }\r\n else {\r\n var selectBottom = element.offsetTop + element.offsetHeight;\r\n var containerBottom = container.scrollTop + container.offsetHeight;\r\n if (selectBottom > containerBottom) {\r\n container.scrollTop += selectBottom - containerBottom;\r\n }\r\n }\r\n }\r\n }\r\n /**\r\n * Select the previous item in suggestions\r\n */\r\n function selectPrev() {\r\n if (items.length < 1) {\r\n selected = undefined;\r\n }\r\n else {\r\n if (selected === items[0]) {\r\n selected = items[items.length - 1];\r\n }\r\n else {\r\n for (var i = items.length - 1; i > 0; i--) {\r\n if (selected === items[i] || i === 1) {\r\n selected = items[i - 1];\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n /**\r\n * Select the next item in suggestions\r\n */\r\n function selectNext() {\r\n if (items.length < 1) {\r\n selected = undefined;\r\n }\r\n if (!selected || selected === items[items.length - 1]) {\r\n selected = items[0];\r\n return;\r\n }\r\n for (var i = 0; i < (items.length - 1); i++) {\r\n if (selected === items[i]) {\r\n selected = items[i + 1];\r\n break;\r\n }\r\n }\r\n }\r\n function keydownEventHandler(ev) {\r\n var keyCode = ev.which || ev.keyCode || 0;\r\n if (keyCode === 38 /* Up */ || keyCode === 40 /* Down */ || keyCode === 27 /* Esc */) {\r\n var containerIsDisplayed = containerDisplayed();\r\n if (keyCode === 27 /* Esc */) {\r\n clear();\r\n }\r\n else {\r\n if (!containerIsDisplayed || items.length < 1) {\r\n return;\r\n }\r\n keyCode === 38 /* Up */\r\n ? selectPrev()\r\n : selectNext();\r\n update();\r\n }\r\n ev.preventDefault();\r\n if (containerIsDisplayed) {\r\n ev.stopPropagation();\r\n }\r\n return;\r\n }\r\n if (keyCode === 13 /* Enter */) {\r\n if (selected) {\r\n settings.onSelect(selected, input);\r\n clear();\r\n }\r\n if (preventSubmit) {\r\n ev.preventDefault();\r\n }\r\n }\r\n }\r\n function focusEventHandler() {\r\n if (showOnFocus) {\r\n startFetch(1 /* Focus */);\r\n }\r\n }\r\n function startFetch(trigger) {\r\n // If multiple keys were pressed, before we get an update from server,\r\n // this may cause redrawing autocomplete multiple times after the last key was pressed.\r\n // To avoid this, the number of times keyboard was pressed will be saved and checked before redraw.\r\n var savedKeypressCounter = ++keypressCounter;\r\n var inputText = input.value;\r\n var cursorPos = input.selectionStart || 0;\r\n if (inputText.length >= minLen || trigger === 1 /* Focus */) {\r\n clearDebounceTimer();\r\n debounceTimer = window.setTimeout(function () {\r\n settings.fetch(inputText, function (elements) {\r\n if (keypressCounter === savedKeypressCounter && elements) {\r\n items = elements;\r\n inputValue = inputText;\r\n selected = (items.length < 1 || disableAutoSelect) ? undefined : items[0];\r\n update();\r\n }\r\n }, trigger, cursorPos);\r\n }, trigger === 0 /* Keyboard */ ? debounceWaitMs : 0);\r\n }\r\n else {\r\n clear();\r\n }\r\n }\r\n function blurEventHandler() {\r\n // we need to delay clear, because when we click on an item, blur will be called before click and remove items from DOM\r\n setTimeout(function () {\r\n if (doc.activeElement !== input) {\r\n clear();\r\n }\r\n }, 200);\r\n }\r\n /**\r\n * Fixes #26: on long clicks focus will be lost and onSelect method will not be called\r\n */\r\n container.addEventListener(\"mousedown\", function (evt) {\r\n evt.stopPropagation();\r\n evt.preventDefault();\r\n });\r\n /**\r\n * Fixes #30: autocomplete closes when scrollbar is clicked in IE\r\n * See: https://stackoverflow.com/a/9210267/13172349\r\n */\r\n container.addEventListener(\"focus\", function () { return input.focus(); });\r\n /**\r\n * This function will remove DOM elements and clear event handlers\r\n */\r\n function destroy() {\r\n input.removeEventListener(\"focus\", focusEventHandler);\r\n input.removeEventListener(\"keydown\", keydownEventHandler);\r\n input.removeEventListener(keyUpEventName, keyupEventHandler);\r\n input.removeEventListener(\"blur\", blurEventHandler);\r\n window.removeEventListener(\"resize\", resizeEventHandler);\r\n doc.removeEventListener(\"scroll\", scrollEventHandler, true);\r\n clearDebounceTimer();\r\n clear();\r\n }\r\n // setup event handlers\r\n input.addEventListener(\"keydown\", keydownEventHandler);\r\n input.addEventListener(keyUpEventName, keyupEventHandler);\r\n input.addEventListener(\"blur\", blurEventHandler);\r\n input.addEventListener(\"focus\", focusEventHandler);\r\n window.addEventListener(\"resize\", resizeEventHandler);\r\n doc.addEventListener(\"scroll\", scrollEventHandler, true);\r\n return {\r\n destroy: destroy\r\n };\r\n }\n\n return autocomplete;\n\n})));\n//# sourceMappingURL=autocomplete.js.map\n\n\n//# sourceURL=webpack://Formio/./node_modules/autocompleter/autocomplete.js?"); +eval("(function (global, factory) {\n true ? module.exports = factory() :\n 0;\n}(this, (function () { 'use strict';\n\n /*\r\n * https://github.com/kraaden/autocomplete\r\n * Copyright (c) 2016 Denys Krasnoshchok\r\n * MIT License\r\n */\r\n function autocomplete(settings) {\r\n // just an alias to minimize JS file size\r\n var doc = document;\r\n var container = settings.container || doc.createElement(\"div\");\r\n container.id = container.id || \"autocomplete-\" + uid();\r\n var containerStyle = container.style;\r\n var userAgent = navigator.userAgent;\r\n var mobileFirefox = ~userAgent.indexOf(\"Firefox\") && ~userAgent.indexOf(\"Mobile\");\r\n var debounceWaitMs = settings.debounceWaitMs || 0;\r\n var preventSubmit = settings.preventSubmit || false;\r\n var disableAutoSelect = settings.disableAutoSelect || false;\r\n // 'keyup' event will not be fired on Mobile Firefox, so we have to use 'input' event instead\r\n var keyUpEventName = mobileFirefox ? \"input\" : \"keyup\";\r\n var items = [];\r\n var inputValue = \"\";\r\n var minLen = 2;\r\n var showOnFocus = settings.showOnFocus;\r\n var selected;\r\n var keypressCounter = 0;\r\n var debounceTimer;\r\n if (settings.minLength !== undefined) {\r\n minLen = settings.minLength;\r\n }\r\n if (!settings.input) {\r\n throw new Error(\"input undefined\");\r\n }\r\n var input = settings.input;\r\n container.className = \"autocomplete \" + (settings.className || \"\");\r\n container.setAttribute(\"role\", \"listbox\");\r\n input.setAttribute(\"role\", \"combobox\");\r\n input.setAttribute(\"aria-expanded\", \"false\");\r\n input.setAttribute(\"aria-autocomplete\", \"list\");\r\n input.setAttribute(\"aria-controls\", container.id);\r\n input.setAttribute(\"aria-owns\", container.id);\r\n input.setAttribute(\"aria-activedescendant\", \"\");\r\n input.setAttribute(\"aria-haspopup\", \"listbox\");\r\n // IOS implementation for fixed positioning has many bugs, so we will use absolute positioning\r\n containerStyle.position = \"absolute\";\r\n /**\r\n * Generate a unique ID\r\n */\r\n function uid() {\r\n return Date.now().toString(36) + Math.random().toString(36).substring(2);\r\n }\r\n /**\r\n * Detach the container from DOM\r\n */\r\n function detach() {\r\n var parent = container.parentNode;\r\n if (parent) {\r\n parent.removeChild(container);\r\n }\r\n }\r\n /**\r\n * Clear debouncing timer if assigned\r\n */\r\n function clearDebounceTimer() {\r\n if (debounceTimer) {\r\n window.clearTimeout(debounceTimer);\r\n }\r\n }\r\n /**\r\n * Attach the container to DOM\r\n */\r\n function attach() {\r\n if (!container.parentNode) {\r\n doc.body.appendChild(container);\r\n }\r\n }\r\n /**\r\n * Check if container for autocomplete is displayed\r\n */\r\n function containerDisplayed() {\r\n return !!container.parentNode;\r\n }\r\n /**\r\n * Clear autocomplete state and hide container\r\n */\r\n function clear() {\r\n // prevent the update call if there are pending AJAX requests\r\n keypressCounter++;\r\n items = [];\r\n inputValue = \"\";\r\n selected = undefined;\r\n input.setAttribute(\"aria-activedescendant\", \"\");\r\n input.setAttribute(\"aria-expanded\", \"false\");\r\n detach();\r\n }\r\n /**\r\n * Update autocomplete position\r\n */\r\n function updatePosition() {\r\n if (!containerDisplayed()) {\r\n return;\r\n }\r\n input.setAttribute(\"aria-expanded\", \"true\");\r\n containerStyle.height = \"auto\";\r\n containerStyle.width = input.offsetWidth + \"px\";\r\n var maxHeight = 0;\r\n var inputRect;\r\n function calc() {\r\n var docEl = doc.documentElement;\r\n var clientTop = docEl.clientTop || doc.body.clientTop || 0;\r\n var clientLeft = docEl.clientLeft || doc.body.clientLeft || 0;\r\n var scrollTop = window.pageYOffset || docEl.scrollTop;\r\n var scrollLeft = window.pageXOffset || docEl.scrollLeft;\r\n inputRect = input.getBoundingClientRect();\r\n var top = inputRect.top + input.offsetHeight + scrollTop - clientTop;\r\n var left = inputRect.left + scrollLeft - clientLeft;\r\n containerStyle.top = top + \"px\";\r\n containerStyle.left = left + \"px\";\r\n maxHeight = window.innerHeight - (inputRect.top + input.offsetHeight);\r\n if (maxHeight < 0) {\r\n maxHeight = 0;\r\n }\r\n containerStyle.top = top + \"px\";\r\n containerStyle.bottom = \"\";\r\n containerStyle.left = left + \"px\";\r\n containerStyle.maxHeight = maxHeight + \"px\";\r\n }\r\n // the calc method must be called twice, otherwise the calculation may be wrong on resize event (chrome browser)\r\n calc();\r\n calc();\r\n if (settings.customize && inputRect) {\r\n settings.customize(input, inputRect, container, maxHeight);\r\n }\r\n }\r\n /**\r\n * Redraw the autocomplete div element with suggestions\r\n */\r\n function update() {\r\n // delete all children from autocomplete DOM container\r\n while (container.firstChild) {\r\n container.removeChild(container.firstChild);\r\n }\r\n input.setAttribute(\"aria-activedescendant\", \"\");\r\n // function for rendering autocomplete suggestions\r\n var render = function (item, _, __) {\r\n var itemElement = doc.createElement(\"div\");\r\n itemElement.textContent = item.label || \"\";\r\n return itemElement;\r\n };\r\n if (settings.render) {\r\n render = settings.render;\r\n }\r\n // function to render autocomplete groups\r\n var renderGroup = function (groupName, _) {\r\n var groupDiv = doc.createElement(\"div\");\r\n groupDiv.textContent = groupName;\r\n return groupDiv;\r\n };\r\n if (settings.renderGroup) {\r\n renderGroup = settings.renderGroup;\r\n }\r\n var fragment = doc.createDocumentFragment();\r\n var prevGroup = \"#9?$\";\r\n items.forEach(function (item, index) {\r\n if (item.group && item.group !== prevGroup) {\r\n prevGroup = item.group;\r\n var groupDiv = renderGroup(item.group, inputValue);\r\n if (groupDiv) {\r\n groupDiv.className += \" group\";\r\n fragment.appendChild(groupDiv);\r\n }\r\n }\r\n var div = render(item, inputValue, index);\r\n if (div) {\r\n div.id = container.id + \"_\" + index;\r\n div.setAttribute(\"role\", \"option\");\r\n div.addEventListener(\"click\", function (ev) {\r\n settings.onSelect(item, input);\r\n clear();\r\n ev.preventDefault();\r\n ev.stopPropagation();\r\n });\r\n if (item === selected) {\r\n div.className += \" selected\";\r\n div.setAttribute(\"aria-selected\", \"true\");\r\n input.setAttribute(\"aria-activedescendant\", div.id);\r\n }\r\n fragment.appendChild(div);\r\n }\r\n });\r\n container.appendChild(fragment);\r\n if (items.length < 1) {\r\n if (settings.emptyMsg) {\r\n var empty = doc.createElement(\"div\");\r\n empty.id = container.id + \"_\" + uid();\r\n empty.className = \"empty\";\r\n empty.textContent = settings.emptyMsg;\r\n container.appendChild(empty);\r\n input.setAttribute(\"aria-activedescendant\", empty.id);\r\n }\r\n else {\r\n clear();\r\n return;\r\n }\r\n }\r\n attach();\r\n updatePosition();\r\n updateScroll();\r\n }\r\n function updateIfDisplayed() {\r\n if (containerDisplayed()) {\r\n update();\r\n }\r\n }\r\n function resizeEventHandler() {\r\n updateIfDisplayed();\r\n }\r\n function scrollEventHandler(e) {\r\n if (e.target !== container) {\r\n updateIfDisplayed();\r\n }\r\n else {\r\n e.preventDefault();\r\n }\r\n }\r\n function keyupEventHandler(ev) {\r\n var keyCode = ev.which || ev.keyCode || 0;\r\n var ignore = settings.keysToIgnore || [38 /* Up */, 13 /* Enter */, 27 /* Esc */, 39 /* Right */, 37 /* Left */, 16 /* Shift */, 17 /* Ctrl */, 18 /* Alt */, 20 /* CapsLock */, 91 /* WindowsKey */, 9 /* Tab */];\r\n for (var _i = 0, ignore_1 = ignore; _i < ignore_1.length; _i++) {\r\n var key = ignore_1[_i];\r\n if (keyCode === key) {\r\n return;\r\n }\r\n }\r\n if (keyCode >= 112 /* F1 */ && keyCode <= 123 /* F12 */ && !settings.keysToIgnore) {\r\n return;\r\n }\r\n // the down key is used to open autocomplete\r\n if (keyCode === 40 /* Down */ && containerDisplayed()) {\r\n return;\r\n }\r\n startFetch(0 /* Keyboard */);\r\n }\r\n /**\r\n * Automatically move scroll bar if selected item is not visible\r\n */\r\n function updateScroll() {\r\n var elements = container.getElementsByClassName(\"selected\");\r\n if (elements.length > 0) {\r\n var element = elements[0];\r\n // make group visible\r\n var previous = element.previousElementSibling;\r\n if (previous && previous.className.indexOf(\"group\") !== -1 && !previous.previousElementSibling) {\r\n element = previous;\r\n }\r\n if (element.offsetTop < container.scrollTop) {\r\n container.scrollTop = element.offsetTop;\r\n }\r\n else {\r\n var selectBottom = element.offsetTop + element.offsetHeight;\r\n var containerBottom = container.scrollTop + container.offsetHeight;\r\n if (selectBottom > containerBottom) {\r\n container.scrollTop += selectBottom - containerBottom;\r\n }\r\n }\r\n }\r\n }\r\n /**\r\n * Select the previous item in suggestions\r\n */\r\n function selectPrev() {\r\n if (items.length < 1) {\r\n selected = undefined;\r\n }\r\n else {\r\n if (selected === items[0]) {\r\n selected = items[items.length - 1];\r\n }\r\n else {\r\n for (var i = items.length - 1; i > 0; i--) {\r\n if (selected === items[i] || i === 1) {\r\n selected = items[i - 1];\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n /**\r\n * Select the next item in suggestions\r\n */\r\n function selectNext() {\r\n if (items.length < 1) {\r\n selected = undefined;\r\n }\r\n if (!selected || selected === items[items.length - 1]) {\r\n selected = items[0];\r\n return;\r\n }\r\n for (var i = 0; i < (items.length - 1); i++) {\r\n if (selected === items[i]) {\r\n selected = items[i + 1];\r\n break;\r\n }\r\n }\r\n }\r\n function keydownEventHandler(ev) {\r\n var keyCode = ev.which || ev.keyCode || 0;\r\n if (keyCode === 38 /* Up */ || keyCode === 40 /* Down */ || keyCode === 27 /* Esc */) {\r\n var containerIsDisplayed = containerDisplayed();\r\n if (keyCode === 27 /* Esc */) {\r\n clear();\r\n }\r\n else {\r\n if (!containerIsDisplayed || items.length < 1) {\r\n return;\r\n }\r\n keyCode === 38 /* Up */\r\n ? selectPrev()\r\n : selectNext();\r\n update();\r\n }\r\n ev.preventDefault();\r\n if (containerIsDisplayed) {\r\n ev.stopPropagation();\r\n }\r\n return;\r\n }\r\n if (keyCode === 13 /* Enter */) {\r\n if (selected) {\r\n settings.onSelect(selected, input);\r\n clear();\r\n }\r\n if (preventSubmit) {\r\n ev.preventDefault();\r\n }\r\n }\r\n }\r\n function focusEventHandler() {\r\n if (showOnFocus) {\r\n startFetch(1 /* Focus */);\r\n }\r\n }\r\n function startFetch(trigger) {\r\n // If multiple keys were pressed, before we get an update from server,\r\n // this may cause redrawing autocomplete multiple times after the last key was pressed.\r\n // To avoid this, the number of times keyboard was pressed will be saved and checked before redraw.\r\n var savedKeypressCounter = ++keypressCounter;\r\n var inputText = input.value;\r\n var cursorPos = input.selectionStart || 0;\r\n if (inputText.length >= minLen || trigger === 1 /* Focus */) {\r\n clearDebounceTimer();\r\n debounceTimer = window.setTimeout(function () {\r\n settings.fetch(inputText, function (elements) {\r\n if (keypressCounter === savedKeypressCounter && elements) {\r\n items = elements;\r\n inputValue = inputText;\r\n selected = (items.length < 1 || disableAutoSelect) ? undefined : items[0];\r\n update();\r\n }\r\n }, trigger, cursorPos);\r\n }, trigger === 0 /* Keyboard */ ? debounceWaitMs : 0);\r\n }\r\n else {\r\n clear();\r\n }\r\n }\r\n function blurEventHandler() {\r\n // we need to delay clear, because when we click on an item, blur will be called before click and remove items from DOM\r\n setTimeout(function () {\r\n if (doc.activeElement !== input) {\r\n clear();\r\n }\r\n }, 200);\r\n }\r\n /**\r\n * Fixes #26: on long clicks focus will be lost and onSelect method will not be called\r\n */\r\n container.addEventListener(\"mousedown\", function (evt) {\r\n evt.stopPropagation();\r\n evt.preventDefault();\r\n });\r\n /**\r\n * Fixes #30: autocomplete closes when scrollbar is clicked in IE\r\n * See: https://stackoverflow.com/a/9210267/13172349\r\n */\r\n container.addEventListener(\"focus\", function () { return input.focus(); });\r\n /**\r\n * This function will remove DOM elements and clear event handlers\r\n */\r\n function destroy() {\r\n input.removeEventListener(\"focus\", focusEventHandler);\r\n input.removeEventListener(\"keydown\", keydownEventHandler);\r\n input.removeEventListener(keyUpEventName, keyupEventHandler);\r\n input.removeEventListener(\"blur\", blurEventHandler);\r\n window.removeEventListener(\"resize\", resizeEventHandler);\r\n doc.removeEventListener(\"scroll\", scrollEventHandler, true);\r\n input.removeAttribute(\"role\");\r\n input.removeAttribute(\"aria-expanded\");\r\n input.removeAttribute(\"aria-autocomplete\");\r\n input.removeAttribute(\"aria-controls\");\r\n input.removeAttribute(\"aria-activedescendant\");\r\n input.removeAttribute(\"aria-owns\");\r\n input.removeAttribute(\"aria-haspopup\");\r\n clearDebounceTimer();\r\n clear();\r\n }\r\n // setup event handlers\r\n input.addEventListener(\"keydown\", keydownEventHandler);\r\n input.addEventListener(keyUpEventName, keyupEventHandler);\r\n input.addEventListener(\"blur\", blurEventHandler);\r\n input.addEventListener(\"focus\", focusEventHandler);\r\n window.addEventListener(\"resize\", resizeEventHandler);\r\n doc.addEventListener(\"scroll\", scrollEventHandler, true);\r\n return {\r\n destroy: destroy\r\n };\r\n }\n\n return autocomplete;\n\n})));\n//# sourceMappingURL=autocomplete.js.map\n\n\n//# sourceURL=webpack://Formio/./node_modules/autocompleter/autocomplete.js?"); /***/ }), @@ -7415,6 +7983,17 @@ eval("(function (global, factory) {\n\t true ? module.exports = factory() :\n\t0 /***/ }), +/***/ "./node_modules/compare-versions/lib/esm/index.js": +/*!********************************************************!*\ + !*** ./node_modules/compare-versions/lib/esm/index.js ***! + \********************************************************/ +/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"compare\": function() { return /* binding */ compare; },\n/* harmony export */ \"compareVersions\": function() { return /* binding */ compareVersions; },\n/* harmony export */ \"satisfies\": function() { return /* binding */ satisfies; },\n/* harmony export */ \"validate\": function() { return /* binding */ validate; }\n/* harmony export */ });\n/**\n * Compare [semver](https://semver.org/) version strings to find greater, equal or lesser.\n * This library supports the full semver specification, including comparing versions with different number of digits like `1.0.0`, `1.0`, `1`, and pre-release versions like `1.0.0-alpha`.\n * @param v1 - First version to compare\n * @param v2 - Second version to compare\n * @returns Numeric value compatible with the [Array.sort(fn) interface](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#Parameters).\n */\nconst compareVersions = (v1, v2) => {\n // validate input and split into segments\n const n1 = validateAndParse(v1);\n const n2 = validateAndParse(v2);\n // pop off the patch\n const p1 = n1.pop();\n const p2 = n2.pop();\n // validate numbers\n const r = compareSegments(n1, n2);\n if (r !== 0)\n return r;\n // validate pre-release\n if (p1 && p2) {\n return compareSegments(p1.split('.'), p2.split('.'));\n }\n else if (p1 || p2) {\n return p1 ? -1 : 1;\n }\n return 0;\n};\n/**\n * Validate [semver](https://semver.org/) version strings.\n *\n * @param version Version number to validate\n * @returns `true` if the version number is a valid semver version number, `false` otherwise.\n *\n * @example\n * ```\n * validate('1.0.0-rc.1'); // return true\n * validate('1.0-rc.1'); // return false\n * validate('foo'); // return false\n * ```\n */\nconst validate = (version) => typeof version === 'string' && /^[v\\d]/.test(version) && semver.test(version);\n/**\n * Compare [semver](https://semver.org/) version strings using the specified operator.\n *\n * @param v1 First version to compare\n * @param v2 Second version to compare\n * @param operator Allowed arithmetic operator to use\n * @returns `true` if the comparison between the firstVersion and the secondVersion satisfies the operator, `false` otherwise.\n *\n * @example\n * ```\n * compare('10.1.8', '10.0.4', '>'); // return true\n * compare('10.0.1', '10.0.1', '='); // return true\n * compare('10.1.1', '10.2.2', '<'); // return true\n * compare('10.1.1', '10.2.2', '<='); // return true\n * compare('10.1.1', '10.2.2', '>='); // return false\n * ```\n */\nconst compare = (v1, v2, operator) => {\n // validate input operator\n assertValidOperator(operator);\n // since result of compareVersions can only be -1 or 0 or 1\n // a simple map can be used to replace switch\n const res = compareVersions(v1, v2);\n return operatorResMap[operator].includes(res);\n};\n/**\n * Match [npm semver](https://docs.npmjs.com/cli/v6/using-npm/semver) version range.\n *\n * @param version Version number to match\n * @param range Range pattern for version\n * @returns `true` if the version number is within the range, `false` otherwise.\n *\n * @example\n * ```\n * satisfies('1.1.0', '^1.0.0'); // return true\n * satisfies('1.1.0', '~1.0.0'); // return false\n * ```\n */\nconst satisfies = (version, range) => {\n // if no range operator then \"=\"\n const m = range.match(/^([<>=~^]+)/);\n const op = m ? m[1] : '=';\n // if gt/lt/eq then operator compare\n if (op !== '^' && op !== '~')\n return compare(version, range, op);\n // else range of either \"~\" or \"^\" is assumed\n const [v1, v2, v3] = validateAndParse(version);\n const [r1, r2, r3] = validateAndParse(range);\n if (compareStrings(v1, r1) !== 0)\n return false;\n if (op === '^') {\n return compareSegments([v2, v3], [r2, r3]) >= 0;\n }\n if (compareStrings(v2, r2) !== 0)\n return false;\n return compareStrings(v3, r3) >= 0;\n};\nconst semver = /^[v^~<>=]*?(\\d+)(?:\\.([x*]|\\d+)(?:\\.([x*]|\\d+)(?:\\.([x*]|\\d+))?(?:-([\\da-z\\-]+(?:\\.[\\da-z\\-]+)*))?(?:\\+[\\da-z\\-]+(?:\\.[\\da-z\\-]+)*)?)?)?$/i;\nconst validateAndParse = (version) => {\n if (typeof version !== 'string') {\n throw new TypeError('Invalid argument expected string');\n }\n const match = version.match(semver);\n if (!match) {\n throw new Error(`Invalid argument not valid semver ('${version}' received)`);\n }\n match.shift();\n return match;\n};\nconst isWildcard = (s) => s === '*' || s === 'x' || s === 'X';\nconst tryParse = (v) => {\n const n = parseInt(v, 10);\n return isNaN(n) ? v : n;\n};\nconst forceType = (a, b) => typeof a !== typeof b ? [String(a), String(b)] : [a, b];\nconst compareStrings = (a, b) => {\n if (isWildcard(a) || isWildcard(b))\n return 0;\n const [ap, bp] = forceType(tryParse(a), tryParse(b));\n if (ap > bp)\n return 1;\n if (ap < bp)\n return -1;\n return 0;\n};\nconst compareSegments = (a, b) => {\n for (let i = 0; i < Math.max(a.length, b.length); i++) {\n const r = compareStrings(a[i] || '0', b[i] || '0');\n if (r !== 0)\n return r;\n }\n return 0;\n};\nconst operatorResMap = {\n '>': [1],\n '>=': [0, 1],\n '=': [0],\n '<=': [-1, 0],\n '<': [-1],\n};\nconst allowedOperators = Object.keys(operatorResMap);\nconst assertValidOperator = (op) => {\n if (typeof op !== 'string') {\n throw new TypeError(`Invalid operator type, expected string but got ${typeof op}`);\n }\n if (allowedOperators.indexOf(op) === -1) {\n throw new Error(`Invalid operator, expected one of ${allowedOperators.join('|')}`);\n }\n};\n//# sourceMappingURL=index.js.map\n\n//# sourceURL=webpack://Formio/./node_modules/compare-versions/lib/esm/index.js?"); + +/***/ }), + /***/ "./node_modules/core-js/internals/a-callable.js": /*!******************************************************!*\ !*** ./node_modules/core-js/internals/a-callable.js ***! @@ -7492,7 +8071,7 @@ eval("var isObject = __webpack_require__(/*! ../internals/is-object */ \"./node_ \************************************************************************/ /***/ (function(module) { -eval("// eslint-disable-next-line es-x/no-typed-arrays -- safe\nmodule.exports = typeof ArrayBuffer != 'undefined' && typeof DataView != 'undefined';\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/array-buffer-basic-detection.js?"); +eval("// eslint-disable-next-line es/no-typed-arrays -- safe\nmodule.exports = typeof ArrayBuffer != 'undefined' && typeof DataView != 'undefined';\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/array-buffer-basic-detection.js?"); /***/ }), @@ -7502,7 +8081,7 @@ eval("// eslint-disable-next-line es-x/no-typed-arrays -- safe\nmodule.exports = \***********************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { -eval("// FF26- bug: ArrayBuffers are non-extensible, but Object.isExtensible does not report it\nvar fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\n\nmodule.exports = fails(function () {\n if (typeof ArrayBuffer == 'function') {\n var buffer = new ArrayBuffer(8);\n // eslint-disable-next-line es-x/no-object-isextensible, es-x/no-object-defineproperty -- safe\n if (Object.isExtensible(buffer)) Object.defineProperty(buffer, 'a', { value: 8 });\n }\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/array-buffer-non-extensible.js?"); +eval("// FF26- bug: ArrayBuffers are non-extensible, but Object.isExtensible does not report it\nvar fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\n\nmodule.exports = fails(function () {\n if (typeof ArrayBuffer == 'function') {\n var buffer = new ArrayBuffer(8);\n // eslint-disable-next-line es/no-object-isextensible, es/no-object-defineproperty -- safe\n if (Object.isExtensible(buffer)) Object.defineProperty(buffer, 'a', { value: 8 });\n }\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/array-buffer-non-extensible.js?"); /***/ }), @@ -7535,7 +8114,7 @@ eval("\nvar global = __webpack_require__(/*! ../internals/global */ \"./node_mod /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; -eval("\nvar toObject = __webpack_require__(/*! ../internals/to-object */ \"./node_modules/core-js/internals/to-object.js\");\nvar toAbsoluteIndex = __webpack_require__(/*! ../internals/to-absolute-index */ \"./node_modules/core-js/internals/to-absolute-index.js\");\nvar lengthOfArrayLike = __webpack_require__(/*! ../internals/length-of-array-like */ \"./node_modules/core-js/internals/length-of-array-like.js\");\nvar deletePropertyOrThrow = __webpack_require__(/*! ../internals/delete-property-or-throw */ \"./node_modules/core-js/internals/delete-property-or-throw.js\");\n\nvar min = Math.min;\n\n// `Array.prototype.copyWithin` method implementation\n// https://tc39.es/ecma262/#sec-array.prototype.copywithin\n// eslint-disable-next-line es-x/no-array-prototype-copywithin -- safe\nmodule.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) {\n var O = toObject(this);\n var len = lengthOfArrayLike(O);\n var to = toAbsoluteIndex(target, len);\n var from = toAbsoluteIndex(start, len);\n var end = arguments.length > 2 ? arguments[2] : undefined;\n var count = min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to);\n var inc = 1;\n if (from < to && to < from + count) {\n inc = -1;\n from += count - 1;\n to += count - 1;\n }\n while (count-- > 0) {\n if (from in O) O[to] = O[from];\n else deletePropertyOrThrow(O, to);\n to += inc;\n from += inc;\n } return O;\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/array-copy-within.js?"); +eval("\nvar toObject = __webpack_require__(/*! ../internals/to-object */ \"./node_modules/core-js/internals/to-object.js\");\nvar toAbsoluteIndex = __webpack_require__(/*! ../internals/to-absolute-index */ \"./node_modules/core-js/internals/to-absolute-index.js\");\nvar lengthOfArrayLike = __webpack_require__(/*! ../internals/length-of-array-like */ \"./node_modules/core-js/internals/length-of-array-like.js\");\nvar deletePropertyOrThrow = __webpack_require__(/*! ../internals/delete-property-or-throw */ \"./node_modules/core-js/internals/delete-property-or-throw.js\");\n\nvar min = Math.min;\n\n// `Array.prototype.copyWithin` method implementation\n// https://tc39.es/ecma262/#sec-array.prototype.copywithin\n// eslint-disable-next-line es/no-array-prototype-copywithin -- safe\nmodule.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) {\n var O = toObject(this);\n var len = lengthOfArrayLike(O);\n var to = toAbsoluteIndex(target, len);\n var from = toAbsoluteIndex(start, len);\n var end = arguments.length > 2 ? arguments[2] : undefined;\n var count = min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to);\n var inc = 1;\n if (from < to && to < from + count) {\n inc = -1;\n from += count - 1;\n to += count - 1;\n }\n while (count-- > 0) {\n if (from in O) O[to] = O[from];\n else deletePropertyOrThrow(O, to);\n to += inc;\n from += inc;\n } return O;\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/array-copy-within.js?"); /***/ }), @@ -7557,7 +8136,7 @@ eval("\nvar toObject = __webpack_require__(/*! ../internals/to-object */ \"./nod /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; -eval("\nvar $forEach = (__webpack_require__(/*! ../internals/array-iteration */ \"./node_modules/core-js/internals/array-iteration.js\").forEach);\nvar arrayMethodIsStrict = __webpack_require__(/*! ../internals/array-method-is-strict */ \"./node_modules/core-js/internals/array-method-is-strict.js\");\n\nvar STRICT_METHOD = arrayMethodIsStrict('forEach');\n\n// `Array.prototype.forEach` method implementation\n// https://tc39.es/ecma262/#sec-array.prototype.foreach\nmodule.exports = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) {\n return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n// eslint-disable-next-line es-x/no-array-prototype-foreach -- safe\n} : [].forEach;\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/array-for-each.js?"); +eval("\nvar $forEach = (__webpack_require__(/*! ../internals/array-iteration */ \"./node_modules/core-js/internals/array-iteration.js\").forEach);\nvar arrayMethodIsStrict = __webpack_require__(/*! ../internals/array-method-is-strict */ \"./node_modules/core-js/internals/array-method-is-strict.js\");\n\nvar STRICT_METHOD = arrayMethodIsStrict('forEach');\n\n// `Array.prototype.forEach` method implementation\n// https://tc39.es/ecma262/#sec-array.prototype.foreach\nmodule.exports = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) {\n return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n// eslint-disable-next-line es/no-array-prototype-foreach -- safe\n} : [].forEach;\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/array-for-each.js?"); /***/ }), @@ -7609,7 +8188,7 @@ eval("var bind = __webpack_require__(/*! ../internals/function-bind-context */ \ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; -eval("\n/* eslint-disable es-x/no-array-prototype-lastindexof -- safe */\nvar apply = __webpack_require__(/*! ../internals/function-apply */ \"./node_modules/core-js/internals/function-apply.js\");\nvar toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ \"./node_modules/core-js/internals/to-indexed-object.js\");\nvar toIntegerOrInfinity = __webpack_require__(/*! ../internals/to-integer-or-infinity */ \"./node_modules/core-js/internals/to-integer-or-infinity.js\");\nvar lengthOfArrayLike = __webpack_require__(/*! ../internals/length-of-array-like */ \"./node_modules/core-js/internals/length-of-array-like.js\");\nvar arrayMethodIsStrict = __webpack_require__(/*! ../internals/array-method-is-strict */ \"./node_modules/core-js/internals/array-method-is-strict.js\");\n\nvar min = Math.min;\nvar $lastIndexOf = [].lastIndexOf;\nvar NEGATIVE_ZERO = !!$lastIndexOf && 1 / [1].lastIndexOf(1, -0) < 0;\nvar STRICT_METHOD = arrayMethodIsStrict('lastIndexOf');\nvar FORCED = NEGATIVE_ZERO || !STRICT_METHOD;\n\n// `Array.prototype.lastIndexOf` method implementation\n// https://tc39.es/ecma262/#sec-array.prototype.lastindexof\nmodule.exports = FORCED ? function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) {\n // convert -0 to +0\n if (NEGATIVE_ZERO) return apply($lastIndexOf, this, arguments) || 0;\n var O = toIndexedObject(this);\n var length = lengthOfArrayLike(O);\n var index = length - 1;\n if (arguments.length > 1) index = min(index, toIntegerOrInfinity(arguments[1]));\n if (index < 0) index = length + index;\n for (;index >= 0; index--) if (index in O && O[index] === searchElement) return index || 0;\n return -1;\n} : $lastIndexOf;\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/array-last-index-of.js?"); +eval("\n/* eslint-disable es/no-array-prototype-lastindexof -- safe */\nvar apply = __webpack_require__(/*! ../internals/function-apply */ \"./node_modules/core-js/internals/function-apply.js\");\nvar toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ \"./node_modules/core-js/internals/to-indexed-object.js\");\nvar toIntegerOrInfinity = __webpack_require__(/*! ../internals/to-integer-or-infinity */ \"./node_modules/core-js/internals/to-integer-or-infinity.js\");\nvar lengthOfArrayLike = __webpack_require__(/*! ../internals/length-of-array-like */ \"./node_modules/core-js/internals/length-of-array-like.js\");\nvar arrayMethodIsStrict = __webpack_require__(/*! ../internals/array-method-is-strict */ \"./node_modules/core-js/internals/array-method-is-strict.js\");\n\nvar min = Math.min;\nvar $lastIndexOf = [].lastIndexOf;\nvar NEGATIVE_ZERO = !!$lastIndexOf && 1 / [1].lastIndexOf(1, -0) < 0;\nvar STRICT_METHOD = arrayMethodIsStrict('lastIndexOf');\nvar FORCED = NEGATIVE_ZERO || !STRICT_METHOD;\n\n// `Array.prototype.lastIndexOf` method implementation\n// https://tc39.es/ecma262/#sec-array.prototype.lastindexof\nmodule.exports = FORCED ? function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) {\n // convert -0 to +0\n if (NEGATIVE_ZERO) return apply($lastIndexOf, this, arguments) || 0;\n var O = toIndexedObject(this);\n var length = lengthOfArrayLike(O);\n var index = length - 1;\n if (arguments.length > 1) index = min(index, toIntegerOrInfinity(arguments[1]));\n if (index < 0) index = length + index;\n for (;index >= 0; index--) if (index in O && O[index] === searchElement) return index || 0;\n return -1;\n} : $lastIndexOf;\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/array-last-index-of.js?"); /***/ }), @@ -7651,7 +8230,7 @@ eval("var aCallable = __webpack_require__(/*! ../internals/a-callable */ \"./nod /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; -eval("\nvar DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./node_modules/core-js/internals/descriptors.js\");\nvar isArray = __webpack_require__(/*! ../internals/is-array */ \"./node_modules/core-js/internals/is-array.js\");\n\nvar $TypeError = TypeError;\n// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// Safari < 13 does not throw an error in this case\nvar SILENT_ON_NON_WRITABLE_LENGTH_SET = DESCRIPTORS && !function () {\n // makes no sense without proper strict mode support\n if (this !== undefined) return true;\n try {\n // eslint-disable-next-line es-x/no-object-defineproperty -- safe\n Object.defineProperty([], 'length', { writable: false }).length = 1;\n } catch (error) {\n return error instanceof TypeError;\n }\n}();\n\nmodule.exports = SILENT_ON_NON_WRITABLE_LENGTH_SET ? function (O, length) {\n if (isArray(O) && !getOwnPropertyDescriptor(O, 'length').writable) {\n throw $TypeError('Cannot set read only .length');\n } return O.length = length;\n} : function (O, length) {\n return O.length = length;\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/array-set-length.js?"); +eval("\nvar DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./node_modules/core-js/internals/descriptors.js\");\nvar isArray = __webpack_require__(/*! ../internals/is-array */ \"./node_modules/core-js/internals/is-array.js\");\n\nvar $TypeError = TypeError;\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// Safari < 13 does not throw an error in this case\nvar SILENT_ON_NON_WRITABLE_LENGTH_SET = DESCRIPTORS && !function () {\n // makes no sense without proper strict mode support\n if (this !== undefined) return true;\n try {\n // eslint-disable-next-line es/no-object-defineproperty -- safe\n Object.defineProperty([], 'length', { writable: false }).length = 1;\n } catch (error) {\n return error instanceof TypeError;\n }\n}();\n\nmodule.exports = SILENT_ON_NON_WRITABLE_LENGTH_SET ? function (O, length) {\n if (isArray(O) && !getOwnPropertyDescriptor(O, 'length').writable) {\n throw $TypeError('Cannot set read only .length');\n } return O.length = length;\n} : function (O, length) {\n return O.length = length;\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/array-set-length.js?"); /***/ }), @@ -7721,7 +8300,7 @@ eval("var anObject = __webpack_require__(/*! ../internals/an-object */ \"./node_ \**************************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { -eval("var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js/internals/well-known-symbol.js\");\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar SAFE_CLOSING = false;\n\ntry {\n var called = 0;\n var iteratorWithReturn = {\n next: function () {\n return { done: !!called++ };\n },\n 'return': function () {\n SAFE_CLOSING = true;\n }\n };\n iteratorWithReturn[ITERATOR] = function () {\n return this;\n };\n // eslint-disable-next-line es-x/no-array-from, no-throw-literal -- required for testing\n Array.from(iteratorWithReturn, function () { throw 2; });\n} catch (error) { /* empty */ }\n\nmodule.exports = function (exec, SKIP_CLOSING) {\n if (!SKIP_CLOSING && !SAFE_CLOSING) return false;\n var ITERATION_SUPPORT = false;\n try {\n var object = {};\n object[ITERATOR] = function () {\n return {\n next: function () {\n return { done: ITERATION_SUPPORT = true };\n }\n };\n };\n exec(object);\n } catch (error) { /* empty */ }\n return ITERATION_SUPPORT;\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/check-correctness-of-iteration.js?"); +eval("var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js/internals/well-known-symbol.js\");\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar SAFE_CLOSING = false;\n\ntry {\n var called = 0;\n var iteratorWithReturn = {\n next: function () {\n return { done: !!called++ };\n },\n 'return': function () {\n SAFE_CLOSING = true;\n }\n };\n iteratorWithReturn[ITERATOR] = function () {\n return this;\n };\n // eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing\n Array.from(iteratorWithReturn, function () { throw 2; });\n} catch (error) { /* empty */ }\n\nmodule.exports = function (exec, SKIP_CLOSING) {\n if (!SKIP_CLOSING && !SAFE_CLOSING) return false;\n var ITERATION_SUPPORT = false;\n try {\n var object = {};\n object[ITERATOR] = function () {\n return {\n next: function () {\n return { done: ITERATION_SUPPORT = true };\n }\n };\n };\n exec(object);\n } catch (error) { /* empty */ }\n return ITERATION_SUPPORT;\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/check-correctness-of-iteration.js?"); /***/ }), @@ -7804,7 +8383,7 @@ eval("var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symb \********************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { -eval("var fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\n\nmodule.exports = !fails(function () {\n function F() { /* empty */ }\n F.prototype.constructor = null;\n // eslint-disable-next-line es-x/no-object-getprototypeof -- required for testing\n return Object.getPrototypeOf(new F()) !== F.prototype;\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/correct-prototype-getter.js?"); +eval("var fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\n\nmodule.exports = !fails(function () {\n function F() { /* empty */ }\n F.prototype.constructor = null;\n // eslint-disable-next-line es/no-object-getprototypeof -- required for testing\n return Object.getPrototypeOf(new F()) !== F.prototype;\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/correct-prototype-getter.js?"); /***/ }), @@ -7849,6 +8428,28 @@ eval("\nvar toPropertyKey = __webpack_require__(/*! ../internals/to-property-key /***/ }), +/***/ "./node_modules/core-js/internals/date-to-iso-string.js": +/*!**************************************************************!*\ + !*** ./node_modules/core-js/internals/date-to-iso-string.js ***! + \**************************************************************/ +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +eval("\nvar uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ \"./node_modules/core-js/internals/function-uncurry-this.js\");\nvar fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\nvar padStart = (__webpack_require__(/*! ../internals/string-pad */ \"./node_modules/core-js/internals/string-pad.js\").start);\n\nvar $RangeError = RangeError;\nvar $isFinite = isFinite;\nvar abs = Math.abs;\nvar DatePrototype = Date.prototype;\nvar nativeDateToISOString = DatePrototype.toISOString;\nvar thisTimeValue = uncurryThis(DatePrototype.getTime);\nvar getUTCDate = uncurryThis(DatePrototype.getUTCDate);\nvar getUTCFullYear = uncurryThis(DatePrototype.getUTCFullYear);\nvar getUTCHours = uncurryThis(DatePrototype.getUTCHours);\nvar getUTCMilliseconds = uncurryThis(DatePrototype.getUTCMilliseconds);\nvar getUTCMinutes = uncurryThis(DatePrototype.getUTCMinutes);\nvar getUTCMonth = uncurryThis(DatePrototype.getUTCMonth);\nvar getUTCSeconds = uncurryThis(DatePrototype.getUTCSeconds);\n\n// `Date.prototype.toISOString` method implementation\n// https://tc39.es/ecma262/#sec-date.prototype.toisostring\n// PhantomJS / old WebKit fails here:\nmodule.exports = (fails(function () {\n return nativeDateToISOString.call(new Date(-5e13 - 1)) != '0385-07-25T07:06:39.999Z';\n}) || !fails(function () {\n nativeDateToISOString.call(new Date(NaN));\n})) ? function toISOString() {\n if (!$isFinite(thisTimeValue(this))) throw $RangeError('Invalid time value');\n var date = this;\n var year = getUTCFullYear(date);\n var milliseconds = getUTCMilliseconds(date);\n var sign = year < 0 ? '-' : year > 9999 ? '+' : '';\n return sign + padStart(abs(year), sign ? 6 : 4, 0) +\n '-' + padStart(getUTCMonth(date) + 1, 2, 0) +\n '-' + padStart(getUTCDate(date), 2, 0) +\n 'T' + padStart(getUTCHours(date), 2, 0) +\n ':' + padStart(getUTCMinutes(date), 2, 0) +\n ':' + padStart(getUTCSeconds(date), 2, 0) +\n '.' + padStart(milliseconds, 3, 0) +\n 'Z';\n} : nativeDateToISOString;\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/date-to-iso-string.js?"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/date-to-primitive.js": +/*!*************************************************************!*\ + !*** ./node_modules/core-js/internals/date-to-primitive.js ***! + \*************************************************************/ +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +eval("\nvar anObject = __webpack_require__(/*! ../internals/an-object */ \"./node_modules/core-js/internals/an-object.js\");\nvar ordinaryToPrimitive = __webpack_require__(/*! ../internals/ordinary-to-primitive */ \"./node_modules/core-js/internals/ordinary-to-primitive.js\");\n\nvar $TypeError = TypeError;\n\n// `Date.prototype[@@toPrimitive](hint)` method implementation\n// https://tc39.es/ecma262/#sec-date.prototype-@@toprimitive\nmodule.exports = function (hint) {\n anObject(this);\n if (hint === 'string' || hint === 'default') hint = 'string';\n else if (hint !== 'number') throw $TypeError('Incorrect hint');\n return ordinaryToPrimitive(this, hint);\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/date-to-primitive.js?"); + +/***/ }), + /***/ "./node_modules/core-js/internals/define-built-in-accessor.js": /*!********************************************************************!*\ !*** ./node_modules/core-js/internals/define-built-in-accessor.js ***! @@ -7885,7 +8486,7 @@ eval("var defineBuiltIn = __webpack_require__(/*! ../internals/define-built-in * \******************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { -eval("var global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js/internals/global.js\");\n\n// eslint-disable-next-line es-x/no-object-defineproperty -- safe\nvar defineProperty = Object.defineProperty;\n\nmodule.exports = function (key, value) {\n try {\n defineProperty(global, key, { value: value, configurable: true, writable: true });\n } catch (error) {\n global[key] = value;\n } return value;\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/define-global-property.js?"); +eval("var global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js/internals/global.js\");\n\n// eslint-disable-next-line es/no-object-defineproperty -- safe\nvar defineProperty = Object.defineProperty;\n\nmodule.exports = function (key, value) {\n try {\n defineProperty(global, key, { value: value, configurable: true, writable: true });\n } catch (error) {\n global[key] = value;\n } return value;\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/define-global-property.js?"); /***/ }), @@ -7906,7 +8507,17 @@ eval("\nvar tryToString = __webpack_require__(/*! ../internals/try-to-string */ \*******************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { -eval("var fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\n\n// Detect IE8's incomplete defineProperty implementation\nmodule.exports = !fails(function () {\n // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing\n return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/descriptors.js?"); +eval("var fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\n\n// Detect IE8's incomplete defineProperty implementation\nmodule.exports = !fails(function () {\n // eslint-disable-next-line es/no-object-defineproperty -- required for testing\n return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/descriptors.js?"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/document-all.js": +/*!********************************************************!*\ + !*** ./node_modules/core-js/internals/document-all.js ***! + \********************************************************/ +/***/ (function(module) { + +eval("var documentAll = typeof document == 'object' && document.all;\n\n// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot\nvar IS_HTMLDDA = typeof documentAll == 'undefined' && documentAll !== undefined;\n\nmodule.exports = {\n all: documentAll,\n IS_HTMLDDA: IS_HTMLDDA\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/document-all.js?"); /***/ }), @@ -8097,7 +8708,7 @@ eval("module.exports = function (exec) {\n try {\n return !!exec();\n } cat /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; -eval("\n// TODO: Remove from `core-js@4` since it's moved to entry points\n__webpack_require__(/*! ../modules/es.regexp.exec */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\nvar uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ \"./node_modules/core-js/internals/function-uncurry-this.js\");\nvar defineBuiltIn = __webpack_require__(/*! ../internals/define-built-in */ \"./node_modules/core-js/internals/define-built-in.js\");\nvar regexpExec = __webpack_require__(/*! ../internals/regexp-exec */ \"./node_modules/core-js/internals/regexp-exec.js\");\nvar fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\nvar wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js/internals/well-known-symbol.js\");\nvar createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ \"./node_modules/core-js/internals/create-non-enumerable-property.js\");\n\nvar SPECIES = wellKnownSymbol('species');\nvar RegExpPrototype = RegExp.prototype;\n\nmodule.exports = function (KEY, exec, FORCED, SHAM) {\n var SYMBOL = wellKnownSymbol(KEY);\n\n var DELEGATES_TO_SYMBOL = !fails(function () {\n // String methods call symbol-named RegEp methods\n var O = {};\n O[SYMBOL] = function () { return 7; };\n return ''[KEY](O) != 7;\n });\n\n var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {\n // Symbol-named RegExp methods call .exec\n var execCalled = false;\n var re = /a/;\n\n if (KEY === 'split') {\n // We can't use real regex here since it causes deoptimization\n // and serious performance degradation in V8\n // https://github.com/zloirock/core-js/issues/306\n re = {};\n // RegExp[@@split] doesn't call the regex's exec method, but first creates\n // a new one. We need to return the patched regex when creating the new one.\n re.constructor = {};\n re.constructor[SPECIES] = function () { return re; };\n re.flags = '';\n re[SYMBOL] = /./[SYMBOL];\n }\n\n re.exec = function () { execCalled = true; return null; };\n\n re[SYMBOL]('');\n return !execCalled;\n });\n\n if (\n !DELEGATES_TO_SYMBOL ||\n !DELEGATES_TO_EXEC ||\n FORCED\n ) {\n var uncurriedNativeRegExpMethod = uncurryThis(/./[SYMBOL]);\n var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {\n var uncurriedNativeMethod = uncurryThis(nativeMethod);\n var $exec = regexp.exec;\n if ($exec === regexpExec || $exec === RegExpPrototype.exec) {\n if (DELEGATES_TO_SYMBOL && !forceStringMethod) {\n // The native String method already delegates to @@method (this\n // polyfilled function), leasing to infinite recursion.\n // We avoid it by directly calling the native @@method method.\n return { done: true, value: uncurriedNativeRegExpMethod(regexp, str, arg2) };\n }\n return { done: true, value: uncurriedNativeMethod(str, regexp, arg2) };\n }\n return { done: false };\n });\n\n defineBuiltIn(String.prototype, KEY, methods[0]);\n defineBuiltIn(RegExpPrototype, SYMBOL, methods[1]);\n }\n\n if (SHAM) createNonEnumerableProperty(RegExpPrototype[SYMBOL], 'sham', true);\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/fix-regexp-well-known-symbol-logic.js?"); +eval("\n// TODO: Remove from `core-js@4` since it's moved to entry points\n__webpack_require__(/*! ../modules/es.regexp.exec */ \"./node_modules/core-js/modules/es.regexp.exec.js\");\nvar uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this-clause */ \"./node_modules/core-js/internals/function-uncurry-this-clause.js\");\nvar defineBuiltIn = __webpack_require__(/*! ../internals/define-built-in */ \"./node_modules/core-js/internals/define-built-in.js\");\nvar regexpExec = __webpack_require__(/*! ../internals/regexp-exec */ \"./node_modules/core-js/internals/regexp-exec.js\");\nvar fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\nvar wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js/internals/well-known-symbol.js\");\nvar createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ \"./node_modules/core-js/internals/create-non-enumerable-property.js\");\n\nvar SPECIES = wellKnownSymbol('species');\nvar RegExpPrototype = RegExp.prototype;\n\nmodule.exports = function (KEY, exec, FORCED, SHAM) {\n var SYMBOL = wellKnownSymbol(KEY);\n\n var DELEGATES_TO_SYMBOL = !fails(function () {\n // String methods call symbol-named RegEp methods\n var O = {};\n O[SYMBOL] = function () { return 7; };\n return ''[KEY](O) != 7;\n });\n\n var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {\n // Symbol-named RegExp methods call .exec\n var execCalled = false;\n var re = /a/;\n\n if (KEY === 'split') {\n // We can't use real regex here since it causes deoptimization\n // and serious performance degradation in V8\n // https://github.com/zloirock/core-js/issues/306\n re = {};\n // RegExp[@@split] doesn't call the regex's exec method, but first creates\n // a new one. We need to return the patched regex when creating the new one.\n re.constructor = {};\n re.constructor[SPECIES] = function () { return re; };\n re.flags = '';\n re[SYMBOL] = /./[SYMBOL];\n }\n\n re.exec = function () { execCalled = true; return null; };\n\n re[SYMBOL]('');\n return !execCalled;\n });\n\n if (\n !DELEGATES_TO_SYMBOL ||\n !DELEGATES_TO_EXEC ||\n FORCED\n ) {\n var uncurriedNativeRegExpMethod = uncurryThis(/./[SYMBOL]);\n var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {\n var uncurriedNativeMethod = uncurryThis(nativeMethod);\n var $exec = regexp.exec;\n if ($exec === regexpExec || $exec === RegExpPrototype.exec) {\n if (DELEGATES_TO_SYMBOL && !forceStringMethod) {\n // The native String method already delegates to @@method (this\n // polyfilled function), leasing to infinite recursion.\n // We avoid it by directly calling the native @@method method.\n return { done: true, value: uncurriedNativeRegExpMethod(regexp, str, arg2) };\n }\n return { done: true, value: uncurriedNativeMethod(str, regexp, arg2) };\n }\n return { done: false };\n });\n\n defineBuiltIn(String.prototype, KEY, methods[0]);\n defineBuiltIn(RegExpPrototype, SYMBOL, methods[1]);\n }\n\n if (SHAM) createNonEnumerableProperty(RegExpPrototype[SYMBOL], 'sham', true);\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/fix-regexp-well-known-symbol-logic.js?"); /***/ }), @@ -8107,7 +8718,7 @@ eval("\n// TODO: Remove from `core-js@4` since it's moved to entry points\n__web \****************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { -eval("var fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\n\nmodule.exports = !fails(function () {\n // eslint-disable-next-line es-x/no-object-isextensible, es-x/no-object-preventextensions -- required for testing\n return Object.isExtensible(Object.preventExtensions({}));\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/freezing.js?"); +eval("var fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\n\nmodule.exports = !fails(function () {\n // eslint-disable-next-line es/no-object-isextensible, es/no-object-preventextensions -- required for testing\n return Object.isExtensible(Object.preventExtensions({}));\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/freezing.js?"); /***/ }), @@ -8117,7 +8728,7 @@ eval("var fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules \**********************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { -eval("var NATIVE_BIND = __webpack_require__(/*! ../internals/function-bind-native */ \"./node_modules/core-js/internals/function-bind-native.js\");\n\nvar FunctionPrototype = Function.prototype;\nvar apply = FunctionPrototype.apply;\nvar call = FunctionPrototype.call;\n\n// eslint-disable-next-line es-x/no-reflect -- safe\nmodule.exports = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call.bind(apply) : function () {\n return call.apply(apply, arguments);\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/function-apply.js?"); +eval("var NATIVE_BIND = __webpack_require__(/*! ../internals/function-bind-native */ \"./node_modules/core-js/internals/function-bind-native.js\");\n\nvar FunctionPrototype = Function.prototype;\nvar apply = FunctionPrototype.apply;\nvar call = FunctionPrototype.call;\n\n// eslint-disable-next-line es/no-reflect -- safe\nmodule.exports = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call.bind(apply) : function () {\n return call.apply(apply, arguments);\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/function-apply.js?"); /***/ }), @@ -8127,7 +8738,7 @@ eval("var NATIVE_BIND = __webpack_require__(/*! ../internals/function-bind-nativ \*****************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { -eval("var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ \"./node_modules/core-js/internals/function-uncurry-this.js\");\nvar aCallable = __webpack_require__(/*! ../internals/a-callable */ \"./node_modules/core-js/internals/a-callable.js\");\nvar NATIVE_BIND = __webpack_require__(/*! ../internals/function-bind-native */ \"./node_modules/core-js/internals/function-bind-native.js\");\n\nvar bind = uncurryThis(uncurryThis.bind);\n\n// optional / simple context binding\nmodule.exports = function (fn, that) {\n aCallable(fn);\n return that === undefined ? fn : NATIVE_BIND ? bind(fn, that) : function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/function-bind-context.js?"); +eval("var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this-clause */ \"./node_modules/core-js/internals/function-uncurry-this-clause.js\");\nvar aCallable = __webpack_require__(/*! ../internals/a-callable */ \"./node_modules/core-js/internals/a-callable.js\");\nvar NATIVE_BIND = __webpack_require__(/*! ../internals/function-bind-native */ \"./node_modules/core-js/internals/function-bind-native.js\");\n\nvar bind = uncurryThis(uncurryThis.bind);\n\n// optional / simple context binding\nmodule.exports = function (fn, that) {\n aCallable(fn);\n return that === undefined ? fn : NATIVE_BIND ? bind(fn, that) : function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/function-bind-context.js?"); /***/ }), @@ -8137,7 +8748,7 @@ eval("var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-th \****************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { -eval("var fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\n\nmodule.exports = !fails(function () {\n // eslint-disable-next-line es-x/no-function-prototype-bind -- safe\n var test = (function () { /* empty */ }).bind();\n // eslint-disable-next-line no-prototype-builtins -- safe\n return typeof test != 'function' || test.hasOwnProperty('prototype');\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/function-bind-native.js?"); +eval("var fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\n\nmodule.exports = !fails(function () {\n // eslint-disable-next-line es/no-function-prototype-bind -- safe\n var test = (function () { /* empty */ }).bind();\n // eslint-disable-next-line no-prototype-builtins -- safe\n return typeof test != 'function' || test.hasOwnProperty('prototype');\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/function-bind-native.js?"); /***/ }), @@ -8168,7 +8779,17 @@ eval("var NATIVE_BIND = __webpack_require__(/*! ../internals/function-bind-nativ \*********************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { -eval("var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./node_modules/core-js/internals/descriptors.js\");\nvar hasOwn = __webpack_require__(/*! ../internals/has-own-property */ \"./node_modules/core-js/internals/has-own-property.js\");\n\nvar FunctionPrototype = Function.prototype;\n// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe\nvar getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor;\n\nvar EXISTS = hasOwn(FunctionPrototype, 'name');\n// additional protection from minified / mangled / dropped function names\nvar PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';\nvar CONFIGURABLE = EXISTS && (!DESCRIPTORS || (DESCRIPTORS && getDescriptor(FunctionPrototype, 'name').configurable));\n\nmodule.exports = {\n EXISTS: EXISTS,\n PROPER: PROPER,\n CONFIGURABLE: CONFIGURABLE\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/function-name.js?"); +eval("var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./node_modules/core-js/internals/descriptors.js\");\nvar hasOwn = __webpack_require__(/*! ../internals/has-own-property */ \"./node_modules/core-js/internals/has-own-property.js\");\n\nvar FunctionPrototype = Function.prototype;\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor;\n\nvar EXISTS = hasOwn(FunctionPrototype, 'name');\n// additional protection from minified / mangled / dropped function names\nvar PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';\nvar CONFIGURABLE = EXISTS && (!DESCRIPTORS || (DESCRIPTORS && getDescriptor(FunctionPrototype, 'name').configurable));\n\nmodule.exports = {\n EXISTS: EXISTS,\n PROPER: PROPER,\n CONFIGURABLE: CONFIGURABLE\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/function-name.js?"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/function-uncurry-this-clause.js": +/*!************************************************************************!*\ + !*** ./node_modules/core-js/internals/function-uncurry-this-clause.js ***! + \************************************************************************/ +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +eval("var classofRaw = __webpack_require__(/*! ../internals/classof-raw */ \"./node_modules/core-js/internals/classof-raw.js\");\nvar uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ \"./node_modules/core-js/internals/function-uncurry-this.js\");\n\nmodule.exports = function (fn) {\n // Nashorn bug:\n // https://github.com/zloirock/core-js/issues/1128\n // https://github.com/zloirock/core-js/issues/1130\n if (classofRaw(fn) === 'Function') return uncurryThis(fn);\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/function-uncurry-this-clause.js?"); /***/ }), @@ -8178,7 +8799,7 @@ eval("var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./ \*****************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { -eval("var NATIVE_BIND = __webpack_require__(/*! ../internals/function-bind-native */ \"./node_modules/core-js/internals/function-bind-native.js\");\n\nvar FunctionPrototype = Function.prototype;\nvar bind = FunctionPrototype.bind;\nvar call = FunctionPrototype.call;\nvar uncurryThis = NATIVE_BIND && bind.bind(call, call);\n\nmodule.exports = NATIVE_BIND ? function (fn) {\n return fn && uncurryThis(fn);\n} : function (fn) {\n return fn && function () {\n return call.apply(fn, arguments);\n };\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/function-uncurry-this.js?"); +eval("var NATIVE_BIND = __webpack_require__(/*! ../internals/function-bind-native */ \"./node_modules/core-js/internals/function-bind-native.js\");\n\nvar FunctionPrototype = Function.prototype;\nvar call = FunctionPrototype.call;\nvar uncurryThisWithBind = NATIVE_BIND && FunctionPrototype.bind.bind(call, call);\n\nmodule.exports = NATIVE_BIND ? uncurryThisWithBind : function (fn) {\n return function () {\n return call.apply(fn, arguments);\n };\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/function-uncurry-this.js?"); /***/ }), @@ -8238,7 +8859,7 @@ eval("var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-th \**************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { -eval("var check = function (it) {\n return it && it.Math == Math && it;\n};\n\n// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nmodule.exports =\n // eslint-disable-next-line es-x/no-global-this -- safe\n check(typeof globalThis == 'object' && globalThis) ||\n check(typeof window == 'object' && window) ||\n // eslint-disable-next-line no-restricted-globals -- safe\n check(typeof self == 'object' && self) ||\n check(typeof __webpack_require__.g == 'object' && __webpack_require__.g) ||\n // eslint-disable-next-line no-new-func -- fallback\n (function () { return this; })() || Function('return this')();\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/global.js?"); +eval("var check = function (it) {\n return it && it.Math == Math && it;\n};\n\n// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nmodule.exports =\n // eslint-disable-next-line es/no-global-this -- safe\n check(typeof globalThis == 'object' && globalThis) ||\n check(typeof window == 'object' && window) ||\n // eslint-disable-next-line no-restricted-globals -- safe\n check(typeof self == 'object' && self) ||\n check(typeof __webpack_require__.g == 'object' && __webpack_require__.g) ||\n // eslint-disable-next-line no-new-func -- fallback\n (function () { return this; })() || Function('return this')();\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/global.js?"); /***/ }), @@ -8248,7 +8869,7 @@ eval("var check = function (it) {\n return it && it.Math == Math && it;\n};\n\n \************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { -eval("var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ \"./node_modules/core-js/internals/function-uncurry-this.js\");\nvar toObject = __webpack_require__(/*! ../internals/to-object */ \"./node_modules/core-js/internals/to-object.js\");\n\nvar hasOwnProperty = uncurryThis({}.hasOwnProperty);\n\n// `HasOwnProperty` abstract operation\n// https://tc39.es/ecma262/#sec-hasownproperty\n// eslint-disable-next-line es-x/no-object-hasown -- safe\nmodule.exports = Object.hasOwn || function hasOwn(it, key) {\n return hasOwnProperty(toObject(it), key);\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/has-own-property.js?"); +eval("var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ \"./node_modules/core-js/internals/function-uncurry-this.js\");\nvar toObject = __webpack_require__(/*! ../internals/to-object */ \"./node_modules/core-js/internals/to-object.js\");\n\nvar hasOwnProperty = uncurryThis({}.hasOwnProperty);\n\n// `HasOwnProperty` abstract operation\n// https://tc39.es/ecma262/#sec-hasownproperty\n// eslint-disable-next-line es/no-object-hasown -- safe\nmodule.exports = Object.hasOwn || function hasOwn(it, key) {\n return hasOwnProperty(toObject(it), key);\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/has-own-property.js?"); /***/ }), @@ -8288,7 +8909,7 @@ eval("var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ \"./ \**********************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { -eval("var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./node_modules/core-js/internals/descriptors.js\");\nvar fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\nvar createElement = __webpack_require__(/*! ../internals/document-create-element */ \"./node_modules/core-js/internals/document-create-element.js\");\n\n// Thanks to IE8 for its funny defineProperty\nmodule.exports = !DESCRIPTORS && !fails(function () {\n // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing\n return Object.defineProperty(createElement('div'), 'a', {\n get: function () { return 7; }\n }).a != 7;\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/ie8-dom-define.js?"); +eval("var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./node_modules/core-js/internals/descriptors.js\");\nvar fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\nvar createElement = __webpack_require__(/*! ../internals/document-create-element */ \"./node_modules/core-js/internals/document-create-element.js\");\n\n// Thanks to IE8 for its funny defineProperty\nmodule.exports = !DESCRIPTORS && !fails(function () {\n // eslint-disable-next-line es/no-object-defineproperty -- required for testing\n return Object.defineProperty(createElement('div'), 'a', {\n get: function () { return 7; }\n }).a != 7;\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/ie8-dom-define.js?"); /***/ }), @@ -8348,7 +8969,7 @@ eval("var $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/co \**********************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { -eval("var NATIVE_WEAK_MAP = __webpack_require__(/*! ../internals/weak-map-basic-detection */ \"./node_modules/core-js/internals/weak-map-basic-detection.js\");\nvar global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js/internals/global.js\");\nvar uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ \"./node_modules/core-js/internals/function-uncurry-this.js\");\nvar isObject = __webpack_require__(/*! ../internals/is-object */ \"./node_modules/core-js/internals/is-object.js\");\nvar createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ \"./node_modules/core-js/internals/create-non-enumerable-property.js\");\nvar hasOwn = __webpack_require__(/*! ../internals/has-own-property */ \"./node_modules/core-js/internals/has-own-property.js\");\nvar shared = __webpack_require__(/*! ../internals/shared-store */ \"./node_modules/core-js/internals/shared-store.js\");\nvar sharedKey = __webpack_require__(/*! ../internals/shared-key */ \"./node_modules/core-js/internals/shared-key.js\");\nvar hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ \"./node_modules/core-js/internals/hidden-keys.js\");\n\nvar OBJECT_ALREADY_INITIALIZED = 'Object already initialized';\nvar TypeError = global.TypeError;\nvar WeakMap = global.WeakMap;\nvar set, get, has;\n\nvar enforce = function (it) {\n return has(it) ? get(it) : set(it, {});\n};\n\nvar getterFor = function (TYPE) {\n return function (it) {\n var state;\n if (!isObject(it) || (state = get(it)).type !== TYPE) {\n throw TypeError('Incompatible receiver, ' + TYPE + ' required');\n } return state;\n };\n};\n\nif (NATIVE_WEAK_MAP || shared.state) {\n var store = shared.state || (shared.state = new WeakMap());\n var wmget = uncurryThis(store.get);\n var wmhas = uncurryThis(store.has);\n var wmset = uncurryThis(store.set);\n set = function (it, metadata) {\n if (wmhas(store, it)) throw TypeError(OBJECT_ALREADY_INITIALIZED);\n metadata.facade = it;\n wmset(store, it, metadata);\n return metadata;\n };\n get = function (it) {\n return wmget(store, it) || {};\n };\n has = function (it) {\n return wmhas(store, it);\n };\n} else {\n var STATE = sharedKey('state');\n hiddenKeys[STATE] = true;\n set = function (it, metadata) {\n if (hasOwn(it, STATE)) throw TypeError(OBJECT_ALREADY_INITIALIZED);\n metadata.facade = it;\n createNonEnumerableProperty(it, STATE, metadata);\n return metadata;\n };\n get = function (it) {\n return hasOwn(it, STATE) ? it[STATE] : {};\n };\n has = function (it) {\n return hasOwn(it, STATE);\n };\n}\n\nmodule.exports = {\n set: set,\n get: get,\n has: has,\n enforce: enforce,\n getterFor: getterFor\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/internal-state.js?"); +eval("var NATIVE_WEAK_MAP = __webpack_require__(/*! ../internals/weak-map-basic-detection */ \"./node_modules/core-js/internals/weak-map-basic-detection.js\");\nvar global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js/internals/global.js\");\nvar isObject = __webpack_require__(/*! ../internals/is-object */ \"./node_modules/core-js/internals/is-object.js\");\nvar createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ \"./node_modules/core-js/internals/create-non-enumerable-property.js\");\nvar hasOwn = __webpack_require__(/*! ../internals/has-own-property */ \"./node_modules/core-js/internals/has-own-property.js\");\nvar shared = __webpack_require__(/*! ../internals/shared-store */ \"./node_modules/core-js/internals/shared-store.js\");\nvar sharedKey = __webpack_require__(/*! ../internals/shared-key */ \"./node_modules/core-js/internals/shared-key.js\");\nvar hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ \"./node_modules/core-js/internals/hidden-keys.js\");\n\nvar OBJECT_ALREADY_INITIALIZED = 'Object already initialized';\nvar TypeError = global.TypeError;\nvar WeakMap = global.WeakMap;\nvar set, get, has;\n\nvar enforce = function (it) {\n return has(it) ? get(it) : set(it, {});\n};\n\nvar getterFor = function (TYPE) {\n return function (it) {\n var state;\n if (!isObject(it) || (state = get(it)).type !== TYPE) {\n throw TypeError('Incompatible receiver, ' + TYPE + ' required');\n } return state;\n };\n};\n\nif (NATIVE_WEAK_MAP || shared.state) {\n var store = shared.state || (shared.state = new WeakMap());\n /* eslint-disable no-self-assign -- prototype methods protection */\n store.get = store.get;\n store.has = store.has;\n store.set = store.set;\n /* eslint-enable no-self-assign -- prototype methods protection */\n set = function (it, metadata) {\n if (store.has(it)) throw TypeError(OBJECT_ALREADY_INITIALIZED);\n metadata.facade = it;\n store.set(it, metadata);\n return metadata;\n };\n get = function (it) {\n return store.get(it) || {};\n };\n has = function (it) {\n return store.has(it);\n };\n} else {\n var STATE = sharedKey('state');\n hiddenKeys[STATE] = true;\n set = function (it, metadata) {\n if (hasOwn(it, STATE)) throw TypeError(OBJECT_ALREADY_INITIALIZED);\n metadata.facade = it;\n createNonEnumerableProperty(it, STATE, metadata);\n return metadata;\n };\n get = function (it) {\n return hasOwn(it, STATE) ? it[STATE] : {};\n };\n has = function (it) {\n return hasOwn(it, STATE);\n };\n}\n\nmodule.exports = {\n set: set,\n get: get,\n has: has,\n enforce: enforce,\n getterFor: getterFor\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/internal-state.js?"); /***/ }), @@ -8368,7 +8989,7 @@ eval("var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symb \****************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { -eval("var classof = __webpack_require__(/*! ../internals/classof-raw */ \"./node_modules/core-js/internals/classof-raw.js\");\n\n// `IsArray` abstract operation\n// https://tc39.es/ecma262/#sec-isarray\n// eslint-disable-next-line es-x/no-array-isarray -- safe\nmodule.exports = Array.isArray || function isArray(argument) {\n return classof(argument) == 'Array';\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/is-array.js?"); +eval("var classof = __webpack_require__(/*! ../internals/classof-raw */ \"./node_modules/core-js/internals/classof-raw.js\");\n\n// `IsArray` abstract operation\n// https://tc39.es/ecma262/#sec-isarray\n// eslint-disable-next-line es/no-array-isarray -- safe\nmodule.exports = Array.isArray || function isArray(argument) {\n return classof(argument) == 'Array';\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/is-array.js?"); /***/ }), @@ -8386,9 +9007,9 @@ eval("var classof = __webpack_require__(/*! ../internals/classof */ \"./node_mod /*!*******************************************************!*\ !*** ./node_modules/core-js/internals/is-callable.js ***! \*******************************************************/ -/***/ (function(module) { +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { -eval("// `IsCallable` abstract operation\n// https://tc39.es/ecma262/#sec-iscallable\nmodule.exports = function (argument) {\n return typeof argument == 'function';\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/is-callable.js?"); +eval("var $documentAll = __webpack_require__(/*! ../internals/document-all */ \"./node_modules/core-js/internals/document-all.js\");\n\nvar documentAll = $documentAll.all;\n\n// `IsCallable` abstract operation\n// https://tc39.es/ecma262/#sec-iscallable\nmodule.exports = $documentAll.IS_HTMLDDA ? function (argument) {\n return typeof argument == 'function' || argument === documentAll;\n} : function (argument) {\n return typeof argument == 'function';\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/is-callable.js?"); /***/ }), @@ -8428,7 +9049,7 @@ eval("var fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules \**************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { -eval("var isObject = __webpack_require__(/*! ../internals/is-object */ \"./node_modules/core-js/internals/is-object.js\");\n\nvar floor = Math.floor;\n\n// `IsIntegralNumber` abstract operation\n// https://tc39.es/ecma262/#sec-isintegralnumber\n// eslint-disable-next-line es-x/no-number-isinteger -- safe\nmodule.exports = Number.isInteger || function isInteger(it) {\n return !isObject(it) && isFinite(it) && floor(it) === it;\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/is-integral-number.js?"); +eval("var isObject = __webpack_require__(/*! ../internals/is-object */ \"./node_modules/core-js/internals/is-object.js\");\n\nvar floor = Math.floor;\n\n// `IsIntegralNumber` abstract operation\n// https://tc39.es/ecma262/#sec-isintegralnumber\n// eslint-disable-next-line es/no-number-isinteger -- safe\nmodule.exports = Number.isInteger || function isInteger(it) {\n return !isObject(it) && isFinite(it) && floor(it) === it;\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/is-integral-number.js?"); /***/ }), @@ -8448,7 +9069,7 @@ eval("// we can't use just `it == null` since of `document.all` special case\n// \*****************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { -eval("var isCallable = __webpack_require__(/*! ../internals/is-callable */ \"./node_modules/core-js/internals/is-callable.js\");\n\nvar documentAll = typeof document == 'object' && document.all;\n\n// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot\nvar SPECIAL_DOCUMENT_ALL = typeof documentAll == 'undefined' && documentAll !== undefined;\n\nmodule.exports = SPECIAL_DOCUMENT_ALL ? function (it) {\n return typeof it == 'object' ? it !== null : isCallable(it) || it === documentAll;\n} : function (it) {\n return typeof it == 'object' ? it !== null : isCallable(it);\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/is-object.js?"); +eval("var isCallable = __webpack_require__(/*! ../internals/is-callable */ \"./node_modules/core-js/internals/is-callable.js\");\nvar $documentAll = __webpack_require__(/*! ../internals/document-all */ \"./node_modules/core-js/internals/document-all.js\");\n\nvar documentAll = $documentAll.all;\n\nmodule.exports = $documentAll.IS_HTMLDDA ? function (it) {\n return typeof it == 'object' ? it !== null : isCallable(it) || it === documentAll;\n} : function (it) {\n return typeof it == 'object' ? it !== null : isCallable(it);\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/is-object.js?"); /***/ }), @@ -8531,7 +9152,7 @@ eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; -eval("\nvar fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\nvar isCallable = __webpack_require__(/*! ../internals/is-callable */ \"./node_modules/core-js/internals/is-callable.js\");\nvar isObject = __webpack_require__(/*! ../internals/is-object */ \"./node_modules/core-js/internals/is-object.js\");\nvar create = __webpack_require__(/*! ../internals/object-create */ \"./node_modules/core-js/internals/object-create.js\");\nvar getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ \"./node_modules/core-js/internals/object-get-prototype-of.js\");\nvar defineBuiltIn = __webpack_require__(/*! ../internals/define-built-in */ \"./node_modules/core-js/internals/define-built-in.js\");\nvar wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js/internals/well-known-symbol.js\");\nvar IS_PURE = __webpack_require__(/*! ../internals/is-pure */ \"./node_modules/core-js/internals/is-pure.js\");\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar BUGGY_SAFARI_ITERATORS = false;\n\n// `%IteratorPrototype%` object\n// https://tc39.es/ecma262/#sec-%iteratorprototype%-object\nvar IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;\n\n/* eslint-disable es-x/no-array-prototype-keys -- safe */\nif ([].keys) {\n arrayIterator = [].keys();\n // Safari 8 has buggy iterators w/o `next`\n if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;\n else {\n PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));\n if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;\n }\n}\n\nvar NEW_ITERATOR_PROTOTYPE = !isObject(IteratorPrototype) || fails(function () {\n var test = {};\n // FF44- legacy iterators case\n return IteratorPrototype[ITERATOR].call(test) !== test;\n});\n\nif (NEW_ITERATOR_PROTOTYPE) IteratorPrototype = {};\nelse if (IS_PURE) IteratorPrototype = create(IteratorPrototype);\n\n// `%IteratorPrototype%[@@iterator]()` method\n// https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator\nif (!isCallable(IteratorPrototype[ITERATOR])) {\n defineBuiltIn(IteratorPrototype, ITERATOR, function () {\n return this;\n });\n}\n\nmodule.exports = {\n IteratorPrototype: IteratorPrototype,\n BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/iterators-core.js?"); +eval("\nvar fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\nvar isCallable = __webpack_require__(/*! ../internals/is-callable */ \"./node_modules/core-js/internals/is-callable.js\");\nvar isObject = __webpack_require__(/*! ../internals/is-object */ \"./node_modules/core-js/internals/is-object.js\");\nvar create = __webpack_require__(/*! ../internals/object-create */ \"./node_modules/core-js/internals/object-create.js\");\nvar getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ \"./node_modules/core-js/internals/object-get-prototype-of.js\");\nvar defineBuiltIn = __webpack_require__(/*! ../internals/define-built-in */ \"./node_modules/core-js/internals/define-built-in.js\");\nvar wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js/internals/well-known-symbol.js\");\nvar IS_PURE = __webpack_require__(/*! ../internals/is-pure */ \"./node_modules/core-js/internals/is-pure.js\");\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar BUGGY_SAFARI_ITERATORS = false;\n\n// `%IteratorPrototype%` object\n// https://tc39.es/ecma262/#sec-%iteratorprototype%-object\nvar IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;\n\n/* eslint-disable es/no-array-prototype-keys -- safe */\nif ([].keys) {\n arrayIterator = [].keys();\n // Safari 8 has buggy iterators w/o `next`\n if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;\n else {\n PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));\n if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;\n }\n}\n\nvar NEW_ITERATOR_PROTOTYPE = !isObject(IteratorPrototype) || fails(function () {\n var test = {};\n // FF44- legacy iterators case\n return IteratorPrototype[ITERATOR].call(test) !== test;\n});\n\nif (NEW_ITERATOR_PROTOTYPE) IteratorPrototype = {};\nelse if (IS_PURE) IteratorPrototype = create(IteratorPrototype);\n\n// `%IteratorPrototype%[@@iterator]()` method\n// https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator\nif (!isCallable(IteratorPrototype[ITERATOR])) {\n defineBuiltIn(IteratorPrototype, ITERATOR, function () {\n return this;\n });\n}\n\nmodule.exports = {\n IteratorPrototype: IteratorPrototype,\n BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/iterators-core.js?"); /***/ }), @@ -8561,7 +9182,7 @@ eval("var toLength = __webpack_require__(/*! ../internals/to-length */ \"./node_ \*********************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { -eval("var fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\nvar isCallable = __webpack_require__(/*! ../internals/is-callable */ \"./node_modules/core-js/internals/is-callable.js\");\nvar hasOwn = __webpack_require__(/*! ../internals/has-own-property */ \"./node_modules/core-js/internals/has-own-property.js\");\nvar DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./node_modules/core-js/internals/descriptors.js\");\nvar CONFIGURABLE_FUNCTION_NAME = (__webpack_require__(/*! ../internals/function-name */ \"./node_modules/core-js/internals/function-name.js\").CONFIGURABLE);\nvar inspectSource = __webpack_require__(/*! ../internals/inspect-source */ \"./node_modules/core-js/internals/inspect-source.js\");\nvar InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ \"./node_modules/core-js/internals/internal-state.js\");\n\nvar enforceInternalState = InternalStateModule.enforce;\nvar getInternalState = InternalStateModule.get;\n// eslint-disable-next-line es-x/no-object-defineproperty -- safe\nvar defineProperty = Object.defineProperty;\n\nvar CONFIGURABLE_LENGTH = DESCRIPTORS && !fails(function () {\n return defineProperty(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;\n});\n\nvar TEMPLATE = String(String).split('String');\n\nvar makeBuiltIn = module.exports = function (value, name, options) {\n if (String(name).slice(0, 7) === 'Symbol(') {\n name = '[' + String(name).replace(/^Symbol\\(([^)]*)\\)/, '$1') + ']';\n }\n if (options && options.getter) name = 'get ' + name;\n if (options && options.setter) name = 'set ' + name;\n if (!hasOwn(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {\n if (DESCRIPTORS) defineProperty(value, 'name', { value: name, configurable: true });\n else value.name = name;\n }\n if (CONFIGURABLE_LENGTH && options && hasOwn(options, 'arity') && value.length !== options.arity) {\n defineProperty(value, 'length', { value: options.arity });\n }\n try {\n if (options && hasOwn(options, 'constructor') && options.constructor) {\n if (DESCRIPTORS) defineProperty(value, 'prototype', { writable: false });\n // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable\n } else if (value.prototype) value.prototype = undefined;\n } catch (error) { /* empty */ }\n var state = enforceInternalState(value);\n if (!hasOwn(state, 'source')) {\n state.source = TEMPLATE.join(typeof name == 'string' ? name : '');\n } return value;\n};\n\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n// eslint-disable-next-line no-extend-native -- required\nFunction.prototype.toString = makeBuiltIn(function toString() {\n return isCallable(this) && getInternalState(this).source || inspectSource(this);\n}, 'toString');\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/make-built-in.js?"); +eval("var fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\nvar isCallable = __webpack_require__(/*! ../internals/is-callable */ \"./node_modules/core-js/internals/is-callable.js\");\nvar hasOwn = __webpack_require__(/*! ../internals/has-own-property */ \"./node_modules/core-js/internals/has-own-property.js\");\nvar DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./node_modules/core-js/internals/descriptors.js\");\nvar CONFIGURABLE_FUNCTION_NAME = (__webpack_require__(/*! ../internals/function-name */ \"./node_modules/core-js/internals/function-name.js\").CONFIGURABLE);\nvar inspectSource = __webpack_require__(/*! ../internals/inspect-source */ \"./node_modules/core-js/internals/inspect-source.js\");\nvar InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ \"./node_modules/core-js/internals/internal-state.js\");\n\nvar enforceInternalState = InternalStateModule.enforce;\nvar getInternalState = InternalStateModule.get;\n// eslint-disable-next-line es/no-object-defineproperty -- safe\nvar defineProperty = Object.defineProperty;\n\nvar CONFIGURABLE_LENGTH = DESCRIPTORS && !fails(function () {\n return defineProperty(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;\n});\n\nvar TEMPLATE = String(String).split('String');\n\nvar makeBuiltIn = module.exports = function (value, name, options) {\n if (String(name).slice(0, 7) === 'Symbol(') {\n name = '[' + String(name).replace(/^Symbol\\(([^)]*)\\)/, '$1') + ']';\n }\n if (options && options.getter) name = 'get ' + name;\n if (options && options.setter) name = 'set ' + name;\n if (!hasOwn(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {\n if (DESCRIPTORS) defineProperty(value, 'name', { value: name, configurable: true });\n else value.name = name;\n }\n if (CONFIGURABLE_LENGTH && options && hasOwn(options, 'arity') && value.length !== options.arity) {\n defineProperty(value, 'length', { value: options.arity });\n }\n try {\n if (options && hasOwn(options, 'constructor') && options.constructor) {\n if (DESCRIPTORS) defineProperty(value, 'prototype', { writable: false });\n // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable\n } else if (value.prototype) value.prototype = undefined;\n } catch (error) { /* empty */ }\n var state = enforceInternalState(value);\n if (!hasOwn(state, 'source')) {\n state.source = TEMPLATE.join(typeof name == 'string' ? name : '');\n } return value;\n};\n\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n// eslint-disable-next-line no-extend-native -- required\nFunction.prototype.toString = makeBuiltIn(function toString() {\n return isCallable(this) && getInternalState(this).source || inspectSource(this);\n}, 'toString');\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/make-built-in.js?"); /***/ }), @@ -8571,7 +9192,7 @@ eval("var fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules \******************************************************/ /***/ (function(module) { -eval("var ceil = Math.ceil;\nvar floor = Math.floor;\n\n// `Math.trunc` method\n// https://tc39.es/ecma262/#sec-math.trunc\n// eslint-disable-next-line es-x/no-math-trunc -- safe\nmodule.exports = Math.trunc || function trunc(x) {\n var n = +x;\n return (n > 0 ? floor : ceil)(n);\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/math-trunc.js?"); +eval("var ceil = Math.ceil;\nvar floor = Math.floor;\n\n// `Math.trunc` method\n// https://tc39.es/ecma262/#sec-math.trunc\n// eslint-disable-next-line es/no-math-trunc -- safe\nmodule.exports = Math.trunc || function trunc(x) {\n var n = +x;\n return (n > 0 ? floor : ceil)(n);\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/math-trunc.js?"); /***/ }), @@ -8612,7 +9233,17 @@ eval("var isRegExp = __webpack_require__(/*! ../internals/is-regexp */ \"./node_ \************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { -eval("var global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js/internals/global.js\");\n\nvar globalIsFinite = global.isFinite;\n\n// `Number.isFinite` method\n// https://tc39.es/ecma262/#sec-number.isfinite\n// eslint-disable-next-line es-x/no-number-isfinite -- safe\nmodule.exports = Number.isFinite || function isFinite(it) {\n return typeof it == 'number' && globalIsFinite(it);\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/number-is-finite.js?"); +eval("var global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js/internals/global.js\");\n\nvar globalIsFinite = global.isFinite;\n\n// `Number.isFinite` method\n// https://tc39.es/ecma262/#sec-number.isfinite\n// eslint-disable-next-line es/no-number-isfinite -- safe\nmodule.exports = Number.isFinite || function isFinite(it) {\n return typeof it == 'number' && globalIsFinite(it);\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/number-is-finite.js?"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/number-parse-float.js": +/*!**************************************************************!*\ + !*** ./node_modules/core-js/internals/number-parse-float.js ***! + \**************************************************************/ +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +eval("var global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js/internals/global.js\");\nvar fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\nvar uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ \"./node_modules/core-js/internals/function-uncurry-this.js\");\nvar toString = __webpack_require__(/*! ../internals/to-string */ \"./node_modules/core-js/internals/to-string.js\");\nvar trim = (__webpack_require__(/*! ../internals/string-trim */ \"./node_modules/core-js/internals/string-trim.js\").trim);\nvar whitespaces = __webpack_require__(/*! ../internals/whitespaces */ \"./node_modules/core-js/internals/whitespaces.js\");\n\nvar charAt = uncurryThis(''.charAt);\nvar $parseFloat = global.parseFloat;\nvar Symbol = global.Symbol;\nvar ITERATOR = Symbol && Symbol.iterator;\nvar FORCED = 1 / $parseFloat(whitespaces + '-0') !== -Infinity\n // MS Edge 18- broken with boxed symbols\n || (ITERATOR && !fails(function () { $parseFloat(Object(ITERATOR)); }));\n\n// `parseFloat` method\n// https://tc39.es/ecma262/#sec-parsefloat-string\nmodule.exports = FORCED ? function parseFloat(string) {\n var trimmedString = trim(toString(string));\n var result = $parseFloat(trimmedString);\n return result === 0 && charAt(trimmedString, 0) == '-' ? -0 : result;\n} : $parseFloat;\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/number-parse-float.js?"); /***/ }), @@ -8633,7 +9264,7 @@ eval("var global = __webpack_require__(/*! ../internals/global */ \"./node_modul /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; -eval("\nvar DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./node_modules/core-js/internals/descriptors.js\");\nvar uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ \"./node_modules/core-js/internals/function-uncurry-this.js\");\nvar call = __webpack_require__(/*! ../internals/function-call */ \"./node_modules/core-js/internals/function-call.js\");\nvar fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\nvar objectKeys = __webpack_require__(/*! ../internals/object-keys */ \"./node_modules/core-js/internals/object-keys.js\");\nvar getOwnPropertySymbolsModule = __webpack_require__(/*! ../internals/object-get-own-property-symbols */ \"./node_modules/core-js/internals/object-get-own-property-symbols.js\");\nvar propertyIsEnumerableModule = __webpack_require__(/*! ../internals/object-property-is-enumerable */ \"./node_modules/core-js/internals/object-property-is-enumerable.js\");\nvar toObject = __webpack_require__(/*! ../internals/to-object */ \"./node_modules/core-js/internals/to-object.js\");\nvar IndexedObject = __webpack_require__(/*! ../internals/indexed-object */ \"./node_modules/core-js/internals/indexed-object.js\");\n\n// eslint-disable-next-line es-x/no-object-assign -- safe\nvar $assign = Object.assign;\n// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing\nvar defineProperty = Object.defineProperty;\nvar concat = uncurryThis([].concat);\n\n// `Object.assign` method\n// https://tc39.es/ecma262/#sec-object.assign\nmodule.exports = !$assign || fails(function () {\n // should have correct order of operations (Edge bug)\n if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {\n enumerable: true,\n get: function () {\n defineProperty(this, 'b', {\n value: 3,\n enumerable: false\n });\n }\n }), { b: 2 })).b !== 1) return true;\n // should work with symbols and should have deterministic property order (V8 bug)\n var A = {};\n var B = {};\n // eslint-disable-next-line es-x/no-symbol -- safe\n var symbol = Symbol();\n var alphabet = 'abcdefghijklmnopqrst';\n A[symbol] = 7;\n alphabet.split('').forEach(function (chr) { B[chr] = chr; });\n return $assign({}, A)[symbol] != 7 || objectKeys($assign({}, B)).join('') != alphabet;\n}) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`\n var T = toObject(target);\n var argumentsLength = arguments.length;\n var index = 1;\n var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n var propertyIsEnumerable = propertyIsEnumerableModule.f;\n while (argumentsLength > index) {\n var S = IndexedObject(arguments[index++]);\n var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);\n var length = keys.length;\n var j = 0;\n var key;\n while (length > j) {\n key = keys[j++];\n if (!DESCRIPTORS || call(propertyIsEnumerable, S, key)) T[key] = S[key];\n }\n } return T;\n} : $assign;\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/object-assign.js?"); +eval("\nvar DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./node_modules/core-js/internals/descriptors.js\");\nvar uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ \"./node_modules/core-js/internals/function-uncurry-this.js\");\nvar call = __webpack_require__(/*! ../internals/function-call */ \"./node_modules/core-js/internals/function-call.js\");\nvar fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\nvar objectKeys = __webpack_require__(/*! ../internals/object-keys */ \"./node_modules/core-js/internals/object-keys.js\");\nvar getOwnPropertySymbolsModule = __webpack_require__(/*! ../internals/object-get-own-property-symbols */ \"./node_modules/core-js/internals/object-get-own-property-symbols.js\");\nvar propertyIsEnumerableModule = __webpack_require__(/*! ../internals/object-property-is-enumerable */ \"./node_modules/core-js/internals/object-property-is-enumerable.js\");\nvar toObject = __webpack_require__(/*! ../internals/to-object */ \"./node_modules/core-js/internals/to-object.js\");\nvar IndexedObject = __webpack_require__(/*! ../internals/indexed-object */ \"./node_modules/core-js/internals/indexed-object.js\");\n\n// eslint-disable-next-line es/no-object-assign -- safe\nvar $assign = Object.assign;\n// eslint-disable-next-line es/no-object-defineproperty -- required for testing\nvar defineProperty = Object.defineProperty;\nvar concat = uncurryThis([].concat);\n\n// `Object.assign` method\n// https://tc39.es/ecma262/#sec-object.assign\nmodule.exports = !$assign || fails(function () {\n // should have correct order of operations (Edge bug)\n if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {\n enumerable: true,\n get: function () {\n defineProperty(this, 'b', {\n value: 3,\n enumerable: false\n });\n }\n }), { b: 2 })).b !== 1) return true;\n // should work with symbols and should have deterministic property order (V8 bug)\n var A = {};\n var B = {};\n // eslint-disable-next-line es/no-symbol -- safe\n var symbol = Symbol();\n var alphabet = 'abcdefghijklmnopqrst';\n A[symbol] = 7;\n alphabet.split('').forEach(function (chr) { B[chr] = chr; });\n return $assign({}, A)[symbol] != 7 || objectKeys($assign({}, B)).join('') != alphabet;\n}) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`\n var T = toObject(target);\n var argumentsLength = arguments.length;\n var index = 1;\n var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n var propertyIsEnumerable = propertyIsEnumerableModule.f;\n while (argumentsLength > index) {\n var S = IndexedObject(arguments[index++]);\n var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);\n var length = keys.length;\n var j = 0;\n var key;\n while (length > j) {\n key = keys[j++];\n if (!DESCRIPTORS || call(propertyIsEnumerable, S, key)) T[key] = S[key];\n }\n } return T;\n} : $assign;\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/object-assign.js?"); /***/ }), @@ -8643,7 +9274,7 @@ eval("\nvar DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \" \*********************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { -eval("/* global ActiveXObject -- old IE, WSH */\nvar anObject = __webpack_require__(/*! ../internals/an-object */ \"./node_modules/core-js/internals/an-object.js\");\nvar definePropertiesModule = __webpack_require__(/*! ../internals/object-define-properties */ \"./node_modules/core-js/internals/object-define-properties.js\");\nvar enumBugKeys = __webpack_require__(/*! ../internals/enum-bug-keys */ \"./node_modules/core-js/internals/enum-bug-keys.js\");\nvar hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ \"./node_modules/core-js/internals/hidden-keys.js\");\nvar html = __webpack_require__(/*! ../internals/html */ \"./node_modules/core-js/internals/html.js\");\nvar documentCreateElement = __webpack_require__(/*! ../internals/document-create-element */ \"./node_modules/core-js/internals/document-create-element.js\");\nvar sharedKey = __webpack_require__(/*! ../internals/shared-key */ \"./node_modules/core-js/internals/shared-key.js\");\n\nvar GT = '>';\nvar LT = '<';\nvar PROTOTYPE = 'prototype';\nvar SCRIPT = 'script';\nvar IE_PROTO = sharedKey('IE_PROTO');\n\nvar EmptyConstructor = function () { /* empty */ };\n\nvar scriptTag = function (content) {\n return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;\n};\n\n// Create object with fake `null` prototype: use ActiveX Object with cleared prototype\nvar NullProtoObjectViaActiveX = function (activeXDocument) {\n activeXDocument.write(scriptTag(''));\n activeXDocument.close();\n var temp = activeXDocument.parentWindow.Object;\n activeXDocument = null; // avoid memory leak\n return temp;\n};\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar NullProtoObjectViaIFrame = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = documentCreateElement('iframe');\n var JS = 'java' + SCRIPT + ':';\n var iframeDocument;\n iframe.style.display = 'none';\n html.appendChild(iframe);\n // https://github.com/zloirock/core-js/issues/475\n iframe.src = String(JS);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(scriptTag('document.F=Object'));\n iframeDocument.close();\n return iframeDocument.F;\n};\n\n// Check for document.domain and active x support\n// No need to use active x approach when document.domain is not set\n// see https://github.com/es-shims/es5-shim/issues/150\n// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346\n// avoid IE GC bug\nvar activeXDocument;\nvar NullProtoObject = function () {\n try {\n activeXDocument = new ActiveXObject('htmlfile');\n } catch (error) { /* ignore */ }\n NullProtoObject = typeof document != 'undefined'\n ? document.domain && activeXDocument\n ? NullProtoObjectViaActiveX(activeXDocument) // old IE\n : NullProtoObjectViaIFrame()\n : NullProtoObjectViaActiveX(activeXDocument); // WSH\n var length = enumBugKeys.length;\n while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];\n return NullProtoObject();\n};\n\nhiddenKeys[IE_PROTO] = true;\n\n// `Object.create` method\n// https://tc39.es/ecma262/#sec-object.create\n// eslint-disable-next-line es-x/no-object-create -- safe\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n EmptyConstructor[PROTOTYPE] = anObject(O);\n result = new EmptyConstructor();\n EmptyConstructor[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = NullProtoObject();\n return Properties === undefined ? result : definePropertiesModule.f(result, Properties);\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/object-create.js?"); +eval("/* global ActiveXObject -- old IE, WSH */\nvar anObject = __webpack_require__(/*! ../internals/an-object */ \"./node_modules/core-js/internals/an-object.js\");\nvar definePropertiesModule = __webpack_require__(/*! ../internals/object-define-properties */ \"./node_modules/core-js/internals/object-define-properties.js\");\nvar enumBugKeys = __webpack_require__(/*! ../internals/enum-bug-keys */ \"./node_modules/core-js/internals/enum-bug-keys.js\");\nvar hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ \"./node_modules/core-js/internals/hidden-keys.js\");\nvar html = __webpack_require__(/*! ../internals/html */ \"./node_modules/core-js/internals/html.js\");\nvar documentCreateElement = __webpack_require__(/*! ../internals/document-create-element */ \"./node_modules/core-js/internals/document-create-element.js\");\nvar sharedKey = __webpack_require__(/*! ../internals/shared-key */ \"./node_modules/core-js/internals/shared-key.js\");\n\nvar GT = '>';\nvar LT = '<';\nvar PROTOTYPE = 'prototype';\nvar SCRIPT = 'script';\nvar IE_PROTO = sharedKey('IE_PROTO');\n\nvar EmptyConstructor = function () { /* empty */ };\n\nvar scriptTag = function (content) {\n return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;\n};\n\n// Create object with fake `null` prototype: use ActiveX Object with cleared prototype\nvar NullProtoObjectViaActiveX = function (activeXDocument) {\n activeXDocument.write(scriptTag(''));\n activeXDocument.close();\n var temp = activeXDocument.parentWindow.Object;\n activeXDocument = null; // avoid memory leak\n return temp;\n};\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar NullProtoObjectViaIFrame = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = documentCreateElement('iframe');\n var JS = 'java' + SCRIPT + ':';\n var iframeDocument;\n iframe.style.display = 'none';\n html.appendChild(iframe);\n // https://github.com/zloirock/core-js/issues/475\n iframe.src = String(JS);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(scriptTag('document.F=Object'));\n iframeDocument.close();\n return iframeDocument.F;\n};\n\n// Check for document.domain and active x support\n// No need to use active x approach when document.domain is not set\n// see https://github.com/es-shims/es5-shim/issues/150\n// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346\n// avoid IE GC bug\nvar activeXDocument;\nvar NullProtoObject = function () {\n try {\n activeXDocument = new ActiveXObject('htmlfile');\n } catch (error) { /* ignore */ }\n NullProtoObject = typeof document != 'undefined'\n ? document.domain && activeXDocument\n ? NullProtoObjectViaActiveX(activeXDocument) // old IE\n : NullProtoObjectViaIFrame()\n : NullProtoObjectViaActiveX(activeXDocument); // WSH\n var length = enumBugKeys.length;\n while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];\n return NullProtoObject();\n};\n\nhiddenKeys[IE_PROTO] = true;\n\n// `Object.create` method\n// https://tc39.es/ecma262/#sec-object.create\n// eslint-disable-next-line es/no-object-create -- safe\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n EmptyConstructor[PROTOTYPE] = anObject(O);\n result = new EmptyConstructor();\n EmptyConstructor[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = NullProtoObject();\n return Properties === undefined ? result : definePropertiesModule.f(result, Properties);\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/object-create.js?"); /***/ }), @@ -8653,7 +9284,7 @@ eval("/* global ActiveXObject -- old IE, WSH */\nvar anObject = __webpack_requir \********************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { -eval("var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./node_modules/core-js/internals/descriptors.js\");\nvar V8_PROTOTYPE_DEFINE_BUG = __webpack_require__(/*! ../internals/v8-prototype-define-bug */ \"./node_modules/core-js/internals/v8-prototype-define-bug.js\");\nvar definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ \"./node_modules/core-js/internals/object-define-property.js\");\nvar anObject = __webpack_require__(/*! ../internals/an-object */ \"./node_modules/core-js/internals/an-object.js\");\nvar toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ \"./node_modules/core-js/internals/to-indexed-object.js\");\nvar objectKeys = __webpack_require__(/*! ../internals/object-keys */ \"./node_modules/core-js/internals/object-keys.js\");\n\n// `Object.defineProperties` method\n// https://tc39.es/ecma262/#sec-object.defineproperties\n// eslint-disable-next-line es-x/no-object-defineproperties -- safe\nexports.f = DESCRIPTORS && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var props = toIndexedObject(Properties);\n var keys = objectKeys(Properties);\n var length = keys.length;\n var index = 0;\n var key;\n while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);\n return O;\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/object-define-properties.js?"); +eval("var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./node_modules/core-js/internals/descriptors.js\");\nvar V8_PROTOTYPE_DEFINE_BUG = __webpack_require__(/*! ../internals/v8-prototype-define-bug */ \"./node_modules/core-js/internals/v8-prototype-define-bug.js\");\nvar definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ \"./node_modules/core-js/internals/object-define-property.js\");\nvar anObject = __webpack_require__(/*! ../internals/an-object */ \"./node_modules/core-js/internals/an-object.js\");\nvar toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ \"./node_modules/core-js/internals/to-indexed-object.js\");\nvar objectKeys = __webpack_require__(/*! ../internals/object-keys */ \"./node_modules/core-js/internals/object-keys.js\");\n\n// `Object.defineProperties` method\n// https://tc39.es/ecma262/#sec-object.defineproperties\n// eslint-disable-next-line es/no-object-defineproperties -- safe\nexports.f = DESCRIPTORS && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var props = toIndexedObject(Properties);\n var keys = objectKeys(Properties);\n var length = keys.length;\n var index = 0;\n var key;\n while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);\n return O;\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/object-define-properties.js?"); /***/ }), @@ -8663,7 +9294,7 @@ eval("var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./ \******************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { -eval("var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./node_modules/core-js/internals/descriptors.js\");\nvar IE8_DOM_DEFINE = __webpack_require__(/*! ../internals/ie8-dom-define */ \"./node_modules/core-js/internals/ie8-dom-define.js\");\nvar V8_PROTOTYPE_DEFINE_BUG = __webpack_require__(/*! ../internals/v8-prototype-define-bug */ \"./node_modules/core-js/internals/v8-prototype-define-bug.js\");\nvar anObject = __webpack_require__(/*! ../internals/an-object */ \"./node_modules/core-js/internals/an-object.js\");\nvar toPropertyKey = __webpack_require__(/*! ../internals/to-property-key */ \"./node_modules/core-js/internals/to-property-key.js\");\n\nvar $TypeError = TypeError;\n// eslint-disable-next-line es-x/no-object-defineproperty -- safe\nvar $defineProperty = Object.defineProperty;\n// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe\nvar $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar ENUMERABLE = 'enumerable';\nvar CONFIGURABLE = 'configurable';\nvar WRITABLE = 'writable';\n\n// `Object.defineProperty` method\n// https://tc39.es/ecma262/#sec-object.defineproperty\nexports.f = DESCRIPTORS ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPropertyKey(P);\n anObject(Attributes);\n if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {\n var current = $getOwnPropertyDescriptor(O, P);\n if (current && current[WRITABLE]) {\n O[P] = Attributes.value;\n Attributes = {\n configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE],\n enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],\n writable: false\n };\n }\n } return $defineProperty(O, P, Attributes);\n} : $defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPropertyKey(P);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return $defineProperty(O, P, Attributes);\n } catch (error) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw $TypeError('Accessors not supported');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/object-define-property.js?"); +eval("var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./node_modules/core-js/internals/descriptors.js\");\nvar IE8_DOM_DEFINE = __webpack_require__(/*! ../internals/ie8-dom-define */ \"./node_modules/core-js/internals/ie8-dom-define.js\");\nvar V8_PROTOTYPE_DEFINE_BUG = __webpack_require__(/*! ../internals/v8-prototype-define-bug */ \"./node_modules/core-js/internals/v8-prototype-define-bug.js\");\nvar anObject = __webpack_require__(/*! ../internals/an-object */ \"./node_modules/core-js/internals/an-object.js\");\nvar toPropertyKey = __webpack_require__(/*! ../internals/to-property-key */ \"./node_modules/core-js/internals/to-property-key.js\");\n\nvar $TypeError = TypeError;\n// eslint-disable-next-line es/no-object-defineproperty -- safe\nvar $defineProperty = Object.defineProperty;\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar ENUMERABLE = 'enumerable';\nvar CONFIGURABLE = 'configurable';\nvar WRITABLE = 'writable';\n\n// `Object.defineProperty` method\n// https://tc39.es/ecma262/#sec-object.defineproperty\nexports.f = DESCRIPTORS ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPropertyKey(P);\n anObject(Attributes);\n if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {\n var current = $getOwnPropertyDescriptor(O, P);\n if (current && current[WRITABLE]) {\n O[P] = Attributes.value;\n Attributes = {\n configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE],\n enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],\n writable: false\n };\n }\n } return $defineProperty(O, P, Attributes);\n} : $defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPropertyKey(P);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return $defineProperty(O, P, Attributes);\n } catch (error) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw $TypeError('Accessors not supported');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/object-define-property.js?"); /***/ }), @@ -8673,7 +9304,7 @@ eval("var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./ \******************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { -eval("var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./node_modules/core-js/internals/descriptors.js\");\nvar call = __webpack_require__(/*! ../internals/function-call */ \"./node_modules/core-js/internals/function-call.js\");\nvar propertyIsEnumerableModule = __webpack_require__(/*! ../internals/object-property-is-enumerable */ \"./node_modules/core-js/internals/object-property-is-enumerable.js\");\nvar createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ \"./node_modules/core-js/internals/create-property-descriptor.js\");\nvar toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ \"./node_modules/core-js/internals/to-indexed-object.js\");\nvar toPropertyKey = __webpack_require__(/*! ../internals/to-property-key */ \"./node_modules/core-js/internals/to-property-key.js\");\nvar hasOwn = __webpack_require__(/*! ../internals/has-own-property */ \"./node_modules/core-js/internals/has-own-property.js\");\nvar IE8_DOM_DEFINE = __webpack_require__(/*! ../internals/ie8-dom-define */ \"./node_modules/core-js/internals/ie8-dom-define.js\");\n\n// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe\nvar $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// `Object.getOwnPropertyDescriptor` method\n// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor\nexports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {\n O = toIndexedObject(O);\n P = toPropertyKey(P);\n if (IE8_DOM_DEFINE) try {\n return $getOwnPropertyDescriptor(O, P);\n } catch (error) { /* empty */ }\n if (hasOwn(O, P)) return createPropertyDescriptor(!call(propertyIsEnumerableModule.f, O, P), O[P]);\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/object-get-own-property-descriptor.js?"); +eval("var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./node_modules/core-js/internals/descriptors.js\");\nvar call = __webpack_require__(/*! ../internals/function-call */ \"./node_modules/core-js/internals/function-call.js\");\nvar propertyIsEnumerableModule = __webpack_require__(/*! ../internals/object-property-is-enumerable */ \"./node_modules/core-js/internals/object-property-is-enumerable.js\");\nvar createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ \"./node_modules/core-js/internals/create-property-descriptor.js\");\nvar toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ \"./node_modules/core-js/internals/to-indexed-object.js\");\nvar toPropertyKey = __webpack_require__(/*! ../internals/to-property-key */ \"./node_modules/core-js/internals/to-property-key.js\");\nvar hasOwn = __webpack_require__(/*! ../internals/has-own-property */ \"./node_modules/core-js/internals/has-own-property.js\");\nvar IE8_DOM_DEFINE = __webpack_require__(/*! ../internals/ie8-dom-define */ \"./node_modules/core-js/internals/ie8-dom-define.js\");\n\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// `Object.getOwnPropertyDescriptor` method\n// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor\nexports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {\n O = toIndexedObject(O);\n P = toPropertyKey(P);\n if (IE8_DOM_DEFINE) try {\n return $getOwnPropertyDescriptor(O, P);\n } catch (error) { /* empty */ }\n if (hasOwn(O, P)) return createPropertyDescriptor(!call(propertyIsEnumerableModule.f, O, P), O[P]);\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/object-get-own-property-descriptor.js?"); /***/ }), @@ -8683,7 +9314,7 @@ eval("var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./ \**********************************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { -eval("/* eslint-disable es-x/no-object-getownpropertynames -- safe */\nvar classof = __webpack_require__(/*! ../internals/classof-raw */ \"./node_modules/core-js/internals/classof-raw.js\");\nvar toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ \"./node_modules/core-js/internals/to-indexed-object.js\");\nvar $getOwnPropertyNames = (__webpack_require__(/*! ../internals/object-get-own-property-names */ \"./node_modules/core-js/internals/object-get-own-property-names.js\").f);\nvar arraySlice = __webpack_require__(/*! ../internals/array-slice-simple */ \"./node_modules/core-js/internals/array-slice-simple.js\");\n\nvar windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames\n ? Object.getOwnPropertyNames(window) : [];\n\nvar getWindowNames = function (it) {\n try {\n return $getOwnPropertyNames(it);\n } catch (error) {\n return arraySlice(windowNames);\n }\n};\n\n// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window\nmodule.exports.f = function getOwnPropertyNames(it) {\n return windowNames && classof(it) == 'Window'\n ? getWindowNames(it)\n : $getOwnPropertyNames(toIndexedObject(it));\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/object-get-own-property-names-external.js?"); +eval("/* eslint-disable es/no-object-getownpropertynames -- safe */\nvar classof = __webpack_require__(/*! ../internals/classof-raw */ \"./node_modules/core-js/internals/classof-raw.js\");\nvar toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ \"./node_modules/core-js/internals/to-indexed-object.js\");\nvar $getOwnPropertyNames = (__webpack_require__(/*! ../internals/object-get-own-property-names */ \"./node_modules/core-js/internals/object-get-own-property-names.js\").f);\nvar arraySlice = __webpack_require__(/*! ../internals/array-slice-simple */ \"./node_modules/core-js/internals/array-slice-simple.js\");\n\nvar windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames\n ? Object.getOwnPropertyNames(window) : [];\n\nvar getWindowNames = function (it) {\n try {\n return $getOwnPropertyNames(it);\n } catch (error) {\n return arraySlice(windowNames);\n }\n};\n\n// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window\nmodule.exports.f = function getOwnPropertyNames(it) {\n return windowNames && classof(it) == 'Window'\n ? getWindowNames(it)\n : $getOwnPropertyNames(toIndexedObject(it));\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/object-get-own-property-names-external.js?"); /***/ }), @@ -8693,7 +9324,7 @@ eval("/* eslint-disable es-x/no-object-getownpropertynames -- safe */\nvar class \*************************************************************************/ /***/ (function(__unused_webpack_module, exports, __webpack_require__) { -eval("var internalObjectKeys = __webpack_require__(/*! ../internals/object-keys-internal */ \"./node_modules/core-js/internals/object-keys-internal.js\");\nvar enumBugKeys = __webpack_require__(/*! ../internals/enum-bug-keys */ \"./node_modules/core-js/internals/enum-bug-keys.js\");\n\nvar hiddenKeys = enumBugKeys.concat('length', 'prototype');\n\n// `Object.getOwnPropertyNames` method\n// https://tc39.es/ecma262/#sec-object.getownpropertynames\n// eslint-disable-next-line es-x/no-object-getownpropertynames -- safe\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return internalObjectKeys(O, hiddenKeys);\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/object-get-own-property-names.js?"); +eval("var internalObjectKeys = __webpack_require__(/*! ../internals/object-keys-internal */ \"./node_modules/core-js/internals/object-keys-internal.js\");\nvar enumBugKeys = __webpack_require__(/*! ../internals/enum-bug-keys */ \"./node_modules/core-js/internals/enum-bug-keys.js\");\n\nvar hiddenKeys = enumBugKeys.concat('length', 'prototype');\n\n// `Object.getOwnPropertyNames` method\n// https://tc39.es/ecma262/#sec-object.getownpropertynames\n// eslint-disable-next-line es/no-object-getownpropertynames -- safe\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return internalObjectKeys(O, hiddenKeys);\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/object-get-own-property-names.js?"); /***/ }), @@ -8703,7 +9334,7 @@ eval("var internalObjectKeys = __webpack_require__(/*! ../internals/object-keys- \***************************************************************************/ /***/ (function(__unused_webpack_module, exports) { -eval("// eslint-disable-next-line es-x/no-object-getownpropertysymbols -- safe\nexports.f = Object.getOwnPropertySymbols;\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/object-get-own-property-symbols.js?"); +eval("// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe\nexports.f = Object.getOwnPropertySymbols;\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/object-get-own-property-symbols.js?"); /***/ }), @@ -8713,7 +9344,7 @@ eval("// eslint-disable-next-line es-x/no-object-getownpropertysymbols -- safe\n \*******************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { -eval("var hasOwn = __webpack_require__(/*! ../internals/has-own-property */ \"./node_modules/core-js/internals/has-own-property.js\");\nvar isCallable = __webpack_require__(/*! ../internals/is-callable */ \"./node_modules/core-js/internals/is-callable.js\");\nvar toObject = __webpack_require__(/*! ../internals/to-object */ \"./node_modules/core-js/internals/to-object.js\");\nvar sharedKey = __webpack_require__(/*! ../internals/shared-key */ \"./node_modules/core-js/internals/shared-key.js\");\nvar CORRECT_PROTOTYPE_GETTER = __webpack_require__(/*! ../internals/correct-prototype-getter */ \"./node_modules/core-js/internals/correct-prototype-getter.js\");\n\nvar IE_PROTO = sharedKey('IE_PROTO');\nvar $Object = Object;\nvar ObjectPrototype = $Object.prototype;\n\n// `Object.getPrototypeOf` method\n// https://tc39.es/ecma262/#sec-object.getprototypeof\n// eslint-disable-next-line es-x/no-object-getprototypeof -- safe\nmodule.exports = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function (O) {\n var object = toObject(O);\n if (hasOwn(object, IE_PROTO)) return object[IE_PROTO];\n var constructor = object.constructor;\n if (isCallable(constructor) && object instanceof constructor) {\n return constructor.prototype;\n } return object instanceof $Object ? ObjectPrototype : null;\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/object-get-prototype-of.js?"); +eval("var hasOwn = __webpack_require__(/*! ../internals/has-own-property */ \"./node_modules/core-js/internals/has-own-property.js\");\nvar isCallable = __webpack_require__(/*! ../internals/is-callable */ \"./node_modules/core-js/internals/is-callable.js\");\nvar toObject = __webpack_require__(/*! ../internals/to-object */ \"./node_modules/core-js/internals/to-object.js\");\nvar sharedKey = __webpack_require__(/*! ../internals/shared-key */ \"./node_modules/core-js/internals/shared-key.js\");\nvar CORRECT_PROTOTYPE_GETTER = __webpack_require__(/*! ../internals/correct-prototype-getter */ \"./node_modules/core-js/internals/correct-prototype-getter.js\");\n\nvar IE_PROTO = sharedKey('IE_PROTO');\nvar $Object = Object;\nvar ObjectPrototype = $Object.prototype;\n\n// `Object.getPrototypeOf` method\n// https://tc39.es/ecma262/#sec-object.getprototypeof\n// eslint-disable-next-line es/no-object-getprototypeof -- safe\nmodule.exports = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function (O) {\n var object = toObject(O);\n if (hasOwn(object, IE_PROTO)) return object[IE_PROTO];\n var constructor = object.constructor;\n if (isCallable(constructor) && object instanceof constructor) {\n return constructor.prototype;\n } return object instanceof $Object ? ObjectPrototype : null;\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/object-get-prototype-of.js?"); /***/ }), @@ -8723,7 +9354,7 @@ eval("var hasOwn = __webpack_require__(/*! ../internals/has-own-property */ \"./ \****************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { -eval("var fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\nvar isObject = __webpack_require__(/*! ../internals/is-object */ \"./node_modules/core-js/internals/is-object.js\");\nvar classof = __webpack_require__(/*! ../internals/classof-raw */ \"./node_modules/core-js/internals/classof-raw.js\");\nvar ARRAY_BUFFER_NON_EXTENSIBLE = __webpack_require__(/*! ../internals/array-buffer-non-extensible */ \"./node_modules/core-js/internals/array-buffer-non-extensible.js\");\n\n// eslint-disable-next-line es-x/no-object-isextensible -- safe\nvar $isExtensible = Object.isExtensible;\nvar FAILS_ON_PRIMITIVES = fails(function () { $isExtensible(1); });\n\n// `Object.isExtensible` method\n// https://tc39.es/ecma262/#sec-object.isextensible\nmodule.exports = (FAILS_ON_PRIMITIVES || ARRAY_BUFFER_NON_EXTENSIBLE) ? function isExtensible(it) {\n if (!isObject(it)) return false;\n if (ARRAY_BUFFER_NON_EXTENSIBLE && classof(it) == 'ArrayBuffer') return false;\n return $isExtensible ? $isExtensible(it) : true;\n} : $isExtensible;\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/object-is-extensible.js?"); +eval("var fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\nvar isObject = __webpack_require__(/*! ../internals/is-object */ \"./node_modules/core-js/internals/is-object.js\");\nvar classof = __webpack_require__(/*! ../internals/classof-raw */ \"./node_modules/core-js/internals/classof-raw.js\");\nvar ARRAY_BUFFER_NON_EXTENSIBLE = __webpack_require__(/*! ../internals/array-buffer-non-extensible */ \"./node_modules/core-js/internals/array-buffer-non-extensible.js\");\n\n// eslint-disable-next-line es/no-object-isextensible -- safe\nvar $isExtensible = Object.isExtensible;\nvar FAILS_ON_PRIMITIVES = fails(function () { $isExtensible(1); });\n\n// `Object.isExtensible` method\n// https://tc39.es/ecma262/#sec-object.isextensible\nmodule.exports = (FAILS_ON_PRIMITIVES || ARRAY_BUFFER_NON_EXTENSIBLE) ? function isExtensible(it) {\n if (!isObject(it)) return false;\n if (ARRAY_BUFFER_NON_EXTENSIBLE && classof(it) == 'ArrayBuffer') return false;\n return $isExtensible ? $isExtensible(it) : true;\n} : $isExtensible;\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/object-is-extensible.js?"); /***/ }), @@ -8753,7 +9384,7 @@ eval("var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-th \*******************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { -eval("var internalObjectKeys = __webpack_require__(/*! ../internals/object-keys-internal */ \"./node_modules/core-js/internals/object-keys-internal.js\");\nvar enumBugKeys = __webpack_require__(/*! ../internals/enum-bug-keys */ \"./node_modules/core-js/internals/enum-bug-keys.js\");\n\n// `Object.keys` method\n// https://tc39.es/ecma262/#sec-object.keys\n// eslint-disable-next-line es-x/no-object-keys -- safe\nmodule.exports = Object.keys || function keys(O) {\n return internalObjectKeys(O, enumBugKeys);\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/object-keys.js?"); +eval("var internalObjectKeys = __webpack_require__(/*! ../internals/object-keys-internal */ \"./node_modules/core-js/internals/object-keys-internal.js\");\nvar enumBugKeys = __webpack_require__(/*! ../internals/enum-bug-keys */ \"./node_modules/core-js/internals/enum-bug-keys.js\");\n\n// `Object.keys` method\n// https://tc39.es/ecma262/#sec-object.keys\n// eslint-disable-next-line es/no-object-keys -- safe\nmodule.exports = Object.keys || function keys(O) {\n return internalObjectKeys(O, enumBugKeys);\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/object-keys.js?"); /***/ }), @@ -8764,7 +9395,7 @@ eval("var internalObjectKeys = __webpack_require__(/*! ../internals/object-keys- /***/ (function(__unused_webpack_module, exports) { "use strict"; -eval("\nvar $propertyIsEnumerable = {}.propertyIsEnumerable;\n// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// Nashorn ~ JDK8 bug\nvar NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);\n\n// `Object.prototype.propertyIsEnumerable` method implementation\n// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable\nexports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {\n var descriptor = getOwnPropertyDescriptor(this, V);\n return !!descriptor && descriptor.enumerable;\n} : $propertyIsEnumerable;\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/object-property-is-enumerable.js?"); +eval("\nvar $propertyIsEnumerable = {}.propertyIsEnumerable;\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// Nashorn ~ JDK8 bug\nvar NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);\n\n// `Object.prototype.propertyIsEnumerable` method implementation\n// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable\nexports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {\n var descriptor = getOwnPropertyDescriptor(this, V);\n return !!descriptor && descriptor.enumerable;\n} : $propertyIsEnumerable;\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/object-property-is-enumerable.js?"); /***/ }), @@ -8775,7 +9406,7 @@ eval("\nvar $propertyIsEnumerable = {}.propertyIsEnumerable;\n// eslint-disable- /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; -eval("\nvar IS_PURE = __webpack_require__(/*! ../internals/is-pure */ \"./node_modules/core-js/internals/is-pure.js\");\nvar global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js/internals/global.js\");\nvar fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\nvar WEBKIT = __webpack_require__(/*! ../internals/engine-webkit-version */ \"./node_modules/core-js/internals/engine-webkit-version.js\");\n\n// Forced replacement object prototype accessors methods\nmodule.exports = IS_PURE || !fails(function () {\n // This feature detection crashes old WebKit\n // https://github.com/zloirock/core-js/issues/232\n if (WEBKIT && WEBKIT < 535) return;\n var key = Math.random();\n // In FF throws only define methods\n // eslint-disable-next-line no-undef, no-useless-call, es-x/no-legacy-object-prototype-accessor-methods -- required for testing\n __defineSetter__.call(null, key, function () { /* empty */ });\n delete global[key];\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/object-prototype-accessors-forced.js?"); +eval("\nvar IS_PURE = __webpack_require__(/*! ../internals/is-pure */ \"./node_modules/core-js/internals/is-pure.js\");\nvar global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js/internals/global.js\");\nvar fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\nvar WEBKIT = __webpack_require__(/*! ../internals/engine-webkit-version */ \"./node_modules/core-js/internals/engine-webkit-version.js\");\n\n// Forced replacement object prototype accessors methods\nmodule.exports = IS_PURE || !fails(function () {\n // This feature detection crashes old WebKit\n // https://github.com/zloirock/core-js/issues/232\n if (WEBKIT && WEBKIT < 535) return;\n var key = Math.random();\n // In FF throws only define methods\n // eslint-disable-next-line no-undef, no-useless-call, es/no-legacy-object-prototype-accessor-methods -- required for testing\n __defineSetter__.call(null, key, function () { /* empty */ });\n delete global[key];\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/object-prototype-accessors-forced.js?"); /***/ }), @@ -8785,7 +9416,7 @@ eval("\nvar IS_PURE = __webpack_require__(/*! ../internals/is-pure */ \"./node_m \*******************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { -eval("/* eslint-disable no-proto -- safe */\nvar uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ \"./node_modules/core-js/internals/function-uncurry-this.js\");\nvar anObject = __webpack_require__(/*! ../internals/an-object */ \"./node_modules/core-js/internals/an-object.js\");\nvar aPossiblePrototype = __webpack_require__(/*! ../internals/a-possible-prototype */ \"./node_modules/core-js/internals/a-possible-prototype.js\");\n\n// `Object.setPrototypeOf` method\n// https://tc39.es/ecma262/#sec-object.setprototypeof\n// Works with __proto__ only. Old v8 can't work with null proto objects.\n// eslint-disable-next-line es-x/no-object-setprototypeof -- safe\nmodule.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {\n var CORRECT_SETTER = false;\n var test = {};\n var setter;\n try {\n // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe\n setter = uncurryThis(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);\n setter(test, []);\n CORRECT_SETTER = test instanceof Array;\n } catch (error) { /* empty */ }\n return function setPrototypeOf(O, proto) {\n anObject(O);\n aPossiblePrototype(proto);\n if (CORRECT_SETTER) setter(O, proto);\n else O.__proto__ = proto;\n return O;\n };\n}() : undefined);\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/object-set-prototype-of.js?"); +eval("/* eslint-disable no-proto -- safe */\nvar uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ \"./node_modules/core-js/internals/function-uncurry-this.js\");\nvar anObject = __webpack_require__(/*! ../internals/an-object */ \"./node_modules/core-js/internals/an-object.js\");\nvar aPossiblePrototype = __webpack_require__(/*! ../internals/a-possible-prototype */ \"./node_modules/core-js/internals/a-possible-prototype.js\");\n\n// `Object.setPrototypeOf` method\n// https://tc39.es/ecma262/#sec-object.setprototypeof\n// Works with __proto__ only. Old v8 can't work with null proto objects.\n// eslint-disable-next-line es/no-object-setprototypeof -- safe\nmodule.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {\n var CORRECT_SETTER = false;\n var test = {};\n var setter;\n try {\n // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\n setter = uncurryThis(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);\n setter(test, []);\n CORRECT_SETTER = test instanceof Array;\n } catch (error) { /* empty */ }\n return function setPrototypeOf(O, proto) {\n anObject(O);\n aPossiblePrototype(proto);\n if (CORRECT_SETTER) setter(O, proto);\n else O.__proto__ = proto;\n return O;\n };\n}() : undefined);\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/object-set-prototype-of.js?"); /***/ }), @@ -8998,7 +9629,17 @@ eval("var isNullOrUndefined = __webpack_require__(/*! ../internals/is-null-or-un \******************************************************/ /***/ (function(module) { -eval("// `SameValue` abstract operation\n// https://tc39.es/ecma262/#sec-samevalue\n// eslint-disable-next-line es-x/no-object-is -- safe\nmodule.exports = Object.is || function is(x, y) {\n // eslint-disable-next-line no-self-compare -- NaN check\n return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/same-value.js?"); +eval("// `SameValue` abstract operation\n// https://tc39.es/ecma262/#sec-samevalue\n// eslint-disable-next-line es/no-object-is -- safe\nmodule.exports = Object.is || function is(x, y) {\n // eslint-disable-next-line no-self-compare -- NaN check\n return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/same-value.js?"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/schedulers-fix.js": +/*!**********************************************************!*\ + !*** ./node_modules/core-js/internals/schedulers-fix.js ***! + \**********************************************************/ +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +eval("var global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js/internals/global.js\");\nvar apply = __webpack_require__(/*! ../internals/function-apply */ \"./node_modules/core-js/internals/function-apply.js\");\nvar isCallable = __webpack_require__(/*! ../internals/is-callable */ \"./node_modules/core-js/internals/is-callable.js\");\nvar userAgent = __webpack_require__(/*! ../internals/engine-user-agent */ \"./node_modules/core-js/internals/engine-user-agent.js\");\nvar arraySlice = __webpack_require__(/*! ../internals/array-slice */ \"./node_modules/core-js/internals/array-slice.js\");\nvar validateArgumentsLength = __webpack_require__(/*! ../internals/validate-arguments-length */ \"./node_modules/core-js/internals/validate-arguments-length.js\");\n\nvar MSIE = /MSIE .\\./.test(userAgent); // <- dirty ie9- check\nvar Function = global.Function;\n\nvar wrap = function (scheduler) {\n return MSIE ? function (handler, timeout /* , ...arguments */) {\n var boundArgs = validateArgumentsLength(arguments.length, 1) > 2;\n var fn = isCallable(handler) ? handler : Function(handler);\n var args = boundArgs ? arraySlice(arguments, 2) : undefined;\n return scheduler(boundArgs ? function () {\n apply(fn, this, args);\n } : fn, timeout);\n } : scheduler;\n};\n\n// ie9- setTimeout & setInterval additional parameters fix\n// https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#timers\nmodule.exports = {\n // `setTimeout` method\n // https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-settimeout\n setTimeout: wrap(global.setTimeout),\n // `setInterval` method\n // https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-setinterval\n setInterval: wrap(global.setInterval)\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/schedulers-fix.js?"); /***/ }), @@ -9049,7 +9690,7 @@ eval("var global = __webpack_require__(/*! ../internals/global */ \"./node_modul \**************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { -eval("var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ \"./node_modules/core-js/internals/is-pure.js\");\nvar store = __webpack_require__(/*! ../internals/shared-store */ \"./node_modules/core-js/internals/shared-store.js\");\n\n(module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n version: '3.25.1',\n mode: IS_PURE ? 'pure' : 'global',\n copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',\n license: 'https://github.com/zloirock/core-js/blob/v3.25.1/LICENSE',\n source: 'https://github.com/zloirock/core-js'\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/shared.js?"); +eval("var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ \"./node_modules/core-js/internals/is-pure.js\");\nvar store = __webpack_require__(/*! ../internals/shared-store */ \"./node_modules/core-js/internals/shared-store.js\");\n\n(module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n version: '3.26.1',\n mode: IS_PURE ? 'pure' : 'global',\n copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',\n license: 'https://github.com/zloirock/core-js/blob/v3.26.1/LICENSE',\n source: 'https://github.com/zloirock/core-js'\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/shared.js?"); /***/ }), @@ -9093,6 +9734,17 @@ eval("// https://github.com/tc39/proposal-string-pad-start-end\nvar uncurryThis /***/ }), +/***/ "./node_modules/core-js/internals/string-punycode-to-ascii.js": +/*!********************************************************************!*\ + !*** ./node_modules/core-js/internals/string-punycode-to-ascii.js ***! + \********************************************************************/ +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +eval("\n// based on https://github.com/bestiejs/punycode.js/blob/master/punycode.js\nvar uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ \"./node_modules/core-js/internals/function-uncurry-this.js\");\n\nvar maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1\nvar base = 36;\nvar tMin = 1;\nvar tMax = 26;\nvar skew = 38;\nvar damp = 700;\nvar initialBias = 72;\nvar initialN = 128; // 0x80\nvar delimiter = '-'; // '\\x2D'\nvar regexNonASCII = /[^\\0-\\u007E]/; // non-ASCII chars\nvar regexSeparators = /[.\\u3002\\uFF0E\\uFF61]/g; // RFC 3490 separators\nvar OVERFLOW_ERROR = 'Overflow: input needs wider integers to process';\nvar baseMinusTMin = base - tMin;\n\nvar $RangeError = RangeError;\nvar exec = uncurryThis(regexSeparators.exec);\nvar floor = Math.floor;\nvar fromCharCode = String.fromCharCode;\nvar charCodeAt = uncurryThis(''.charCodeAt);\nvar join = uncurryThis([].join);\nvar push = uncurryThis([].push);\nvar replace = uncurryThis(''.replace);\nvar split = uncurryThis(''.split);\nvar toLowerCase = uncurryThis(''.toLowerCase);\n\n/**\n * Creates an array containing the numeric code points of each Unicode\n * character in the string. While JavaScript uses UCS-2 internally,\n * this function will convert a pair of surrogate halves (each of which\n * UCS-2 exposes as separate characters) into a single code point,\n * matching UTF-16.\n */\nvar ucs2decode = function (string) {\n var output = [];\n var counter = 0;\n var length = string.length;\n while (counter < length) {\n var value = charCodeAt(string, counter++);\n if (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n // It's a high surrogate, and there is a next character.\n var extra = charCodeAt(string, counter++);\n if ((extra & 0xFC00) == 0xDC00) { // Low surrogate.\n push(output, ((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n } else {\n // It's an unmatched surrogate; only append this code unit, in case the\n // next code unit is the high surrogate of a surrogate pair.\n push(output, value);\n counter--;\n }\n } else {\n push(output, value);\n }\n }\n return output;\n};\n\n/**\n * Converts a digit/integer into a basic code point.\n */\nvar digitToBasic = function (digit) {\n // 0..25 map to ASCII a..z or A..Z\n // 26..35 map to ASCII 0..9\n return digit + 22 + 75 * (digit < 26);\n};\n\n/**\n * Bias adaptation function as per section 3.4 of RFC 3492.\n * https://tools.ietf.org/html/rfc3492#section-3.4\n */\nvar adapt = function (delta, numPoints, firstTime) {\n var k = 0;\n delta = firstTime ? floor(delta / damp) : delta >> 1;\n delta += floor(delta / numPoints);\n while (delta > baseMinusTMin * tMax >> 1) {\n delta = floor(delta / baseMinusTMin);\n k += base;\n }\n return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n};\n\n/**\n * Converts a string of Unicode symbols (e.g. a domain name label) to a\n * Punycode string of ASCII-only symbols.\n */\nvar encode = function (input) {\n var output = [];\n\n // Convert the input in UCS-2 to an array of Unicode code points.\n input = ucs2decode(input);\n\n // Cache the length.\n var inputLength = input.length;\n\n // Initialize the state.\n var n = initialN;\n var delta = 0;\n var bias = initialBias;\n var i, currentValue;\n\n // Handle the basic code points.\n for (i = 0; i < input.length; i++) {\n currentValue = input[i];\n if (currentValue < 0x80) {\n push(output, fromCharCode(currentValue));\n }\n }\n\n var basicLength = output.length; // number of basic code points.\n var handledCPCount = basicLength; // number of code points that have been handled;\n\n // Finish the basic string with a delimiter unless it's empty.\n if (basicLength) {\n push(output, delimiter);\n }\n\n // Main encoding loop:\n while (handledCPCount < inputLength) {\n // All non-basic code points < n have been handled already. Find the next larger one:\n var m = maxInt;\n for (i = 0; i < input.length; i++) {\n currentValue = input[i];\n if (currentValue >= n && currentValue < m) {\n m = currentValue;\n }\n }\n\n // Increase `delta` enough to advance the decoder's state to , but guard against overflow.\n var handledCPCountPlusOne = handledCPCount + 1;\n if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n throw $RangeError(OVERFLOW_ERROR);\n }\n\n delta += (m - n) * handledCPCountPlusOne;\n n = m;\n\n for (i = 0; i < input.length; i++) {\n currentValue = input[i];\n if (currentValue < n && ++delta > maxInt) {\n throw $RangeError(OVERFLOW_ERROR);\n }\n if (currentValue == n) {\n // Represent delta as a generalized variable-length integer.\n var q = delta;\n var k = base;\n while (true) {\n var t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n if (q < t) break;\n var qMinusT = q - t;\n var baseMinusT = base - t;\n push(output, fromCharCode(digitToBasic(t + qMinusT % baseMinusT)));\n q = floor(qMinusT / baseMinusT);\n k += base;\n }\n\n push(output, fromCharCode(digitToBasic(q)));\n bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);\n delta = 0;\n handledCPCount++;\n }\n }\n\n delta++;\n n++;\n }\n return join(output, '');\n};\n\nmodule.exports = function (input) {\n var encoded = [];\n var labels = split(replace(toLowerCase(input), regexSeparators, '\\u002E'), '.');\n var i, label;\n for (i = 0; i < labels.length; i++) {\n label = labels[i];\n push(encoded, exec(regexNonASCII, label) ? 'xn--' + encode(label) : label);\n }\n return join(encoded, '.');\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/string-punycode-to-ascii.js?"); + +/***/ }), + /***/ "./node_modules/core-js/internals/string-repeat.js": /*!*********************************************************!*\ !*** ./node_modules/core-js/internals/string-repeat.js ***! @@ -9130,7 +9782,7 @@ eval("var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-th \************************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { -eval("/* eslint-disable es-x/no-symbol -- required for testing */\nvar V8_VERSION = __webpack_require__(/*! ../internals/engine-v8-version */ \"./node_modules/core-js/internals/engine-v8-version.js\");\nvar fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\n\n// eslint-disable-next-line es-x/no-object-getownpropertysymbols -- required for testing\nmodule.exports = !!Object.getOwnPropertySymbols && !fails(function () {\n var symbol = Symbol();\n // Chrome 38 Symbol has incorrect toString conversion\n // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances\n return !String(symbol) || !(Object(symbol) instanceof Symbol) ||\n // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances\n !Symbol.sham && V8_VERSION && V8_VERSION < 41;\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/symbol-constructor-detection.js?"); +eval("/* eslint-disable es/no-symbol -- required for testing */\nvar V8_VERSION = __webpack_require__(/*! ../internals/engine-v8-version */ \"./node_modules/core-js/internals/engine-v8-version.js\");\nvar fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\n\n// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing\nmodule.exports = !!Object.getOwnPropertySymbols && !fails(function () {\n var symbol = Symbol();\n // Chrome 38 Symbol has incorrect toString conversion\n // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances\n return !String(symbol) || !(Object(symbol) instanceof Symbol) ||\n // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances\n !Symbol.sham && V8_VERSION && V8_VERSION < 41;\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/symbol-constructor-detection.js?"); /***/ }), @@ -9150,7 +9802,7 @@ eval("var call = __webpack_require__(/*! ../internals/function-call */ \"./node_ \*********************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { -eval("var NATIVE_SYMBOL = __webpack_require__(/*! ../internals/symbol-constructor-detection */ \"./node_modules/core-js/internals/symbol-constructor-detection.js\");\n\n/* eslint-disable es-x/no-symbol -- safe */\nmodule.exports = NATIVE_SYMBOL && !!Symbol['for'] && !!Symbol.keyFor;\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/symbol-registry-detection.js?"); +eval("var NATIVE_SYMBOL = __webpack_require__(/*! ../internals/symbol-constructor-detection */ \"./node_modules/core-js/internals/symbol-constructor-detection.js\");\n\n/* eslint-disable es/no-symbol -- safe */\nmodule.exports = NATIVE_SYMBOL && !!Symbol['for'] && !!Symbol.keyFor;\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/symbol-registry-detection.js?"); /***/ }), @@ -9160,7 +9812,7 @@ eval("var NATIVE_SYMBOL = __webpack_require__(/*! ../internals/symbol-constructo \************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { -eval("var global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js/internals/global.js\");\nvar apply = __webpack_require__(/*! ../internals/function-apply */ \"./node_modules/core-js/internals/function-apply.js\");\nvar bind = __webpack_require__(/*! ../internals/function-bind-context */ \"./node_modules/core-js/internals/function-bind-context.js\");\nvar isCallable = __webpack_require__(/*! ../internals/is-callable */ \"./node_modules/core-js/internals/is-callable.js\");\nvar hasOwn = __webpack_require__(/*! ../internals/has-own-property */ \"./node_modules/core-js/internals/has-own-property.js\");\nvar fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\nvar html = __webpack_require__(/*! ../internals/html */ \"./node_modules/core-js/internals/html.js\");\nvar arraySlice = __webpack_require__(/*! ../internals/array-slice */ \"./node_modules/core-js/internals/array-slice.js\");\nvar createElement = __webpack_require__(/*! ../internals/document-create-element */ \"./node_modules/core-js/internals/document-create-element.js\");\nvar validateArgumentsLength = __webpack_require__(/*! ../internals/validate-arguments-length */ \"./node_modules/core-js/internals/validate-arguments-length.js\");\nvar IS_IOS = __webpack_require__(/*! ../internals/engine-is-ios */ \"./node_modules/core-js/internals/engine-is-ios.js\");\nvar IS_NODE = __webpack_require__(/*! ../internals/engine-is-node */ \"./node_modules/core-js/internals/engine-is-node.js\");\n\nvar set = global.setImmediate;\nvar clear = global.clearImmediate;\nvar process = global.process;\nvar Dispatch = global.Dispatch;\nvar Function = global.Function;\nvar MessageChannel = global.MessageChannel;\nvar String = global.String;\nvar counter = 0;\nvar queue = {};\nvar ONREADYSTATECHANGE = 'onreadystatechange';\nvar location, defer, channel, port;\n\ntry {\n // Deno throws a ReferenceError on `location` access without `--location` flag\n location = global.location;\n} catch (error) { /* empty */ }\n\nvar run = function (id) {\n if (hasOwn(queue, id)) {\n var fn = queue[id];\n delete queue[id];\n fn();\n }\n};\n\nvar runner = function (id) {\n return function () {\n run(id);\n };\n};\n\nvar listener = function (event) {\n run(event.data);\n};\n\nvar post = function (id) {\n // old engines have not location.origin\n global.postMessage(String(id), location.protocol + '//' + location.host);\n};\n\n// Node.js 0.9+ & IE10+ has setImmediate, otherwise:\nif (!set || !clear) {\n set = function setImmediate(handler) {\n validateArgumentsLength(arguments.length, 1);\n var fn = isCallable(handler) ? handler : Function(handler);\n var args = arraySlice(arguments, 1);\n queue[++counter] = function () {\n apply(fn, undefined, args);\n };\n defer(counter);\n return counter;\n };\n clear = function clearImmediate(id) {\n delete queue[id];\n };\n // Node.js 0.8-\n if (IS_NODE) {\n defer = function (id) {\n process.nextTick(runner(id));\n };\n // Sphere (JS game engine) Dispatch API\n } else if (Dispatch && Dispatch.now) {\n defer = function (id) {\n Dispatch.now(runner(id));\n };\n // Browsers with MessageChannel, includes WebWorkers\n // except iOS - https://github.com/zloirock/core-js/issues/624\n } else if (MessageChannel && !IS_IOS) {\n channel = new MessageChannel();\n port = channel.port2;\n channel.port1.onmessage = listener;\n defer = bind(port.postMessage, port);\n // Browsers with postMessage, skip WebWorkers\n // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'\n } else if (\n global.addEventListener &&\n isCallable(global.postMessage) &&\n !global.importScripts &&\n location && location.protocol !== 'file:' &&\n !fails(post)\n ) {\n defer = post;\n global.addEventListener('message', listener, false);\n // IE8-\n } else if (ONREADYSTATECHANGE in createElement('script')) {\n defer = function (id) {\n html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {\n html.removeChild(this);\n run(id);\n };\n };\n // Rest old browsers\n } else {\n defer = function (id) {\n setTimeout(runner(id), 0);\n };\n }\n}\n\nmodule.exports = {\n set: set,\n clear: clear\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/task.js?"); +eval("var global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js/internals/global.js\");\nvar apply = __webpack_require__(/*! ../internals/function-apply */ \"./node_modules/core-js/internals/function-apply.js\");\nvar bind = __webpack_require__(/*! ../internals/function-bind-context */ \"./node_modules/core-js/internals/function-bind-context.js\");\nvar isCallable = __webpack_require__(/*! ../internals/is-callable */ \"./node_modules/core-js/internals/is-callable.js\");\nvar hasOwn = __webpack_require__(/*! ../internals/has-own-property */ \"./node_modules/core-js/internals/has-own-property.js\");\nvar fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\nvar html = __webpack_require__(/*! ../internals/html */ \"./node_modules/core-js/internals/html.js\");\nvar arraySlice = __webpack_require__(/*! ../internals/array-slice */ \"./node_modules/core-js/internals/array-slice.js\");\nvar createElement = __webpack_require__(/*! ../internals/document-create-element */ \"./node_modules/core-js/internals/document-create-element.js\");\nvar validateArgumentsLength = __webpack_require__(/*! ../internals/validate-arguments-length */ \"./node_modules/core-js/internals/validate-arguments-length.js\");\nvar IS_IOS = __webpack_require__(/*! ../internals/engine-is-ios */ \"./node_modules/core-js/internals/engine-is-ios.js\");\nvar IS_NODE = __webpack_require__(/*! ../internals/engine-is-node */ \"./node_modules/core-js/internals/engine-is-node.js\");\n\nvar set = global.setImmediate;\nvar clear = global.clearImmediate;\nvar process = global.process;\nvar Dispatch = global.Dispatch;\nvar Function = global.Function;\nvar MessageChannel = global.MessageChannel;\nvar String = global.String;\nvar counter = 0;\nvar queue = {};\nvar ONREADYSTATECHANGE = 'onreadystatechange';\nvar $location, defer, channel, port;\n\ntry {\n // Deno throws a ReferenceError on `location` access without `--location` flag\n $location = global.location;\n} catch (error) { /* empty */ }\n\nvar run = function (id) {\n if (hasOwn(queue, id)) {\n var fn = queue[id];\n delete queue[id];\n fn();\n }\n};\n\nvar runner = function (id) {\n return function () {\n run(id);\n };\n};\n\nvar listener = function (event) {\n run(event.data);\n};\n\nvar post = function (id) {\n // old engines have not location.origin\n global.postMessage(String(id), $location.protocol + '//' + $location.host);\n};\n\n// Node.js 0.9+ & IE10+ has setImmediate, otherwise:\nif (!set || !clear) {\n set = function setImmediate(handler) {\n validateArgumentsLength(arguments.length, 1);\n var fn = isCallable(handler) ? handler : Function(handler);\n var args = arraySlice(arguments, 1);\n queue[++counter] = function () {\n apply(fn, undefined, args);\n };\n defer(counter);\n return counter;\n };\n clear = function clearImmediate(id) {\n delete queue[id];\n };\n // Node.js 0.8-\n if (IS_NODE) {\n defer = function (id) {\n process.nextTick(runner(id));\n };\n // Sphere (JS game engine) Dispatch API\n } else if (Dispatch && Dispatch.now) {\n defer = function (id) {\n Dispatch.now(runner(id));\n };\n // Browsers with MessageChannel, includes WebWorkers\n // except iOS - https://github.com/zloirock/core-js/issues/624\n } else if (MessageChannel && !IS_IOS) {\n channel = new MessageChannel();\n port = channel.port2;\n channel.port1.onmessage = listener;\n defer = bind(port.postMessage, port);\n // Browsers with postMessage, skip WebWorkers\n // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'\n } else if (\n global.addEventListener &&\n isCallable(global.postMessage) &&\n !global.importScripts &&\n $location && $location.protocol !== 'file:' &&\n !fails(post)\n ) {\n defer = post;\n global.addEventListener('message', listener, false);\n // IE8-\n } else if (ONREADYSTATECHANGE in createElement('script')) {\n defer = function (id) {\n html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {\n html.removeChild(this);\n run(id);\n };\n };\n // Rest old browsers\n } else {\n defer = function (id) {\n setTimeout(runner(id), 0);\n };\n }\n}\n\nmodule.exports = {\n set: set,\n clear: clear\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/task.js?"); /***/ }), @@ -9190,7 +9842,7 @@ eval("var toIntegerOrInfinity = __webpack_require__(/*! ../internals/to-integer- \******************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { -eval("var toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ \"./node_modules/core-js/internals/to-primitive.js\");\n\nvar $TypeError = TypeError;\n\n// `ToBigInt` abstract operation\n// https://tc39.es/ecma262/#sec-tobigint\nmodule.exports = function (argument) {\n var prim = toPrimitive(argument, 'number');\n if (typeof prim == 'number') throw $TypeError(\"Can't convert number to bigint\");\n // eslint-disable-next-line es-x/no-bigint -- safe\n return BigInt(prim);\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/to-big-int.js?"); +eval("var toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ \"./node_modules/core-js/internals/to-primitive.js\");\n\nvar $TypeError = TypeError;\n\n// `ToBigInt` abstract operation\n// https://tc39.es/ecma262/#sec-tobigint\nmodule.exports = function (argument) {\n var prim = toPrimitive(argument, 'number');\n if (typeof prim == 'number') throw $TypeError(\"Can't convert number to bigint\");\n // eslint-disable-next-line es/no-bigint -- safe\n return BigInt(prim);\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/to-big-int.js?"); /***/ }), @@ -9375,13 +10027,23 @@ eval("var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-th /***/ }), +/***/ "./node_modules/core-js/internals/url-constructor-detection.js": +/*!*********************************************************************!*\ + !*** ./node_modules/core-js/internals/url-constructor-detection.js ***! + \*********************************************************************/ +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +eval("var fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\nvar wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js/internals/well-known-symbol.js\");\nvar IS_PURE = __webpack_require__(/*! ../internals/is-pure */ \"./node_modules/core-js/internals/is-pure.js\");\n\nvar ITERATOR = wellKnownSymbol('iterator');\n\nmodule.exports = !fails(function () {\n // eslint-disable-next-line unicorn/relative-url-style -- required for testing\n var url = new URL('b?a=1&b=2&c=3', 'http://a');\n var searchParams = url.searchParams;\n var result = '';\n url.pathname = 'c%20d';\n searchParams.forEach(function (value, key) {\n searchParams['delete']('b');\n result += key + value;\n });\n return (IS_PURE && !url.toJSON)\n || !searchParams.sort\n || url.href !== 'http://a/c%20d?a=1&c=3'\n || searchParams.get('c') !== '3'\n || String(new URLSearchParams('?a=1')) !== 'a=1'\n || !searchParams[ITERATOR]\n // throws in Edge\n || new URL('https://a@b').username !== 'a'\n || new URLSearchParams(new URLSearchParams('a=b')).get('a') !== 'b'\n // not punycoded in Edge\n || new URL('http://тест').host !== 'xn--e1aybc'\n // not escaped in Chrome 62-\n || new URL('http://a#б').hash !== '#%D0%B1'\n // fails in Chrome 66-\n || result !== 'a1c3'\n // throws in Safari\n || new URL('http://x', undefined).host !== 'x';\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/url-constructor-detection.js?"); + +/***/ }), + /***/ "./node_modules/core-js/internals/use-symbol-as-uid.js": /*!*************************************************************!*\ !*** ./node_modules/core-js/internals/use-symbol-as-uid.js ***! \*************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { -eval("/* eslint-disable es-x/no-symbol -- required for testing */\nvar NATIVE_SYMBOL = __webpack_require__(/*! ../internals/symbol-constructor-detection */ \"./node_modules/core-js/internals/symbol-constructor-detection.js\");\n\nmodule.exports = NATIVE_SYMBOL\n && !Symbol.sham\n && typeof Symbol.iterator == 'symbol';\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/use-symbol-as-uid.js?"); +eval("/* eslint-disable es/no-symbol -- required for testing */\nvar NATIVE_SYMBOL = __webpack_require__(/*! ../internals/symbol-constructor-detection */ \"./node_modules/core-js/internals/symbol-constructor-detection.js\");\n\nmodule.exports = NATIVE_SYMBOL\n && !Symbol.sham\n && typeof Symbol.iterator == 'symbol';\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/use-symbol-as-uid.js?"); /***/ }), @@ -9391,7 +10053,7 @@ eval("/* eslint-disable es-x/no-symbol -- required for testing */\nvar NATIVE_SY \*******************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { -eval("var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./node_modules/core-js/internals/descriptors.js\");\nvar fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\n\n// V8 ~ Chrome 36-\n// https://bugs.chromium.org/p/v8/issues/detail?id=3334\nmodule.exports = DESCRIPTORS && fails(function () {\n // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing\n return Object.defineProperty(function () { /* empty */ }, 'prototype', {\n value: 42,\n writable: false\n }).prototype != 42;\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/v8-prototype-define-bug.js?"); +eval("var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./node_modules/core-js/internals/descriptors.js\");\nvar fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\n\n// V8 ~ Chrome 36-\n// https://bugs.chromium.org/p/v8/issues/detail?id=3334\nmodule.exports = DESCRIPTORS && fails(function () {\n // eslint-disable-next-line es/no-object-defineproperty -- required for testing\n return Object.defineProperty(function () { /* empty */ }, 'prototype', {\n value: 42,\n writable: false\n }).prototype != 42;\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/v8-prototype-define-bug.js?"); /***/ }), @@ -9451,7 +10113,18 @@ eval("var global = __webpack_require__(/*! ../internals/global */ \"./node_modul \*******************************************************/ /***/ (function(module) { -eval("// a string of all valid unicode whitespaces\nmodule.exports = '\\u0009\\u000A\\u000B\\u000C\\u000D\\u0020\\u00A0\\u1680\\u2000\\u2001\\u2002' +\n '\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF';\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/whitespaces.js?"); +eval("// a string of all valid unicode whitespaces\nmodule.exports = '\\u0009\\u000A\\u000B\\u000C\\u000D\\u0020\\u00A0\\u1680\\u2000\\u2001\\u2002' +\n '\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF';\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/whitespaces.js?"); + +/***/ }), + +/***/ "./node_modules/core-js/modules/es.array-buffer.slice.js": +/*!***************************************************************!*\ + !*** ./node_modules/core-js/modules/es.array-buffer.slice.js ***! + \***************************************************************/ +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this-clause */ \"./node_modules/core-js/internals/function-uncurry-this-clause.js\");\nvar fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\nvar ArrayBufferModule = __webpack_require__(/*! ../internals/array-buffer */ \"./node_modules/core-js/internals/array-buffer.js\");\nvar anObject = __webpack_require__(/*! ../internals/an-object */ \"./node_modules/core-js/internals/an-object.js\");\nvar toAbsoluteIndex = __webpack_require__(/*! ../internals/to-absolute-index */ \"./node_modules/core-js/internals/to-absolute-index.js\");\nvar toLength = __webpack_require__(/*! ../internals/to-length */ \"./node_modules/core-js/internals/to-length.js\");\nvar speciesConstructor = __webpack_require__(/*! ../internals/species-constructor */ \"./node_modules/core-js/internals/species-constructor.js\");\n\nvar ArrayBuffer = ArrayBufferModule.ArrayBuffer;\nvar DataView = ArrayBufferModule.DataView;\nvar DataViewPrototype = DataView.prototype;\nvar nativeArrayBufferSlice = uncurryThis(ArrayBuffer.prototype.slice);\nvar getUint8 = uncurryThis(DataViewPrototype.getUint8);\nvar setUint8 = uncurryThis(DataViewPrototype.setUint8);\n\nvar INCORRECT_SLICE = fails(function () {\n return !new ArrayBuffer(2).slice(1, undefined).byteLength;\n});\n\n// `ArrayBuffer.prototype.slice` method\n// https://tc39.es/ecma262/#sec-arraybuffer.prototype.slice\n$({ target: 'ArrayBuffer', proto: true, unsafe: true, forced: INCORRECT_SLICE }, {\n slice: function slice(start, end) {\n if (nativeArrayBufferSlice && end === undefined) {\n return nativeArrayBufferSlice(anObject(this), start); // FF fix\n }\n var length = anObject(this).byteLength;\n var first = toAbsoluteIndex(start, length);\n var fin = toAbsoluteIndex(end === undefined ? length : end, length);\n var result = new (speciesConstructor(this, ArrayBuffer))(toLength(fin - first));\n var viewSource = new DataView(this);\n var viewTarget = new DataView(result);\n var index = 0;\n while (first < fin) {\n setUint8(viewTarget, index++, getUint8(viewSource, first++));\n } return result;\n }\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/es.array-buffer.slice.js?"); /***/ }), @@ -9466,6 +10139,17 @@ eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/ /***/ }), +/***/ "./node_modules/core-js/modules/es.array.every.js": +/*!********************************************************!*\ + !*** ./node_modules/core-js/modules/es.array.every.js ***! + \********************************************************/ +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar $every = (__webpack_require__(/*! ../internals/array-iteration */ \"./node_modules/core-js/internals/array-iteration.js\").every);\nvar arrayMethodIsStrict = __webpack_require__(/*! ../internals/array-method-is-strict */ \"./node_modules/core-js/internals/array-method-is-strict.js\");\n\nvar STRICT_METHOD = arrayMethodIsStrict('every');\n\n// `Array.prototype.every` method\n// https://tc39.es/ecma262/#sec-array.prototype.every\n$({ target: 'Array', proto: true, forced: !STRICT_METHOD }, {\n every: function every(callbackfn /* , thisArg */) {\n return $every(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/es.array.every.js?"); + +/***/ }), + /***/ "./node_modules/core-js/modules/es.array.filter.js": /*!*********************************************************!*\ !*** ./node_modules/core-js/modules/es.array.filter.js ***! @@ -9499,13 +10183,24 @@ eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/ /***/ }), +/***/ "./node_modules/core-js/modules/es.array.for-each.js": +/*!***********************************************************!*\ + !*** ./node_modules/core-js/modules/es.array.for-each.js ***! + \***********************************************************/ +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar forEach = __webpack_require__(/*! ../internals/array-for-each */ \"./node_modules/core-js/internals/array-for-each.js\");\n\n// `Array.prototype.forEach` method\n// https://tc39.es/ecma262/#sec-array.prototype.foreach\n// eslint-disable-next-line es/no-array-prototype-foreach -- safe\n$({ target: 'Array', proto: true, forced: [].forEach != forEach }, {\n forEach: forEach\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/es.array.for-each.js?"); + +/***/ }), + /***/ "./node_modules/core-js/modules/es.array.from.js": /*!*******************************************************!*\ !*** ./node_modules/core-js/modules/es.array.from.js ***! \*******************************************************/ /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { -eval("var $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar from = __webpack_require__(/*! ../internals/array-from */ \"./node_modules/core-js/internals/array-from.js\");\nvar checkCorrectnessOfIteration = __webpack_require__(/*! ../internals/check-correctness-of-iteration */ \"./node_modules/core-js/internals/check-correctness-of-iteration.js\");\n\nvar INCORRECT_ITERATION = !checkCorrectnessOfIteration(function (iterable) {\n // eslint-disable-next-line es-x/no-array-from -- required for testing\n Array.from(iterable);\n});\n\n// `Array.from` method\n// https://tc39.es/ecma262/#sec-array.from\n$({ target: 'Array', stat: true, forced: INCORRECT_ITERATION }, {\n from: from\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/es.array.from.js?"); +eval("var $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar from = __webpack_require__(/*! ../internals/array-from */ \"./node_modules/core-js/internals/array-from.js\");\nvar checkCorrectnessOfIteration = __webpack_require__(/*! ../internals/check-correctness-of-iteration */ \"./node_modules/core-js/internals/check-correctness-of-iteration.js\");\n\nvar INCORRECT_ITERATION = !checkCorrectnessOfIteration(function (iterable) {\n // eslint-disable-next-line es/no-array-from -- required for testing\n Array.from(iterable);\n});\n\n// `Array.from` method\n// https://tc39.es/ecma262/#sec-array.from\n$({ target: 'Array', stat: true, forced: INCORRECT_ITERATION }, {\n from: from\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/es.array.from.js?"); /***/ }), @@ -9520,6 +10215,27 @@ eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/ /***/ }), +/***/ "./node_modules/core-js/modules/es.array.index-of.js": +/*!***********************************************************!*\ + !*** ./node_modules/core-js/modules/es.array.index-of.js ***! + \***********************************************************/ +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +eval("\n/* eslint-disable es/no-array-prototype-indexof -- required for testing */\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this-clause */ \"./node_modules/core-js/internals/function-uncurry-this-clause.js\");\nvar $indexOf = (__webpack_require__(/*! ../internals/array-includes */ \"./node_modules/core-js/internals/array-includes.js\").indexOf);\nvar arrayMethodIsStrict = __webpack_require__(/*! ../internals/array-method-is-strict */ \"./node_modules/core-js/internals/array-method-is-strict.js\");\n\nvar nativeIndexOf = uncurryThis([].indexOf);\n\nvar NEGATIVE_ZERO = !!nativeIndexOf && 1 / nativeIndexOf([1], 1, -0) < 0;\nvar STRICT_METHOD = arrayMethodIsStrict('indexOf');\n\n// `Array.prototype.indexOf` method\n// https://tc39.es/ecma262/#sec-array.prototype.indexof\n$({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || !STRICT_METHOD }, {\n indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {\n var fromIndex = arguments.length > 1 ? arguments[1] : undefined;\n return NEGATIVE_ZERO\n // convert -0 to +0\n ? nativeIndexOf(this, searchElement, fromIndex) || 0\n : $indexOf(this, searchElement, fromIndex);\n }\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/es.array.index-of.js?"); + +/***/ }), + +/***/ "./node_modules/core-js/modules/es.array.is-array.js": +/*!***********************************************************!*\ + !*** ./node_modules/core-js/modules/es.array.is-array.js ***! + \***********************************************************/ +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +eval("var $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar isArray = __webpack_require__(/*! ../internals/is-array */ \"./node_modules/core-js/internals/is-array.js\");\n\n// `Array.isArray` method\n// https://tc39.es/ecma262/#sec-array.isarray\n$({ target: 'Array', stat: true }, {\n isArray: isArray\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/es.array.is-array.js?"); + +/***/ }), + /***/ "./node_modules/core-js/modules/es.array.iterator.js": /*!***********************************************************!*\ !*** ./node_modules/core-js/modules/es.array.iterator.js ***! @@ -9553,6 +10269,39 @@ eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/ /***/ }), +/***/ "./node_modules/core-js/modules/es.array.reduce-right.js": +/*!***************************************************************!*\ + !*** ./node_modules/core-js/modules/es.array.reduce-right.js ***! + \***************************************************************/ +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar $reduceRight = (__webpack_require__(/*! ../internals/array-reduce */ \"./node_modules/core-js/internals/array-reduce.js\").right);\nvar arrayMethodIsStrict = __webpack_require__(/*! ../internals/array-method-is-strict */ \"./node_modules/core-js/internals/array-method-is-strict.js\");\nvar CHROME_VERSION = __webpack_require__(/*! ../internals/engine-v8-version */ \"./node_modules/core-js/internals/engine-v8-version.js\");\nvar IS_NODE = __webpack_require__(/*! ../internals/engine-is-node */ \"./node_modules/core-js/internals/engine-is-node.js\");\n\nvar STRICT_METHOD = arrayMethodIsStrict('reduceRight');\n// Chrome 80-82 has a critical bug\n// https://bugs.chromium.org/p/chromium/issues/detail?id=1049982\nvar CHROME_BUG = !IS_NODE && CHROME_VERSION > 79 && CHROME_VERSION < 83;\n\n// `Array.prototype.reduceRight` method\n// https://tc39.es/ecma262/#sec-array.prototype.reduceright\n$({ target: 'Array', proto: true, forced: !STRICT_METHOD || CHROME_BUG }, {\n reduceRight: function reduceRight(callbackfn /* , initialValue */) {\n return $reduceRight(this, callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/es.array.reduce-right.js?"); + +/***/ }), + +/***/ "./node_modules/core-js/modules/es.array.reduce.js": +/*!*********************************************************!*\ + !*** ./node_modules/core-js/modules/es.array.reduce.js ***! + \*********************************************************/ +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar $reduce = (__webpack_require__(/*! ../internals/array-reduce */ \"./node_modules/core-js/internals/array-reduce.js\").left);\nvar arrayMethodIsStrict = __webpack_require__(/*! ../internals/array-method-is-strict */ \"./node_modules/core-js/internals/array-method-is-strict.js\");\nvar CHROME_VERSION = __webpack_require__(/*! ../internals/engine-v8-version */ \"./node_modules/core-js/internals/engine-v8-version.js\");\nvar IS_NODE = __webpack_require__(/*! ../internals/engine-is-node */ \"./node_modules/core-js/internals/engine-is-node.js\");\n\nvar STRICT_METHOD = arrayMethodIsStrict('reduce');\n// Chrome 80-82 has a critical bug\n// https://bugs.chromium.org/p/chromium/issues/detail?id=1049982\nvar CHROME_BUG = !IS_NODE && CHROME_VERSION > 79 && CHROME_VERSION < 83;\n\n// `Array.prototype.reduce` method\n// https://tc39.es/ecma262/#sec-array.prototype.reduce\n$({ target: 'Array', proto: true, forced: !STRICT_METHOD || CHROME_BUG }, {\n reduce: function reduce(callbackfn /* , initialValue */) {\n var length = arguments.length;\n return $reduce(this, callbackfn, length, length > 1 ? arguments[1] : undefined);\n }\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/es.array.reduce.js?"); + +/***/ }), + +/***/ "./node_modules/core-js/modules/es.array.reverse.js": +/*!**********************************************************!*\ + !*** ./node_modules/core-js/modules/es.array.reverse.js ***! + \**********************************************************/ +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ \"./node_modules/core-js/internals/function-uncurry-this.js\");\nvar isArray = __webpack_require__(/*! ../internals/is-array */ \"./node_modules/core-js/internals/is-array.js\");\n\nvar nativeReverse = uncurryThis([].reverse);\nvar test = [1, 2];\n\n// `Array.prototype.reverse` method\n// https://tc39.es/ecma262/#sec-array.prototype.reverse\n// fix for Safari 12.0 bug\n// https://bugs.webkit.org/show_bug.cgi?id=188794\n$({ target: 'Array', proto: true, forced: String(test) === String(test.reverse()) }, {\n reverse: function reverse() {\n // eslint-disable-next-line no-self-assign -- dirty hack\n if (isArray(this)) this.length = this.length;\n return nativeReverse(this);\n }\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/es.array.reverse.js?"); + +/***/ }), + /***/ "./node_modules/core-js/modules/es.array.slice.js": /*!********************************************************!*\ !*** ./node_modules/core-js/modules/es.array.slice.js ***! @@ -9564,6 +10313,17 @@ eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/ /***/ }), +/***/ "./node_modules/core-js/modules/es.array.some.js": +/*!*******************************************************!*\ + !*** ./node_modules/core-js/modules/es.array.some.js ***! + \*******************************************************/ +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar $some = (__webpack_require__(/*! ../internals/array-iteration */ \"./node_modules/core-js/internals/array-iteration.js\").some);\nvar arrayMethodIsStrict = __webpack_require__(/*! ../internals/array-method-is-strict */ \"./node_modules/core-js/internals/array-method-is-strict.js\");\n\nvar STRICT_METHOD = arrayMethodIsStrict('some');\n\n// `Array.prototype.some` method\n// https://tc39.es/ecma262/#sec-array.prototype.some\n$({ target: 'Array', proto: true, forced: !STRICT_METHOD }, {\n some: function some(callbackfn /* , thisArg */) {\n return $some(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/es.array.some.js?"); + +/***/ }), + /***/ "./node_modules/core-js/modules/es.array.sort.js": /*!*******************************************************!*\ !*** ./node_modules/core-js/modules/es.array.sort.js ***! @@ -9586,6 +10346,56 @@ eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/ /***/ }), +/***/ "./node_modules/core-js/modules/es.date.now.js": +/*!*****************************************************!*\ + !*** ./node_modules/core-js/modules/es.date.now.js ***! + \*****************************************************/ +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +eval("// TODO: Remove from `core-js@4`\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ \"./node_modules/core-js/internals/function-uncurry-this.js\");\n\nvar $Date = Date;\nvar thisTimeValue = uncurryThis($Date.prototype.getTime);\n\n// `Date.now` method\n// https://tc39.es/ecma262/#sec-date.now\n$({ target: 'Date', stat: true }, {\n now: function now() {\n return thisTimeValue(new $Date());\n }\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/es.date.now.js?"); + +/***/ }), + +/***/ "./node_modules/core-js/modules/es.date.to-iso-string.js": +/*!***************************************************************!*\ + !*** ./node_modules/core-js/modules/es.date.to-iso-string.js ***! + \***************************************************************/ +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +eval("var $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar toISOString = __webpack_require__(/*! ../internals/date-to-iso-string */ \"./node_modules/core-js/internals/date-to-iso-string.js\");\n\n// `Date.prototype.toISOString` method\n// https://tc39.es/ecma262/#sec-date.prototype.toisostring\n// PhantomJS / old WebKit has a broken implementations\n$({ target: 'Date', proto: true, forced: Date.prototype.toISOString !== toISOString }, {\n toISOString: toISOString\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/es.date.to-iso-string.js?"); + +/***/ }), + +/***/ "./node_modules/core-js/modules/es.date.to-primitive.js": +/*!**************************************************************!*\ + !*** ./node_modules/core-js/modules/es.date.to-primitive.js ***! + \**************************************************************/ +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +eval("var hasOwn = __webpack_require__(/*! ../internals/has-own-property */ \"./node_modules/core-js/internals/has-own-property.js\");\nvar defineBuiltIn = __webpack_require__(/*! ../internals/define-built-in */ \"./node_modules/core-js/internals/define-built-in.js\");\nvar dateToPrimitive = __webpack_require__(/*! ../internals/date-to-primitive */ \"./node_modules/core-js/internals/date-to-primitive.js\");\nvar wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js/internals/well-known-symbol.js\");\n\nvar TO_PRIMITIVE = wellKnownSymbol('toPrimitive');\nvar DatePrototype = Date.prototype;\n\n// `Date.prototype[@@toPrimitive]` method\n// https://tc39.es/ecma262/#sec-date.prototype-@@toprimitive\nif (!hasOwn(DatePrototype, TO_PRIMITIVE)) {\n defineBuiltIn(DatePrototype, TO_PRIMITIVE, dateToPrimitive);\n}\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/es.date.to-primitive.js?"); + +/***/ }), + +/***/ "./node_modules/core-js/modules/es.date.to-string.js": +/*!***********************************************************!*\ + !*** ./node_modules/core-js/modules/es.date.to-string.js ***! + \***********************************************************/ +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +eval("// TODO: Remove from `core-js@4`\nvar uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ \"./node_modules/core-js/internals/function-uncurry-this.js\");\nvar defineBuiltIn = __webpack_require__(/*! ../internals/define-built-in */ \"./node_modules/core-js/internals/define-built-in.js\");\n\nvar DatePrototype = Date.prototype;\nvar INVALID_DATE = 'Invalid Date';\nvar TO_STRING = 'toString';\nvar nativeDateToString = uncurryThis(DatePrototype[TO_STRING]);\nvar thisTimeValue = uncurryThis(DatePrototype.getTime);\n\n// `Date.prototype.toString` method\n// https://tc39.es/ecma262/#sec-date.prototype.tostring\nif (String(new Date(NaN)) != INVALID_DATE) {\n defineBuiltIn(DatePrototype, TO_STRING, function toString() {\n var value = thisTimeValue(this);\n // eslint-disable-next-line no-self-compare -- NaN check\n return value === value ? nativeDateToString(this) : INVALID_DATE;\n });\n}\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/es.date.to-string.js?"); + +/***/ }), + +/***/ "./node_modules/core-js/modules/es.function.bind.js": +/*!**********************************************************!*\ + !*** ./node_modules/core-js/modules/es.function.bind.js ***! + \**********************************************************/ +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +eval("// TODO: Remove from `core-js@4`\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar bind = __webpack_require__(/*! ../internals/function-bind */ \"./node_modules/core-js/internals/function-bind.js\");\n\n// `Function.prototype.bind` method\n// https://tc39.es/ecma262/#sec-function.prototype.bind\n$({ target: 'Function', proto: true, forced: Function.bind !== bind }, {\n bind: bind\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/es.function.bind.js?"); + +/***/ }), + /***/ "./node_modules/core-js/modules/es.function.name.js": /*!**********************************************************!*\ !*** ./node_modules/core-js/modules/es.function.name.js ***! @@ -9596,6 +10406,16 @@ eval("var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./ /***/ }), +/***/ "./node_modules/core-js/modules/es.global-this.js": +/*!********************************************************!*\ + !*** ./node_modules/core-js/modules/es.global-this.js ***! + \********************************************************/ +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +eval("var $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js/internals/global.js\");\n\n// `globalThis` object\n// https://tc39.es/ecma262/#sec-globalthis\n$({ global: true, forced: global.globalThis !== global }, {\n globalThis: global\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/es.global-this.js?"); + +/***/ }), + /***/ "./node_modules/core-js/modules/es.json.stringify.js": /*!***********************************************************!*\ !*** ./node_modules/core-js/modules/es.json.stringify.js ***! @@ -9694,7 +10514,7 @@ eval("var $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/co \*************************************************************/ /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { -eval("var $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar parseInt = __webpack_require__(/*! ../internals/number-parse-int */ \"./node_modules/core-js/internals/number-parse-int.js\");\n\n// `Number.parseInt` method\n// https://tc39.es/ecma262/#sec-number.parseint\n// eslint-disable-next-line es-x/no-number-parseint -- required for testing\n$({ target: 'Number', stat: true, forced: Number.parseInt != parseInt }, {\n parseInt: parseInt\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/es.number.parse-int.js?"); +eval("var $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar parseInt = __webpack_require__(/*! ../internals/number-parse-int */ \"./node_modules/core-js/internals/number-parse-int.js\");\n\n// `Number.parseInt` method\n// https://tc39.es/ecma262/#sec-number.parseint\n// eslint-disable-next-line es/no-number-parseint -- required for testing\n$({ target: 'Number', stat: true, forced: Number.parseInt != parseInt }, {\n parseInt: parseInt\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/es.number.parse-int.js?"); /***/ }), @@ -9715,7 +10535,17 @@ eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/ \**********************************************************/ /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { -eval("var $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar assign = __webpack_require__(/*! ../internals/object-assign */ \"./node_modules/core-js/internals/object-assign.js\");\n\n// `Object.assign` method\n// https://tc39.es/ecma262/#sec-object.assign\n// eslint-disable-next-line es-x/no-object-assign -- required for testing\n$({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {\n assign: assign\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/es.object.assign.js?"); +eval("var $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar assign = __webpack_require__(/*! ../internals/object-assign */ \"./node_modules/core-js/internals/object-assign.js\");\n\n// `Object.assign` method\n// https://tc39.es/ecma262/#sec-object.assign\n// eslint-disable-next-line es/no-object-assign -- required for testing\n$({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {\n assign: assign\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/es.object.assign.js?"); + +/***/ }), + +/***/ "./node_modules/core-js/modules/es.object.create.js": +/*!**********************************************************!*\ + !*** ./node_modules/core-js/modules/es.object.create.js ***! + \**********************************************************/ +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +eval("// TODO: Remove from `core-js@4`\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./node_modules/core-js/internals/descriptors.js\");\nvar create = __webpack_require__(/*! ../internals/object-create */ \"./node_modules/core-js/internals/object-create.js\");\n\n// `Object.create` method\n// https://tc39.es/ecma262/#sec-object.create\n$({ target: 'Object', stat: true, sham: !DESCRIPTORS }, {\n create: create\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/es.object.create.js?"); /***/ }), @@ -9730,6 +10560,26 @@ eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/ /***/ }), +/***/ "./node_modules/core-js/modules/es.object.define-properties.js": +/*!*********************************************************************!*\ + !*** ./node_modules/core-js/modules/es.object.define-properties.js ***! + \*********************************************************************/ +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +eval("var $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./node_modules/core-js/internals/descriptors.js\");\nvar defineProperties = (__webpack_require__(/*! ../internals/object-define-properties */ \"./node_modules/core-js/internals/object-define-properties.js\").f);\n\n// `Object.defineProperties` method\n// https://tc39.es/ecma262/#sec-object.defineproperties\n// eslint-disable-next-line es/no-object-defineproperties -- safe\n$({ target: 'Object', stat: true, forced: Object.defineProperties !== defineProperties, sham: !DESCRIPTORS }, {\n defineProperties: defineProperties\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/es.object.define-properties.js?"); + +/***/ }), + +/***/ "./node_modules/core-js/modules/es.object.define-property.js": +/*!*******************************************************************!*\ + !*** ./node_modules/core-js/modules/es.object.define-property.js ***! + \*******************************************************************/ +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +eval("var $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./node_modules/core-js/internals/descriptors.js\");\nvar defineProperty = (__webpack_require__(/*! ../internals/object-define-property */ \"./node_modules/core-js/internals/object-define-property.js\").f);\n\n// `Object.defineProperty` method\n// https://tc39.es/ecma262/#sec-object.defineproperty\n// eslint-disable-next-line es/no-object-defineproperty -- safe\n$({ target: 'Object', stat: true, forced: Object.defineProperty !== defineProperty, sham: !DESCRIPTORS }, {\n defineProperty: defineProperty\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/es.object.define-property.js?"); + +/***/ }), + /***/ "./node_modules/core-js/modules/es.object.define-setter.js": /*!*****************************************************************!*\ !*** ./node_modules/core-js/modules/es.object.define-setter.js ***! @@ -9801,6 +10651,16 @@ eval("var $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/co /***/ }), +/***/ "./node_modules/core-js/modules/es.object.set-prototype-of.js": +/*!********************************************************************!*\ + !*** ./node_modules/core-js/modules/es.object.set-prototype-of.js ***! + \********************************************************************/ +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +eval("var $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar setPrototypeOf = __webpack_require__(/*! ../internals/object-set-prototype-of */ \"./node_modules/core-js/internals/object-set-prototype-of.js\");\n\n// `Object.setPrototypeOf` method\n// https://tc39.es/ecma262/#sec-object.setprototypeof\n$({ target: 'Object', stat: true }, {\n setPrototypeOf: setPrototypeOf\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/es.object.set-prototype-of.js?"); + +/***/ }), + /***/ "./node_modules/core-js/modules/es.object.to-string.js": /*!*************************************************************!*\ !*** ./node_modules/core-js/modules/es.object.to-string.js ***! @@ -9821,6 +10681,26 @@ eval("var $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/co /***/ }), +/***/ "./node_modules/core-js/modules/es.parse-float.js": +/*!********************************************************!*\ + !*** ./node_modules/core-js/modules/es.parse-float.js ***! + \********************************************************/ +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +eval("var $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar $parseFloat = __webpack_require__(/*! ../internals/number-parse-float */ \"./node_modules/core-js/internals/number-parse-float.js\");\n\n// `parseFloat` method\n// https://tc39.es/ecma262/#sec-parsefloat-string\n$({ global: true, forced: parseFloat != $parseFloat }, {\n parseFloat: $parseFloat\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/es.parse-float.js?"); + +/***/ }), + +/***/ "./node_modules/core-js/modules/es.parse-int.js": +/*!******************************************************!*\ + !*** ./node_modules/core-js/modules/es.parse-int.js ***! + \******************************************************/ +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +eval("var $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar $parseInt = __webpack_require__(/*! ../internals/number-parse-int */ \"./node_modules/core-js/internals/number-parse-int.js\");\n\n// `parseInt` method\n// https://tc39.es/ecma262/#sec-parseint-string-radix\n$({ global: true, forced: parseInt != $parseInt }, {\n parseInt: $parseInt\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/es.parse-int.js?"); + +/***/ }), + /***/ "./node_modules/core-js/modules/es.promise.all.js": /*!********************************************************!*\ !*** ./node_modules/core-js/modules/es.promise.all.js ***! @@ -9934,7 +10814,7 @@ eval("var $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/co \********************************************************/ /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { -eval("var $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar call = __webpack_require__(/*! ../internals/function-call */ \"./node_modules/core-js/internals/function-call.js\");\nvar anObject = __webpack_require__(/*! ../internals/an-object */ \"./node_modules/core-js/internals/an-object.js\");\nvar isObject = __webpack_require__(/*! ../internals/is-object */ \"./node_modules/core-js/internals/is-object.js\");\nvar isDataDescriptor = __webpack_require__(/*! ../internals/is-data-descriptor */ \"./node_modules/core-js/internals/is-data-descriptor.js\");\nvar fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\nvar definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ \"./node_modules/core-js/internals/object-define-property.js\");\nvar getOwnPropertyDescriptorModule = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ \"./node_modules/core-js/internals/object-get-own-property-descriptor.js\");\nvar getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ \"./node_modules/core-js/internals/object-get-prototype-of.js\");\nvar createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ \"./node_modules/core-js/internals/create-property-descriptor.js\");\n\n// `Reflect.set` method\n// https://tc39.es/ecma262/#sec-reflect.set\nfunction set(target, propertyKey, V /* , receiver */) {\n var receiver = arguments.length < 4 ? target : arguments[3];\n var ownDescriptor = getOwnPropertyDescriptorModule.f(anObject(target), propertyKey);\n var existingDescriptor, prototype, setter;\n if (!ownDescriptor) {\n if (isObject(prototype = getPrototypeOf(target))) {\n return set(prototype, propertyKey, V, receiver);\n }\n ownDescriptor = createPropertyDescriptor(0);\n }\n if (isDataDescriptor(ownDescriptor)) {\n if (ownDescriptor.writable === false || !isObject(receiver)) return false;\n if (existingDescriptor = getOwnPropertyDescriptorModule.f(receiver, propertyKey)) {\n if (existingDescriptor.get || existingDescriptor.set || existingDescriptor.writable === false) return false;\n existingDescriptor.value = V;\n definePropertyModule.f(receiver, propertyKey, existingDescriptor);\n } else definePropertyModule.f(receiver, propertyKey, createPropertyDescriptor(0, V));\n } else {\n setter = ownDescriptor.set;\n if (setter === undefined) return false;\n call(setter, receiver, V);\n } return true;\n}\n\n// MS Edge 17-18 Reflect.set allows setting the property to object\n// with non-writable property on the prototype\nvar MS_EDGE_BUG = fails(function () {\n var Constructor = function () { /* empty */ };\n var object = definePropertyModule.f(new Constructor(), 'a', { configurable: true });\n // eslint-disable-next-line es-x/no-reflect -- required for testing\n return Reflect.set(Constructor.prototype, 'a', 1, object) !== false;\n});\n\n$({ target: 'Reflect', stat: true, forced: MS_EDGE_BUG }, {\n set: set\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/es.reflect.set.js?"); +eval("var $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar call = __webpack_require__(/*! ../internals/function-call */ \"./node_modules/core-js/internals/function-call.js\");\nvar anObject = __webpack_require__(/*! ../internals/an-object */ \"./node_modules/core-js/internals/an-object.js\");\nvar isObject = __webpack_require__(/*! ../internals/is-object */ \"./node_modules/core-js/internals/is-object.js\");\nvar isDataDescriptor = __webpack_require__(/*! ../internals/is-data-descriptor */ \"./node_modules/core-js/internals/is-data-descriptor.js\");\nvar fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\nvar definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ \"./node_modules/core-js/internals/object-define-property.js\");\nvar getOwnPropertyDescriptorModule = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ \"./node_modules/core-js/internals/object-get-own-property-descriptor.js\");\nvar getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ \"./node_modules/core-js/internals/object-get-prototype-of.js\");\nvar createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ \"./node_modules/core-js/internals/create-property-descriptor.js\");\n\n// `Reflect.set` method\n// https://tc39.es/ecma262/#sec-reflect.set\nfunction set(target, propertyKey, V /* , receiver */) {\n var receiver = arguments.length < 4 ? target : arguments[3];\n var ownDescriptor = getOwnPropertyDescriptorModule.f(anObject(target), propertyKey);\n var existingDescriptor, prototype, setter;\n if (!ownDescriptor) {\n if (isObject(prototype = getPrototypeOf(target))) {\n return set(prototype, propertyKey, V, receiver);\n }\n ownDescriptor = createPropertyDescriptor(0);\n }\n if (isDataDescriptor(ownDescriptor)) {\n if (ownDescriptor.writable === false || !isObject(receiver)) return false;\n if (existingDescriptor = getOwnPropertyDescriptorModule.f(receiver, propertyKey)) {\n if (existingDescriptor.get || existingDescriptor.set || existingDescriptor.writable === false) return false;\n existingDescriptor.value = V;\n definePropertyModule.f(receiver, propertyKey, existingDescriptor);\n } else definePropertyModule.f(receiver, propertyKey, createPropertyDescriptor(0, V));\n } else {\n setter = ownDescriptor.set;\n if (setter === undefined) return false;\n call(setter, receiver, V);\n } return true;\n}\n\n// MS Edge 17-18 Reflect.set allows setting the property to object\n// with non-writable property on the prototype\nvar MS_EDGE_BUG = fails(function () {\n var Constructor = function () { /* empty */ };\n var object = definePropertyModule.f(new Constructor(), 'a', { configurable: true });\n // eslint-disable-next-line es/no-reflect -- required for testing\n return Reflect.set(Constructor.prototype, 'a', 1, object) !== false;\n});\n\n$({ target: 'Reflect', stat: true, forced: MS_EDGE_BUG }, {\n set: set\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/es.reflect.set.js?"); /***/ }), @@ -9965,7 +10845,7 @@ eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/ \*********************************************************/ /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { -eval("var global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js/internals/global.js\");\nvar DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./node_modules/core-js/internals/descriptors.js\");\nvar defineBuiltInAccessor = __webpack_require__(/*! ../internals/define-built-in-accessor */ \"./node_modules/core-js/internals/define-built-in-accessor.js\");\nvar regExpFlags = __webpack_require__(/*! ../internals/regexp-flags */ \"./node_modules/core-js/internals/regexp-flags.js\");\nvar fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\n\n// babel-minify and Closure Compiler transpiles RegExp('.', 'd') -> /./d and it causes SyntaxError\nvar RegExp = global.RegExp;\nvar RegExpPrototype = RegExp.prototype;\n\nvar FORCED = DESCRIPTORS && fails(function () {\n var INDICES_SUPPORT = true;\n try {\n RegExp('.', 'd');\n } catch (error) {\n INDICES_SUPPORT = false;\n }\n\n var O = {};\n // modern V8 bug\n var calls = '';\n var expected = INDICES_SUPPORT ? 'dgimsy' : 'gimsy';\n\n var addGetter = function (key, chr) {\n // eslint-disable-next-line es-x/no-object-defineproperty -- safe\n Object.defineProperty(O, key, { get: function () {\n calls += chr;\n return true;\n } });\n };\n\n var pairs = {\n dotAll: 's',\n global: 'g',\n ignoreCase: 'i',\n multiline: 'm',\n sticky: 'y'\n };\n\n if (INDICES_SUPPORT) pairs.hasIndices = 'd';\n\n for (var key in pairs) addGetter(key, pairs[key]);\n\n // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe\n var result = Object.getOwnPropertyDescriptor(RegExpPrototype, 'flags').get.call(O);\n\n return result !== expected || calls !== expected;\n});\n\n// `RegExp.prototype.flags` getter\n// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags\nif (FORCED) defineBuiltInAccessor(RegExpPrototype, 'flags', {\n configurable: true,\n get: regExpFlags\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/es.regexp.flags.js?"); +eval("var global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js/internals/global.js\");\nvar DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./node_modules/core-js/internals/descriptors.js\");\nvar defineBuiltInAccessor = __webpack_require__(/*! ../internals/define-built-in-accessor */ \"./node_modules/core-js/internals/define-built-in-accessor.js\");\nvar regExpFlags = __webpack_require__(/*! ../internals/regexp-flags */ \"./node_modules/core-js/internals/regexp-flags.js\");\nvar fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\n\n// babel-minify and Closure Compiler transpiles RegExp('.', 'd') -> /./d and it causes SyntaxError\nvar RegExp = global.RegExp;\nvar RegExpPrototype = RegExp.prototype;\n\nvar FORCED = DESCRIPTORS && fails(function () {\n var INDICES_SUPPORT = true;\n try {\n RegExp('.', 'd');\n } catch (error) {\n INDICES_SUPPORT = false;\n }\n\n var O = {};\n // modern V8 bug\n var calls = '';\n var expected = INDICES_SUPPORT ? 'dgimsy' : 'gimsy';\n\n var addGetter = function (key, chr) {\n // eslint-disable-next-line es/no-object-defineproperty -- safe\n Object.defineProperty(O, key, { get: function () {\n calls += chr;\n return true;\n } });\n };\n\n var pairs = {\n dotAll: 's',\n global: 'g',\n ignoreCase: 'i',\n multiline: 'm',\n sticky: 'y'\n };\n\n if (INDICES_SUPPORT) pairs.hasIndices = 'd';\n\n for (var key in pairs) addGetter(key, pairs[key]);\n\n // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\n var result = Object.getOwnPropertyDescriptor(RegExpPrototype, 'flags').get.call(O);\n\n return result !== expected || calls !== expected;\n});\n\n// `RegExp.prototype.flags` getter\n// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags\nif (FORCED) defineBuiltInAccessor(RegExpPrototype, 'flags', {\n configurable: true,\n get: regExpFlags\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/es.regexp.flags.js?"); /***/ }), @@ -9980,6 +10860,17 @@ eval("\nvar PROPER_FUNCTION_NAME = (__webpack_require__(/*! ../internals/functio /***/ }), +/***/ "./node_modules/core-js/modules/es.string.ends-with.js": +/*!*************************************************************!*\ + !*** ./node_modules/core-js/modules/es.string.ends-with.js ***! + \*************************************************************/ +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this-clause */ \"./node_modules/core-js/internals/function-uncurry-this-clause.js\");\nvar getOwnPropertyDescriptor = (__webpack_require__(/*! ../internals/object-get-own-property-descriptor */ \"./node_modules/core-js/internals/object-get-own-property-descriptor.js\").f);\nvar toLength = __webpack_require__(/*! ../internals/to-length */ \"./node_modules/core-js/internals/to-length.js\");\nvar toString = __webpack_require__(/*! ../internals/to-string */ \"./node_modules/core-js/internals/to-string.js\");\nvar notARegExp = __webpack_require__(/*! ../internals/not-a-regexp */ \"./node_modules/core-js/internals/not-a-regexp.js\");\nvar requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ \"./node_modules/core-js/internals/require-object-coercible.js\");\nvar correctIsRegExpLogic = __webpack_require__(/*! ../internals/correct-is-regexp-logic */ \"./node_modules/core-js/internals/correct-is-regexp-logic.js\");\nvar IS_PURE = __webpack_require__(/*! ../internals/is-pure */ \"./node_modules/core-js/internals/is-pure.js\");\n\n// eslint-disable-next-line es/no-string-prototype-endswith -- safe\nvar nativeEndsWith = uncurryThis(''.endsWith);\nvar slice = uncurryThis(''.slice);\nvar min = Math.min;\n\nvar CORRECT_IS_REGEXP_LOGIC = correctIsRegExpLogic('endsWith');\n// https://github.com/zloirock/core-js/pull/702\nvar MDN_POLYFILL_BUG = !IS_PURE && !CORRECT_IS_REGEXP_LOGIC && !!function () {\n var descriptor = getOwnPropertyDescriptor(String.prototype, 'endsWith');\n return descriptor && !descriptor.writable;\n}();\n\n// `String.prototype.endsWith` method\n// https://tc39.es/ecma262/#sec-string.prototype.endswith\n$({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {\n endsWith: function endsWith(searchString /* , endPosition = @length */) {\n var that = toString(requireObjectCoercible(this));\n notARegExp(searchString);\n var endPosition = arguments.length > 1 ? arguments[1] : undefined;\n var len = that.length;\n var end = endPosition === undefined ? len : min(toLength(endPosition), len);\n var search = toString(searchString);\n return nativeEndsWith\n ? nativeEndsWith(that, search, end)\n : slice(that, end - search.length, end) === search;\n }\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/es.string.ends-with.js?"); + +/***/ }), + /***/ "./node_modules/core-js/modules/es.string.includes.js": /*!************************************************************!*\ !*** ./node_modules/core-js/modules/es.string.includes.js ***! @@ -10034,6 +10925,17 @@ eval("var $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/co /***/ }), +/***/ "./node_modules/core-js/modules/es.string.replace-all.js": +/*!***************************************************************!*\ + !*** ./node_modules/core-js/modules/es.string.replace-all.js ***! + \***************************************************************/ +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar call = __webpack_require__(/*! ../internals/function-call */ \"./node_modules/core-js/internals/function-call.js\");\nvar uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ \"./node_modules/core-js/internals/function-uncurry-this.js\");\nvar requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ \"./node_modules/core-js/internals/require-object-coercible.js\");\nvar isCallable = __webpack_require__(/*! ../internals/is-callable */ \"./node_modules/core-js/internals/is-callable.js\");\nvar isNullOrUndefined = __webpack_require__(/*! ../internals/is-null-or-undefined */ \"./node_modules/core-js/internals/is-null-or-undefined.js\");\nvar isRegExp = __webpack_require__(/*! ../internals/is-regexp */ \"./node_modules/core-js/internals/is-regexp.js\");\nvar toString = __webpack_require__(/*! ../internals/to-string */ \"./node_modules/core-js/internals/to-string.js\");\nvar getMethod = __webpack_require__(/*! ../internals/get-method */ \"./node_modules/core-js/internals/get-method.js\");\nvar getRegExpFlags = __webpack_require__(/*! ../internals/regexp-get-flags */ \"./node_modules/core-js/internals/regexp-get-flags.js\");\nvar getSubstitution = __webpack_require__(/*! ../internals/get-substitution */ \"./node_modules/core-js/internals/get-substitution.js\");\nvar wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js/internals/well-known-symbol.js\");\nvar IS_PURE = __webpack_require__(/*! ../internals/is-pure */ \"./node_modules/core-js/internals/is-pure.js\");\n\nvar REPLACE = wellKnownSymbol('replace');\nvar $TypeError = TypeError;\nvar indexOf = uncurryThis(''.indexOf);\nvar replace = uncurryThis(''.replace);\nvar stringSlice = uncurryThis(''.slice);\nvar max = Math.max;\n\nvar stringIndexOf = function (string, searchValue, fromIndex) {\n if (fromIndex > string.length) return -1;\n if (searchValue === '') return fromIndex;\n return indexOf(string, searchValue, fromIndex);\n};\n\n// `String.prototype.replaceAll` method\n// https://tc39.es/ecma262/#sec-string.prototype.replaceall\n$({ target: 'String', proto: true }, {\n replaceAll: function replaceAll(searchValue, replaceValue) {\n var O = requireObjectCoercible(this);\n var IS_REG_EXP, flags, replacer, string, searchString, functionalReplace, searchLength, advanceBy, replacement;\n var position = 0;\n var endOfLastMatch = 0;\n var result = '';\n if (!isNullOrUndefined(searchValue)) {\n IS_REG_EXP = isRegExp(searchValue);\n if (IS_REG_EXP) {\n flags = toString(requireObjectCoercible(getRegExpFlags(searchValue)));\n if (!~indexOf(flags, 'g')) throw $TypeError('`.replaceAll` does not allow non-global regexes');\n }\n replacer = getMethod(searchValue, REPLACE);\n if (replacer) {\n return call(replacer, searchValue, O, replaceValue);\n } else if (IS_PURE && IS_REG_EXP) {\n return replace(toString(O), searchValue, replaceValue);\n }\n }\n string = toString(O);\n searchString = toString(searchValue);\n functionalReplace = isCallable(replaceValue);\n if (!functionalReplace) replaceValue = toString(replaceValue);\n searchLength = searchString.length;\n advanceBy = max(1, searchLength);\n position = stringIndexOf(string, searchString, 0);\n while (position !== -1) {\n replacement = functionalReplace\n ? toString(replaceValue(searchString, position, string))\n : getSubstitution(searchString, string, position, [], undefined, replaceValue);\n result += stringSlice(string, endOfLastMatch, position) + replacement;\n endOfLastMatch = position + searchLength;\n position = stringIndexOf(string, searchString, position + advanceBy);\n }\n if (endOfLastMatch < string.length) {\n result += stringSlice(string, endOfLastMatch);\n }\n return result;\n }\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/es.string.replace-all.js?"); + +/***/ }), + /***/ "./node_modules/core-js/modules/es.string.replace.js": /*!***********************************************************!*\ !*** ./node_modules/core-js/modules/es.string.replace.js ***! @@ -10074,7 +10976,7 @@ eval("\nvar apply = __webpack_require__(/*! ../internals/function-apply */ \"./n /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; -eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ \"./node_modules/core-js/internals/function-uncurry-this.js\");\nvar getOwnPropertyDescriptor = (__webpack_require__(/*! ../internals/object-get-own-property-descriptor */ \"./node_modules/core-js/internals/object-get-own-property-descriptor.js\").f);\nvar toLength = __webpack_require__(/*! ../internals/to-length */ \"./node_modules/core-js/internals/to-length.js\");\nvar toString = __webpack_require__(/*! ../internals/to-string */ \"./node_modules/core-js/internals/to-string.js\");\nvar notARegExp = __webpack_require__(/*! ../internals/not-a-regexp */ \"./node_modules/core-js/internals/not-a-regexp.js\");\nvar requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ \"./node_modules/core-js/internals/require-object-coercible.js\");\nvar correctIsRegExpLogic = __webpack_require__(/*! ../internals/correct-is-regexp-logic */ \"./node_modules/core-js/internals/correct-is-regexp-logic.js\");\nvar IS_PURE = __webpack_require__(/*! ../internals/is-pure */ \"./node_modules/core-js/internals/is-pure.js\");\n\n// eslint-disable-next-line es-x/no-string-prototype-startswith -- safe\nvar nativeStartsWith = uncurryThis(''.startsWith);\nvar stringSlice = uncurryThis(''.slice);\nvar min = Math.min;\n\nvar CORRECT_IS_REGEXP_LOGIC = correctIsRegExpLogic('startsWith');\n// https://github.com/zloirock/core-js/pull/702\nvar MDN_POLYFILL_BUG = !IS_PURE && !CORRECT_IS_REGEXP_LOGIC && !!function () {\n var descriptor = getOwnPropertyDescriptor(String.prototype, 'startsWith');\n return descriptor && !descriptor.writable;\n}();\n\n// `String.prototype.startsWith` method\n// https://tc39.es/ecma262/#sec-string.prototype.startswith\n$({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {\n startsWith: function startsWith(searchString /* , position = 0 */) {\n var that = toString(requireObjectCoercible(this));\n notARegExp(searchString);\n var index = toLength(min(arguments.length > 1 ? arguments[1] : undefined, that.length));\n var search = toString(searchString);\n return nativeStartsWith\n ? nativeStartsWith(that, search, index)\n : stringSlice(that, index, index + search.length) === search;\n }\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/es.string.starts-with.js?"); +eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this-clause */ \"./node_modules/core-js/internals/function-uncurry-this-clause.js\");\nvar getOwnPropertyDescriptor = (__webpack_require__(/*! ../internals/object-get-own-property-descriptor */ \"./node_modules/core-js/internals/object-get-own-property-descriptor.js\").f);\nvar toLength = __webpack_require__(/*! ../internals/to-length */ \"./node_modules/core-js/internals/to-length.js\");\nvar toString = __webpack_require__(/*! ../internals/to-string */ \"./node_modules/core-js/internals/to-string.js\");\nvar notARegExp = __webpack_require__(/*! ../internals/not-a-regexp */ \"./node_modules/core-js/internals/not-a-regexp.js\");\nvar requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ \"./node_modules/core-js/internals/require-object-coercible.js\");\nvar correctIsRegExpLogic = __webpack_require__(/*! ../internals/correct-is-regexp-logic */ \"./node_modules/core-js/internals/correct-is-regexp-logic.js\");\nvar IS_PURE = __webpack_require__(/*! ../internals/is-pure */ \"./node_modules/core-js/internals/is-pure.js\");\n\n// eslint-disable-next-line es/no-string-prototype-startswith -- safe\nvar nativeStartsWith = uncurryThis(''.startsWith);\nvar stringSlice = uncurryThis(''.slice);\nvar min = Math.min;\n\nvar CORRECT_IS_REGEXP_LOGIC = correctIsRegExpLogic('startsWith');\n// https://github.com/zloirock/core-js/pull/702\nvar MDN_POLYFILL_BUG = !IS_PURE && !CORRECT_IS_REGEXP_LOGIC && !!function () {\n var descriptor = getOwnPropertyDescriptor(String.prototype, 'startsWith');\n return descriptor && !descriptor.writable;\n}();\n\n// `String.prototype.startsWith` method\n// https://tc39.es/ecma262/#sec-string.prototype.startswith\n$({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {\n startsWith: function startsWith(searchString /* , position = 0 */) {\n var that = toString(requireObjectCoercible(this));\n notARegExp(searchString);\n var index = toLength(min(arguments.length > 1 ? arguments[1] : undefined, that.length));\n var search = toString(searchString);\n return nativeStartsWith\n ? nativeStartsWith(that, search, index)\n : stringSlice(that, index, index + search.length) === search;\n }\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/es.string.starts-with.js?"); /***/ }), @@ -10161,6 +11063,16 @@ eval("var $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/co /***/ }), +/***/ "./node_modules/core-js/modules/es.symbol.to-primitive.js": +/*!****************************************************************!*\ + !*** ./node_modules/core-js/modules/es.symbol.to-primitive.js ***! + \****************************************************************/ +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +eval("var defineWellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol-define */ \"./node_modules/core-js/internals/well-known-symbol-define.js\");\nvar defineSymbolToPrimitive = __webpack_require__(/*! ../internals/symbol-define-to-primitive */ \"./node_modules/core-js/internals/symbol-define-to-primitive.js\");\n\n// `Symbol.toPrimitive` well-known symbol\n// https://tc39.es/ecma262/#sec-symbol.toprimitive\ndefineWellKnownSymbol('toPrimitive');\n\n// `Symbol.prototype[@@toPrimitive]` method\n// https://tc39.es/ecma262/#sec-symbol.prototype-@@toprimitive\ndefineSymbolToPrimitive();\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/es.symbol.to-primitive.js?"); + +/***/ }), + /***/ "./node_modules/core-js/modules/es.symbol.to-string-tag.js": /*!*****************************************************************!*\ !*** ./node_modules/core-js/modules/es.symbol.to-string-tag.js ***! @@ -10200,7 +11112,7 @@ eval("\nvar ArrayBufferViewCore = __webpack_require__(/*! ../internals/array-buf /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; -eval("\nvar ArrayBufferViewCore = __webpack_require__(/*! ../internals/array-buffer-view-core */ \"./node_modules/core-js/internals/array-buffer-view-core.js\");\nvar $fill = __webpack_require__(/*! ../internals/array-fill */ \"./node_modules/core-js/internals/array-fill.js\");\nvar toBigInt = __webpack_require__(/*! ../internals/to-big-int */ \"./node_modules/core-js/internals/to-big-int.js\");\nvar classof = __webpack_require__(/*! ../internals/classof */ \"./node_modules/core-js/internals/classof.js\");\nvar call = __webpack_require__(/*! ../internals/function-call */ \"./node_modules/core-js/internals/function-call.js\");\nvar uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ \"./node_modules/core-js/internals/function-uncurry-this.js\");\nvar fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar slice = uncurryThis(''.slice);\n\n// V8 ~ Chrome < 59, Safari < 14.1, FF < 55, Edge <=18\nvar CONVERSION_BUG = fails(function () {\n var count = 0;\n // eslint-disable-next-line es-x/no-typed-arrays -- safe\n new Int8Array(2).fill({ valueOf: function () { return count++; } });\n return count !== 1;\n});\n\n// `%TypedArray%.prototype.fill` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.fill\nexportTypedArrayMethod('fill', function fill(value /* , start, end */) {\n var length = arguments.length;\n aTypedArray(this);\n var actualValue = slice(classof(this), 0, 3) === 'Big' ? toBigInt(value) : +value;\n return call($fill, this, actualValue, length > 1 ? arguments[1] : undefined, length > 2 ? arguments[2] : undefined);\n}, CONVERSION_BUG);\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/es.typed-array.fill.js?"); +eval("\nvar ArrayBufferViewCore = __webpack_require__(/*! ../internals/array-buffer-view-core */ \"./node_modules/core-js/internals/array-buffer-view-core.js\");\nvar $fill = __webpack_require__(/*! ../internals/array-fill */ \"./node_modules/core-js/internals/array-fill.js\");\nvar toBigInt = __webpack_require__(/*! ../internals/to-big-int */ \"./node_modules/core-js/internals/to-big-int.js\");\nvar classof = __webpack_require__(/*! ../internals/classof */ \"./node_modules/core-js/internals/classof.js\");\nvar call = __webpack_require__(/*! ../internals/function-call */ \"./node_modules/core-js/internals/function-call.js\");\nvar uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ \"./node_modules/core-js/internals/function-uncurry-this.js\");\nvar fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar slice = uncurryThis(''.slice);\n\n// V8 ~ Chrome < 59, Safari < 14.1, FF < 55, Edge <=18\nvar CONVERSION_BUG = fails(function () {\n var count = 0;\n // eslint-disable-next-line es/no-typed-arrays -- safe\n new Int8Array(2).fill({ valueOf: function () { return count++; } });\n return count !== 1;\n});\n\n// `%TypedArray%.prototype.fill` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.fill\nexportTypedArrayMethod('fill', function fill(value /* , start, end */) {\n var length = arguments.length;\n aTypedArray(this);\n var actualValue = slice(classof(this), 0, 3) === 'Big' ? toBigInt(value) : +value;\n return call($fill, this, actualValue, length > 1 ? arguments[1] : undefined, length > 2 ? arguments[2] : undefined);\n}, CONVERSION_BUG);\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/es.typed-array.fill.js?"); /***/ }), @@ -10354,7 +11266,7 @@ eval("\nvar ArrayBufferViewCore = __webpack_require__(/*! ../internals/array-buf /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; -eval("\nvar global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js/internals/global.js\");\nvar call = __webpack_require__(/*! ../internals/function-call */ \"./node_modules/core-js/internals/function-call.js\");\nvar ArrayBufferViewCore = __webpack_require__(/*! ../internals/array-buffer-view-core */ \"./node_modules/core-js/internals/array-buffer-view-core.js\");\nvar lengthOfArrayLike = __webpack_require__(/*! ../internals/length-of-array-like */ \"./node_modules/core-js/internals/length-of-array-like.js\");\nvar toOffset = __webpack_require__(/*! ../internals/to-offset */ \"./node_modules/core-js/internals/to-offset.js\");\nvar toIndexedObject = __webpack_require__(/*! ../internals/to-object */ \"./node_modules/core-js/internals/to-object.js\");\nvar fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\n\nvar RangeError = global.RangeError;\nvar Int8Array = global.Int8Array;\nvar Int8ArrayPrototype = Int8Array && Int8Array.prototype;\nvar $set = Int8ArrayPrototype && Int8ArrayPrototype.set;\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\nvar WORKS_WITH_OBJECTS_AND_GEERIC_ON_TYPED_ARRAYS = !fails(function () {\n // eslint-disable-next-line es-x/no-typed-arrays -- required for testing\n var array = new Uint8ClampedArray(2);\n call($set, array, { length: 1, 0: 3 }, 1);\n return array[1] !== 3;\n});\n\n// https://bugs.chromium.org/p/v8/issues/detail?id=11294 and other\nvar TO_OBJECT_BUG = WORKS_WITH_OBJECTS_AND_GEERIC_ON_TYPED_ARRAYS && ArrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS && fails(function () {\n var array = new Int8Array(2);\n array.set(1);\n array.set('2', 1);\n return array[0] !== 0 || array[1] !== 2;\n});\n\n// `%TypedArray%.prototype.set` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.set\nexportTypedArrayMethod('set', function set(arrayLike /* , offset */) {\n aTypedArray(this);\n var offset = toOffset(arguments.length > 1 ? arguments[1] : undefined, 1);\n var src = toIndexedObject(arrayLike);\n if (WORKS_WITH_OBJECTS_AND_GEERIC_ON_TYPED_ARRAYS) return call($set, this, src, offset);\n var length = this.length;\n var len = lengthOfArrayLike(src);\n var index = 0;\n if (len + offset > length) throw RangeError('Wrong length');\n while (index < len) this[offset + index] = src[index++];\n}, !WORKS_WITH_OBJECTS_AND_GEERIC_ON_TYPED_ARRAYS || TO_OBJECT_BUG);\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/es.typed-array.set.js?"); +eval("\nvar global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js/internals/global.js\");\nvar call = __webpack_require__(/*! ../internals/function-call */ \"./node_modules/core-js/internals/function-call.js\");\nvar ArrayBufferViewCore = __webpack_require__(/*! ../internals/array-buffer-view-core */ \"./node_modules/core-js/internals/array-buffer-view-core.js\");\nvar lengthOfArrayLike = __webpack_require__(/*! ../internals/length-of-array-like */ \"./node_modules/core-js/internals/length-of-array-like.js\");\nvar toOffset = __webpack_require__(/*! ../internals/to-offset */ \"./node_modules/core-js/internals/to-offset.js\");\nvar toIndexedObject = __webpack_require__(/*! ../internals/to-object */ \"./node_modules/core-js/internals/to-object.js\");\nvar fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\n\nvar RangeError = global.RangeError;\nvar Int8Array = global.Int8Array;\nvar Int8ArrayPrototype = Int8Array && Int8Array.prototype;\nvar $set = Int8ArrayPrototype && Int8ArrayPrototype.set;\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\nvar WORKS_WITH_OBJECTS_AND_GEERIC_ON_TYPED_ARRAYS = !fails(function () {\n // eslint-disable-next-line es/no-typed-arrays -- required for testing\n var array = new Uint8ClampedArray(2);\n call($set, array, { length: 1, 0: 3 }, 1);\n return array[1] !== 3;\n});\n\n// https://bugs.chromium.org/p/v8/issues/detail?id=11294 and other\nvar TO_OBJECT_BUG = WORKS_WITH_OBJECTS_AND_GEERIC_ON_TYPED_ARRAYS && ArrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS && fails(function () {\n var array = new Int8Array(2);\n array.set(1);\n array.set('2', 1);\n return array[0] !== 0 || array[1] !== 2;\n});\n\n// `%TypedArray%.prototype.set` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.set\nexportTypedArrayMethod('set', function set(arrayLike /* , offset */) {\n aTypedArray(this);\n var offset = toOffset(arguments.length > 1 ? arguments[1] : undefined, 1);\n var src = toIndexedObject(arrayLike);\n if (WORKS_WITH_OBJECTS_AND_GEERIC_ON_TYPED_ARRAYS) return call($set, this, src, offset);\n var length = this.length;\n var len = lengthOfArrayLike(src);\n var index = 0;\n if (len + offset > length) throw RangeError('Wrong length');\n while (index < len) this[offset + index] = src[index++];\n}, !WORKS_WITH_OBJECTS_AND_GEERIC_ON_TYPED_ARRAYS || TO_OBJECT_BUG);\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/es.typed-array.set.js?"); /***/ }), @@ -10365,7 +11277,7 @@ eval("\nvar global = __webpack_require__(/*! ../internals/global */ \"./node_mod /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; -eval("\nvar ArrayBufferViewCore = __webpack_require__(/*! ../internals/array-buffer-view-core */ \"./node_modules/core-js/internals/array-buffer-view-core.js\");\nvar typedArraySpeciesConstructor = __webpack_require__(/*! ../internals/typed-array-species-constructor */ \"./node_modules/core-js/internals/typed-array-species-constructor.js\");\nvar fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\nvar arraySlice = __webpack_require__(/*! ../internals/array-slice */ \"./node_modules/core-js/internals/array-slice.js\");\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\nvar FORCED = fails(function () {\n // eslint-disable-next-line es-x/no-typed-arrays -- required for testing\n new Int8Array(1).slice();\n});\n\n// `%TypedArray%.prototype.slice` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.slice\nexportTypedArrayMethod('slice', function slice(start, end) {\n var list = arraySlice(aTypedArray(this), start, end);\n var C = typedArraySpeciesConstructor(this);\n var index = 0;\n var length = list.length;\n var result = new C(length);\n while (length > index) result[index] = list[index++];\n return result;\n}, FORCED);\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/es.typed-array.slice.js?"); +eval("\nvar ArrayBufferViewCore = __webpack_require__(/*! ../internals/array-buffer-view-core */ \"./node_modules/core-js/internals/array-buffer-view-core.js\");\nvar typedArraySpeciesConstructor = __webpack_require__(/*! ../internals/typed-array-species-constructor */ \"./node_modules/core-js/internals/typed-array-species-constructor.js\");\nvar fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\nvar arraySlice = __webpack_require__(/*! ../internals/array-slice */ \"./node_modules/core-js/internals/array-slice.js\");\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\n\nvar FORCED = fails(function () {\n // eslint-disable-next-line es/no-typed-arrays -- required for testing\n new Int8Array(1).slice();\n});\n\n// `%TypedArray%.prototype.slice` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.slice\nexportTypedArrayMethod('slice', function slice(start, end) {\n var list = arraySlice(aTypedArray(this), start, end);\n var C = typedArraySpeciesConstructor(this);\n var index = 0;\n var length = list.length;\n var result = new C(length);\n while (length > index) result[index] = list[index++];\n return result;\n}, FORCED);\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/es.typed-array.slice.js?"); /***/ }), @@ -10387,7 +11299,7 @@ eval("\nvar ArrayBufferViewCore = __webpack_require__(/*! ../internals/array-buf /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; -eval("\nvar global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js/internals/global.js\");\nvar uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ \"./node_modules/core-js/internals/function-uncurry-this.js\");\nvar fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\nvar aCallable = __webpack_require__(/*! ../internals/a-callable */ \"./node_modules/core-js/internals/a-callable.js\");\nvar internalSort = __webpack_require__(/*! ../internals/array-sort */ \"./node_modules/core-js/internals/array-sort.js\");\nvar ArrayBufferViewCore = __webpack_require__(/*! ../internals/array-buffer-view-core */ \"./node_modules/core-js/internals/array-buffer-view-core.js\");\nvar FF = __webpack_require__(/*! ../internals/engine-ff-version */ \"./node_modules/core-js/internals/engine-ff-version.js\");\nvar IE_OR_EDGE = __webpack_require__(/*! ../internals/engine-is-ie-or-edge */ \"./node_modules/core-js/internals/engine-is-ie-or-edge.js\");\nvar V8 = __webpack_require__(/*! ../internals/engine-v8-version */ \"./node_modules/core-js/internals/engine-v8-version.js\");\nvar WEBKIT = __webpack_require__(/*! ../internals/engine-webkit-version */ \"./node_modules/core-js/internals/engine-webkit-version.js\");\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar Uint16Array = global.Uint16Array;\nvar nativeSort = Uint16Array && uncurryThis(Uint16Array.prototype.sort);\n\n// WebKit\nvar ACCEPT_INCORRECT_ARGUMENTS = !!nativeSort && !(fails(function () {\n nativeSort(new Uint16Array(2), null);\n}) && fails(function () {\n nativeSort(new Uint16Array(2), {});\n}));\n\nvar STABLE_SORT = !!nativeSort && !fails(function () {\n // feature detection can be too slow, so check engines versions\n if (V8) return V8 < 74;\n if (FF) return FF < 67;\n if (IE_OR_EDGE) return true;\n if (WEBKIT) return WEBKIT < 602;\n\n var array = new Uint16Array(516);\n var expected = Array(516);\n var index, mod;\n\n for (index = 0; index < 516; index++) {\n mod = index % 4;\n array[index] = 515 - index;\n expected[index] = index - 2 * mod + 3;\n }\n\n nativeSort(array, function (a, b) {\n return (a / 4 | 0) - (b / 4 | 0);\n });\n\n for (index = 0; index < 516; index++) {\n if (array[index] !== expected[index]) return true;\n }\n});\n\nvar getSortCompare = function (comparefn) {\n return function (x, y) {\n if (comparefn !== undefined) return +comparefn(x, y) || 0;\n // eslint-disable-next-line no-self-compare -- NaN check\n if (y !== y) return -1;\n // eslint-disable-next-line no-self-compare -- NaN check\n if (x !== x) return 1;\n if (x === 0 && y === 0) return 1 / x > 0 && 1 / y < 0 ? 1 : -1;\n return x > y;\n };\n};\n\n// `%TypedArray%.prototype.sort` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.sort\nexportTypedArrayMethod('sort', function sort(comparefn) {\n if (comparefn !== undefined) aCallable(comparefn);\n if (STABLE_SORT) return nativeSort(this, comparefn);\n\n return internalSort(aTypedArray(this), getSortCompare(comparefn));\n}, !STABLE_SORT || ACCEPT_INCORRECT_ARGUMENTS);\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/es.typed-array.sort.js?"); +eval("\nvar global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js/internals/global.js\");\nvar uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this-clause */ \"./node_modules/core-js/internals/function-uncurry-this-clause.js\");\nvar fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\nvar aCallable = __webpack_require__(/*! ../internals/a-callable */ \"./node_modules/core-js/internals/a-callable.js\");\nvar internalSort = __webpack_require__(/*! ../internals/array-sort */ \"./node_modules/core-js/internals/array-sort.js\");\nvar ArrayBufferViewCore = __webpack_require__(/*! ../internals/array-buffer-view-core */ \"./node_modules/core-js/internals/array-buffer-view-core.js\");\nvar FF = __webpack_require__(/*! ../internals/engine-ff-version */ \"./node_modules/core-js/internals/engine-ff-version.js\");\nvar IE_OR_EDGE = __webpack_require__(/*! ../internals/engine-is-ie-or-edge */ \"./node_modules/core-js/internals/engine-is-ie-or-edge.js\");\nvar V8 = __webpack_require__(/*! ../internals/engine-v8-version */ \"./node_modules/core-js/internals/engine-v8-version.js\");\nvar WEBKIT = __webpack_require__(/*! ../internals/engine-webkit-version */ \"./node_modules/core-js/internals/engine-webkit-version.js\");\n\nvar aTypedArray = ArrayBufferViewCore.aTypedArray;\nvar exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;\nvar Uint16Array = global.Uint16Array;\nvar nativeSort = Uint16Array && uncurryThis(Uint16Array.prototype.sort);\n\n// WebKit\nvar ACCEPT_INCORRECT_ARGUMENTS = !!nativeSort && !(fails(function () {\n nativeSort(new Uint16Array(2), null);\n}) && fails(function () {\n nativeSort(new Uint16Array(2), {});\n}));\n\nvar STABLE_SORT = !!nativeSort && !fails(function () {\n // feature detection can be too slow, so check engines versions\n if (V8) return V8 < 74;\n if (FF) return FF < 67;\n if (IE_OR_EDGE) return true;\n if (WEBKIT) return WEBKIT < 602;\n\n var array = new Uint16Array(516);\n var expected = Array(516);\n var index, mod;\n\n for (index = 0; index < 516; index++) {\n mod = index % 4;\n array[index] = 515 - index;\n expected[index] = index - 2 * mod + 3;\n }\n\n nativeSort(array, function (a, b) {\n return (a / 4 | 0) - (b / 4 | 0);\n });\n\n for (index = 0; index < 516; index++) {\n if (array[index] !== expected[index]) return true;\n }\n});\n\nvar getSortCompare = function (comparefn) {\n return function (x, y) {\n if (comparefn !== undefined) return +comparefn(x, y) || 0;\n // eslint-disable-next-line no-self-compare -- NaN check\n if (y !== y) return -1;\n // eslint-disable-next-line no-self-compare -- NaN check\n if (x !== x) return 1;\n if (x === 0 && y === 0) return 1 / x > 0 && 1 / y < 0 ? 1 : -1;\n return x > y;\n };\n};\n\n// `%TypedArray%.prototype.sort` method\n// https://tc39.es/ecma262/#sec-%typedarray%.prototype.sort\nexportTypedArrayMethod('sort', function sort(comparefn) {\n if (comparefn !== undefined) aCallable(comparefn);\n if (STABLE_SORT) return nativeSort(this, comparefn);\n\n return internalSort(aTypedArray(this), getSortCompare(comparefn));\n}, !STABLE_SORT || ACCEPT_INCORRECT_ARGUMENTS);\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/es.typed-array.sort.js?"); /***/ }), @@ -10440,38 +11352,141 @@ eval("var createTypedArrayConstructor = __webpack_require__(/*! ../internals/typ \*****************************************************************/ /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { -"use strict"; -eval("\nvar global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js/internals/global.js\");\nvar uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ \"./node_modules/core-js/internals/function-uncurry-this.js\");\nvar defineBuiltIns = __webpack_require__(/*! ../internals/define-built-ins */ \"./node_modules/core-js/internals/define-built-ins.js\");\nvar InternalMetadataModule = __webpack_require__(/*! ../internals/internal-metadata */ \"./node_modules/core-js/internals/internal-metadata.js\");\nvar collection = __webpack_require__(/*! ../internals/collection */ \"./node_modules/core-js/internals/collection.js\");\nvar collectionWeak = __webpack_require__(/*! ../internals/collection-weak */ \"./node_modules/core-js/internals/collection-weak.js\");\nvar isObject = __webpack_require__(/*! ../internals/is-object */ \"./node_modules/core-js/internals/is-object.js\");\nvar isExtensible = __webpack_require__(/*! ../internals/object-is-extensible */ \"./node_modules/core-js/internals/object-is-extensible.js\");\nvar enforceInternalState = (__webpack_require__(/*! ../internals/internal-state */ \"./node_modules/core-js/internals/internal-state.js\").enforce);\nvar NATIVE_WEAK_MAP = __webpack_require__(/*! ../internals/weak-map-basic-detection */ \"./node_modules/core-js/internals/weak-map-basic-detection.js\");\n\nvar IS_IE11 = !global.ActiveXObject && 'ActiveXObject' in global;\nvar InternalWeakMap;\n\nvar wrapper = function (init) {\n return function WeakMap() {\n return init(this, arguments.length ? arguments[0] : undefined);\n };\n};\n\n// `WeakMap` constructor\n// https://tc39.es/ecma262/#sec-weakmap-constructor\nvar $WeakMap = collection('WeakMap', wrapper, collectionWeak);\n\n// IE11 WeakMap frozen keys fix\n// We can't use feature detection because it crash some old IE builds\n// https://github.com/zloirock/core-js/issues/485\nif (NATIVE_WEAK_MAP && IS_IE11) {\n InternalWeakMap = collectionWeak.getConstructor(wrapper, 'WeakMap', true);\n InternalMetadataModule.enable();\n var WeakMapPrototype = $WeakMap.prototype;\n var nativeDelete = uncurryThis(WeakMapPrototype['delete']);\n var nativeHas = uncurryThis(WeakMapPrototype.has);\n var nativeGet = uncurryThis(WeakMapPrototype.get);\n var nativeSet = uncurryThis(WeakMapPrototype.set);\n defineBuiltIns(WeakMapPrototype, {\n 'delete': function (key) {\n if (isObject(key) && !isExtensible(key)) {\n var state = enforceInternalState(this);\n if (!state.frozen) state.frozen = new InternalWeakMap();\n return nativeDelete(this, key) || state.frozen['delete'](key);\n } return nativeDelete(this, key);\n },\n has: function has(key) {\n if (isObject(key) && !isExtensible(key)) {\n var state = enforceInternalState(this);\n if (!state.frozen) state.frozen = new InternalWeakMap();\n return nativeHas(this, key) || state.frozen.has(key);\n } return nativeHas(this, key);\n },\n get: function get(key) {\n if (isObject(key) && !isExtensible(key)) {\n var state = enforceInternalState(this);\n if (!state.frozen) state.frozen = new InternalWeakMap();\n return nativeHas(this, key) ? nativeGet(this, key) : state.frozen.get(key);\n } return nativeGet(this, key);\n },\n set: function set(key, value) {\n if (isObject(key) && !isExtensible(key)) {\n var state = enforceInternalState(this);\n if (!state.frozen) state.frozen = new InternalWeakMap();\n nativeHas(this, key) ? nativeSet(this, key, value) : state.frozen.set(key, value);\n } else nativeSet(this, key, value);\n return this;\n }\n });\n}\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/es.weak-map.constructor.js?"); +"use strict"; +eval("\nvar global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js/internals/global.js\");\nvar uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ \"./node_modules/core-js/internals/function-uncurry-this.js\");\nvar defineBuiltIns = __webpack_require__(/*! ../internals/define-built-ins */ \"./node_modules/core-js/internals/define-built-ins.js\");\nvar InternalMetadataModule = __webpack_require__(/*! ../internals/internal-metadata */ \"./node_modules/core-js/internals/internal-metadata.js\");\nvar collection = __webpack_require__(/*! ../internals/collection */ \"./node_modules/core-js/internals/collection.js\");\nvar collectionWeak = __webpack_require__(/*! ../internals/collection-weak */ \"./node_modules/core-js/internals/collection-weak.js\");\nvar isObject = __webpack_require__(/*! ../internals/is-object */ \"./node_modules/core-js/internals/is-object.js\");\nvar isExtensible = __webpack_require__(/*! ../internals/object-is-extensible */ \"./node_modules/core-js/internals/object-is-extensible.js\");\nvar enforceInternalState = (__webpack_require__(/*! ../internals/internal-state */ \"./node_modules/core-js/internals/internal-state.js\").enforce);\nvar NATIVE_WEAK_MAP = __webpack_require__(/*! ../internals/weak-map-basic-detection */ \"./node_modules/core-js/internals/weak-map-basic-detection.js\");\n\nvar IS_IE11 = !global.ActiveXObject && 'ActiveXObject' in global;\nvar InternalWeakMap;\n\nvar wrapper = function (init) {\n return function WeakMap() {\n return init(this, arguments.length ? arguments[0] : undefined);\n };\n};\n\n// `WeakMap` constructor\n// https://tc39.es/ecma262/#sec-weakmap-constructor\nvar $WeakMap = collection('WeakMap', wrapper, collectionWeak);\n\n// IE11 WeakMap frozen keys fix\n// We can't use feature detection because it crash some old IE builds\n// https://github.com/zloirock/core-js/issues/485\nif (NATIVE_WEAK_MAP && IS_IE11) {\n InternalWeakMap = collectionWeak.getConstructor(wrapper, 'WeakMap', true);\n InternalMetadataModule.enable();\n var WeakMapPrototype = $WeakMap.prototype;\n var nativeDelete = uncurryThis(WeakMapPrototype['delete']);\n var nativeHas = uncurryThis(WeakMapPrototype.has);\n var nativeGet = uncurryThis(WeakMapPrototype.get);\n var nativeSet = uncurryThis(WeakMapPrototype.set);\n defineBuiltIns(WeakMapPrototype, {\n 'delete': function (key) {\n if (isObject(key) && !isExtensible(key)) {\n var state = enforceInternalState(this);\n if (!state.frozen) state.frozen = new InternalWeakMap();\n return nativeDelete(this, key) || state.frozen['delete'](key);\n } return nativeDelete(this, key);\n },\n has: function has(key) {\n if (isObject(key) && !isExtensible(key)) {\n var state = enforceInternalState(this);\n if (!state.frozen) state.frozen = new InternalWeakMap();\n return nativeHas(this, key) || state.frozen.has(key);\n } return nativeHas(this, key);\n },\n get: function get(key) {\n if (isObject(key) && !isExtensible(key)) {\n var state = enforceInternalState(this);\n if (!state.frozen) state.frozen = new InternalWeakMap();\n return nativeHas(this, key) ? nativeGet(this, key) : state.frozen.get(key);\n } return nativeGet(this, key);\n },\n set: function set(key, value) {\n if (isObject(key) && !isExtensible(key)) {\n var state = enforceInternalState(this);\n if (!state.frozen) state.frozen = new InternalWeakMap();\n nativeHas(this, key) ? nativeSet(this, key, value) : state.frozen.set(key, value);\n } else nativeSet(this, key, value);\n return this;\n }\n });\n}\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/es.weak-map.constructor.js?"); + +/***/ }), + +/***/ "./node_modules/core-js/modules/es.weak-map.js": +/*!*****************************************************!*\ + !*** ./node_modules/core-js/modules/es.weak-map.js ***! + \*****************************************************/ +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +eval("// TODO: Remove this module from `core-js@4` since it's replaced to module below\n__webpack_require__(/*! ../modules/es.weak-map.constructor */ \"./node_modules/core-js/modules/es.weak-map.constructor.js\");\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/es.weak-map.js?"); + +/***/ }), + +/***/ "./node_modules/core-js/modules/esnext.global-this.js": +/*!************************************************************!*\ + !*** ./node_modules/core-js/modules/esnext.global-this.js ***! + \************************************************************/ +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +eval("// TODO: Remove from `core-js@4`\n__webpack_require__(/*! ../modules/es.global-this */ \"./node_modules/core-js/modules/es.global-this.js\");\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/esnext.global-this.js?"); + +/***/ }), + +/***/ "./node_modules/core-js/modules/esnext.string.replace-all.js": +/*!*******************************************************************!*\ + !*** ./node_modules/core-js/modules/esnext.string.replace-all.js ***! + \*******************************************************************/ +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +eval("// TODO: Remove from `core-js@4`\n__webpack_require__(/*! ../modules/es.string.replace-all */ \"./node_modules/core-js/modules/es.string.replace-all.js\");\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/esnext.string.replace-all.js?"); + +/***/ }), + +/***/ "./node_modules/core-js/modules/web.dom-collections.for-each.js": +/*!**********************************************************************!*\ + !*** ./node_modules/core-js/modules/web.dom-collections.for-each.js ***! + \**********************************************************************/ +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +eval("var global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js/internals/global.js\");\nvar DOMIterables = __webpack_require__(/*! ../internals/dom-iterables */ \"./node_modules/core-js/internals/dom-iterables.js\");\nvar DOMTokenListPrototype = __webpack_require__(/*! ../internals/dom-token-list-prototype */ \"./node_modules/core-js/internals/dom-token-list-prototype.js\");\nvar forEach = __webpack_require__(/*! ../internals/array-for-each */ \"./node_modules/core-js/internals/array-for-each.js\");\nvar createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ \"./node_modules/core-js/internals/create-non-enumerable-property.js\");\n\nvar handlePrototype = function (CollectionPrototype) {\n // some Chrome versions have non-configurable methods on DOMTokenList\n if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {\n createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach);\n } catch (error) {\n CollectionPrototype.forEach = forEach;\n }\n};\n\nfor (var COLLECTION_NAME in DOMIterables) {\n if (DOMIterables[COLLECTION_NAME]) {\n handlePrototype(global[COLLECTION_NAME] && global[COLLECTION_NAME].prototype);\n }\n}\n\nhandlePrototype(DOMTokenListPrototype);\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/web.dom-collections.for-each.js?"); + +/***/ }), + +/***/ "./node_modules/core-js/modules/web.dom-collections.iterator.js": +/*!**********************************************************************!*\ + !*** ./node_modules/core-js/modules/web.dom-collections.iterator.js ***! + \**********************************************************************/ +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +eval("var global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js/internals/global.js\");\nvar DOMIterables = __webpack_require__(/*! ../internals/dom-iterables */ \"./node_modules/core-js/internals/dom-iterables.js\");\nvar DOMTokenListPrototype = __webpack_require__(/*! ../internals/dom-token-list-prototype */ \"./node_modules/core-js/internals/dom-token-list-prototype.js\");\nvar ArrayIteratorMethods = __webpack_require__(/*! ../modules/es.array.iterator */ \"./node_modules/core-js/modules/es.array.iterator.js\");\nvar createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ \"./node_modules/core-js/internals/create-non-enumerable-property.js\");\nvar wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js/internals/well-known-symbol.js\");\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar ArrayValues = ArrayIteratorMethods.values;\n\nvar handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {\n if (CollectionPrototype) {\n // some Chrome versions have non-configurable methods on DOMTokenList\n if (CollectionPrototype[ITERATOR] !== ArrayValues) try {\n createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);\n } catch (error) {\n CollectionPrototype[ITERATOR] = ArrayValues;\n }\n if (!CollectionPrototype[TO_STRING_TAG]) {\n createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);\n }\n if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {\n // some Chrome versions have non-configurable methods on DOMTokenList\n if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {\n createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);\n } catch (error) {\n CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];\n }\n }\n }\n};\n\nfor (var COLLECTION_NAME in DOMIterables) {\n handlePrototype(global[COLLECTION_NAME] && global[COLLECTION_NAME].prototype, COLLECTION_NAME);\n}\n\nhandlePrototype(DOMTokenListPrototype, 'DOMTokenList');\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/web.dom-collections.iterator.js?"); + +/***/ }), + +/***/ "./node_modules/core-js/modules/web.set-interval.js": +/*!**********************************************************!*\ + !*** ./node_modules/core-js/modules/web.set-interval.js ***! + \**********************************************************/ +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +eval("var $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js/internals/global.js\");\nvar setInterval = (__webpack_require__(/*! ../internals/schedulers-fix */ \"./node_modules/core-js/internals/schedulers-fix.js\").setInterval);\n\n// ie9- setInterval additional parameters fix\n// https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-setinterval\n$({ global: true, bind: true, forced: global.setInterval !== setInterval }, {\n setInterval: setInterval\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/web.set-interval.js?"); + +/***/ }), + +/***/ "./node_modules/core-js/modules/web.set-timeout.js": +/*!*********************************************************!*\ + !*** ./node_modules/core-js/modules/web.set-timeout.js ***! + \*********************************************************/ +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +eval("var $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js/internals/global.js\");\nvar setTimeout = (__webpack_require__(/*! ../internals/schedulers-fix */ \"./node_modules/core-js/internals/schedulers-fix.js\").setTimeout);\n\n// ie9- setTimeout additional parameters fix\n// https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-settimeout\n$({ global: true, bind: true, forced: global.setTimeout !== setTimeout }, {\n setTimeout: setTimeout\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/web.set-timeout.js?"); + +/***/ }), + +/***/ "./node_modules/core-js/modules/web.timers.js": +/*!****************************************************!*\ + !*** ./node_modules/core-js/modules/web.timers.js ***! + \****************************************************/ +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +eval("// TODO: Remove this module from `core-js@4` since it's split to modules listed below\n__webpack_require__(/*! ../modules/web.set-interval */ \"./node_modules/core-js/modules/web.set-interval.js\");\n__webpack_require__(/*! ../modules/web.set-timeout */ \"./node_modules/core-js/modules/web.set-timeout.js\");\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/web.timers.js?"); + +/***/ }), + +/***/ "./node_modules/core-js/modules/web.url-search-params.constructor.js": +/*!***************************************************************************!*\ + !*** ./node_modules/core-js/modules/web.url-search-params.constructor.js ***! + \***************************************************************************/ +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +eval("\n// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`\n__webpack_require__(/*! ../modules/es.array.iterator */ \"./node_modules/core-js/modules/es.array.iterator.js\");\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js/internals/global.js\");\nvar call = __webpack_require__(/*! ../internals/function-call */ \"./node_modules/core-js/internals/function-call.js\");\nvar uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ \"./node_modules/core-js/internals/function-uncurry-this.js\");\nvar DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./node_modules/core-js/internals/descriptors.js\");\nvar USE_NATIVE_URL = __webpack_require__(/*! ../internals/url-constructor-detection */ \"./node_modules/core-js/internals/url-constructor-detection.js\");\nvar defineBuiltIn = __webpack_require__(/*! ../internals/define-built-in */ \"./node_modules/core-js/internals/define-built-in.js\");\nvar defineBuiltIns = __webpack_require__(/*! ../internals/define-built-ins */ \"./node_modules/core-js/internals/define-built-ins.js\");\nvar setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ \"./node_modules/core-js/internals/set-to-string-tag.js\");\nvar createIteratorConstructor = __webpack_require__(/*! ../internals/iterator-create-constructor */ \"./node_modules/core-js/internals/iterator-create-constructor.js\");\nvar InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ \"./node_modules/core-js/internals/internal-state.js\");\nvar anInstance = __webpack_require__(/*! ../internals/an-instance */ \"./node_modules/core-js/internals/an-instance.js\");\nvar isCallable = __webpack_require__(/*! ../internals/is-callable */ \"./node_modules/core-js/internals/is-callable.js\");\nvar hasOwn = __webpack_require__(/*! ../internals/has-own-property */ \"./node_modules/core-js/internals/has-own-property.js\");\nvar bind = __webpack_require__(/*! ../internals/function-bind-context */ \"./node_modules/core-js/internals/function-bind-context.js\");\nvar classof = __webpack_require__(/*! ../internals/classof */ \"./node_modules/core-js/internals/classof.js\");\nvar anObject = __webpack_require__(/*! ../internals/an-object */ \"./node_modules/core-js/internals/an-object.js\");\nvar isObject = __webpack_require__(/*! ../internals/is-object */ \"./node_modules/core-js/internals/is-object.js\");\nvar $toString = __webpack_require__(/*! ../internals/to-string */ \"./node_modules/core-js/internals/to-string.js\");\nvar create = __webpack_require__(/*! ../internals/object-create */ \"./node_modules/core-js/internals/object-create.js\");\nvar createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ \"./node_modules/core-js/internals/create-property-descriptor.js\");\nvar getIterator = __webpack_require__(/*! ../internals/get-iterator */ \"./node_modules/core-js/internals/get-iterator.js\");\nvar getIteratorMethod = __webpack_require__(/*! ../internals/get-iterator-method */ \"./node_modules/core-js/internals/get-iterator-method.js\");\nvar validateArgumentsLength = __webpack_require__(/*! ../internals/validate-arguments-length */ \"./node_modules/core-js/internals/validate-arguments-length.js\");\nvar wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js/internals/well-known-symbol.js\");\nvar arraySort = __webpack_require__(/*! ../internals/array-sort */ \"./node_modules/core-js/internals/array-sort.js\");\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar URL_SEARCH_PARAMS = 'URLSearchParams';\nvar URL_SEARCH_PARAMS_ITERATOR = URL_SEARCH_PARAMS + 'Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalParamsState = InternalStateModule.getterFor(URL_SEARCH_PARAMS);\nvar getInternalIteratorState = InternalStateModule.getterFor(URL_SEARCH_PARAMS_ITERATOR);\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// Avoid NodeJS experimental warning\nvar safeGetBuiltIn = function (name) {\n if (!DESCRIPTORS) return global[name];\n var descriptor = getOwnPropertyDescriptor(global, name);\n return descriptor && descriptor.value;\n};\n\nvar nativeFetch = safeGetBuiltIn('fetch');\nvar NativeRequest = safeGetBuiltIn('Request');\nvar Headers = safeGetBuiltIn('Headers');\nvar RequestPrototype = NativeRequest && NativeRequest.prototype;\nvar HeadersPrototype = Headers && Headers.prototype;\nvar RegExp = global.RegExp;\nvar TypeError = global.TypeError;\nvar decodeURIComponent = global.decodeURIComponent;\nvar encodeURIComponent = global.encodeURIComponent;\nvar charAt = uncurryThis(''.charAt);\nvar join = uncurryThis([].join);\nvar push = uncurryThis([].push);\nvar replace = uncurryThis(''.replace);\nvar shift = uncurryThis([].shift);\nvar splice = uncurryThis([].splice);\nvar split = uncurryThis(''.split);\nvar stringSlice = uncurryThis(''.slice);\n\nvar plus = /\\+/g;\nvar sequences = Array(4);\n\nvar percentSequence = function (bytes) {\n return sequences[bytes - 1] || (sequences[bytes - 1] = RegExp('((?:%[\\\\da-f]{2}){' + bytes + '})', 'gi'));\n};\n\nvar percentDecode = function (sequence) {\n try {\n return decodeURIComponent(sequence);\n } catch (error) {\n return sequence;\n }\n};\n\nvar deserialize = function (it) {\n var result = replace(it, plus, ' ');\n var bytes = 4;\n try {\n return decodeURIComponent(result);\n } catch (error) {\n while (bytes) {\n result = replace(result, percentSequence(bytes--), percentDecode);\n }\n return result;\n }\n};\n\nvar find = /[!'()~]|%20/g;\n\nvar replacements = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+'\n};\n\nvar replacer = function (match) {\n return replacements[match];\n};\n\nvar serialize = function (it) {\n return replace(encodeURIComponent(it), find, replacer);\n};\n\nvar URLSearchParamsIterator = createIteratorConstructor(function Iterator(params, kind) {\n setInternalState(this, {\n type: URL_SEARCH_PARAMS_ITERATOR,\n iterator: getIterator(getInternalParamsState(params).entries),\n kind: kind\n });\n}, 'Iterator', function next() {\n var state = getInternalIteratorState(this);\n var kind = state.kind;\n var step = state.iterator.next();\n var entry = step.value;\n if (!step.done) {\n step.value = kind === 'keys' ? entry.key : kind === 'values' ? entry.value : [entry.key, entry.value];\n } return step;\n}, true);\n\nvar URLSearchParamsState = function (init) {\n this.entries = [];\n this.url = null;\n\n if (init !== undefined) {\n if (isObject(init)) this.parseObject(init);\n else this.parseQuery(typeof init == 'string' ? charAt(init, 0) === '?' ? stringSlice(init, 1) : init : $toString(init));\n }\n};\n\nURLSearchParamsState.prototype = {\n type: URL_SEARCH_PARAMS,\n bindURL: function (url) {\n this.url = url;\n this.update();\n },\n parseObject: function (object) {\n var iteratorMethod = getIteratorMethod(object);\n var iterator, next, step, entryIterator, entryNext, first, second;\n\n if (iteratorMethod) {\n iterator = getIterator(object, iteratorMethod);\n next = iterator.next;\n while (!(step = call(next, iterator)).done) {\n entryIterator = getIterator(anObject(step.value));\n entryNext = entryIterator.next;\n if (\n (first = call(entryNext, entryIterator)).done ||\n (second = call(entryNext, entryIterator)).done ||\n !call(entryNext, entryIterator).done\n ) throw TypeError('Expected sequence with length 2');\n push(this.entries, { key: $toString(first.value), value: $toString(second.value) });\n }\n } else for (var key in object) if (hasOwn(object, key)) {\n push(this.entries, { key: key, value: $toString(object[key]) });\n }\n },\n parseQuery: function (query) {\n if (query) {\n var attributes = split(query, '&');\n var index = 0;\n var attribute, entry;\n while (index < attributes.length) {\n attribute = attributes[index++];\n if (attribute.length) {\n entry = split(attribute, '=');\n push(this.entries, {\n key: deserialize(shift(entry)),\n value: deserialize(join(entry, '='))\n });\n }\n }\n }\n },\n serialize: function () {\n var entries = this.entries;\n var result = [];\n var index = 0;\n var entry;\n while (index < entries.length) {\n entry = entries[index++];\n push(result, serialize(entry.key) + '=' + serialize(entry.value));\n } return join(result, '&');\n },\n update: function () {\n this.entries.length = 0;\n this.parseQuery(this.url.query);\n },\n updateURL: function () {\n if (this.url) this.url.update();\n }\n};\n\n// `URLSearchParams` constructor\n// https://url.spec.whatwg.org/#interface-urlsearchparams\nvar URLSearchParamsConstructor = function URLSearchParams(/* init */) {\n anInstance(this, URLSearchParamsPrototype);\n var init = arguments.length > 0 ? arguments[0] : undefined;\n setInternalState(this, new URLSearchParamsState(init));\n};\n\nvar URLSearchParamsPrototype = URLSearchParamsConstructor.prototype;\n\ndefineBuiltIns(URLSearchParamsPrototype, {\n // `URLSearchParams.prototype.append` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-append\n append: function append(name, value) {\n validateArgumentsLength(arguments.length, 2);\n var state = getInternalParamsState(this);\n push(state.entries, { key: $toString(name), value: $toString(value) });\n state.updateURL();\n },\n // `URLSearchParams.prototype.delete` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-delete\n 'delete': function (name) {\n validateArgumentsLength(arguments.length, 1);\n var state = getInternalParamsState(this);\n var entries = state.entries;\n var key = $toString(name);\n var index = 0;\n while (index < entries.length) {\n if (entries[index].key === key) splice(entries, index, 1);\n else index++;\n }\n state.updateURL();\n },\n // `URLSearchParams.prototype.get` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-get\n get: function get(name) {\n validateArgumentsLength(arguments.length, 1);\n var entries = getInternalParamsState(this).entries;\n var key = $toString(name);\n var index = 0;\n for (; index < entries.length; index++) {\n if (entries[index].key === key) return entries[index].value;\n }\n return null;\n },\n // `URLSearchParams.prototype.getAll` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-getall\n getAll: function getAll(name) {\n validateArgumentsLength(arguments.length, 1);\n var entries = getInternalParamsState(this).entries;\n var key = $toString(name);\n var result = [];\n var index = 0;\n for (; index < entries.length; index++) {\n if (entries[index].key === key) push(result, entries[index].value);\n }\n return result;\n },\n // `URLSearchParams.prototype.has` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-has\n has: function has(name) {\n validateArgumentsLength(arguments.length, 1);\n var entries = getInternalParamsState(this).entries;\n var key = $toString(name);\n var index = 0;\n while (index < entries.length) {\n if (entries[index++].key === key) return true;\n }\n return false;\n },\n // `URLSearchParams.prototype.set` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-set\n set: function set(name, value) {\n validateArgumentsLength(arguments.length, 1);\n var state = getInternalParamsState(this);\n var entries = state.entries;\n var found = false;\n var key = $toString(name);\n var val = $toString(value);\n var index = 0;\n var entry;\n for (; index < entries.length; index++) {\n entry = entries[index];\n if (entry.key === key) {\n if (found) splice(entries, index--, 1);\n else {\n found = true;\n entry.value = val;\n }\n }\n }\n if (!found) push(entries, { key: key, value: val });\n state.updateURL();\n },\n // `URLSearchParams.prototype.sort` method\n // https://url.spec.whatwg.org/#dom-urlsearchparams-sort\n sort: function sort() {\n var state = getInternalParamsState(this);\n arraySort(state.entries, function (a, b) {\n return a.key > b.key ? 1 : -1;\n });\n state.updateURL();\n },\n // `URLSearchParams.prototype.forEach` method\n forEach: function forEach(callback /* , thisArg */) {\n var entries = getInternalParamsState(this).entries;\n var boundFunction = bind(callback, arguments.length > 1 ? arguments[1] : undefined);\n var index = 0;\n var entry;\n while (index < entries.length) {\n entry = entries[index++];\n boundFunction(entry.value, entry.key, this);\n }\n },\n // `URLSearchParams.prototype.keys` method\n keys: function keys() {\n return new URLSearchParamsIterator(this, 'keys');\n },\n // `URLSearchParams.prototype.values` method\n values: function values() {\n return new URLSearchParamsIterator(this, 'values');\n },\n // `URLSearchParams.prototype.entries` method\n entries: function entries() {\n return new URLSearchParamsIterator(this, 'entries');\n }\n}, { enumerable: true });\n\n// `URLSearchParams.prototype[@@iterator]` method\ndefineBuiltIn(URLSearchParamsPrototype, ITERATOR, URLSearchParamsPrototype.entries, { name: 'entries' });\n\n// `URLSearchParams.prototype.toString` method\n// https://url.spec.whatwg.org/#urlsearchparams-stringification-behavior\ndefineBuiltIn(URLSearchParamsPrototype, 'toString', function toString() {\n return getInternalParamsState(this).serialize();\n}, { enumerable: true });\n\nsetToStringTag(URLSearchParamsConstructor, URL_SEARCH_PARAMS);\n\n$({ global: true, constructor: true, forced: !USE_NATIVE_URL }, {\n URLSearchParams: URLSearchParamsConstructor\n});\n\n// Wrap `fetch` and `Request` for correct work with polyfilled `URLSearchParams`\nif (!USE_NATIVE_URL && isCallable(Headers)) {\n var headersHas = uncurryThis(HeadersPrototype.has);\n var headersSet = uncurryThis(HeadersPrototype.set);\n\n var wrapRequestOptions = function (init) {\n if (isObject(init)) {\n var body = init.body;\n var headers;\n if (classof(body) === URL_SEARCH_PARAMS) {\n headers = init.headers ? new Headers(init.headers) : new Headers();\n if (!headersHas(headers, 'content-type')) {\n headersSet(headers, 'content-type', 'application/x-www-form-urlencoded;charset=UTF-8');\n }\n return create(init, {\n body: createPropertyDescriptor(0, $toString(body)),\n headers: createPropertyDescriptor(0, headers)\n });\n }\n } return init;\n };\n\n if (isCallable(nativeFetch)) {\n $({ global: true, enumerable: true, dontCallGetSet: true, forced: true }, {\n fetch: function fetch(input /* , init */) {\n return nativeFetch(input, arguments.length > 1 ? wrapRequestOptions(arguments[1]) : {});\n }\n });\n }\n\n if (isCallable(NativeRequest)) {\n var RequestConstructor = function Request(input /* , init */) {\n anInstance(this, RequestPrototype);\n return new NativeRequest(input, arguments.length > 1 ? wrapRequestOptions(arguments[1]) : {});\n };\n\n RequestPrototype.constructor = RequestConstructor;\n RequestConstructor.prototype = RequestPrototype;\n\n $({ global: true, constructor: true, dontCallGetSet: true, forced: true }, {\n Request: RequestConstructor\n });\n }\n}\n\nmodule.exports = {\n URLSearchParams: URLSearchParamsConstructor,\n getState: getInternalParamsState\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/web.url-search-params.constructor.js?"); + +/***/ }), + +/***/ "./node_modules/core-js/modules/web.url-search-params.js": +/*!***************************************************************!*\ + !*** ./node_modules/core-js/modules/web.url-search-params.js ***! + \***************************************************************/ +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +eval("// TODO: Remove this module from `core-js@4` since it's replaced to module below\n__webpack_require__(/*! ../modules/web.url-search-params.constructor */ \"./node_modules/core-js/modules/web.url-search-params.constructor.js\");\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/web.url-search-params.js?"); /***/ }), -/***/ "./node_modules/core-js/modules/es.weak-map.js": -/*!*****************************************************!*\ - !*** ./node_modules/core-js/modules/es.weak-map.js ***! - \*****************************************************/ +/***/ "./node_modules/core-js/modules/web.url.constructor.js": +/*!*************************************************************!*\ + !*** ./node_modules/core-js/modules/web.url.constructor.js ***! + \*************************************************************/ /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { -eval("// TODO: Remove this module from `core-js@4` since it's replaced to module below\n__webpack_require__(/*! ../modules/es.weak-map.constructor */ \"./node_modules/core-js/modules/es.weak-map.constructor.js\");\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/es.weak-map.js?"); +"use strict"; +eval("\n// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`\n__webpack_require__(/*! ../modules/es.string.iterator */ \"./node_modules/core-js/modules/es.string.iterator.js\");\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./node_modules/core-js/internals/descriptors.js\");\nvar USE_NATIVE_URL = __webpack_require__(/*! ../internals/url-constructor-detection */ \"./node_modules/core-js/internals/url-constructor-detection.js\");\nvar global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js/internals/global.js\");\nvar bind = __webpack_require__(/*! ../internals/function-bind-context */ \"./node_modules/core-js/internals/function-bind-context.js\");\nvar uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ \"./node_modules/core-js/internals/function-uncurry-this.js\");\nvar defineBuiltIn = __webpack_require__(/*! ../internals/define-built-in */ \"./node_modules/core-js/internals/define-built-in.js\");\nvar defineBuiltInAccessor = __webpack_require__(/*! ../internals/define-built-in-accessor */ \"./node_modules/core-js/internals/define-built-in-accessor.js\");\nvar anInstance = __webpack_require__(/*! ../internals/an-instance */ \"./node_modules/core-js/internals/an-instance.js\");\nvar hasOwn = __webpack_require__(/*! ../internals/has-own-property */ \"./node_modules/core-js/internals/has-own-property.js\");\nvar assign = __webpack_require__(/*! ../internals/object-assign */ \"./node_modules/core-js/internals/object-assign.js\");\nvar arrayFrom = __webpack_require__(/*! ../internals/array-from */ \"./node_modules/core-js/internals/array-from.js\");\nvar arraySlice = __webpack_require__(/*! ../internals/array-slice-simple */ \"./node_modules/core-js/internals/array-slice-simple.js\");\nvar codeAt = (__webpack_require__(/*! ../internals/string-multibyte */ \"./node_modules/core-js/internals/string-multibyte.js\").codeAt);\nvar toASCII = __webpack_require__(/*! ../internals/string-punycode-to-ascii */ \"./node_modules/core-js/internals/string-punycode-to-ascii.js\");\nvar $toString = __webpack_require__(/*! ../internals/to-string */ \"./node_modules/core-js/internals/to-string.js\");\nvar setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ \"./node_modules/core-js/internals/set-to-string-tag.js\");\nvar validateArgumentsLength = __webpack_require__(/*! ../internals/validate-arguments-length */ \"./node_modules/core-js/internals/validate-arguments-length.js\");\nvar URLSearchParamsModule = __webpack_require__(/*! ../modules/web.url-search-params.constructor */ \"./node_modules/core-js/modules/web.url-search-params.constructor.js\");\nvar InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ \"./node_modules/core-js/internals/internal-state.js\");\n\nvar setInternalState = InternalStateModule.set;\nvar getInternalURLState = InternalStateModule.getterFor('URL');\nvar URLSearchParams = URLSearchParamsModule.URLSearchParams;\nvar getInternalSearchParamsState = URLSearchParamsModule.getState;\n\nvar NativeURL = global.URL;\nvar TypeError = global.TypeError;\nvar parseInt = global.parseInt;\nvar floor = Math.floor;\nvar pow = Math.pow;\nvar charAt = uncurryThis(''.charAt);\nvar exec = uncurryThis(/./.exec);\nvar join = uncurryThis([].join);\nvar numberToString = uncurryThis(1.0.toString);\nvar pop = uncurryThis([].pop);\nvar push = uncurryThis([].push);\nvar replace = uncurryThis(''.replace);\nvar shift = uncurryThis([].shift);\nvar split = uncurryThis(''.split);\nvar stringSlice = uncurryThis(''.slice);\nvar toLowerCase = uncurryThis(''.toLowerCase);\nvar unshift = uncurryThis([].unshift);\n\nvar INVALID_AUTHORITY = 'Invalid authority';\nvar INVALID_SCHEME = 'Invalid scheme';\nvar INVALID_HOST = 'Invalid host';\nvar INVALID_PORT = 'Invalid port';\n\nvar ALPHA = /[a-z]/i;\n// eslint-disable-next-line regexp/no-obscure-range -- safe\nvar ALPHANUMERIC = /[\\d+-.a-z]/i;\nvar DIGIT = /\\d/;\nvar HEX_START = /^0x/i;\nvar OCT = /^[0-7]+$/;\nvar DEC = /^\\d+$/;\nvar HEX = /^[\\da-f]+$/i;\n/* eslint-disable regexp/no-control-character -- safe */\nvar FORBIDDEN_HOST_CODE_POINT = /[\\0\\t\\n\\r #%/:<>?@[\\\\\\]^|]/;\nvar FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT = /[\\0\\t\\n\\r #/:<>?@[\\\\\\]^|]/;\nvar LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE = /^[\\u0000-\\u0020]+|[\\u0000-\\u0020]+$/g;\nvar TAB_AND_NEW_LINE = /[\\t\\n\\r]/g;\n/* eslint-enable regexp/no-control-character -- safe */\nvar EOF;\n\n// https://url.spec.whatwg.org/#ipv4-number-parser\nvar parseIPv4 = function (input) {\n var parts = split(input, '.');\n var partsLength, numbers, index, part, radix, number, ipv4;\n if (parts.length && parts[parts.length - 1] == '') {\n parts.length--;\n }\n partsLength = parts.length;\n if (partsLength > 4) return input;\n numbers = [];\n for (index = 0; index < partsLength; index++) {\n part = parts[index];\n if (part == '') return input;\n radix = 10;\n if (part.length > 1 && charAt(part, 0) == '0') {\n radix = exec(HEX_START, part) ? 16 : 8;\n part = stringSlice(part, radix == 8 ? 1 : 2);\n }\n if (part === '') {\n number = 0;\n } else {\n if (!exec(radix == 10 ? DEC : radix == 8 ? OCT : HEX, part)) return input;\n number = parseInt(part, radix);\n }\n push(numbers, number);\n }\n for (index = 0; index < partsLength; index++) {\n number = numbers[index];\n if (index == partsLength - 1) {\n if (number >= pow(256, 5 - partsLength)) return null;\n } else if (number > 255) return null;\n }\n ipv4 = pop(numbers);\n for (index = 0; index < numbers.length; index++) {\n ipv4 += numbers[index] * pow(256, 3 - index);\n }\n return ipv4;\n};\n\n// https://url.spec.whatwg.org/#concept-ipv6-parser\n// eslint-disable-next-line max-statements -- TODO\nvar parseIPv6 = function (input) {\n var address = [0, 0, 0, 0, 0, 0, 0, 0];\n var pieceIndex = 0;\n var compress = null;\n var pointer = 0;\n var value, length, numbersSeen, ipv4Piece, number, swaps, swap;\n\n var chr = function () {\n return charAt(input, pointer);\n };\n\n if (chr() == ':') {\n if (charAt(input, 1) != ':') return;\n pointer += 2;\n pieceIndex++;\n compress = pieceIndex;\n }\n while (chr()) {\n if (pieceIndex == 8) return;\n if (chr() == ':') {\n if (compress !== null) return;\n pointer++;\n pieceIndex++;\n compress = pieceIndex;\n continue;\n }\n value = length = 0;\n while (length < 4 && exec(HEX, chr())) {\n value = value * 16 + parseInt(chr(), 16);\n pointer++;\n length++;\n }\n if (chr() == '.') {\n if (length == 0) return;\n pointer -= length;\n if (pieceIndex > 6) return;\n numbersSeen = 0;\n while (chr()) {\n ipv4Piece = null;\n if (numbersSeen > 0) {\n if (chr() == '.' && numbersSeen < 4) pointer++;\n else return;\n }\n if (!exec(DIGIT, chr())) return;\n while (exec(DIGIT, chr())) {\n number = parseInt(chr(), 10);\n if (ipv4Piece === null) ipv4Piece = number;\n else if (ipv4Piece == 0) return;\n else ipv4Piece = ipv4Piece * 10 + number;\n if (ipv4Piece > 255) return;\n pointer++;\n }\n address[pieceIndex] = address[pieceIndex] * 256 + ipv4Piece;\n numbersSeen++;\n if (numbersSeen == 2 || numbersSeen == 4) pieceIndex++;\n }\n if (numbersSeen != 4) return;\n break;\n } else if (chr() == ':') {\n pointer++;\n if (!chr()) return;\n } else if (chr()) return;\n address[pieceIndex++] = value;\n }\n if (compress !== null) {\n swaps = pieceIndex - compress;\n pieceIndex = 7;\n while (pieceIndex != 0 && swaps > 0) {\n swap = address[pieceIndex];\n address[pieceIndex--] = address[compress + swaps - 1];\n address[compress + --swaps] = swap;\n }\n } else if (pieceIndex != 8) return;\n return address;\n};\n\nvar findLongestZeroSequence = function (ipv6) {\n var maxIndex = null;\n var maxLength = 1;\n var currStart = null;\n var currLength = 0;\n var index = 0;\n for (; index < 8; index++) {\n if (ipv6[index] !== 0) {\n if (currLength > maxLength) {\n maxIndex = currStart;\n maxLength = currLength;\n }\n currStart = null;\n currLength = 0;\n } else {\n if (currStart === null) currStart = index;\n ++currLength;\n }\n }\n if (currLength > maxLength) {\n maxIndex = currStart;\n maxLength = currLength;\n }\n return maxIndex;\n};\n\n// https://url.spec.whatwg.org/#host-serializing\nvar serializeHost = function (host) {\n var result, index, compress, ignore0;\n // ipv4\n if (typeof host == 'number') {\n result = [];\n for (index = 0; index < 4; index++) {\n unshift(result, host % 256);\n host = floor(host / 256);\n } return join(result, '.');\n // ipv6\n } else if (typeof host == 'object') {\n result = '';\n compress = findLongestZeroSequence(host);\n for (index = 0; index < 8; index++) {\n if (ignore0 && host[index] === 0) continue;\n if (ignore0) ignore0 = false;\n if (compress === index) {\n result += index ? ':' : '::';\n ignore0 = true;\n } else {\n result += numberToString(host[index], 16);\n if (index < 7) result += ':';\n }\n }\n return '[' + result + ']';\n } return host;\n};\n\nvar C0ControlPercentEncodeSet = {};\nvar fragmentPercentEncodeSet = assign({}, C0ControlPercentEncodeSet, {\n ' ': 1, '\"': 1, '<': 1, '>': 1, '`': 1\n});\nvar pathPercentEncodeSet = assign({}, fragmentPercentEncodeSet, {\n '#': 1, '?': 1, '{': 1, '}': 1\n});\nvar userinfoPercentEncodeSet = assign({}, pathPercentEncodeSet, {\n '/': 1, ':': 1, ';': 1, '=': 1, '@': 1, '[': 1, '\\\\': 1, ']': 1, '^': 1, '|': 1\n});\n\nvar percentEncode = function (chr, set) {\n var code = codeAt(chr, 0);\n return code > 0x20 && code < 0x7F && !hasOwn(set, chr) ? chr : encodeURIComponent(chr);\n};\n\n// https://url.spec.whatwg.org/#special-scheme\nvar specialSchemes = {\n ftp: 21,\n file: null,\n http: 80,\n https: 443,\n ws: 80,\n wss: 443\n};\n\n// https://url.spec.whatwg.org/#windows-drive-letter\nvar isWindowsDriveLetter = function (string, normalized) {\n var second;\n return string.length == 2 && exec(ALPHA, charAt(string, 0))\n && ((second = charAt(string, 1)) == ':' || (!normalized && second == '|'));\n};\n\n// https://url.spec.whatwg.org/#start-with-a-windows-drive-letter\nvar startsWithWindowsDriveLetter = function (string) {\n var third;\n return string.length > 1 && isWindowsDriveLetter(stringSlice(string, 0, 2)) && (\n string.length == 2 ||\n ((third = charAt(string, 2)) === '/' || third === '\\\\' || third === '?' || third === '#')\n );\n};\n\n// https://url.spec.whatwg.org/#single-dot-path-segment\nvar isSingleDot = function (segment) {\n return segment === '.' || toLowerCase(segment) === '%2e';\n};\n\n// https://url.spec.whatwg.org/#double-dot-path-segment\nvar isDoubleDot = function (segment) {\n segment = toLowerCase(segment);\n return segment === '..' || segment === '%2e.' || segment === '.%2e' || segment === '%2e%2e';\n};\n\n// States:\nvar SCHEME_START = {};\nvar SCHEME = {};\nvar NO_SCHEME = {};\nvar SPECIAL_RELATIVE_OR_AUTHORITY = {};\nvar PATH_OR_AUTHORITY = {};\nvar RELATIVE = {};\nvar RELATIVE_SLASH = {};\nvar SPECIAL_AUTHORITY_SLASHES = {};\nvar SPECIAL_AUTHORITY_IGNORE_SLASHES = {};\nvar AUTHORITY = {};\nvar HOST = {};\nvar HOSTNAME = {};\nvar PORT = {};\nvar FILE = {};\nvar FILE_SLASH = {};\nvar FILE_HOST = {};\nvar PATH_START = {};\nvar PATH = {};\nvar CANNOT_BE_A_BASE_URL_PATH = {};\nvar QUERY = {};\nvar FRAGMENT = {};\n\nvar URLState = function (url, isBase, base) {\n var urlString = $toString(url);\n var baseState, failure, searchParams;\n if (isBase) {\n failure = this.parse(urlString);\n if (failure) throw TypeError(failure);\n this.searchParams = null;\n } else {\n if (base !== undefined) baseState = new URLState(base, true);\n failure = this.parse(urlString, null, baseState);\n if (failure) throw TypeError(failure);\n searchParams = getInternalSearchParamsState(new URLSearchParams());\n searchParams.bindURL(this);\n this.searchParams = searchParams;\n }\n};\n\nURLState.prototype = {\n type: 'URL',\n // https://url.spec.whatwg.org/#url-parsing\n // eslint-disable-next-line max-statements -- TODO\n parse: function (input, stateOverride, base) {\n var url = this;\n var state = stateOverride || SCHEME_START;\n var pointer = 0;\n var buffer = '';\n var seenAt = false;\n var seenBracket = false;\n var seenPasswordToken = false;\n var codePoints, chr, bufferCodePoints, failure;\n\n input = $toString(input);\n\n if (!stateOverride) {\n url.scheme = '';\n url.username = '';\n url.password = '';\n url.host = null;\n url.port = null;\n url.path = [];\n url.query = null;\n url.fragment = null;\n url.cannotBeABaseURL = false;\n input = replace(input, LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE, '');\n }\n\n input = replace(input, TAB_AND_NEW_LINE, '');\n\n codePoints = arrayFrom(input);\n\n while (pointer <= codePoints.length) {\n chr = codePoints[pointer];\n switch (state) {\n case SCHEME_START:\n if (chr && exec(ALPHA, chr)) {\n buffer += toLowerCase(chr);\n state = SCHEME;\n } else if (!stateOverride) {\n state = NO_SCHEME;\n continue;\n } else return INVALID_SCHEME;\n break;\n\n case SCHEME:\n if (chr && (exec(ALPHANUMERIC, chr) || chr == '+' || chr == '-' || chr == '.')) {\n buffer += toLowerCase(chr);\n } else if (chr == ':') {\n if (stateOverride && (\n (url.isSpecial() != hasOwn(specialSchemes, buffer)) ||\n (buffer == 'file' && (url.includesCredentials() || url.port !== null)) ||\n (url.scheme == 'file' && !url.host)\n )) return;\n url.scheme = buffer;\n if (stateOverride) {\n if (url.isSpecial() && specialSchemes[url.scheme] == url.port) url.port = null;\n return;\n }\n buffer = '';\n if (url.scheme == 'file') {\n state = FILE;\n } else if (url.isSpecial() && base && base.scheme == url.scheme) {\n state = SPECIAL_RELATIVE_OR_AUTHORITY;\n } else if (url.isSpecial()) {\n state = SPECIAL_AUTHORITY_SLASHES;\n } else if (codePoints[pointer + 1] == '/') {\n state = PATH_OR_AUTHORITY;\n pointer++;\n } else {\n url.cannotBeABaseURL = true;\n push(url.path, '');\n state = CANNOT_BE_A_BASE_URL_PATH;\n }\n } else if (!stateOverride) {\n buffer = '';\n state = NO_SCHEME;\n pointer = 0;\n continue;\n } else return INVALID_SCHEME;\n break;\n\n case NO_SCHEME:\n if (!base || (base.cannotBeABaseURL && chr != '#')) return INVALID_SCHEME;\n if (base.cannotBeABaseURL && chr == '#') {\n url.scheme = base.scheme;\n url.path = arraySlice(base.path);\n url.query = base.query;\n url.fragment = '';\n url.cannotBeABaseURL = true;\n state = FRAGMENT;\n break;\n }\n state = base.scheme == 'file' ? FILE : RELATIVE;\n continue;\n\n case SPECIAL_RELATIVE_OR_AUTHORITY:\n if (chr == '/' && codePoints[pointer + 1] == '/') {\n state = SPECIAL_AUTHORITY_IGNORE_SLASHES;\n pointer++;\n } else {\n state = RELATIVE;\n continue;\n } break;\n\n case PATH_OR_AUTHORITY:\n if (chr == '/') {\n state = AUTHORITY;\n break;\n } else {\n state = PATH;\n continue;\n }\n\n case RELATIVE:\n url.scheme = base.scheme;\n if (chr == EOF) {\n url.username = base.username;\n url.password = base.password;\n url.host = base.host;\n url.port = base.port;\n url.path = arraySlice(base.path);\n url.query = base.query;\n } else if (chr == '/' || (chr == '\\\\' && url.isSpecial())) {\n state = RELATIVE_SLASH;\n } else if (chr == '?') {\n url.username = base.username;\n url.password = base.password;\n url.host = base.host;\n url.port = base.port;\n url.path = arraySlice(base.path);\n url.query = '';\n state = QUERY;\n } else if (chr == '#') {\n url.username = base.username;\n url.password = base.password;\n url.host = base.host;\n url.port = base.port;\n url.path = arraySlice(base.path);\n url.query = base.query;\n url.fragment = '';\n state = FRAGMENT;\n } else {\n url.username = base.username;\n url.password = base.password;\n url.host = base.host;\n url.port = base.port;\n url.path = arraySlice(base.path);\n url.path.length--;\n state = PATH;\n continue;\n } break;\n\n case RELATIVE_SLASH:\n if (url.isSpecial() && (chr == '/' || chr == '\\\\')) {\n state = SPECIAL_AUTHORITY_IGNORE_SLASHES;\n } else if (chr == '/') {\n state = AUTHORITY;\n } else {\n url.username = base.username;\n url.password = base.password;\n url.host = base.host;\n url.port = base.port;\n state = PATH;\n continue;\n } break;\n\n case SPECIAL_AUTHORITY_SLASHES:\n state = SPECIAL_AUTHORITY_IGNORE_SLASHES;\n if (chr != '/' || charAt(buffer, pointer + 1) != '/') continue;\n pointer++;\n break;\n\n case SPECIAL_AUTHORITY_IGNORE_SLASHES:\n if (chr != '/' && chr != '\\\\') {\n state = AUTHORITY;\n continue;\n } break;\n\n case AUTHORITY:\n if (chr == '@') {\n if (seenAt) buffer = '%40' + buffer;\n seenAt = true;\n bufferCodePoints = arrayFrom(buffer);\n for (var i = 0; i < bufferCodePoints.length; i++) {\n var codePoint = bufferCodePoints[i];\n if (codePoint == ':' && !seenPasswordToken) {\n seenPasswordToken = true;\n continue;\n }\n var encodedCodePoints = percentEncode(codePoint, userinfoPercentEncodeSet);\n if (seenPasswordToken) url.password += encodedCodePoints;\n else url.username += encodedCodePoints;\n }\n buffer = '';\n } else if (\n chr == EOF || chr == '/' || chr == '?' || chr == '#' ||\n (chr == '\\\\' && url.isSpecial())\n ) {\n if (seenAt && buffer == '') return INVALID_AUTHORITY;\n pointer -= arrayFrom(buffer).length + 1;\n buffer = '';\n state = HOST;\n } else buffer += chr;\n break;\n\n case HOST:\n case HOSTNAME:\n if (stateOverride && url.scheme == 'file') {\n state = FILE_HOST;\n continue;\n } else if (chr == ':' && !seenBracket) {\n if (buffer == '') return INVALID_HOST;\n failure = url.parseHost(buffer);\n if (failure) return failure;\n buffer = '';\n state = PORT;\n if (stateOverride == HOSTNAME) return;\n } else if (\n chr == EOF || chr == '/' || chr == '?' || chr == '#' ||\n (chr == '\\\\' && url.isSpecial())\n ) {\n if (url.isSpecial() && buffer == '') return INVALID_HOST;\n if (stateOverride && buffer == '' && (url.includesCredentials() || url.port !== null)) return;\n failure = url.parseHost(buffer);\n if (failure) return failure;\n buffer = '';\n state = PATH_START;\n if (stateOverride) return;\n continue;\n } else {\n if (chr == '[') seenBracket = true;\n else if (chr == ']') seenBracket = false;\n buffer += chr;\n } break;\n\n case PORT:\n if (exec(DIGIT, chr)) {\n buffer += chr;\n } else if (\n chr == EOF || chr == '/' || chr == '?' || chr == '#' ||\n (chr == '\\\\' && url.isSpecial()) ||\n stateOverride\n ) {\n if (buffer != '') {\n var port = parseInt(buffer, 10);\n if (port > 0xFFFF) return INVALID_PORT;\n url.port = (url.isSpecial() && port === specialSchemes[url.scheme]) ? null : port;\n buffer = '';\n }\n if (stateOverride) return;\n state = PATH_START;\n continue;\n } else return INVALID_PORT;\n break;\n\n case FILE:\n url.scheme = 'file';\n if (chr == '/' || chr == '\\\\') state = FILE_SLASH;\n else if (base && base.scheme == 'file') {\n if (chr == EOF) {\n url.host = base.host;\n url.path = arraySlice(base.path);\n url.query = base.query;\n } else if (chr == '?') {\n url.host = base.host;\n url.path = arraySlice(base.path);\n url.query = '';\n state = QUERY;\n } else if (chr == '#') {\n url.host = base.host;\n url.path = arraySlice(base.path);\n url.query = base.query;\n url.fragment = '';\n state = FRAGMENT;\n } else {\n if (!startsWithWindowsDriveLetter(join(arraySlice(codePoints, pointer), ''))) {\n url.host = base.host;\n url.path = arraySlice(base.path);\n url.shortenPath();\n }\n state = PATH;\n continue;\n }\n } else {\n state = PATH;\n continue;\n } break;\n\n case FILE_SLASH:\n if (chr == '/' || chr == '\\\\') {\n state = FILE_HOST;\n break;\n }\n if (base && base.scheme == 'file' && !startsWithWindowsDriveLetter(join(arraySlice(codePoints, pointer), ''))) {\n if (isWindowsDriveLetter(base.path[0], true)) push(url.path, base.path[0]);\n else url.host = base.host;\n }\n state = PATH;\n continue;\n\n case FILE_HOST:\n if (chr == EOF || chr == '/' || chr == '\\\\' || chr == '?' || chr == '#') {\n if (!stateOverride && isWindowsDriveLetter(buffer)) {\n state = PATH;\n } else if (buffer == '') {\n url.host = '';\n if (stateOverride) return;\n state = PATH_START;\n } else {\n failure = url.parseHost(buffer);\n if (failure) return failure;\n if (url.host == 'localhost') url.host = '';\n if (stateOverride) return;\n buffer = '';\n state = PATH_START;\n } continue;\n } else buffer += chr;\n break;\n\n case PATH_START:\n if (url.isSpecial()) {\n state = PATH;\n if (chr != '/' && chr != '\\\\') continue;\n } else if (!stateOverride && chr == '?') {\n url.query = '';\n state = QUERY;\n } else if (!stateOverride && chr == '#') {\n url.fragment = '';\n state = FRAGMENT;\n } else if (chr != EOF) {\n state = PATH;\n if (chr != '/') continue;\n } break;\n\n case PATH:\n if (\n chr == EOF || chr == '/' ||\n (chr == '\\\\' && url.isSpecial()) ||\n (!stateOverride && (chr == '?' || chr == '#'))\n ) {\n if (isDoubleDot(buffer)) {\n url.shortenPath();\n if (chr != '/' && !(chr == '\\\\' && url.isSpecial())) {\n push(url.path, '');\n }\n } else if (isSingleDot(buffer)) {\n if (chr != '/' && !(chr == '\\\\' && url.isSpecial())) {\n push(url.path, '');\n }\n } else {\n if (url.scheme == 'file' && !url.path.length && isWindowsDriveLetter(buffer)) {\n if (url.host) url.host = '';\n buffer = charAt(buffer, 0) + ':'; // normalize windows drive letter\n }\n push(url.path, buffer);\n }\n buffer = '';\n if (url.scheme == 'file' && (chr == EOF || chr == '?' || chr == '#')) {\n while (url.path.length > 1 && url.path[0] === '') {\n shift(url.path);\n }\n }\n if (chr == '?') {\n url.query = '';\n state = QUERY;\n } else if (chr == '#') {\n url.fragment = '';\n state = FRAGMENT;\n }\n } else {\n buffer += percentEncode(chr, pathPercentEncodeSet);\n } break;\n\n case CANNOT_BE_A_BASE_URL_PATH:\n if (chr == '?') {\n url.query = '';\n state = QUERY;\n } else if (chr == '#') {\n url.fragment = '';\n state = FRAGMENT;\n } else if (chr != EOF) {\n url.path[0] += percentEncode(chr, C0ControlPercentEncodeSet);\n } break;\n\n case QUERY:\n if (!stateOverride && chr == '#') {\n url.fragment = '';\n state = FRAGMENT;\n } else if (chr != EOF) {\n if (chr == \"'\" && url.isSpecial()) url.query += '%27';\n else if (chr == '#') url.query += '%23';\n else url.query += percentEncode(chr, C0ControlPercentEncodeSet);\n } break;\n\n case FRAGMENT:\n if (chr != EOF) url.fragment += percentEncode(chr, fragmentPercentEncodeSet);\n break;\n }\n\n pointer++;\n }\n },\n // https://url.spec.whatwg.org/#host-parsing\n parseHost: function (input) {\n var result, codePoints, index;\n if (charAt(input, 0) == '[') {\n if (charAt(input, input.length - 1) != ']') return INVALID_HOST;\n result = parseIPv6(stringSlice(input, 1, -1));\n if (!result) return INVALID_HOST;\n this.host = result;\n // opaque host\n } else if (!this.isSpecial()) {\n if (exec(FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT, input)) return INVALID_HOST;\n result = '';\n codePoints = arrayFrom(input);\n for (index = 0; index < codePoints.length; index++) {\n result += percentEncode(codePoints[index], C0ControlPercentEncodeSet);\n }\n this.host = result;\n } else {\n input = toASCII(input);\n if (exec(FORBIDDEN_HOST_CODE_POINT, input)) return INVALID_HOST;\n result = parseIPv4(input);\n if (result === null) return INVALID_HOST;\n this.host = result;\n }\n },\n // https://url.spec.whatwg.org/#cannot-have-a-username-password-port\n cannotHaveUsernamePasswordPort: function () {\n return !this.host || this.cannotBeABaseURL || this.scheme == 'file';\n },\n // https://url.spec.whatwg.org/#include-credentials\n includesCredentials: function () {\n return this.username != '' || this.password != '';\n },\n // https://url.spec.whatwg.org/#is-special\n isSpecial: function () {\n return hasOwn(specialSchemes, this.scheme);\n },\n // https://url.spec.whatwg.org/#shorten-a-urls-path\n shortenPath: function () {\n var path = this.path;\n var pathSize = path.length;\n if (pathSize && (this.scheme != 'file' || pathSize != 1 || !isWindowsDriveLetter(path[0], true))) {\n path.length--;\n }\n },\n // https://url.spec.whatwg.org/#concept-url-serializer\n serialize: function () {\n var url = this;\n var scheme = url.scheme;\n var username = url.username;\n var password = url.password;\n var host = url.host;\n var port = url.port;\n var path = url.path;\n var query = url.query;\n var fragment = url.fragment;\n var output = scheme + ':';\n if (host !== null) {\n output += '//';\n if (url.includesCredentials()) {\n output += username + (password ? ':' + password : '') + '@';\n }\n output += serializeHost(host);\n if (port !== null) output += ':' + port;\n } else if (scheme == 'file') output += '//';\n output += url.cannotBeABaseURL ? path[0] : path.length ? '/' + join(path, '/') : '';\n if (query !== null) output += '?' + query;\n if (fragment !== null) output += '#' + fragment;\n return output;\n },\n // https://url.spec.whatwg.org/#dom-url-href\n setHref: function (href) {\n var failure = this.parse(href);\n if (failure) throw TypeError(failure);\n this.searchParams.update();\n },\n // https://url.spec.whatwg.org/#dom-url-origin\n getOrigin: function () {\n var scheme = this.scheme;\n var port = this.port;\n if (scheme == 'blob') try {\n return new URLConstructor(scheme.path[0]).origin;\n } catch (error) {\n return 'null';\n }\n if (scheme == 'file' || !this.isSpecial()) return 'null';\n return scheme + '://' + serializeHost(this.host) + (port !== null ? ':' + port : '');\n },\n // https://url.spec.whatwg.org/#dom-url-protocol\n getProtocol: function () {\n return this.scheme + ':';\n },\n setProtocol: function (protocol) {\n this.parse($toString(protocol) + ':', SCHEME_START);\n },\n // https://url.spec.whatwg.org/#dom-url-username\n getUsername: function () {\n return this.username;\n },\n setUsername: function (username) {\n var codePoints = arrayFrom($toString(username));\n if (this.cannotHaveUsernamePasswordPort()) return;\n this.username = '';\n for (var i = 0; i < codePoints.length; i++) {\n this.username += percentEncode(codePoints[i], userinfoPercentEncodeSet);\n }\n },\n // https://url.spec.whatwg.org/#dom-url-password\n getPassword: function () {\n return this.password;\n },\n setPassword: function (password) {\n var codePoints = arrayFrom($toString(password));\n if (this.cannotHaveUsernamePasswordPort()) return;\n this.password = '';\n for (var i = 0; i < codePoints.length; i++) {\n this.password += percentEncode(codePoints[i], userinfoPercentEncodeSet);\n }\n },\n // https://url.spec.whatwg.org/#dom-url-host\n getHost: function () {\n var host = this.host;\n var port = this.port;\n return host === null ? ''\n : port === null ? serializeHost(host)\n : serializeHost(host) + ':' + port;\n },\n setHost: function (host) {\n if (this.cannotBeABaseURL) return;\n this.parse(host, HOST);\n },\n // https://url.spec.whatwg.org/#dom-url-hostname\n getHostname: function () {\n var host = this.host;\n return host === null ? '' : serializeHost(host);\n },\n setHostname: function (hostname) {\n if (this.cannotBeABaseURL) return;\n this.parse(hostname, HOSTNAME);\n },\n // https://url.spec.whatwg.org/#dom-url-port\n getPort: function () {\n var port = this.port;\n return port === null ? '' : $toString(port);\n },\n setPort: function (port) {\n if (this.cannotHaveUsernamePasswordPort()) return;\n port = $toString(port);\n if (port == '') this.port = null;\n else this.parse(port, PORT);\n },\n // https://url.spec.whatwg.org/#dom-url-pathname\n getPathname: function () {\n var path = this.path;\n return this.cannotBeABaseURL ? path[0] : path.length ? '/' + join(path, '/') : '';\n },\n setPathname: function (pathname) {\n if (this.cannotBeABaseURL) return;\n this.path = [];\n this.parse(pathname, PATH_START);\n },\n // https://url.spec.whatwg.org/#dom-url-search\n getSearch: function () {\n var query = this.query;\n return query ? '?' + query : '';\n },\n setSearch: function (search) {\n search = $toString(search);\n if (search == '') {\n this.query = null;\n } else {\n if ('?' == charAt(search, 0)) search = stringSlice(search, 1);\n this.query = '';\n this.parse(search, QUERY);\n }\n this.searchParams.update();\n },\n // https://url.spec.whatwg.org/#dom-url-searchparams\n getSearchParams: function () {\n return this.searchParams.facade;\n },\n // https://url.spec.whatwg.org/#dom-url-hash\n getHash: function () {\n var fragment = this.fragment;\n return fragment ? '#' + fragment : '';\n },\n setHash: function (hash) {\n hash = $toString(hash);\n if (hash == '') {\n this.fragment = null;\n return;\n }\n if ('#' == charAt(hash, 0)) hash = stringSlice(hash, 1);\n this.fragment = '';\n this.parse(hash, FRAGMENT);\n },\n update: function () {\n this.query = this.searchParams.serialize() || null;\n }\n};\n\n// `URL` constructor\n// https://url.spec.whatwg.org/#url-class\nvar URLConstructor = function URL(url /* , base */) {\n var that = anInstance(this, URLPrototype);\n var base = validateArgumentsLength(arguments.length, 1) > 1 ? arguments[1] : undefined;\n var state = setInternalState(that, new URLState(url, false, base));\n if (!DESCRIPTORS) {\n that.href = state.serialize();\n that.origin = state.getOrigin();\n that.protocol = state.getProtocol();\n that.username = state.getUsername();\n that.password = state.getPassword();\n that.host = state.getHost();\n that.hostname = state.getHostname();\n that.port = state.getPort();\n that.pathname = state.getPathname();\n that.search = state.getSearch();\n that.searchParams = state.getSearchParams();\n that.hash = state.getHash();\n }\n};\n\nvar URLPrototype = URLConstructor.prototype;\n\nvar accessorDescriptor = function (getter, setter) {\n return {\n get: function () {\n return getInternalURLState(this)[getter]();\n },\n set: setter && function (value) {\n return getInternalURLState(this)[setter](value);\n },\n configurable: true,\n enumerable: true\n };\n};\n\nif (DESCRIPTORS) {\n // `URL.prototype.href` accessors pair\n // https://url.spec.whatwg.org/#dom-url-href\n defineBuiltInAccessor(URLPrototype, 'href', accessorDescriptor('serialize', 'setHref'));\n // `URL.prototype.origin` getter\n // https://url.spec.whatwg.org/#dom-url-origin\n defineBuiltInAccessor(URLPrototype, 'origin', accessorDescriptor('getOrigin'));\n // `URL.prototype.protocol` accessors pair\n // https://url.spec.whatwg.org/#dom-url-protocol\n defineBuiltInAccessor(URLPrototype, 'protocol', accessorDescriptor('getProtocol', 'setProtocol'));\n // `URL.prototype.username` accessors pair\n // https://url.spec.whatwg.org/#dom-url-username\n defineBuiltInAccessor(URLPrototype, 'username', accessorDescriptor('getUsername', 'setUsername'));\n // `URL.prototype.password` accessors pair\n // https://url.spec.whatwg.org/#dom-url-password\n defineBuiltInAccessor(URLPrototype, 'password', accessorDescriptor('getPassword', 'setPassword'));\n // `URL.prototype.host` accessors pair\n // https://url.spec.whatwg.org/#dom-url-host\n defineBuiltInAccessor(URLPrototype, 'host', accessorDescriptor('getHost', 'setHost'));\n // `URL.prototype.hostname` accessors pair\n // https://url.spec.whatwg.org/#dom-url-hostname\n defineBuiltInAccessor(URLPrototype, 'hostname', accessorDescriptor('getHostname', 'setHostname'));\n // `URL.prototype.port` accessors pair\n // https://url.spec.whatwg.org/#dom-url-port\n defineBuiltInAccessor(URLPrototype, 'port', accessorDescriptor('getPort', 'setPort'));\n // `URL.prototype.pathname` accessors pair\n // https://url.spec.whatwg.org/#dom-url-pathname\n defineBuiltInAccessor(URLPrototype, 'pathname', accessorDescriptor('getPathname', 'setPathname'));\n // `URL.prototype.search` accessors pair\n // https://url.spec.whatwg.org/#dom-url-search\n defineBuiltInAccessor(URLPrototype, 'search', accessorDescriptor('getSearch', 'setSearch'));\n // `URL.prototype.searchParams` getter\n // https://url.spec.whatwg.org/#dom-url-searchparams\n defineBuiltInAccessor(URLPrototype, 'searchParams', accessorDescriptor('getSearchParams'));\n // `URL.prototype.hash` accessors pair\n // https://url.spec.whatwg.org/#dom-url-hash\n defineBuiltInAccessor(URLPrototype, 'hash', accessorDescriptor('getHash', 'setHash'));\n}\n\n// `URL.prototype.toJSON` method\n// https://url.spec.whatwg.org/#dom-url-tojson\ndefineBuiltIn(URLPrototype, 'toJSON', function toJSON() {\n return getInternalURLState(this).serialize();\n}, { enumerable: true });\n\n// `URL.prototype.toString` method\n// https://url.spec.whatwg.org/#URL-stringification-behavior\ndefineBuiltIn(URLPrototype, 'toString', function toString() {\n return getInternalURLState(this).serialize();\n}, { enumerable: true });\n\nif (NativeURL) {\n var nativeCreateObjectURL = NativeURL.createObjectURL;\n var nativeRevokeObjectURL = NativeURL.revokeObjectURL;\n // `URL.createObjectURL` method\n // https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL\n if (nativeCreateObjectURL) defineBuiltIn(URLConstructor, 'createObjectURL', bind(nativeCreateObjectURL, NativeURL));\n // `URL.revokeObjectURL` method\n // https://developer.mozilla.org/en-US/docs/Web/API/URL/revokeObjectURL\n if (nativeRevokeObjectURL) defineBuiltIn(URLConstructor, 'revokeObjectURL', bind(nativeRevokeObjectURL, NativeURL));\n}\n\nsetToStringTag(URLConstructor, 'URL');\n\n$({ global: true, constructor: true, forced: !USE_NATIVE_URL, sham: !DESCRIPTORS }, {\n URL: URLConstructor\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/web.url.constructor.js?"); /***/ }), -/***/ "./node_modules/core-js/modules/web.dom-collections.for-each.js": -/*!**********************************************************************!*\ - !*** ./node_modules/core-js/modules/web.dom-collections.for-each.js ***! - \**********************************************************************/ +/***/ "./node_modules/core-js/modules/web.url.js": +/*!*************************************************!*\ + !*** ./node_modules/core-js/modules/web.url.js ***! + \*************************************************/ /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { -eval("var global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js/internals/global.js\");\nvar DOMIterables = __webpack_require__(/*! ../internals/dom-iterables */ \"./node_modules/core-js/internals/dom-iterables.js\");\nvar DOMTokenListPrototype = __webpack_require__(/*! ../internals/dom-token-list-prototype */ \"./node_modules/core-js/internals/dom-token-list-prototype.js\");\nvar forEach = __webpack_require__(/*! ../internals/array-for-each */ \"./node_modules/core-js/internals/array-for-each.js\");\nvar createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ \"./node_modules/core-js/internals/create-non-enumerable-property.js\");\n\nvar handlePrototype = function (CollectionPrototype) {\n // some Chrome versions have non-configurable methods on DOMTokenList\n if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {\n createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach);\n } catch (error) {\n CollectionPrototype.forEach = forEach;\n }\n};\n\nfor (var COLLECTION_NAME in DOMIterables) {\n if (DOMIterables[COLLECTION_NAME]) {\n handlePrototype(global[COLLECTION_NAME] && global[COLLECTION_NAME].prototype);\n }\n}\n\nhandlePrototype(DOMTokenListPrototype);\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/web.dom-collections.for-each.js?"); +eval("// TODO: Remove this module from `core-js@4` since it's replaced to module below\n__webpack_require__(/*! ../modules/web.url.constructor */ \"./node_modules/core-js/modules/web.url.constructor.js\");\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/web.url.js?"); /***/ }), -/***/ "./node_modules/core-js/modules/web.dom-collections.iterator.js": -/*!**********************************************************************!*\ - !*** ./node_modules/core-js/modules/web.dom-collections.iterator.js ***! - \**********************************************************************/ -/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { +/***/ "./node_modules/create-point-cb/dist/bundle.js": +/*!*****************************************************!*\ + !*** ./node_modules/create-point-cb/dist/bundle.js ***! + \*****************************************************/ +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { -eval("var global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js/internals/global.js\");\nvar DOMIterables = __webpack_require__(/*! ../internals/dom-iterables */ \"./node_modules/core-js/internals/dom-iterables.js\");\nvar DOMTokenListPrototype = __webpack_require__(/*! ../internals/dom-token-list-prototype */ \"./node_modules/core-js/internals/dom-token-list-prototype.js\");\nvar ArrayIteratorMethods = __webpack_require__(/*! ../modules/es.array.iterator */ \"./node_modules/core-js/modules/es.array.iterator.js\");\nvar createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ \"./node_modules/core-js/internals/create-non-enumerable-property.js\");\nvar wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js/internals/well-known-symbol.js\");\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar ArrayValues = ArrayIteratorMethods.values;\n\nvar handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {\n if (CollectionPrototype) {\n // some Chrome versions have non-configurable methods on DOMTokenList\n if (CollectionPrototype[ITERATOR] !== ArrayValues) try {\n createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);\n } catch (error) {\n CollectionPrototype[ITERATOR] = ArrayValues;\n }\n if (!CollectionPrototype[TO_STRING_TAG]) {\n createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);\n }\n if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {\n // some Chrome versions have non-configurable methods on DOMTokenList\n if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {\n createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);\n } catch (error) {\n CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];\n }\n }\n }\n};\n\nfor (var COLLECTION_NAME in DOMIterables) {\n handlePrototype(global[COLLECTION_NAME] && global[COLLECTION_NAME].prototype, COLLECTION_NAME);\n}\n\nhandlePrototype(DOMTokenListPrototype, 'DOMTokenList');\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/web.dom-collections.iterator.js?"); +"use strict"; +eval("\n\nvar typeFunc = __webpack_require__(/*! type-func */ \"./node_modules/type-func/dist/bundle.js\");\n\nfunction createPointCB(object, options) {\n\n // A persistent object (as opposed to returned object) is used to save memory\n // This is good to prevent layout thrashing, or for games, and such\n\n // NOTE\n // This uses IE fixes which should be OK to remove some day. :)\n // Some speed will be gained by removal of these.\n\n // pointCB should be saved in a variable on return\n // This allows the usage of element.removeEventListener\n\n options = options || {};\n\n var allowUpdate = typeFunc.boolean(options.allowUpdate, true);\n\n /*if(typeof options.allowUpdate === 'function'){\n allowUpdate = options.allowUpdate;\n }else{\n allowUpdate = function(){return true;};\n }*/\n\n return function pointCB(event) {\n\n event = event || window.event; // IE-ism\n object.target = event.target || event.srcElement || event.originalTarget;\n object.element = this;\n object.type = event.type;\n\n if (!allowUpdate(event)) {\n return;\n }\n\n // Support touch\n // http://www.creativebloq.com/javascript/make-your-site-work-touch-devices-51411644\n\n if (event.targetTouches) {\n object.x = event.targetTouches[0].clientX;\n object.y = event.targetTouches[0].clientY;\n object.pageX = event.targetTouches[0].pageX;\n object.pageY = event.targetTouches[0].pageY;\n object.screenX = event.targetTouches[0].screenX;\n object.screenY = event.targetTouches[0].screenY;\n } else {\n\n // If pageX/Y aren't available and clientX/Y are,\n // calculate pageX/Y - logic taken from jQuery.\n // (This is to support old IE)\n // NOTE Hopefully this can be removed soon.\n\n if (event.pageX === null && event.clientX !== null) {\n var eventDoc = event.target && event.target.ownerDocument || document;\n var doc = eventDoc.documentElement;\n var body = eventDoc.body;\n\n object.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0);\n object.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0);\n } else {\n object.pageX = event.pageX;\n object.pageY = event.pageY;\n }\n\n // pageX, and pageY change with page scroll\n // so we're not going to use those for x, and y.\n // NOTE Most browsers also alias clientX/Y with x/y\n // so that's something to consider down the road.\n\n object.x = event.clientX;\n object.y = event.clientY;\n\n object.screenX = event.screenX;\n object.screenY = event.screenY;\n }\n\n object.clientX = object.x;\n object.clientY = object.y;\n };\n\n //NOTE Remember accessibility, Aria roles, and labels.\n}\n\n/*\ngit remote add origin https://github.com/hollowdoor/create_point_cb.git\ngit push -u origin master\n*/\n\nmodule.exports = createPointCB;\n//# sourceMappingURL=bundle.js.map\n\n\n//# sourceURL=webpack://Formio/./node_modules/create-point-cb/dist/bundle.js?"); /***/ }), @@ -10485,13 +11500,57 @@ eval("// Polyfill for creating CustomEvents on IE9/10/11\n\n// code pulled from: /***/ }), +/***/ "./node_modules/dom-autoscroller/dist/bundle.js": +/*!******************************************************!*\ + !*** ./node_modules/dom-autoscroller/dist/bundle.js ***! + \******************************************************/ +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +eval("\n\nfunction _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }\n\nvar typeFunc = __webpack_require__(/*! type-func */ \"./node_modules/type-func/dist/bundle.js\");\nvar animationFramePolyfill = __webpack_require__(/*! animation-frame-polyfill */ \"./node_modules/animation-frame-polyfill/lib/animation-frame-polyfill.module.js\");\nvar domSet = __webpack_require__(/*! dom-set */ \"./node_modules/dom-set/dist/bundle.js\");\nvar domPlane = __webpack_require__(/*! dom-plane */ \"./node_modules/dom-plane/dist/bundle.js\");\nvar mousemoveDispatcher = _interopDefault(__webpack_require__(/*! dom-mousemove-dispatcher */ \"./node_modules/dom-mousemove-dispatcher/dist/bundle.js\"));\n\nfunction AutoScroller(elements, options){\n if ( options === void 0 ) options = {};\n\n var self = this;\n var maxSpeed = 4, scrolling = false;\n\n this.margin = options.margin || -1;\n //this.scrolling = false;\n this.scrollWhenOutside = options.scrollWhenOutside || false;\n\n var point = {},\n pointCB = domPlane.createPointCB(point),\n dispatcher = mousemoveDispatcher(),\n down = false;\n\n window.addEventListener('mousemove', pointCB, false);\n window.addEventListener('touchmove', pointCB, false);\n\n if(!isNaN(options.maxSpeed)){\n maxSpeed = options.maxSpeed;\n }\n\n this.autoScroll = typeFunc.boolean(options.autoScroll);\n this.syncMove = typeFunc.boolean(options.syncMove, false);\n\n this.destroy = function(forceCleanAnimation) {\n window.removeEventListener('mousemove', pointCB, false);\n window.removeEventListener('touchmove', pointCB, false);\n window.removeEventListener('mousedown', onDown, false);\n window.removeEventListener('touchstart', onDown, false);\n window.removeEventListener('mouseup', onUp, false);\n window.removeEventListener('touchend', onUp, false);\n window.removeEventListener('pointerup', onUp, false);\n window.removeEventListener('mouseleave', onMouseOut, false);\n\n window.removeEventListener('mousemove', onMove, false);\n window.removeEventListener('touchmove', onMove, false);\n\n window.removeEventListener('scroll', setScroll, true);\n elements = [];\n if(forceCleanAnimation){\n cleanAnimation();\n }\n };\n\n this.add = function(){\n var element = [], len = arguments.length;\n while ( len-- ) element[ len ] = arguments[ len ];\n\n domSet.addElements.apply(void 0, [ elements ].concat( element ));\n return this;\n };\n\n this.remove = function(){\n var element = [], len = arguments.length;\n while ( len-- ) element[ len ] = arguments[ len ];\n\n return domSet.removeElements.apply(void 0, [ elements ].concat( element ));\n };\n\n var hasWindow = null, windowAnimationFrame;\n\n if(Object.prototype.toString.call(elements) !== '[object Array]'){\n elements = [elements];\n }\n\n (function(temp){\n elements = [];\n temp.forEach(function(element){\n if(element === window){\n hasWindow = window;\n }else{\n self.add(element);\n }\n });\n }(elements));\n\n Object.defineProperties(this, {\n down: {\n get: function(){ return down; }\n },\n maxSpeed: {\n get: function(){ return maxSpeed; }\n },\n point: {\n get: function(){ return point; }\n },\n scrolling: {\n get: function(){ return scrolling; }\n }\n });\n\n var n = 0, current = null, animationFrame;\n\n window.addEventListener('mousedown', onDown, false);\n window.addEventListener('touchstart', onDown, false);\n window.addEventListener('mouseup', onUp, false);\n window.addEventListener('touchend', onUp, false);\n\n /*\n IE does not trigger mouseup event when scrolling.\n It is a known issue that Microsoft won't fix.\n https://connect.microsoft.com/IE/feedback/details/783058/scrollbar-trigger-mousedown-but-not-mouseup\n IE supports pointer events instead\n */\n window.addEventListener('pointerup', onUp, false);\n\n window.addEventListener('mousemove', onMove, false);\n window.addEventListener('touchmove', onMove, false);\n\n window.addEventListener('mouseleave', onMouseOut, false);\n\n window.addEventListener('scroll', setScroll, true);\n\n function setScroll(e){\n\n for(var i=0; i rect.right - self.margin){\n scrollx = Math.ceil(\n Math.min(1, (point.x - rect.right) / self.margin + 1) * self.maxSpeed\n );\n }else{\n scrollx = 0;\n }\n\n if(point.y < rect.top + self.margin){\n scrolly = Math.floor(\n Math.max(-1, (point.y - rect.top) / self.margin - 1) * self.maxSpeed\n );\n }else if(point.y > rect.bottom - self.margin){\n scrolly = Math.ceil(\n Math.min(1, (point.y - rect.bottom) / self.margin + 1) * self.maxSpeed\n );\n }else{\n scrolly = 0;\n }\n\n if(self.syncMove()){\n /*\n Notes about mousemove event dispatch.\n screen(X/Y) should need to be updated.\n Some other properties might need to be set.\n Keep the syncMove option default false until all inconsistencies are taken care of.\n */\n dispatcher.dispatch(el, {\n pageX: point.pageX + scrollx,\n pageY: point.pageY + scrolly,\n clientX: point.x + scrollx,\n clientY: point.y + scrolly\n });\n }\n\n setTimeout(function (){\n\n if(scrolly){\n scrollY(el, scrolly);\n }\n\n if(scrollx){\n scrollX(el, scrollx);\n }\n\n });\n }\n\n function scrollY(el, amount){\n if(el === window){\n window.scrollTo(el.pageXOffset, el.pageYOffset + amount);\n }else{\n el.scrollTop += amount;\n }\n }\n\n function scrollX(el, amount){\n if(el === window){\n window.scrollTo(el.pageXOffset + amount, el.pageYOffset);\n }else{\n el.scrollLeft += amount;\n }\n }\n\n}\n\nfunction AutoScrollerFactory(element, options){\n return new AutoScroller(element, options);\n}\n\nfunction inside(point, el, rect){\n if(!rect){\n return domPlane.pointInside(point, el);\n }else{\n return (point.y > rect.top && point.y < rect.bottom &&\n point.x > rect.left && point.x < rect.right);\n }\n}\n\n/*\ngit remote add origin https://github.com/hollowdoor/dom_autoscroller.git\ngit push -u origin master\n*/\n\nmodule.exports = AutoScrollerFactory;\n//# sourceMappingURL=bundle.js.map\n\n\n//# sourceURL=webpack://Formio/./node_modules/dom-autoscroller/dist/bundle.js?"); + +/***/ }), + +/***/ "./node_modules/dom-mousemove-dispatcher/dist/bundle.js": +/*!**************************************************************!*\ + !*** ./node_modules/dom-mousemove-dispatcher/dist/bundle.js ***! + \**************************************************************/ +/***/ (function(module) { + +"use strict"; +eval("\n\nvar objectCreate = void 0;\nif (typeof Object.create != 'function') {\n objectCreate = function (undefined) {\n var Temp = function Temp() {};\n return function (prototype, propertiesObject) {\n if (prototype !== Object(prototype) && prototype !== null) {\n throw TypeError('Argument must be an object, or null');\n }\n Temp.prototype = prototype || {};\n var result = new Temp();\n Temp.prototype = null;\n if (propertiesObject !== undefined) {\n Object.defineProperties(result, propertiesObject);\n }\n\n // to imitate the case of Object.create(null)\n if (prototype === null) {\n result.__proto__ = null;\n }\n return result;\n };\n }();\n} else {\n objectCreate = Object.create;\n}\n\nvar objectCreate$1 = objectCreate;\n\nvar mouseEventProps = ['altKey', 'button', 'buttons', 'clientX', 'clientY', 'ctrlKey', 'metaKey', 'movementX', 'movementY', 'offsetX', 'offsetY', 'pageX', 'pageY', 'region', 'relatedTarget', 'screenX', 'screenY', 'shiftKey', 'which', 'x', 'y'];\n\nfunction createDispatcher(element) {\n\n var defaultSettings = {\n screenX: 0,\n screenY: 0,\n clientX: 0,\n clientY: 0,\n ctrlKey: false,\n shiftKey: false,\n altKey: false,\n metaKey: false,\n button: 0,\n buttons: 1,\n relatedTarget: null,\n region: null\n };\n\n if (element !== undefined) {\n element.addEventListener('mousemove', onMove);\n }\n\n function onMove(e) {\n for (var i = 0; i < mouseEventProps.length; i++) {\n defaultSettings[mouseEventProps[i]] = e[mouseEventProps[i]];\n }\n }\n\n var dispatch = function () {\n if (MouseEvent) {\n return function m1(element, initMove, data) {\n var evt = new MouseEvent('mousemove', createMoveInit(defaultSettings, initMove));\n\n //evt.dispatched = 'mousemove';\n setSpecial(evt, data);\n\n return element.dispatchEvent(evt);\n };\n } else if (typeof document.createEvent === 'function') {\n return function m2(element, initMove, data) {\n var settings = createMoveInit(defaultSettings, initMove);\n var evt = document.createEvent('MouseEvents');\n\n evt.initMouseEvent(\"mousemove\", true, //can bubble\n true, //cancelable\n window, //view\n 0, //detail\n settings.screenX, //0, //screenX\n settings.screenY, //0, //screenY\n settings.clientX, //80, //clientX\n settings.clientY, //20, //clientY\n settings.ctrlKey, //false, //ctrlKey\n settings.altKey, //false, //altKey\n settings.shiftKey, //false, //shiftKey\n settings.metaKey, //false, //metaKey\n settings.button, //0, //button\n settings.relatedTarget //null //relatedTarget\n );\n\n //evt.dispatched = 'mousemove';\n setSpecial(evt, data);\n\n return element.dispatchEvent(evt);\n };\n } else if (typeof document.createEventObject === 'function') {\n return function m3(element, initMove, data) {\n var evt = document.createEventObject();\n var settings = createMoveInit(defaultSettings, initMove);\n for (var name in settings) {\n evt[name] = settings[name];\n }\n\n //evt.dispatched = 'mousemove';\n setSpecial(evt, data);\n\n return element.dispatchEvent(evt);\n };\n }\n }();\n\n function destroy() {\n if (element) element.removeEventListener('mousemove', onMove, false);\n defaultSettings = null;\n }\n\n return {\n destroy: destroy,\n dispatch: dispatch\n };\n}\n\nfunction createMoveInit(defaultSettings, initMove) {\n initMove = initMove || {};\n var settings = objectCreate$1(defaultSettings);\n for (var i = 0; i < mouseEventProps.length; i++) {\n if (initMove[mouseEventProps[i]] !== undefined) settings[mouseEventProps[i]] = initMove[mouseEventProps[i]];\n }\n\n return settings;\n}\n\nfunction setSpecial(e, data) {\n console.log('data ', data);\n e.data = data || {};\n e.dispatched = 'mousemove';\n}\n\n/*\nhttp://marcgrabanski.com/simulating-mouse-click-events-in-javascript/\n*/\n\nmodule.exports = createDispatcher;\n//# sourceMappingURL=bundle.js.map\n\n\n//# sourceURL=webpack://Formio/./node_modules/dom-mousemove-dispatcher/dist/bundle.js?"); + +/***/ }), + +/***/ "./node_modules/dom-plane/dist/bundle.js": +/*!***********************************************!*\ + !*** ./node_modules/dom-plane/dist/bundle.js ***! + \***********************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\n\nfunction _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }\n\nvar createPointCb = _interopDefault(__webpack_require__(/*! create-point-cb */ \"./node_modules/create-point-cb/dist/bundle.js\"));\n\nfunction createWindowRect() {\n var props = {\n top: { value: 0, enumerable: true },\n left: { value: 0, enumerable: true },\n right: { value: window.innerWidth, enumerable: true },\n bottom: { value: window.innerHeight, enumerable: true },\n width: { value: window.innerWidth, enumerable: true },\n height: { value: window.innerHeight, enumerable: true },\n x: { value: 0, enumerable: true },\n y: { value: 0, enumerable: true }\n };\n\n if (Object.create) {\n return Object.create({}, props);\n } else {\n var rect = {};\n Object.defineProperties(rect, props);\n return rect;\n }\n}\n\nfunction getClientRect(el) {\n if (el === window) {\n return createWindowRect();\n } else {\n try {\n var rect = el.getBoundingClientRect();\n if (rect.x === undefined) {\n rect.x = rect.left;\n rect.y = rect.top;\n }\n return rect;\n } catch (e) {\n throw new TypeError(\"Can't call getBoundingClientRect on \" + el);\n }\n }\n}\n\nfunction pointInside(point, el) {\n var rect = getClientRect(el);\n return point.y > rect.top && point.y < rect.bottom && point.x > rect.left && point.x < rect.right;\n}\n\nexports.createPointCB = createPointCb;\nexports.getClientRect = getClientRect;\nexports.pointInside = pointInside;\n//# sourceMappingURL=bundle.js.map\n\n\n//# sourceURL=webpack://Formio/./node_modules/dom-plane/dist/bundle.js?"); + +/***/ }), + +/***/ "./node_modules/dom-set/dist/bundle.js": +/*!*********************************************!*\ + !*** ./node_modules/dom-set/dist/bundle.js ***! + \*********************************************/ +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\n\nfunction _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }\n\nvar arrayFrom = _interopDefault(__webpack_require__(/*! array-from */ \"./node_modules/array-from/index.js\"));\nvar isArray = _interopDefault(__webpack_require__(/*! is-array */ \"./node_modules/is-array/index.js\"));\nvar isElement = _interopDefault(__webpack_require__(/*! iselement */ \"./node_modules/iselement/module/index.js\"));\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol ? \"symbol\" : typeof obj; };\n\n/**\n * Returns `true` if provided input is Element.\n * @name isElement\n * @param {*} [input]\n * @returns {boolean}\n */\nvar isElement$1 = function (input) {\n return input != null && (typeof input === 'undefined' ? 'undefined' : _typeof(input)) === 'object' && input.nodeType === 1 && _typeof(input.style) === 'object' && _typeof(input.ownerDocument) === 'object';\n};\n\nfunction select(selector){\n if(typeof selector === 'string'){\n try{\n return document.querySelector(selector);\n }catch(e){\n throw e;\n }\n }else if(isElement(selector)){\n return selector;\n }\n}\n\nfunction selectAll(selector){\n if(typeof selector === 'string'){\n return Array.prototype.slice.apply(\n document.querySelectorAll(selector)\n );\n }else if(isArray(selector)){\n return selector.map(select);\n }else if('length' in selector){\n return arrayFrom(selector).map(select);\n }\n}\n\nfunction indexOfElement(elements, element){\n element = resolveElement(element, true);\n if(!isElement$1(element)) { return -1; }\n for(var i=0; i 0 ) toAdd[ len ] = arguments[ len + 1 ];\n\n toAdd = toAdd.map(resolveElement);\n return pushElements(elements, toAdd);\n}\n\nfunction removeElements(elements){\n var toRemove = [], len = arguments.length - 1;\n while ( len-- > 0 ) toRemove[ len ] = arguments[ len + 1 ];\n\n return toRemove.map(resolveElement).reduce(function (last, e){\n\n var index = indexOfElement(elements, e);\n\n if(index !== -1)\n { return last.concat(elements.splice(index, 1)); }\n return last;\n }, []);\n}\n\nfunction resolveElement(element, noThrow){\n if(typeof element === 'string'){\n try{\n return document.querySelector(element);\n }catch(e){\n throw e;\n }\n\n }\n\n if(!isElement$1(element) && !noThrow){\n throw new TypeError((element + \" is not a DOM element.\"));\n }\n return element;\n}\n\nexports.indexOfElement = indexOfElement;\nexports.hasElement = hasElement;\nexports.domListOf = domListOf;\nexports.concatElementLists = concatElementLists;\nexports.addElements = addElements;\nexports.removeElements = removeElements;\nexports.resolveElement = resolveElement;\nexports.select = select;\nexports.selectAll = selectAll;\n//# sourceMappingURL=bundle.js.map\n\n\n//# sourceURL=webpack://Formio/./node_modules/dom-set/dist/bundle.js?"); + +/***/ }), + /***/ "./node_modules/dompurify/dist/purify.js": /*!***********************************************!*\ !*** ./node_modules/dompurify/dist/purify.js ***! \***********************************************/ /***/ (function(module) { -eval("/*! @license DOMPurify 2.4.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.4.0/LICENSE */\n\n(function (global, factory) {\n true ? module.exports = factory() :\n 0;\n})(this, (function () { 'use strict';\n\n function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n }\n\n function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n }\n\n function _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n }\n\n function _construct(Parent, args, Class) {\n if (_isNativeReflectConstruct()) {\n _construct = Reflect.construct;\n } else {\n _construct = function _construct(Parent, args, Class) {\n var a = [null];\n a.push.apply(a, args);\n var Constructor = Function.bind.apply(Parent, a);\n var instance = new Constructor();\n if (Class) _setPrototypeOf(instance, Class.prototype);\n return instance;\n };\n }\n\n return _construct.apply(null, arguments);\n }\n\n function _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n }\n\n function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n }\n\n function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n }\n\n function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n }\n\n function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n }\n\n function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n\n var hasOwnProperty = Object.hasOwnProperty,\n setPrototypeOf = Object.setPrototypeOf,\n isFrozen = Object.isFrozen,\n getPrototypeOf = Object.getPrototypeOf,\n getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n var freeze = Object.freeze,\n seal = Object.seal,\n create = Object.create; // eslint-disable-line import/no-mutable-exports\n\n var _ref = typeof Reflect !== 'undefined' && Reflect,\n apply = _ref.apply,\n construct = _ref.construct;\n\n if (!apply) {\n apply = function apply(fun, thisValue, args) {\n return fun.apply(thisValue, args);\n };\n }\n\n if (!freeze) {\n freeze = function freeze(x) {\n return x;\n };\n }\n\n if (!seal) {\n seal = function seal(x) {\n return x;\n };\n }\n\n if (!construct) {\n construct = function construct(Func, args) {\n return _construct(Func, _toConsumableArray(args));\n };\n }\n\n var arrayForEach = unapply(Array.prototype.forEach);\n var arrayPop = unapply(Array.prototype.pop);\n var arrayPush = unapply(Array.prototype.push);\n var stringToLowerCase = unapply(String.prototype.toLowerCase);\n var stringMatch = unapply(String.prototype.match);\n var stringReplace = unapply(String.prototype.replace);\n var stringIndexOf = unapply(String.prototype.indexOf);\n var stringTrim = unapply(String.prototype.trim);\n var regExpTest = unapply(RegExp.prototype.test);\n var typeErrorCreate = unconstruct(TypeError);\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\n return apply(func, thisArg, args);\n };\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\n return construct(func, args);\n };\n }\n /* Add properties to a lookup table */\n\n function addToSet(set, array, transformCaseFunc) {\n transformCaseFunc = transformCaseFunc ? transformCaseFunc : stringToLowerCase;\n\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\n var l = array.length;\n\n while (l--) {\n var element = array[l];\n\n if (typeof element === 'string') {\n var lcElement = transformCaseFunc(element);\n\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\n element = lcElement;\n }\n }\n\n set[element] = true;\n }\n\n return set;\n }\n /* Shallow clone an object */\n\n function clone(object) {\n var newObject = create(null);\n var property;\n\n for (property in object) {\n if (apply(hasOwnProperty, object, [property])) {\n newObject[property] = object[property];\n }\n }\n\n return newObject;\n }\n /* IE10 doesn't support __lookupGetter__ so lets'\n * simulate it. It also automatically checks\n * if the prop is function or getter and behaves\n * accordingly. */\n\n function lookupGetter(object, prop) {\n while (object !== null) {\n var desc = getOwnPropertyDescriptor(object, prop);\n\n if (desc) {\n if (desc.get) {\n return unapply(desc.get);\n }\n\n if (typeof desc.value === 'function') {\n return unapply(desc.value);\n }\n }\n\n object = getPrototypeOf(object);\n }\n\n function fallbackValue(element) {\n console.warn('fallback value for', element);\n return null;\n }\n\n return fallbackValue;\n }\n\n var 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']); // SVG\n\n var 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 var svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']); // 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\n var svgDisallowed = freeze(['animate', 'color-profile', 'cursor', 'discard', 'fedropshadow', '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 var 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']); // Similarly to SVG, we want to know all MathML elements,\n // even those that we disallow by default.\n\n var mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']);\n var text = freeze(['#text']);\n\n var 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', 'xmlns', 'slot']);\n var 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 var 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 var xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);\n\n var MUSTACHE_EXPR = seal(/\\{\\{[\\w\\W]*|[\\w\\W]*\\}\\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode\n\n var ERB_EXPR = seal(/<%[\\w\\W]*|[\\w\\W]*%>/gm);\n var DATA_ATTR = seal(/^data-[\\-\\w.\\u00B7-\\uFFFF]/); // eslint-disable-line no-useless-escape\n\n var ARIA_ATTR = seal(/^aria-[\\-\\w]+$/); // eslint-disable-line no-useless-escape\n\n var IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i // eslint-disable-line no-useless-escape\n );\n var IS_SCRIPT_OR_DATA = seal(/^(?:\\w+script|data):/i);\n var ATTR_WHITESPACE = seal(/[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]/g // eslint-disable-line no-control-regex\n );\n var DOCTYPE_NAME = seal(/^html$/i);\n\n var getGlobal = function getGlobal() {\n return typeof window === 'undefined' ? null : window;\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 {Document} document The document object (to determine policy name suffix)\n * @return {?TrustedTypePolicy} The policy created (or null, if Trusted Types\n * are not supported).\n */\n\n\n var _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, document) {\n if (_typeof(trustedTypes) !== 'object' || typeof trustedTypes.createPolicy !== 'function') {\n return null;\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\n\n var suffix = null;\n var ATTR_NAME = 'data-tt-policy-suffix';\n\n if (document.currentScript && document.currentScript.hasAttribute(ATTR_NAME)) {\n suffix = document.currentScript.getAttribute(ATTR_NAME);\n }\n\n var policyName = 'dompurify' + (suffix ? '#' + suffix : '');\n\n try {\n return trustedTypes.createPolicy(policyName, {\n createHTML: function createHTML(html) {\n return html;\n },\n createScriptURL: function 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\n function createDOMPurify() {\n var window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();\n\n var DOMPurify = function DOMPurify(root) {\n return createDOMPurify(root);\n };\n /**\n * Version label, exposed for easier checks\n * if DOMPurify is up to date or not\n */\n\n\n DOMPurify.version = '2.4.0';\n /**\n * Array of elements that DOMPurify removed during sanitation.\n * Empty if nothing was removed.\n */\n\n DOMPurify.removed = [];\n\n if (!window || !window.document || window.document.nodeType !== 9) {\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\n var originalDocument = window.document;\n var document = window.document;\n var DocumentFragment = window.DocumentFragment,\n HTMLTemplateElement = window.HTMLTemplateElement,\n Node = window.Node,\n Element = window.Element,\n NodeFilter = window.NodeFilter,\n _window$NamedNodeMap = window.NamedNodeMap,\n NamedNodeMap = _window$NamedNodeMap === void 0 ? window.NamedNodeMap || window.MozNamedAttrMap : _window$NamedNodeMap,\n HTMLFormElement = window.HTMLFormElement,\n DOMParser = window.DOMParser,\n trustedTypes = window.trustedTypes;\n var ElementPrototype = Element.prototype;\n var cloneNode = lookupGetter(ElementPrototype, 'cloneNode');\n var getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');\n var getChildNodes = lookupGetter(ElementPrototype, 'childNodes');\n var getParentNode = lookupGetter(ElementPrototype, 'parentNode'); // 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\n if (typeof HTMLTemplateElement === 'function') {\n var template = document.createElement('template');\n\n if (template.content && template.content.ownerDocument) {\n document = template.content.ownerDocument;\n }\n }\n\n var trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, originalDocument);\n\n var emptyHTML = trustedTypesPolicy ? trustedTypesPolicy.createHTML('') : '';\n var _document = document,\n implementation = _document.implementation,\n createNodeIterator = _document.createNodeIterator,\n createDocumentFragment = _document.createDocumentFragment,\n getElementsByTagName = _document.getElementsByTagName;\n var importNode = originalDocument.importNode;\n var documentMode = {};\n\n try {\n documentMode = clone(document).documentMode ? document.documentMode : {};\n } catch (_) {}\n\n var hooks = {};\n /**\n * Expose whether this browser supports running the full DOMPurify.\n */\n\n DOMPurify.isSupported = typeof getParentNode === 'function' && implementation && typeof implementation.createHTMLDocument !== 'undefined' && documentMode !== 9;\n var MUSTACHE_EXPR$1 = MUSTACHE_EXPR,\n ERB_EXPR$1 = ERB_EXPR,\n DATA_ATTR$1 = DATA_ATTR,\n ARIA_ATTR$1 = ARIA_ATTR,\n IS_SCRIPT_OR_DATA$1 = IS_SCRIPT_OR_DATA,\n ATTR_WHITESPACE$1 = ATTR_WHITESPACE;\n var IS_ALLOWED_URI$1 = IS_ALLOWED_URI;\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\n var ALLOWED_TAGS = null;\n var DEFAULT_ALLOWED_TAGS = addToSet({}, [].concat(_toConsumableArray(html$1), _toConsumableArray(svg$1), _toConsumableArray(svgFilters), _toConsumableArray(mathMl$1), _toConsumableArray(text)));\n /* Allowed attribute names */\n\n var ALLOWED_ATTR = null;\n var DEFAULT_ALLOWED_ATTR = addToSet({}, [].concat(_toConsumableArray(html), _toConsumableArray(svg), _toConsumableArray(mathMl), _toConsumableArray(xml)));\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\n var CUSTOM_ELEMENT_HANDLING = Object.seal(Object.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 /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */\n\n var FORBID_TAGS = null;\n /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */\n\n var FORBID_ATTR = null;\n /* Decide if ARIA attributes are okay */\n\n var ALLOW_ARIA_ATTR = true;\n /* Decide if custom data attributes are okay */\n\n var ALLOW_DATA_ATTR = true;\n /* Decide if unknown protocols are okay */\n\n var ALLOW_UNKNOWN_PROTOCOLS = false;\n /* Output should be safe for common template engines.\n * This means, DOMPurify removes data attributes, mustaches and ERB\n */\n\n var SAFE_FOR_TEMPLATES = false;\n /* Decide if document with ... should be returned */\n\n var WHOLE_DOCUMENT = false;\n /* Track whether config is already set on this instance of DOMPurify. */\n\n var SET_CONFIG = false;\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\n var FORCE_BODY = false;\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\n var RETURN_DOM = false;\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\n var RETURN_DOM_FRAGMENT = false;\n /* Try to return a Trusted Type object instead of a string, return a string in\n * case Trusted Types are not supported */\n\n var RETURN_TRUSTED_TYPE = false;\n /* Output should be free from DOM clobbering attacks?\n * This sanitizes markups named with colliding, clobberable built-in DOM APIs.\n */\n\n var SANITIZE_DOM = true;\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\n var SANITIZE_NAMED_PROPS = false;\n var SANITIZE_NAMED_PROPS_PREFIX = 'user-content-';\n /* Keep element content when removing element? */\n\n var KEEP_CONTENT = true;\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\n var IN_PLACE = false;\n /* Allow usage of profiles like html, svg and mathMl */\n\n var USE_PROFILES = {};\n /* Tags to ignore content of when KEEP_CONTENT is true */\n\n var FORBID_CONTENTS = null;\n var 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 /* Tags that are safe for data: URIs */\n\n var DATA_URI_TAGS = null;\n var DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);\n /* Attributes safe for values like \"javascript:\" */\n\n var URI_SAFE_ATTRIBUTES = null;\n var DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'role', 'summary', 'title', 'value', 'style', 'xmlns']);\n var MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\n var SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\n var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\n /* Document namespace */\n\n var NAMESPACE = HTML_NAMESPACE;\n var IS_EMPTY_INPUT = false;\n /* Parsing of strict XHTML documents */\n\n var PARSER_MEDIA_TYPE;\n var SUPPORTED_PARSER_MEDIA_TYPES = ['application/xhtml+xml', 'text/html'];\n var DEFAULT_PARSER_MEDIA_TYPE = 'text/html';\n var transformCaseFunc;\n /* Keep a reference to config to pass to hooks */\n\n var CONFIG = null;\n /* Ideally, do not touch anything below this line */\n\n /* ______________________________________________ */\n\n var formElement = document.createElement('form');\n\n var isRegexOrFunction = function isRegexOrFunction(testValue) {\n return testValue instanceof RegExp || testValue instanceof Function;\n };\n /**\n * _parseConfig\n *\n * @param {Object} cfg optional config literal\n */\n // eslint-disable-next-line complexity\n\n\n var _parseConfig = function _parseConfig(cfg) {\n if (CONFIG && CONFIG === cfg) {\n return;\n }\n /* Shield configuration object from tampering */\n\n\n if (!cfg || _typeof(cfg) !== 'object') {\n cfg = {};\n }\n /* Shield configuration object from prototype pollution */\n\n\n cfg = clone(cfg);\n PARSER_MEDIA_TYPE = // eslint-disable-next-line unicorn/prefer-includes\n SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? PARSER_MEDIA_TYPE = DEFAULT_PARSER_MEDIA_TYPE : PARSER_MEDIA_TYPE = cfg.PARSER_MEDIA_TYPE; // HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.\n\n transformCaseFunc = PARSER_MEDIA_TYPE === 'application/xhtml+xml' ? function (x) {\n return x;\n } : stringToLowerCase;\n /* Set configuration parameters */\n\n ALLOWED_TAGS = 'ALLOWED_TAGS' in cfg ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;\n ALLOWED_ATTR = 'ALLOWED_ATTR' in cfg ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;\n URI_SAFE_ATTRIBUTES = 'ADD_URI_SAFE_ATTR' in cfg ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), // eslint-disable-line indent\n cfg.ADD_URI_SAFE_ATTR, // eslint-disable-line indent\n transformCaseFunc // eslint-disable-line indent\n ) // eslint-disable-line indent\n : DEFAULT_URI_SAFE_ATTRIBUTES;\n DATA_URI_TAGS = 'ADD_DATA_URI_TAGS' in cfg ? addToSet(clone(DEFAULT_DATA_URI_TAGS), // eslint-disable-line indent\n cfg.ADD_DATA_URI_TAGS, // eslint-disable-line indent\n transformCaseFunc // eslint-disable-line indent\n ) // eslint-disable-line indent\n : DEFAULT_DATA_URI_TAGS;\n FORBID_CONTENTS = 'FORBID_CONTENTS' in cfg ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;\n FORBID_TAGS = 'FORBID_TAGS' in cfg ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : {};\n FORBID_ATTR = 'FORBID_ATTR' in cfg ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : {};\n USE_PROFILES = 'USE_PROFILES' in cfg ? cfg.USE_PROFILES : false;\n ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true\n\n ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true\n\n ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false\n\n SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false\n\n WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false\n\n RETURN_DOM = cfg.RETURN_DOM || false; // Default false\n\n RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false\n\n RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false\n\n FORCE_BODY = cfg.FORCE_BODY || false; // Default false\n\n SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true\n\n SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false; // Default false\n\n KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true\n\n IN_PLACE = cfg.IN_PLACE || false; // Default false\n\n IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI$1;\n NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;\n\n if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) {\n CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck;\n }\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\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\n if (SAFE_FOR_TEMPLATES) {\n ALLOW_DATA_ATTR = false;\n }\n\n if (RETURN_DOM_FRAGMENT) {\n RETURN_DOM = true;\n }\n /* Parse profile info */\n\n\n if (USE_PROFILES) {\n ALLOWED_TAGS = addToSet({}, _toConsumableArray(text));\n ALLOWED_ATTR = [];\n\n if (USE_PROFILES.html === true) {\n addToSet(ALLOWED_TAGS, html$1);\n addToSet(ALLOWED_ATTR, html);\n }\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\n if (USE_PROFILES.svgFilters === true) {\n addToSet(ALLOWED_TAGS, svgFilters);\n addToSet(ALLOWED_ATTR, svg);\n addToSet(ALLOWED_ATTR, xml);\n }\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 /* Merge configuration parameters */\n\n\n if (cfg.ADD_TAGS) {\n if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {\n ALLOWED_TAGS = clone(ALLOWED_TAGS);\n }\n\n addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);\n }\n\n if (cfg.ADD_ATTR) {\n if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {\n ALLOWED_ATTR = clone(ALLOWED_ATTR);\n }\n\n addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);\n }\n\n if (cfg.ADD_URI_SAFE_ATTR) {\n addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);\n }\n\n if (cfg.FORBID_CONTENTS) {\n if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {\n FORBID_CONTENTS = clone(FORBID_CONTENTS);\n }\n\n addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);\n }\n /* Add #text in case KEEP_CONTENT is set to true */\n\n\n if (KEEP_CONTENT) {\n ALLOWED_TAGS['#text'] = true;\n }\n /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */\n\n\n if (WHOLE_DOCUMENT) {\n addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);\n }\n /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */\n\n\n if (ALLOWED_TAGS.table) {\n addToSet(ALLOWED_TAGS, ['tbody']);\n delete FORBID_TAGS.tbody;\n } // Prevent further manipulation of configuration.\n // Not available in IE8, Safari 5, etc.\n\n\n if (freeze) {\n freeze(cfg);\n }\n\n CONFIG = cfg;\n };\n\n var MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ['mi', 'mo', 'mn', 'ms', 'mtext']);\n var HTML_INTEGRATION_POINTS = addToSet({}, ['foreignobject', 'desc', 'title', 'annotation-xml']); // 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\n var COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ['title', 'style', 'font', 'a', 'script']);\n /* Keep track of all possible SVG and MathML tags\n * so that we can perform the namespace checks\n * correctly. */\n\n var ALL_SVG_TAGS = addToSet({}, svg$1);\n addToSet(ALL_SVG_TAGS, svgFilters);\n addToSet(ALL_SVG_TAGS, svgDisallowed);\n var ALL_MATHML_TAGS = addToSet({}, mathMl$1);\n addToSet(ALL_MATHML_TAGS, mathMlDisallowed);\n /**\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\n var _checkValidNamespace = function _checkValidNamespace(element) {\n var parent = getParentNode(element); // In JSDOM, if we're inside shadow DOM, then parentNode\n // can be null. We just simulate parent in this case.\n\n if (!parent || !parent.tagName) {\n parent = {\n namespaceURI: HTML_NAMESPACE,\n tagName: 'template'\n };\n }\n\n var tagName = stringToLowerCase(element.tagName);\n var parentTagName = stringToLowerCase(parent.tagName);\n\n if (element.namespaceURI === SVG_NAMESPACE) {\n // The only way to switch from HTML namespace to SVG\n // is via . If it happens via any other tag, then\n // it should be killed.\n if (parent.namespaceURI === HTML_NAMESPACE) {\n return tagName === 'svg';\n } // The only way to switch from MathML to SVG is via\n // svg if parent is either or MathML\n // text integration points.\n\n\n if (parent.namespaceURI === MATHML_NAMESPACE) {\n return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);\n } // We only allow elements that are defined in SVG\n // spec. All others are disallowed in SVG namespace.\n\n\n return Boolean(ALL_SVG_TAGS[tagName]);\n }\n\n if (element.namespaceURI === MATHML_NAMESPACE) {\n // The only way to switch from HTML namespace to MathML\n // is via . If it happens via any other tag, then\n // it should be killed.\n if (parent.namespaceURI === HTML_NAMESPACE) {\n return tagName === 'math';\n } // The only way to switch from SVG to MathML is via\n // and HTML integration points\n\n\n if (parent.namespaceURI === SVG_NAMESPACE) {\n return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];\n } // We only allow elements that are defined in MathML\n // spec. All others are disallowed in MathML namespace.\n\n\n return Boolean(ALL_MATHML_TAGS[tagName]);\n }\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\n if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {\n return false;\n } // We disallow tags that are specific for MathML\n // or SVG and should never appear in HTML namespace\n\n\n return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);\n } // The code should never reach this place (this means\n // that the element somehow got namespace that is not\n // HTML, SVG or MathML). Return false just in case.\n\n\n return false;\n };\n /**\n * _forceRemove\n *\n * @param {Node} node a DOM node\n */\n\n\n var _forceRemove = function _forceRemove(node) {\n arrayPush(DOMPurify.removed, {\n element: node\n });\n\n try {\n // eslint-disable-next-line unicorn/prefer-dom-node-remove\n node.parentNode.removeChild(node);\n } catch (_) {\n try {\n node.outerHTML = emptyHTML;\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\n\n var _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\n node.removeAttribute(name); // We void attribute values for unremovable \"is\"\" attributes\n\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 * _initDocument\n *\n * @param {String} dirty a string of dirty markup\n * @return {Document} a DOM, filled with the dirty markup\n */\n\n\n var _initDocument = function _initDocument(dirty) {\n /* Create a HTML document */\n var doc;\n var leadingWhitespace;\n\n if (FORCE_BODY) {\n dirty = '' + dirty;\n } else {\n /* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */\n var matches = stringMatch(dirty, /^[\\r\\n\\t ]+/);\n leadingWhitespace = matches && matches[0];\n }\n\n if (PARSER_MEDIA_TYPE === 'application/xhtml+xml') {\n // Root of XHTML doc must contain xmlns declaration (see https://www.w3.org/TR/xhtml1/normative.html#strict)\n dirty = '' + dirty + '';\n }\n\n var 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\n if (NAMESPACE === HTML_NAMESPACE) {\n try {\n doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);\n } catch (_) {}\n }\n /* Use createHTMLDocument in case DOMParser is not available */\n\n\n if (!doc || !doc.documentElement) {\n doc = implementation.createDocument(NAMESPACE, 'template', null);\n\n try {\n doc.documentElement.innerHTML = IS_EMPTY_INPUT ? '' : dirtyPayload;\n } catch (_) {// Syntax error if dirtyPayload is invalid xml\n }\n }\n\n var body = doc.body || doc.documentElement;\n\n if (dirty && leadingWhitespace) {\n body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null);\n }\n /* Work on whole document or just its body */\n\n\n if (NAMESPACE === HTML_NAMESPACE) {\n return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? 'html' : 'body')[0];\n }\n\n return WHOLE_DOCUMENT ? doc.documentElement : body;\n };\n /**\n * _createIterator\n *\n * @param {Document} root document/fragment to create iterator for\n * @return {Iterator} iterator instance\n */\n\n\n var _createIterator = function _createIterator(root) {\n return createNodeIterator.call(root.ownerDocument || root, root, // eslint-disable-next-line no-bitwise\n NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT, null, false);\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\n\n var _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');\n };\n /**\n * _isNode\n *\n * @param {Node} obj object to check whether it's a DOM node\n * @return {Boolean} true is object is a DOM node\n */\n\n\n var _isNode = function _isNode(object) {\n return _typeof(Node) === 'object' ? object instanceof Node : object && _typeof(object) === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string';\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\n\n var _executeHook = function _executeHook(entryPoint, currentNode, data) {\n if (!hooks[entryPoint]) {\n return;\n }\n\n arrayForEach(hooks[entryPoint], function (hook) {\n hook.call(DOMPurify, currentNode, data, CONFIG);\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\n\n var _sanitizeElements = function _sanitizeElements(currentNode) {\n var content;\n /* Execute a hook if present */\n\n _executeHook('beforeSanitizeElements', currentNode, null);\n /* Check if element is clobbered or can clobber */\n\n\n if (_isClobbered(currentNode)) {\n _forceRemove(currentNode);\n\n return true;\n }\n /* Check if tagname contains Unicode */\n\n\n if (regExpTest(/[\\u0080-\\uFFFF]/, currentNode.nodeName)) {\n _forceRemove(currentNode);\n\n return true;\n }\n /* Now let's check the element's type and name */\n\n\n var tagName = transformCaseFunc(currentNode.nodeName);\n /* Execute a hook if present */\n\n _executeHook('uponSanitizeElement', currentNode, {\n tagName: tagName,\n allowedTags: ALLOWED_TAGS\n });\n /* Detect mXSS attempts abusing namespace confusion */\n\n\n if (currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && (!_isNode(currentNode.content) || !_isNode(currentNode.content.firstElementChild)) && regExpTest(/<[/\\w]/g, currentNode.innerHTML) && regExpTest(/<[/\\w]/g, currentNode.textContent)) {\n _forceRemove(currentNode);\n\n return true;\n }\n /* Mitigate a problem with templates inside select */\n\n\n if (tagName === 'select' && regExpTest(/