From c103d39cc87d8219a46b3202de42e98ff2d3b3f1 Mon Sep 17 00:00:00 2001 From: Travis Tidwell Date: Wed, 6 Apr 2022 13:21:32 -0500 Subject: [PATCH] Updated build and version. --- Changelog.md | 5 +- babel.config.js | 3 - dist/formio.builder.css | 18 +- dist/formio.builder.min.css | 2 +- dist/formio.contrib.js | 997 +- dist/formio.contrib.min.js | 2 +- dist/formio.contrib.min.js.LICENSE.txt | 12 +- dist/formio.embed.js | 2 +- dist/formio.embed.min.js | 2 +- dist/formio.embed.min.js.LICENSE.txt | 2 +- dist/formio.form.css | 16 +- dist/formio.form.js | 1643 +- dist/formio.form.min.css | 2 +- dist/formio.form.min.js | 2 +- dist/formio.form.min.js.LICENSE.txt | 29 +- dist/formio.full.css | 18 +- dist/formio.full.js | 1649 +- dist/formio.full.min.css | 2 +- dist/formio.full.min.js | 2 +- dist/formio.full.min.js.LICENSE.txt | 29 +- dist/formio.js | 367 +- dist/formio.min.js | 2 +- dist/formio.min.js.LICENSE.txt | 12 +- dist/formio.utils.js | 280 +- dist/formio.utils.min.js | 2 +- dist/formio.utils.min.js.LICENSE.txt | 12 +- docs/ast/source/PDFBuilder.js.json | 28076 +++-- .../editForm/Component.edit.data.js.json | 16065 ++- .../editForm/Address.edit.data.js.json | 280 +- .../components/checkbox/Checkbox.js.json | 8020 +- .../components/container/Container.js.json | 2786 +- .../components/currency/Currency.js.json | 7398 +- .../components/datetime/DateTime.js.json | 6070 +- .../components/datetime/DateTime.unit.js.json | 98280 +++++++++------- .../datetime/fixtures/comp8.js.json | 7331 ++ .../datetime/fixtures/index.js.json | 214 +- .../ast/source/components/email/Email.js.json | 1138 +- .../components/fieldset/Fieldset.js.json | 534 +- .../form/editForm/Form.edit.data.js.json | 1128 +- .../source/components/hidden/Hidden.js.json | 934 +- .../components/password/Password.js.json | 474 +- .../phonenumber/PhoneNumber.js.json | 202 +- .../components/recaptcha/ReCaptcha.js.json | 4848 +- .../components/resource/Resource.js.json | 474 +- .../ast/source/components/table/Table.js.json | 7180 +- docs/ast/source/components/tabs/Tabs.js.json | 17617 +-- docs/ast/source/components/tags/Tags.js.json | 6424 +- .../source/components/tags/Tags.unit.js.json | 25611 ++-- .../components/tags/fixtures/comp5.js.json | 3046 + .../components/tags/fixtures/index.js.json | 214 +- docs/ast/source/components/time/Time.js.json | 4644 +- .../source/components/unknown/Unknown.js.json | 230 +- docs/ast/source/components/url/Url.js.json | 662 +- docs/ast/source/components/well/Well.js.json | 550 +- docs/ast/source/translations/en.js.json | 712 +- docs/ast/source/utils/formUtils.js.json | 15247 +-- docs/class/src/PDFBuilder.js~PDFBuilder.html | 119 +- .../tabs/Tabs.js~TabsComponent.html | 14 +- docs/coverage.json | 51 +- docs/file/src/PDFBuilder.js.html | 4 - .../editForm/Component.edit.data.js.html | 51 +- .../editForm/Address.edit.data.js.html | 2 +- .../src/components/checkbox/Checkbox.js.html | 2 +- .../components/container/Container.js.html | 2 +- .../src/components/currency/Currency.js.html | 2 +- .../src/components/datetime/DateTime.js.html | 2 +- .../components/datetime/DateTime.unit.js.html | 40 +- .../datetime/fixtures/comp8.js.html | 239 + .../datetime/fixtures/index.js.html | 1 + docs/file/src/components/email/Email.js.html | 2 +- .../src/components/fieldset/Fieldset.js.html | 2 +- .../form/editForm/Form.edit.data.js.html | 7 +- .../file/src/components/hidden/Hidden.js.html | 2 +- .../src/components/password/Password.js.html | 2 +- .../phonenumber/PhoneNumber.js.html | 2 +- .../components/recaptcha/ReCaptcha.js.html | 2 +- .../src/components/resource/Resource.js.html | 2 +- docs/file/src/components/table/Table.js.html | 2 +- docs/file/src/components/tabs/Tabs.js.html | 44 +- docs/file/src/components/tags/Tags.js.html | 4 +- .../src/components/tags/Tags.unit.js.html | 25 +- .../components/tags/fixtures/comp5.js.html | 211 + .../components/tags/fixtures/index.js.html | 1 + docs/file/src/components/time/Time.js.html | 2 +- .../src/components/unknown/Unknown.js.html | 2 +- docs/file/src/components/url/Url.js.html | 2 +- docs/file/src/components/well/Well.js.html | 2 +- docs/file/src/translations/en.js.html | 6 +- docs/file/src/utils/formUtils.js.html | 2 +- docs/index.json | 2168 +- docs/script/search_index.js | 18 +- docs/source.html | 274 +- package-lock.json | 2767 +- package.json | 60 +- .../component/editForm/Component.edit.data.js | 48 +- src/components/datetime/fixtures/index.js | 2 +- src/components/signature/Signature.js | 2 +- 97 files changed, 155638 insertions(+), 122055 deletions(-) create mode 100644 docs/ast/source/components/datetime/fixtures/comp8.js.json create mode 100644 docs/ast/source/components/tags/fixtures/comp5.js.json create mode 100644 docs/file/src/components/datetime/fixtures/comp8.js.html create mode 100644 docs/file/src/components/tags/fixtures/comp5.js.html diff --git a/Changelog.md b/Changelog.md index b3fa08494f..9812dc468a 100644 --- a/Changelog.md +++ b/Changelog.md @@ -4,7 +4,10 @@ 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/). -## [Unreleased: 4.15.0-rc.8] +## 4.15.0-rc.8 +### Changed + - Updated @formio/bootstrap3@2.12.2-rc.1 + ### 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 diff --git a/babel.config.js b/babel.config.js index 76bb3b804a..4ae526d79f 100644 --- a/babel.config.js +++ b/babel.config.js @@ -3,9 +3,6 @@ module.exports = { [ '@babel/preset-env', { - targets: { - ie: '11', - }, useBuiltIns: 'usage', corejs: 3 }, diff --git a/dist/formio.builder.css b/dist/formio.builder.css index 165c36108b..481dbc4dd4 100644 --- a/dist/formio.builder.css +++ b/dist/formio.builder.css @@ -138,7 +138,9 @@ dialog.fixed { .builder-component.has-error .invalid-feedback, .formio-component.has-error .invalid-feedback, .formio-component.alert-danger .invalid-feedback, -.formio-component.has-message .invalid-feedback { +.formio-component.has-message .invalid-feedback, +.formio-component-modal-wrapper.has-message .invalid-feedback, +.formio-component-modal-wrapper.has-error .invalid-feedback { display: block; color: inherit; margin-top: 4px; @@ -179,9 +181,9 @@ dialog.fixed { .quill-source-code { width: 100%; margin: 0px; - background: #1d1d1d; + background: rgb(29, 29, 29); box-sizing: border-box; - color: #cccccc; + color: rgb(204, 204, 204); font-size: 15px; outline: none; padding: 20px; @@ -1228,8 +1230,8 @@ div[data-oembed-url] { display: table-caption; caption-side: bottom; word-break: break-word; - color: #333333; - background-color: #f7f7f7; + color: hsl(0deg, 0%, 20%); + background-color: hsl(0deg, 0%, 97%); padding: 0.6em; font-size: 0.75em; outline-offset: -1px; @@ -1312,13 +1314,13 @@ div[data-oembed-url] { margin-left: 0; margin-right: 0; font-style: italic; - border-left: solid 5px #cccccc; + border-left: solid 5px hsl(0deg, 0%, 80%); } /* ckeditor5-block-quote/theme/blockquote.css */ .formio-component-content[dir=rtl] blockquote { border-left: 0; - border-right: solid 5px #cccccc; + border-right: solid 5px hsl(0deg, 0%, 80%); } .formio-component-content .text-tiny { @@ -1808,6 +1810,8 @@ span[role=link] { .builder-sidebar_scroll { position: sticky; top: 15px; + max-height: 100vh; + overflow-y: auto; } .builder-sidebar_search { diff --git a/dist/formio.builder.min.css b/dist/formio.builder.min.css index c5a3651a5e..55ea9e5ef3 100644 --- a/dist/formio.builder.min.css +++ b/dist/formio.builder.min.css @@ -1 +1 @@ -@charset "UTF-8";.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}.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;left:0;right:0;width:-moz-fit-content;width:-webkit-fit-content;width:fit-content;height:-moz-fit-content;height:-webkit-fit-content;height:fit-content;margin:auto;border:solid;padding:1em;background:#fff;color:#000;display:block}dialog:not([open]){display:none}dialog+.backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.1)}._dialog_overlay{position:fixed;top:0;right:0;bottom:0;left:0}dialog.fixed{position:fixed;top:50%;transform:translate(0,-50%)}.gu-mirror{position:fixed!important;margin:0!important;z-index:9999!important;opacity:.8;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=80)";filter:alpha(opacity=80)}.gu-hide{display:none!important}.gu-unselectable{-webkit-user-select:none!important;-moz-user-select:none!important;-ms-user-select:none!important;user-select:none!important}.gu-transit{opacity:.2;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=20)";filter:alpha(opacity=20)}.formio-loader{position:relative;min-height:60px}.loader-wrapper{z-index:1000;position:absolute;top:0;left:0;bottom:0;right:0;height:120px;background-color:rgba(0,0,0,0)}.loader{position:absolute;left:50%;top:50%;margin-left:-30px;margin-top:-30px;z-index:10000;display:inline-block;border:6px solid #f3f3f3;border-top:6px solid #3498db;border-radius:50%;width:60px;height:60px;animation:spin 2s linear infinite}@keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.formio-form{position:relative;min-height:80px}.formio-error-wrapper,.formio-warning-wrapper{padding:1em}.formio-error-wrapper{color:#721c24;background-color:#f8d7da;border-color:#f5c6cb}.formio-error-wrapper .formio-errors .error{color:#c20000}.formio-error-wrapper .field-required:after{color:#c20000}.formio-warning-wrapper{color:#856404;background-color:#fff3cd;border-color:#ffeeba}.formio-disabled-input .form-control.flatpickr-input{background-color:#eee}.builder-component.has-error .invalid-feedback,.formio-component.alert-danger .invalid-feedback,.formio-component.has-error .invalid-feedback,.formio-component.has-message .invalid-feedback{display:block;color:inherit;margin-top:4px}.formio-errors .error{color:#dc3545}.formio-errors .warning{color:#856404}.formio-errors .info{color:#004085}.formio-wysiwyg-editor{min-height:200px;background-color:#fff}.has-feedback .form-control{padding-right:10px}.has-feedback .form-control[type=hidden]{padding-right:0}.has-error.bg-danger{padding:4px}.ql-source:after{content:"[source]";white-space:nowrap}.quill-source-code{width:100%;margin:0;background:#1d1d1d;box-sizing:border-box;color:#ccc;font-size:15px;outline:0;padding:20px;line-height:24px;font-family:Consolas,Menlo,Monaco,"Courier New",monospace;position:absolute;top:0;bottom:0;border:none;display:none}.formio-component-tags tags{background-color:#fff}.field-required:after,.tab-error::after{content:" *";color:#eb0000}.field-required:after{position:relative;z-index:10}.glyphicon-spin{-webkit-animation:formio-spin 1s infinite linear;-moz-animation:formio-spin 1s infinite linear;-o-animation:formio-spin 1s infinite linear;animation:formio-spin 1s infinite linear}@-moz-keyframes formio-spin{from{-moz-transform:rotate(0)}to{-moz-transform:rotate(360deg)}}@-webkit-keyframes formio-spin{from{-webkit-transform:rotate(0)}to{-webkit-transform:rotate(360deg)}}@keyframes formio-spin{from{transform:rotate(0)}to{transform:rotate(360deg)}}.button-icon-right{margin-left:5px}.formio-component-submit .submit-success::after{content:"✓";position:relative;right:-4px;top:1px;line-height:1}.formio-component-submit .submit-fail::after{content:"✗";position:relative;right:-4px;top:1px;line-height:1}.card-vertical{display:flex;flex-direction:row;margin-top:5px}.card-vertical .card-body,.tab,.tab-content{flex-grow:2}.nav-tabs-vertical{display:flex;flex-direction:column;border-right:1px solid #ddd;padding-left:5px;margin-right:10px;border-bottom:0}.card-vertical>.card-body,.card-vertical>.tab,.card-vertical>.tab-content{flex-basis:85%}.card-vertical ul>li>.nav-link-vertical{border-right-color:transparent;border-radius:4px 0 0 4px;margin-right:0}.card-vertical ul>li>.nav-link-vertical.active{border-bottom-color:#ddd;border-right-color:transparent}.card-vertical ul>li>.nav-link-vertical.active:hover{border-right-color:transparent}.nav-tabs-vertical>li{margin:0 -1px 0 0}.formio-component-submit .submit-fail[disabled]{opacity:1}.form-control.flatpickr-input{background-color:#fff}.input-group .flatpickr-wrapper{flex-grow:1}.flatpickr-calendar .flatpickr-current-month .flatpickr-monthDropdown-months:focus,.flatpickr-calendar .flatpickr-current-month input.cur-year:focus,.flatpickr-calendar .flatpickr-days:focus{outline:auto}td>.form-group{margin-bottom:0}.signature-pad-body{overflow:hidden;position:relative}.signature-pad-canvas{border-radius:4px;box-shadow:0 0 5px rgba(0,0,0,.02) inset;border:1px solid #f4f4f4}.btn.signature-pad-refresh{position:absolute;left:0;top:0;z-index:1000;padding:3px;line-height:0}[dir=rtl] .btn.signature-pad-refresh{left:unset;right:0}.formio-component-multiple .choices__input{width:100%}.formio-component-multiple .is-invalid{border-color:#f04124}.formio-component-multiple :not(.is-invalid){border-color:#ccc}.choices__list--dropdown .choices__item--selectable{padding-right:0}.signature-pad-refresh img{height:1.2em}.signature-pad-footer{text-align:center;color:#c3c3c3}.choices__list--dropdown{z-index:100}.choices__list--multiple .choices__item{border-radius:0;padding:2px 8px;line-height:1em;margin-bottom:6px}.choices__list--single{padding:0}.choices__item.choices__item--selectable{white-space:nowrap;overflow:hidden;padding-right:25px;text-overflow:ellipsis}.choices__input{padding:2px}.choices[dir=rtl]>*{text-align:right}.choices[dir=rtl] .choices__list--multiple .choices__item[data-deletable]{padding-left:5px;float:right}.choices[dir=rtl] .choices__list--multiple .choices__item[data-deletable] .choices__button{float:left;margin:0 8px 0 -4px;padding-left:unset;padding-right:16px;border-left:unset;border-right:1px solid #008fa1;overflow:hidden}@-moz-document url-prefix(){.choices__button{float:right}}.formio-component-file .fileSelector{position:relative;padding:15px;border:2px dashed #ddd;text-align:center}.formio-component-file .fileSelector .loader-wrapper{display:none;width:100%;height:100%;background-color:rgba(0,0,0,.1)}.formio-component-file .fileSelector .loader-wrapper .loader{height:45px;width:45px;margin-top:-23px;margin-left:-23px}.formio-component-file .fileSelector a{text-decoration:underline}.formio-component-file .fileSelector.fileDragOver{border-color:#127abe}.formio-component-file .fileSelector .fa,.formio-component-file .fileSelector .glyphicon{font-size:20px;margin-right:5px}[dir=rtl] .formio-component-file .fileSelector .fa,[dir=rtl] .formio-component-file .fileSelector .glyphicon{margin-right:unset;margin-left:5px}.formio-component-file .fileSelector .browse{cursor:pointer}@-webkit-keyframes formio-dialog-fadeout{0%{opacity:1}100%{opacity:0}}@keyframes formio-dialog-fadeout{0%{opacity:1}100%{opacity:0}}@-webkit-keyframes formio-dialog-fadein{0%{opacity:0}100%{opacity:1}}@keyframes formio-dialog-fadein{0%{opacity:0}100%{opacity:1}}.formio-dialog{box-sizing:border-box;font-size:.8em;color:#666}.formio-dialog.formio-modaledit-dialog{font-size:inherit}.formio-dialog *,.formio-dialog :after,.formio-dialog :before{box-sizing:inherit}.formio-dialog{position:fixed;overflow:auto;-webkit-overflow-scrolling:touch;z-index:10000;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.4);animation:formio-dialog-fadein .5s}.formio-dialog.formio-dialog-disabled-animation,.formio-dialog.formio-dialog-disabled-animation .formio-dialog-content,.formio-dialog.formio-dialog-disabled-animation .formio-dialog-overlay{-webkit-animation:none!important;animation:none!important}.formio-dialog-overlay{position:fixed;top:0;right:0;bottom:0;left:0;-webkit-backface-visibility:hidden;-webkit-animation:formio-dialog-fadein .5s;animation:formio-dialog-fadein .5s;margin-right:15px;background:0 0}.formio-dialog-no-overlay{pointer-events:none}.formio-dialog.formio-dialog-closing .formio-dialog-overlay{-webkit-backface-visibility:hidden;-webkit-animation:formio-dialog-fadeout .5s;animation:formio-dialog-fadeout .5s}.formio-dialog-content{background:#fff;-webkit-backface-visibility:hidden;-webkit-animation:formio-dialog-fadein .5s;animation:formio-dialog-fadein .5s;pointer-events:all;overflow:auto}.formio-component-modal-wrapper-select .formio-dialog-content{overflow:initial}.formio-dialog.formio-dialog-closing .formio-dialog-content{-webkit-backface-visibility:hidden;-webkit-animation:formio-dialog-fadeout .5s;animation:formio-dialog-fadeout .5s}.formio-dialog-close:before{font-family:Helvetica,Arial,sans-serif;content:"×";cursor:pointer}body.formio-dialog-open,html.formio-dialog-open{overflow:hidden}.formio-dialog .tab-content{padding-top:12px}.formio-dialog-close{z-index:1000}@-webkit-keyframes formio-dialog-flyin{0%{opacity:0;-webkit-transform:translateY(-40px);transform:translateY(-40px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes formio-dialog-flyin{0%{opacity:0;-webkit-transform:translateY(-40px);transform:translateY(-40px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes formio-dialog-flyout{0%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}100%{opacity:0;-webkit-transform:translateY(-40px);transform:translateY(-40px)}}@keyframes formio-dialog-flyout{0%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}100%{opacity:0;-webkit-transform:translateY(-40px);transform:translateY(-40px)}}.formio-dialog.formio-dialog-theme-default{padding-bottom:160px;padding-top:160px}.formio-dialog.formio-dialog-theme-default .component-edit-container{padding:.5em}.formio-dialog.formio-dialog-theme-default.formio-dialog-closing .formio-dialog-content{-webkit-animation:formio-dialog-flyout .5s;animation:formio-dialog-flyout .5s}.formio-dialog.formio-dialog-theme-default .formio-dialog-content{-webkit-animation:formio-dialog-flyin .5s;animation:formio-dialog-flyin .5s;background:#f0f0f0;border-radius:5px;font-family:Helvetica,sans-serif;font-size:1.1em;line-height:1.5em;margin:0 auto;max-width:100%;padding:1em;position:relative;width:80%}.formio-dialog.formio-dialog-theme-default .formio-dialog-close{border:none;background:0 0;cursor:pointer;position:absolute;right:1px;top:1px;z-index:100}.formio-clickable{cursor:pointer}.component-settings .nav>li>a{padding:8px 10px}.formio-dialog.formio-dialog-theme-default .formio-dialog-close:before{display:block;padding:3px;background:0 0;color:#8a8a8a;content:"×";font-size:26px;font-weight:400;line-height:26px;text-align:center}.formio-dialog.formio-dialog-theme-default .formio-dialog-close:active:before,.formio-dialog.formio-dialog-theme-default .formio-dialog-close:hover:before{color:#777}.formio-dialog.formio-dialog-theme-default .formio-dialog-message{margin-bottom:.5em}.formio-dialog.formio-dialog-theme-default .formio-dialog-input{margin-bottom:1em}.formio-dialog.formio-dialog-theme-default .formio-dialog-input input[type=email],.formio-dialog.formio-dialog-theme-default .formio-dialog-input input[type=password],.formio-dialog.formio-dialog-theme-default .formio-dialog-input input[type=text],.formio-dialog.formio-dialog-theme-default .formio-dialog-input input[type=url],.formio-dialog.formio-dialog-theme-default .formio-dialog-input textarea{background:#fff;border:0;border-radius:3px;font-family:inherit;font-size:inherit;font-weight:inherit;margin:0 0 .25em;min-height:2.5em;padding:.25em .67em;width:100%}.formio-dialog.formio-dialog-theme-default .formio-dialog-input input[type=email]:focus,.formio-dialog.formio-dialog-theme-default .formio-dialog-input input[type=password]:focus,.formio-dialog.formio-dialog-theme-default .formio-dialog-input input[type=text]:focus,.formio-dialog.formio-dialog-theme-default .formio-dialog-input input[type=url]:focus,.formio-dialog.formio-dialog-theme-default .formio-dialog-input textarea:focus{box-shadow:inset 0 0 0 2px #8dbdf1;outline:0}.formio-dialog-buttons{display:flex;justify-content:flex-end}.formio-dialog.formio-dialog-theme-default .formio-dialog-buttons{*zoom:1}.formio-dialog.formio-dialog-theme-default .formio-dialog-buttons:after{content:"";display:table;clear:both}.formio-dialog.formio-dialog-theme-default .formio-dialog-button{border:0;border-radius:3px;cursor:pointer;float:right;font-family:inherit;font-size:.8em;letter-spacing:.1em;line-height:1em;margin:0 0 0 .5em;padding:.75em 2em;text-transform:uppercase}.formio-dialog.formio-dialog-theme-default .formio-dialog-button:focus{-webkit-animation:formio-dialog-pulse 1.1s infinite;animation:formio-dialog-pulse 1.1s infinite;outline:0}@media (max-width:568px){.formio-dialog.formio-dialog-theme-default .formio-dialog-button:focus{-webkit-animation:none;animation:none}}.formio-dialog.formio-dialog-theme-default .formio-dialog-button.formio-dialog-button-primary{background:#3288e6;color:#fff}.formio-dialog.formio-dialog-theme-default .formio-dialog-button.formio-dialog-button-secondary{background:#e0e0e0;color:#777}.formio-dialog-content .panel{margin:0}.formio-dialog-content [ref=dialogHeader]{padding-right:15px}.formio-placeholder{position:absolute;color:#999}.formio-dialog .formio-dialog-close{cursor:pointer}.formio-iframe{border:none;width:100%;height:1000px}.inline-form-button{margin-right:10px}.tooltip{opacity:1}.tooltip[x-placement=right] .tooltip-arrow{border-right:5px solid #000}.tooltip[x-placement=right] .tooltip-inner{margin-left:8px}.control-label--bottom{margin-bottom:0;margin-top:5px}.formio-component-label-hidden{position:relative}.formio-hidden{margin:0}.formio-removed{display:none}.control-label--hidden{position:absolute;top:6px;right:5px}.formio-component-datetime .control-label--hidden.field-required{right:45px;z-index:3}.formio-component-selectboxes .control-label--hidden.field-required,.formio-component-survey .control-label--hidden.field-required{top:0}.formio-component-resource .control-label--hidden.field-required,.formio-component-select .control-label--hidden.field-required{right:40px;z-index:2}.formio-component-radio .control-label--hidden.field-required:after,.formio-component-selectboxes .control-label--hidden.field-required:after{display:none}.formio-component-radio.formio-component-label-hidden.required .form-check-label:before,.formio-component-selectboxes.formio-component-label-hidden.required .form-check-label:before{position:relative;content:"* ";color:#eb0000}.formio-component-radio.formio-component-label-hidden.required .label-position-right.form-check-label:before,.formio-component-selectboxes.formio-component-label-hidden.required .label-position-right.form-check-label:before{right:20px}.formio-component-datasource,.formio-component-hidden:not(.formio-component-checkbox){margin-bottom:0}.checkbox-inline label,.radio-inline label{font-weight:400;cursor:pointer}.editgrid-listgroup{margin-bottom:10px}.tree-listgroup{flex-direction:row}.formio-component-submit button[disabled]+.has-error{display:block}.formio-choices.form-group{margin-bottom:0}.formio-choices[data-type=select-multiple] .form-control{height:auto}.form-control.formio-multiple-mask-select{width:15%;z-index:4}.form-control.formio-multiple-mask-input{width:85%}.input-group.formio-multiple-mask-container{width:100%}.formio-component .table{margin-bottom:0}.editgrid-table-container{margin-bottom:10px;max-width:calc(100vw - 140px)}.editgrid-table-container .table-responsive{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.editgrid-table-column{border:none}.editgrid-table-head{border:1px solid #ddd}.editgrid-table-body{border:1px solid #ddd;border-top:0}.formio-hide-label-panel-tooltip{margin-top:-10px;margin-left:-10px}.is-disabled .choices__list--multiple .choices__item{padding:5px 10px}.is-disabled .choices__list--multiple .choices__item .choices__button{display:none}.formio-collapse-icon{cursor:pointer;margin-right:4px}[dir=rtl] .formio-collapse-icon{margin-right:unset;margin-left:4px}.formio-component-dateTime .form-control[type=datetime-local]~.input-group-addon,.formio-component-datetime .form-control[type=datetime-local]~.input-group-addon{width:auto}.formio-component-datagrid .formio-datagrid-remove{position:absolute;top:0;right:0;visibility:hidden;opacity:0;transition:opacity .2s linear,visibility 0s .2s}.formio-component-datagrid .datagrid-table>tbody>tr>td:last-child{position:relative}.formio-component-datagrid .datagrid-table>tbody>tr:hover>td:last-child .formio-datagrid-remove{visibility:visible;opacity:1;transition:visibility 0s,opacity .2s linear}.formio-component-modaledit .formio-modaledit-view-container{position:relative;border:1px solid #ddd;min-height:34px;padding:6px 12px;cursor:text}td .formio-component-modaledit .formio-modaledit-view-container{padding:0;border-style:none}.formio-component-modaledit .formio-modaledit-edit{position:absolute;top:0;left:0;visibility:hidden;opacity:0;transition:opacity .2s linear,visibility 0s .2s}.formio-component-modaledit .formio-modaledit-view-container:hover .formio-modaledit-edit{visibility:visible;opacity:1;transition:visibility 0s,opacity .2s linear}.formio-modaledit-dialog .formio-modaledit-close{position:absolute;top:100%;right:0;border-radius:0}.reset-margins a,.reset-margins abbr,.reset-margins acronym,.reset-margins address,.reset-margins applet,.reset-margins article,.reset-margins aside,.reset-margins audio,.reset-margins b,.reset-margins big,.reset-margins blockquote,.reset-margins body,.reset-margins canvas,.reset-margins caption,.reset-margins center,.reset-margins cite,.reset-margins code,.reset-margins dd,.reset-margins del,.reset-margins details,.reset-margins dfn,.reset-margins div,.reset-margins dl,.reset-margins dt,.reset-margins em,.reset-margins embed,.reset-margins fieldset,.reset-margins figcaption,.reset-margins figure,.reset-margins footer,.reset-margins form,.reset-margins h1,.reset-margins h2,.reset-margins h3,.reset-margins h4,.reset-margins h5,.reset-margins h6,.reset-margins header,.reset-margins hgroup,.reset-margins html,.reset-margins i,.reset-margins iframe,.reset-margins img,.reset-margins ins,.reset-margins kbd,.reset-margins label,.reset-margins legend,.reset-margins li,.reset-margins mark,.reset-margins menu,.reset-margins nav,.reset-margins object,.reset-margins ol,.reset-margins output,.reset-margins p,.reset-margins pre,.reset-margins q,.reset-margins ruby,.reset-margins s,.reset-margins samp,.reset-margins section,.reset-margins small,.reset-margins span,.reset-margins strike,.reset-margins strong,.reset-margins sub,.reset-margins summary,.reset-margins sup,.reset-margins table,.reset-margins tbody,.reset-margins td,.reset-margins tfoot,.reset-margins th,.reset-margins thead,.reset-margins time,.reset-margins tr,.reset-margins tt,.reset-margins u,.reset-margins ul,.reset-margins var,.reset-margins video{margin:0}.ck-body .ck.ck-balloon-panel{z-index:101000}.formio-component-select select[disabled=disabled]{-webkit-appearance:none;-moz-appearance:none;text-indent:1px;text-overflow:""}.formio-component-select .choices.is-disabled[data-type*=select-one]:after,.formio-component-select div[disabled=disabled] button{display:none}.datagrid-group-label.collapsed>td{display:none}.datagrid-group-header.clickable{cursor:pointer}.datagrid-group-header.clickable .datagrid-group-label:before{display:inline-block;vertical-align:middle;content:"▾";margin:0 5px}.datagrid-group-header.clickable.collapsed .datagrid-group-label:before{content:"▸"}.formio-component.alert-danger .help-block,.formio-component.alert-warning .help-block{color:inherit}.tree__level_even{background-color:#f6f6f6}.tree__node-content{margin-bottom:10px}.tree__node-children{margin:0}.formio-select-autocomplete-input{opacity:0;position:relative;z-index:-1;display:block;height:0;border:none}.has-error>.help-block{margin-top:5px;margin-bottom:10px}.no-top-border-table>.table>tbody>tr:first-child>td{border-top:none}.table>tbody>tr>td.cell-align-left{text-align:left}.table>tbody>tr>td.cell-align-center{text-align:center}.table>tbody>tr>td.cell-align-center>div{margin-left:auto;margin-right:auto}.table>tbody>tr>td.cell-align-right{text-align:right}.table>tbody>tr>td.cell-align-right>div{margin-left:auto}.table-responsive[ref=component]{overflow-x:visible}.formio-component-textarea .alert .ck-editor__editable{color:inherit}.formio-component-textarea .ck.ck-editor__editable .image .ck-progress-bar{height:4px}div[data-oembed-url]{width:100%}.checkbox label.label-position-bottom,.checkbox label.label-position-left,.checkbox label.label-position-top,.radio label.label-position-bottom,.radio label.label-position-left,.radio label.label-position-top{padding-left:0}.checkbox label.label-position-bottom span,.checkbox label.label-position-top span,.radio label.label-position-bottom span,.radio label.label-position-top span{display:block}.checkbox label.label-position-bottom input[type=checkbox],.checkbox label.label-position-top input[type=checkbox],.radio label.label-position-bottom input[type=radio],.radio label.label-position-top input[type=radio]{position:relative;margin-left:0}.checkbox label.label-position-top input[type=checkbox],.radio label.label-position-top input[type=radio]{margin-top:4px}.checkbox label.label-position-bottom input[type=checkbox],.radio label.label-position-bottom input[type=radio]{margin-bottom:8px}.radio label.label-position-left input[type=radio]{margin-left:10px}.checkbox label.label-position-left input[type=checkbox]{margin-left:4px;position:relative}.open-modal-button{width:100%;text-align:left;white-space:normal;height:auto}.formio-component-modal-wrapper-signature .open-modal-button{text-align:center;height:100%;font-size:1.4em;padding:0;margin:0}.formio-component-content .image{display:table;clear:both;text-align:center;margin:1em auto}.formio-component-content .image>img{display:block;margin:0 auto;max-width:100%;min-width:50px}.formio-component-content .image>figcaption{display:table-caption;caption-side:bottom;word-break:break-word;color:#333;background-color:#f7f7f7;padding:.6em;font-size:.75em;outline-offset:-1px}.formio-component-content .image.image_resized{max-width:100%;display:block;box-sizing:border-box}.formio-component-content .image.image_resized img{width:100%}.formio-component-content .image.image_resized>figcaption{display:block}.formio-component-content .media{clear:both;margin:1em 0;display:block;min-width:15em}.formio-component-content .image-style-align-center:not(.image_resized),.formio-component-content .image-style-align-left:not(.image_resized),.formio-component-content .image-style-align-right:not(.image_resized),.formio-component-content .image-style-side:not(.image_resized){max-width:50%}.formio-component-content .image-style-align-center:not(.image_resized),.formio-component-content .image-style-align-left:not(.image_resized),.formio-component-content .image-style-align-right:not(.image_resized),.formio-component-content .image-style-side:not(.image_resized){max-width:50%}.formio-component-content .image-style-align-center:not(.image_resized),.formio-component-content .image-style-align-left:not(.image_resized),.formio-component-content .image-style-align-right:not(.image_resized),.formio-component-content .image-style-side:not(.image_resized){max-width:50%}.formio-component-content .image-style-align-center:not(.image_resized),.formio-component-content .image-style-align-left:not(.image_resized),.formio-component-content .image-style-align-right:not(.image_resized),.formio-component-content .image-style-side:not(.image_resized){max-width:50%}.formio-component-content .image-style-side{float:right;margin-left:var(--ck-image-style-spacing)}.formio-component-content .image-style-align-left{float:left;margin-right:var(--ck-image-style-spacing)}.formio-component-content .image-style-align-center{margin-left:auto;margin-right:auto}.formio-component-content .image-style-align-right{float:right;margin-left:var(--ck-image-style-spacing)}.formio-component-content blockquote{overflow:hidden;padding-right:1.5em;padding-left:1.5em;margin-left:0;margin-right:0;font-style:italic;border-left:solid 5px #ccc}.formio-component-content[dir=rtl] blockquote{border-left:0;border-right:solid 5px #ccc}.formio-component-content .text-tiny{font-size:.7em}.formio-component-content .text-small{font-size:.85em}.formio-component-content .text-big{font-size:1.4em}.formio-component-content .text-huge{font-size:1.8em}.formio-component-address.formio-component-label-hidden>label.field-required{z-index:1}.formio-component-address.formio-component-label-hidden>label.field-required~.address-autocomplete-container .address-autocomplete-remove-value-icon{right:20px}.address-autocomplete-container{position:relative}.address-autocomplete-container .address-autocomplete-remove-value-icon{cursor:pointer;position:absolute;margin-top:-9px;right:10px;top:50%}.address-autocomplete-container .address-autocomplete-remove-value-icon--hidden{display:none}.autocomplete{background:#fff;font:14px/22px "-apple-system",BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;overflow:auto;box-sizing:border-box;border:1px solid rgba(50,50,50,.6);z-index:11000}.autocomplete>div{cursor:pointer;padding:6px 10px}.autocomplete>div.selected,.autocomplete>div:hover:not(.group){background:#1e90ff;color:#fff}.field-wrapper{display:flex}.field-wrapper--reverse{flex-direction:row-reverse}.field-wrapper .field-label--right{text-align:right}.formio-component-modal-wrapper{margin-bottom:10px}.formio-component-modal-wrapper .open-modal-button{height:auto}.formio-component-modal-wrapper .component-rendering-hidden{visibility:hidden}.formio-component-textarea div.formio-editor-read-only-content[ref=input]{white-space:pre-wrap}.formio-editor-read-only-content img{max-width:100%}.formio-editor-read-only-content li[data-list=bullet]{list-style-type:none}.formio-editor-read-only-content li[data-list=bullet] .ql-ui{padding-right:.5rem}.formio-editor-read-only-content li[data-list=bullet] .ql-ui::before{content:"•"}.formio-editor-read-only-content li[data-list=ordered]{list-style-type:none;counter-reset:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;counter-increment:list-0}.formio-editor-read-only-content li[data-list=ordered] .ql-ui{padding-right:.5rem}.formio-editor-read-only-content li[data-list=ordered] .ql-ui::before{content:counter(list-0,decimal) ". "}.formio-editor-read-only-content figure.table table{border-collapse:collapse;border-spacing:0;width:100%;height:100%;border:1px double #b3b3b3;table-layout:fixed}.formio-editor-read-only-content figure.table table td,.formio-editor-read-only-content figure.table table th{min-width:2em;padding:.4em;border:1px solid #bfbfbf}.formio-component-password .pull-right:not(:last-child),.formio-component-textarea .pull-right:not(:last-child),.formio-component-textfield .pull-right:not(:last-child){padding-left:12px}.formio-form>div>nav>ul.pagination{flex-flow:wrap row}.formio-form>div>nav>ul.pagination .page-link{cursor:pointer;color:#1c74d9}.formio-form>div>nav>ul.pagination .page-item.active .page-link{color:#fff;background-color:#1c74d9;border-color:#1c74d9}.classic-pagination{border-bottom:solid 1px #e0e0e0;padding:0 15px 10px 15px;line-height:1em}.classic-pagination-page{padding:0;position:relative}.classic-pagination-title{color:#595959;font-size:16px;margin-bottom:5px}.classic-pagination-dot{position:absolute;width:30px;height:30px;display:block;background:#fbe8aa;top:40px;left:50%;margin-top:-15px;margin-left:-15px;border-radius:50%}.classic-pagination-dot::after{content:" ";width:14px;height:14px;background:#fbbd19;border-radius:50px;position:absolute;top:8px;left:8px}.classic-pagination .progress,.classic-pagination-progress{position:relative;border-radius:0;height:8px;box-shadow:none;margin:20px 0;border:none;padding:0;background-color:#f6f6f6}.classic-pagination .progress-bar,.classic-pagination-progress-bar{width:0;height:10px;box-shadow:none;background:#fbe8aa}.classic-pagination-page.complete .classic-pagination-progress-bar,.classic-pagination-page.complete .progress-bar{width:100%}.classic-pagination-page.active .classic-pagination-progress-bar,.classic-pagination-page.active .progress-bar{width:50%}.classic-pagination-page.disabled .classic-pagination-dot{background-color:#f5f5f5}.classic-pagination-page.disabled .classic-pagination-dot::after{opacity:0}.classic-pagination-page:first-child .classic-pagination-progress,.classic-pagination-page:first-child .progress{left:50%;width:50%}.classic-pagination-page:first-child.active .classic-pagination-progress-bar,.classic-pagination-page:first-child.active .progress-bar{width:0%}.classic-pagination-page:last-child .classic-pagination-progress,.classic-pagination-page:last-child .progress{width:50%}.classic-pagination-page:last-child.active .classic-pagination-progress-bar,.classic-pagination-page:last-child.active .progress-bar{width:100%}.pac-container{z-index:11000}[ref=buttonMessageContainer].has-error{cursor:pointer}[ref=passwordStrengthIndicator]{display:inline}.formio-security-indicator{display:flex;height:5px}.formio-security-indicator [class^=security-]{width:100%;height:100%}.formio-security-indicator .security-low{background-color:#c51e00}.formio-security-indicator .security-medium{background-color:#ebb400}.formio-security-indicator .security-high{background-color:#bddf00}.formio-security-indicator .security-very-high{background-color:#009118}.formio-component-textarea .formio-editor-read-only-content .text-big{font-size:1.4em}.formio-component-textarea .formio-editor-read-only-content .text-huge{font-size:1.8em}.formio-component-textarea .formio-editor-read-only-content .text-small{font-size:.85em}.formio-component-textarea .formio-editor-read-only-content .text-tiny{font-size:.7em}.formio-component [ref=valueMaskInput]{display:none}.formio-wizard-nav-container{display:flex}.formio-wizard-nav-container li{margin-right:.5rem}@media not all and (min-width:30em){.formio-wizard-nav-container{flex-direction:column}.formio-wizard-nav-container li{margin-right:0}.formio-wizard-nav-container li .btn{width:100%;margin-bottom:.25rem}}.formio-tooltip__trigger{cursor:pointer}.formio-tooltip__body{background-color:#1b1b1b;border-radius:.25rem;bottom:0;color:#f0f0f0;display:none;font-size:1rem;padding:.5rem;position:absolute;left:0;transform:translateX(-50%);width:auto;white-space:pre;z-index:1000}.formio-tooltip__body.formio-tooltip--is-set{display:block}.formio-tooltip__body--whitespace{white-space:normal;width:250px}.formio-tooltip__body--right{top:auto;transform:translateX(0)}.formio-tooltip__body--left{top:auto;left:0;right:auto;transform:translateX(0)}.formio-tooltip__body--bottom{bottom:auto;top:0}.formio-tooltip__wrapper{position:relative}.formio-tooltip__wrapper>span{font-weight:400}span[role=link]{text-decoration:underline;cursor:pointer}.formbuilder{position:relative}.drag-container{padding:10px;border:dotted 2px #e8e8e8}.drag-container:hover{cursor:move;border:dotted 2px #ccc}.drag-container.formio-builder-form,.drag-container.formio-builder-form:hover,.panel-body>.drag-container.formio-builder-components,.panel-body>.drag-container.formio-builder-components:hover,.tab-pane>.drag-container.formio-builder-components,.tab-pane>.drag-container.formio-builder-components:hover{padding:0 0 1rem 0;border:none}.component-btn-group{display:flex;flex-direction:row-reverse;position:absolute;right:0;z-index:1000;margin-top:-2px}.builder-component{position:relative;min-height:15px;margin-bottom:15px}.builder-component .formio-component-htmlelement{border:dotted 2px #e8e8e8}.builder-component .formio-component-htmlelement [ref=html]:empty:before{content:"HTML Content";color:#aaa}.builder-component:not(:hover) .component-btn-group{display:none}.builder-group-button{background-color:transparent;white-space:normal;text-align:left}.form-builder-group-header{padding:0}.component-btn-group .component-settings-button{float:right;z-index:1001;margin:4px 4px 0 0;z-index:1001;-webkit-box-shadow:0 0 10px 1px rgba(48,113,169,.6);-moz-box-shadow:0 0 10px 1px rgba(48,113,169,.6);box-shadow:0 0 10px 1px rgba(48,113,169,.6)}.formbuilder .formio-component-content,.formbuilder .formio-component-datasource,.formbuilder .formio-component-form,.formbuilder .formio-component-hidden{border:2px dashed #ddd}.formbuilder .formio-component-datasource,.formbuilder .formio-component-form,.formbuilder .formio-component-hidden{min-height:3em;text-align:center;color:#aaa;padding-top:.5em}.btn-group-xxs>.btn,.btn-xxs,.component-btn-group .component-settings-button{padding:2px 2px;font-size:10px;line-height:1.2em;border-radius:0;width:18px;height:18px}.formcomponents .formcomponent{text-align:left;padding:5px 5px 5px 8px;margin-top:.2rem;font-size:.8em;line-height:1.2;border-radius:.3em}.form-builder-panel .panel-body{padding:5px}.formio-component-tabs .ui.tabular.menu .item{padding:.8em}.formio-pdf-builder{position:relative}.formio-drop-zone{display:none;position:absolute;z-index:10;background-color:#0d87e9;opacity:.1}.formio-drop-zone.enabled{display:inherit}.component-settings .formio-dialog-content{max-height:100%}.component-btn-group .btn.component-settings-button-paste{display:none}.builder-paste-mode .component-settings-button-paste{display:inherit!important}.wizard-page-label{cursor:pointer;border-radius:0}.panel-body .drag-and-drop-alert{margin-bottom:0}.builder-sidebar_scroll{position:sticky;top:15px}.builder-sidebar_search{margin-bottom:10px;appearance:auto}.formio-wizard-builder-component-title{color:#6c757d;text-align:center;padding:.5rem}.formio-wizard-position{position:relative}.formio-settings-help{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc;margin-top:10px}.help-block{margin:0}.builder-sidebar .btn{white-space:normal}.component-settings{padding-top:20px!important;padding-bottom:20px!important}.component-edit-container{height:auto;overflow:hidden}.component-edit-content{height:calc(100% - 4em)}.component-edit-tabs.col-sm-6{height:100%;overflow-y:auto}.component-edit-tabs.col-sm-12{height:calc(100% - 4em);overflow-y:auto}.component-edit-tabs.col-sm-12 .editForm{height:calc(100% - 4em);overflow-y:auto}.progress.pdf-progress{height:2rem}.progress.pdf-progress .progress-bar{font-size:1rem;line-height:2rem}.builder-sidebar.disabled .formcomponent{cursor:not-allowed;opacity:.65;box-shadow:none} \ No newline at end of file +@charset "UTF-8";.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}.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;left:0;right:0;width:-moz-fit-content;width:-webkit-fit-content;width:fit-content;height:-moz-fit-content;height:-webkit-fit-content;height:fit-content;margin:auto;border:solid;padding:1em;background:#fff;color:#000;display:block}dialog:not([open]){display:none}dialog+.backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.1)}._dialog_overlay{position:fixed;top:0;right:0;bottom:0;left:0}dialog.fixed{position:fixed;top:50%;transform:translate(0,-50%)}.gu-mirror{position:fixed!important;margin:0!important;z-index:9999!important;opacity:.8;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=80)";filter:alpha(opacity=80)}.gu-hide{display:none!important}.gu-unselectable{-webkit-user-select:none!important;-moz-user-select:none!important;-ms-user-select:none!important;user-select:none!important}.gu-transit{opacity:.2;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=20)";filter:alpha(opacity=20)}.formio-loader{position:relative;min-height:60px}.loader-wrapper{z-index:1000;position:absolute;top:0;left:0;bottom:0;right:0;height:120px;background-color:rgba(0,0,0,0)}.loader{position:absolute;left:50%;top:50%;margin-left:-30px;margin-top:-30px;z-index:10000;display:inline-block;border:6px solid #f3f3f3;border-top:6px solid #3498db;border-radius:50%;width:60px;height:60px;animation:spin 2s linear infinite}@keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.formio-form{position:relative;min-height:80px}.formio-error-wrapper,.formio-warning-wrapper{padding:1em}.formio-error-wrapper{color:#721c24;background-color:#f8d7da;border-color:#f5c6cb}.formio-error-wrapper .formio-errors .error{color:#c20000}.formio-error-wrapper .field-required:after{color:#c20000}.formio-warning-wrapper{color:#856404;background-color:#fff3cd;border-color:#ffeeba}.formio-disabled-input .form-control.flatpickr-input{background-color:#eee}.builder-component.has-error .invalid-feedback,.formio-component-modal-wrapper.has-error .invalid-feedback,.formio-component-modal-wrapper.has-message .invalid-feedback,.formio-component.alert-danger .invalid-feedback,.formio-component.has-error .invalid-feedback,.formio-component.has-message .invalid-feedback{display:block;color:inherit;margin-top:4px}.formio-errors .error{color:#dc3545}.formio-errors .warning{color:#856404}.formio-errors .info{color:#004085}.formio-wysiwyg-editor{min-height:200px;background-color:#fff}.has-feedback .form-control{padding-right:10px}.has-feedback .form-control[type=hidden]{padding-right:0}.has-error.bg-danger{padding:4px}.ql-source:after{content:"[source]";white-space:nowrap}.quill-source-code{width:100%;margin:0;background:#1d1d1d;box-sizing:border-box;color:#ccc;font-size:15px;outline:0;padding:20px;line-height:24px;font-family:Consolas,Menlo,Monaco,"Courier New",monospace;position:absolute;top:0;bottom:0;border:none;display:none}.formio-component-tags tags{background-color:#fff}.field-required:after,.tab-error::after{content:" *";color:#eb0000}.field-required:after{position:relative;z-index:10}.glyphicon-spin{-webkit-animation:formio-spin 1s infinite linear;-moz-animation:formio-spin 1s infinite linear;-o-animation:formio-spin 1s infinite linear;animation:formio-spin 1s infinite linear}@-moz-keyframes formio-spin{from{-moz-transform:rotate(0)}to{-moz-transform:rotate(360deg)}}@-webkit-keyframes formio-spin{from{-webkit-transform:rotate(0)}to{-webkit-transform:rotate(360deg)}}@keyframes formio-spin{from{transform:rotate(0)}to{transform:rotate(360deg)}}.button-icon-right{margin-left:5px}.formio-component-submit .submit-success::after{content:"✓";position:relative;right:-4px;top:1px;line-height:1}.formio-component-submit .submit-fail::after{content:"✗";position:relative;right:-4px;top:1px;line-height:1}.card-vertical{display:flex;flex-direction:row;margin-top:5px}.card-vertical .card-body,.tab,.tab-content{flex-grow:2}.nav-tabs-vertical{display:flex;flex-direction:column;border-right:1px solid #ddd;padding-left:5px;margin-right:10px;border-bottom:0}.card-vertical>.card-body,.card-vertical>.tab,.card-vertical>.tab-content{flex-basis:85%}.card-vertical ul>li>.nav-link-vertical{border-right-color:transparent;border-radius:4px 0 0 4px;margin-right:0}.card-vertical ul>li>.nav-link-vertical.active{border-bottom-color:#ddd;border-right-color:transparent}.card-vertical ul>li>.nav-link-vertical.active:hover{border-right-color:transparent}.nav-tabs-vertical>li{margin:0 -1px 0 0}.formio-component-submit .submit-fail[disabled]{opacity:1}.form-control.flatpickr-input{background-color:#fff}.input-group .flatpickr-wrapper{flex-grow:1}.flatpickr-calendar .flatpickr-current-month .flatpickr-monthDropdown-months:focus,.flatpickr-calendar .flatpickr-current-month input.cur-year:focus,.flatpickr-calendar .flatpickr-days:focus{outline:auto}td>.form-group{margin-bottom:0}.signature-pad-body{overflow:hidden;position:relative}.signature-pad-canvas{border-radius:4px;box-shadow:0 0 5px rgba(0,0,0,.02) inset;border:1px solid #f4f4f4}.btn.signature-pad-refresh{position:absolute;left:0;top:0;z-index:1000;padding:3px;line-height:0}[dir=rtl] .btn.signature-pad-refresh{left:unset;right:0}.formio-component-multiple .choices__input{width:100%}.formio-component-multiple .is-invalid{border-color:#f04124}.formio-component-multiple :not(.is-invalid){border-color:#ccc}.choices__list--dropdown .choices__item--selectable{padding-right:0}.signature-pad-refresh img{height:1.2em}.signature-pad-footer{text-align:center;color:#c3c3c3}.choices__list--dropdown{z-index:100}.choices__list--multiple .choices__item{border-radius:0;padding:2px 8px;line-height:1em;margin-bottom:6px}.choices__list--single{padding:0}.choices__item.choices__item--selectable{white-space:nowrap;overflow:hidden;padding-right:25px;text-overflow:ellipsis}.choices__input{padding:2px}.choices[dir=rtl]>*{text-align:right}.choices[dir=rtl] .choices__list--multiple .choices__item[data-deletable]{padding-left:5px;float:right}.choices[dir=rtl] .choices__list--multiple .choices__item[data-deletable] .choices__button{float:left;margin:0 8px 0 -4px;padding-left:unset;padding-right:16px;border-left:unset;border-right:1px solid #008fa1;overflow:hidden}@-moz-document url-prefix(){.choices__button{float:right}}.formio-component-file .fileSelector{position:relative;padding:15px;border:2px dashed #ddd;text-align:center}.formio-component-file .fileSelector .loader-wrapper{display:none;width:100%;height:100%;background-color:rgba(0,0,0,.1)}.formio-component-file .fileSelector .loader-wrapper .loader{height:45px;width:45px;margin-top:-23px;margin-left:-23px}.formio-component-file .fileSelector a{text-decoration:underline}.formio-component-file .fileSelector.fileDragOver{border-color:#127abe}.formio-component-file .fileSelector .fa,.formio-component-file .fileSelector .glyphicon{font-size:20px;margin-right:5px}[dir=rtl] .formio-component-file .fileSelector .fa,[dir=rtl] .formio-component-file .fileSelector .glyphicon{margin-right:unset;margin-left:5px}.formio-component-file .fileSelector .browse{cursor:pointer}@-webkit-keyframes formio-dialog-fadeout{0%{opacity:1}100%{opacity:0}}@keyframes formio-dialog-fadeout{0%{opacity:1}100%{opacity:0}}@-webkit-keyframes formio-dialog-fadein{0%{opacity:0}100%{opacity:1}}@keyframes formio-dialog-fadein{0%{opacity:0}100%{opacity:1}}.formio-dialog{box-sizing:border-box;font-size:.8em;color:#666}.formio-dialog.formio-modaledit-dialog{font-size:inherit}.formio-dialog *,.formio-dialog :after,.formio-dialog :before{box-sizing:inherit}.formio-dialog{position:fixed;overflow:auto;-webkit-overflow-scrolling:touch;z-index:10000;top:0;right:0;bottom:0;left:0;background:rgba(0,0,0,.4);animation:formio-dialog-fadein .5s}.formio-dialog.formio-dialog-disabled-animation,.formio-dialog.formio-dialog-disabled-animation .formio-dialog-content,.formio-dialog.formio-dialog-disabled-animation .formio-dialog-overlay{-webkit-animation:none!important;animation:none!important}.formio-dialog-overlay{position:fixed;top:0;right:0;bottom:0;left:0;-webkit-backface-visibility:hidden;-webkit-animation:formio-dialog-fadein .5s;animation:formio-dialog-fadein .5s;margin-right:15px;background:0 0}.formio-dialog-no-overlay{pointer-events:none}.formio-dialog.formio-dialog-closing .formio-dialog-overlay{-webkit-backface-visibility:hidden;-webkit-animation:formio-dialog-fadeout .5s;animation:formio-dialog-fadeout .5s}.formio-dialog-content{background:#fff;-webkit-backface-visibility:hidden;-webkit-animation:formio-dialog-fadein .5s;animation:formio-dialog-fadein .5s;pointer-events:all;overflow:auto}.formio-component-modal-wrapper-select .formio-dialog-content{overflow:initial}.formio-dialog.formio-dialog-closing .formio-dialog-content{-webkit-backface-visibility:hidden;-webkit-animation:formio-dialog-fadeout .5s;animation:formio-dialog-fadeout .5s}.formio-dialog-close:before{font-family:Helvetica,Arial,sans-serif;content:"×";cursor:pointer}body.formio-dialog-open,html.formio-dialog-open{overflow:hidden}.formio-dialog .tab-content{padding-top:12px}.formio-dialog-close{z-index:1000}@-webkit-keyframes formio-dialog-flyin{0%{opacity:0;-webkit-transform:translateY(-40px);transform:translateY(-40px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes formio-dialog-flyin{0%{opacity:0;-webkit-transform:translateY(-40px);transform:translateY(-40px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes formio-dialog-flyout{0%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}100%{opacity:0;-webkit-transform:translateY(-40px);transform:translateY(-40px)}}@keyframes formio-dialog-flyout{0%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}100%{opacity:0;-webkit-transform:translateY(-40px);transform:translateY(-40px)}}.formio-dialog.formio-dialog-theme-default{padding-bottom:160px;padding-top:160px}.formio-dialog.formio-dialog-theme-default .component-edit-container{padding:.5em}.formio-dialog.formio-dialog-theme-default.formio-dialog-closing .formio-dialog-content{-webkit-animation:formio-dialog-flyout .5s;animation:formio-dialog-flyout .5s}.formio-dialog.formio-dialog-theme-default .formio-dialog-content{-webkit-animation:formio-dialog-flyin .5s;animation:formio-dialog-flyin .5s;background:#f0f0f0;border-radius:5px;font-family:Helvetica,sans-serif;font-size:1.1em;line-height:1.5em;margin:0 auto;max-width:100%;padding:1em;position:relative;width:80%}.formio-dialog.formio-dialog-theme-default .formio-dialog-close{border:none;background:0 0;cursor:pointer;position:absolute;right:1px;top:1px;z-index:100}.formio-clickable{cursor:pointer}.component-settings .nav>li>a{padding:8px 10px}.formio-dialog.formio-dialog-theme-default .formio-dialog-close:before{display:block;padding:3px;background:0 0;color:#8a8a8a;content:"×";font-size:26px;font-weight:400;line-height:26px;text-align:center}.formio-dialog.formio-dialog-theme-default .formio-dialog-close:active:before,.formio-dialog.formio-dialog-theme-default .formio-dialog-close:hover:before{color:#777}.formio-dialog.formio-dialog-theme-default .formio-dialog-message{margin-bottom:.5em}.formio-dialog.formio-dialog-theme-default .formio-dialog-input{margin-bottom:1em}.formio-dialog.formio-dialog-theme-default .formio-dialog-input input[type=email],.formio-dialog.formio-dialog-theme-default .formio-dialog-input input[type=password],.formio-dialog.formio-dialog-theme-default .formio-dialog-input input[type=text],.formio-dialog.formio-dialog-theme-default .formio-dialog-input input[type=url],.formio-dialog.formio-dialog-theme-default .formio-dialog-input textarea{background:#fff;border:0;border-radius:3px;font-family:inherit;font-size:inherit;font-weight:inherit;margin:0 0 .25em;min-height:2.5em;padding:.25em .67em;width:100%}.formio-dialog.formio-dialog-theme-default .formio-dialog-input input[type=email]:focus,.formio-dialog.formio-dialog-theme-default .formio-dialog-input input[type=password]:focus,.formio-dialog.formio-dialog-theme-default .formio-dialog-input input[type=text]:focus,.formio-dialog.formio-dialog-theme-default .formio-dialog-input input[type=url]:focus,.formio-dialog.formio-dialog-theme-default .formio-dialog-input textarea:focus{box-shadow:inset 0 0 0 2px #8dbdf1;outline:0}.formio-dialog-buttons{display:flex;justify-content:flex-end}.formio-dialog.formio-dialog-theme-default .formio-dialog-buttons{*zoom:1}.formio-dialog.formio-dialog-theme-default .formio-dialog-buttons:after{content:"";display:table;clear:both}.formio-dialog.formio-dialog-theme-default .formio-dialog-button{border:0;border-radius:3px;cursor:pointer;float:right;font-family:inherit;font-size:.8em;letter-spacing:.1em;line-height:1em;margin:0 0 0 .5em;padding:.75em 2em;text-transform:uppercase}.formio-dialog.formio-dialog-theme-default .formio-dialog-button:focus{-webkit-animation:formio-dialog-pulse 1.1s infinite;animation:formio-dialog-pulse 1.1s infinite;outline:0}@media (max-width:568px){.formio-dialog.formio-dialog-theme-default .formio-dialog-button:focus{-webkit-animation:none;animation:none}}.formio-dialog.formio-dialog-theme-default .formio-dialog-button.formio-dialog-button-primary{background:#3288e6;color:#fff}.formio-dialog.formio-dialog-theme-default .formio-dialog-button.formio-dialog-button-secondary{background:#e0e0e0;color:#777}.formio-dialog-content .panel{margin:0}.formio-dialog-content [ref=dialogHeader]{padding-right:15px}.formio-placeholder{position:absolute;color:#999}.formio-dialog .formio-dialog-close{cursor:pointer}.formio-iframe{border:none;width:100%;height:1000px}.inline-form-button{margin-right:10px}.tooltip{opacity:1}.tooltip[x-placement=right] .tooltip-arrow{border-right:5px solid #000}.tooltip[x-placement=right] .tooltip-inner{margin-left:8px}.control-label--bottom{margin-bottom:0;margin-top:5px}.formio-component-label-hidden{position:relative}.formio-hidden{margin:0}.formio-removed{display:none}.control-label--hidden{position:absolute;top:6px;right:5px}.formio-component-datetime .control-label--hidden.field-required{right:45px;z-index:3}.formio-component-selectboxes .control-label--hidden.field-required,.formio-component-survey .control-label--hidden.field-required{top:0}.formio-component-resource .control-label--hidden.field-required,.formio-component-select .control-label--hidden.field-required{right:40px;z-index:2}.formio-component-radio .control-label--hidden.field-required:after,.formio-component-selectboxes .control-label--hidden.field-required:after{display:none}.formio-component-radio.formio-component-label-hidden.required .form-check-label:before,.formio-component-selectboxes.formio-component-label-hidden.required .form-check-label:before{position:relative;content:"* ";color:#eb0000}.formio-component-radio.formio-component-label-hidden.required .label-position-right.form-check-label:before,.formio-component-selectboxes.formio-component-label-hidden.required .label-position-right.form-check-label:before{right:20px}.formio-component-datasource,.formio-component-hidden:not(.formio-component-checkbox){margin-bottom:0}.checkbox-inline label,.radio-inline label{font-weight:400;cursor:pointer}.editgrid-listgroup{margin-bottom:10px}.tree-listgroup{flex-direction:row}.formio-component-submit button[disabled]+.has-error{display:block}.formio-choices.form-group{margin-bottom:0}.formio-choices[data-type=select-multiple] .form-control{height:auto}.form-control.formio-multiple-mask-select{width:15%;z-index:4}.form-control.formio-multiple-mask-input{width:85%}.input-group.formio-multiple-mask-container{width:100%}.formio-component .table{margin-bottom:0}.editgrid-table-container{margin-bottom:10px;max-width:calc(100vw - 140px)}.editgrid-table-container .table-responsive{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.editgrid-table-column{border:none}.editgrid-table-head{border:1px solid #ddd}.editgrid-table-body{border:1px solid #ddd;border-top:0}.formio-hide-label-panel-tooltip{margin-top:-10px;margin-left:-10px}.is-disabled .choices__list--multiple .choices__item{padding:5px 10px}.is-disabled .choices__list--multiple .choices__item .choices__button{display:none}.formio-collapse-icon{cursor:pointer;margin-right:4px}[dir=rtl] .formio-collapse-icon{margin-right:unset;margin-left:4px}.formio-component-dateTime .form-control[type=datetime-local]~.input-group-addon,.formio-component-datetime .form-control[type=datetime-local]~.input-group-addon{width:auto}.formio-component-datagrid .formio-datagrid-remove{position:absolute;top:0;right:0;visibility:hidden;opacity:0;transition:opacity .2s linear,visibility 0s .2s}.formio-component-datagrid .datagrid-table>tbody>tr>td:last-child{position:relative}.formio-component-datagrid .datagrid-table>tbody>tr:hover>td:last-child .formio-datagrid-remove{visibility:visible;opacity:1;transition:visibility 0s,opacity .2s linear}.formio-component-modaledit .formio-modaledit-view-container{position:relative;border:1px solid #ddd;min-height:34px;padding:6px 12px;cursor:text}td .formio-component-modaledit .formio-modaledit-view-container{padding:0;border-style:none}.formio-component-modaledit .formio-modaledit-edit{position:absolute;top:0;left:0;visibility:hidden;opacity:0;transition:opacity .2s linear,visibility 0s .2s}.formio-component-modaledit .formio-modaledit-view-container:hover .formio-modaledit-edit{visibility:visible;opacity:1;transition:visibility 0s,opacity .2s linear}.formio-modaledit-dialog .formio-modaledit-close{position:absolute;top:100%;right:0;border-radius:0}.reset-margins a,.reset-margins abbr,.reset-margins acronym,.reset-margins address,.reset-margins applet,.reset-margins article,.reset-margins aside,.reset-margins audio,.reset-margins b,.reset-margins big,.reset-margins blockquote,.reset-margins body,.reset-margins canvas,.reset-margins caption,.reset-margins center,.reset-margins cite,.reset-margins code,.reset-margins dd,.reset-margins del,.reset-margins details,.reset-margins dfn,.reset-margins div,.reset-margins dl,.reset-margins dt,.reset-margins em,.reset-margins embed,.reset-margins fieldset,.reset-margins figcaption,.reset-margins figure,.reset-margins footer,.reset-margins form,.reset-margins h1,.reset-margins h2,.reset-margins h3,.reset-margins h4,.reset-margins h5,.reset-margins h6,.reset-margins header,.reset-margins hgroup,.reset-margins html,.reset-margins i,.reset-margins iframe,.reset-margins img,.reset-margins ins,.reset-margins kbd,.reset-margins label,.reset-margins legend,.reset-margins li,.reset-margins mark,.reset-margins menu,.reset-margins nav,.reset-margins object,.reset-margins ol,.reset-margins output,.reset-margins p,.reset-margins pre,.reset-margins q,.reset-margins ruby,.reset-margins s,.reset-margins samp,.reset-margins section,.reset-margins small,.reset-margins span,.reset-margins strike,.reset-margins strong,.reset-margins sub,.reset-margins summary,.reset-margins sup,.reset-margins table,.reset-margins tbody,.reset-margins td,.reset-margins tfoot,.reset-margins th,.reset-margins thead,.reset-margins time,.reset-margins tr,.reset-margins tt,.reset-margins u,.reset-margins ul,.reset-margins var,.reset-margins video{margin:0}.ck-body .ck.ck-balloon-panel{z-index:101000}.formio-component-select select[disabled=disabled]{-webkit-appearance:none;-moz-appearance:none;text-indent:1px;text-overflow:""}.formio-component-select .choices.is-disabled[data-type*=select-one]:after,.formio-component-select div[disabled=disabled] button{display:none}.datagrid-group-label.collapsed>td{display:none}.datagrid-group-header.clickable{cursor:pointer}.datagrid-group-header.clickable .datagrid-group-label:before{display:inline-block;vertical-align:middle;content:"▾";margin:0 5px}.datagrid-group-header.clickable.collapsed .datagrid-group-label:before{content:"▸"}.formio-component.alert-danger .help-block,.formio-component.alert-warning .help-block{color:inherit}.tree__level_even{background-color:#f6f6f6}.tree__node-content{margin-bottom:10px}.tree__node-children{margin:0}.formio-select-autocomplete-input{opacity:0;position:relative;z-index:-1;display:block;height:0;border:none}.has-error>.help-block{margin-top:5px;margin-bottom:10px}.no-top-border-table>.table>tbody>tr:first-child>td{border-top:none}.table>tbody>tr>td.cell-align-left{text-align:left}.table>tbody>tr>td.cell-align-center{text-align:center}.table>tbody>tr>td.cell-align-center>div{margin-left:auto;margin-right:auto}.table>tbody>tr>td.cell-align-right{text-align:right}.table>tbody>tr>td.cell-align-right>div{margin-left:auto}.table-responsive[ref=component]{overflow-x:visible}.formio-component-textarea .alert .ck-editor__editable{color:inherit}.formio-component-textarea .ck.ck-editor__editable .image .ck-progress-bar{height:4px}div[data-oembed-url]{width:100%}.checkbox label.label-position-bottom,.checkbox label.label-position-left,.checkbox label.label-position-top,.radio label.label-position-bottom,.radio label.label-position-left,.radio label.label-position-top{padding-left:0}.checkbox label.label-position-bottom span,.checkbox label.label-position-top span,.radio label.label-position-bottom span,.radio label.label-position-top span{display:block}.checkbox label.label-position-bottom input[type=checkbox],.checkbox label.label-position-top input[type=checkbox],.radio label.label-position-bottom input[type=radio],.radio label.label-position-top input[type=radio]{position:relative;margin-left:0}.checkbox label.label-position-top input[type=checkbox],.radio label.label-position-top input[type=radio]{margin-top:4px}.checkbox label.label-position-bottom input[type=checkbox],.radio label.label-position-bottom input[type=radio]{margin-bottom:8px}.radio label.label-position-left input[type=radio]{margin-left:10px}.checkbox label.label-position-left input[type=checkbox]{margin-left:4px;position:relative}.open-modal-button{width:100%;text-align:left;white-space:normal;height:auto}.formio-component-modal-wrapper-signature .open-modal-button{text-align:center;height:100%;font-size:1.4em;padding:0;margin:0}.formio-component-content .image{display:table;clear:both;text-align:center;margin:1em auto}.formio-component-content .image>img{display:block;margin:0 auto;max-width:100%;min-width:50px}.formio-component-content .image>figcaption{display:table-caption;caption-side:bottom;word-break:break-word;color:hsl(0deg,0%,20%);background-color:hsl(0deg,0%,97%);padding:.6em;font-size:.75em;outline-offset:-1px}.formio-component-content .image.image_resized{max-width:100%;display:block;box-sizing:border-box}.formio-component-content .image.image_resized img{width:100%}.formio-component-content .image.image_resized>figcaption{display:block}.formio-component-content .media{clear:both;margin:1em 0;display:block;min-width:15em}.formio-component-content .image-style-align-center:not(.image_resized),.formio-component-content .image-style-align-left:not(.image_resized),.formio-component-content .image-style-align-right:not(.image_resized),.formio-component-content .image-style-side:not(.image_resized){max-width:50%}.formio-component-content .image-style-align-center:not(.image_resized),.formio-component-content .image-style-align-left:not(.image_resized),.formio-component-content .image-style-align-right:not(.image_resized),.formio-component-content .image-style-side:not(.image_resized){max-width:50%}.formio-component-content .image-style-align-center:not(.image_resized),.formio-component-content .image-style-align-left:not(.image_resized),.formio-component-content .image-style-align-right:not(.image_resized),.formio-component-content .image-style-side:not(.image_resized){max-width:50%}.formio-component-content .image-style-align-center:not(.image_resized),.formio-component-content .image-style-align-left:not(.image_resized),.formio-component-content .image-style-align-right:not(.image_resized),.formio-component-content .image-style-side:not(.image_resized){max-width:50%}.formio-component-content .image-style-side{float:right;margin-left:var(--ck-image-style-spacing)}.formio-component-content .image-style-align-left{float:left;margin-right:var(--ck-image-style-spacing)}.formio-component-content .image-style-align-center{margin-left:auto;margin-right:auto}.formio-component-content .image-style-align-right{float:right;margin-left:var(--ck-image-style-spacing)}.formio-component-content blockquote{overflow:hidden;padding-right:1.5em;padding-left:1.5em;margin-left:0;margin-right:0;font-style:italic;border-left:solid 5px hsl(0deg,0%,80%)}.formio-component-content[dir=rtl] blockquote{border-left:0;border-right:solid 5px hsl(0deg,0%,80%)}.formio-component-content .text-tiny{font-size:.7em}.formio-component-content .text-small{font-size:.85em}.formio-component-content .text-big{font-size:1.4em}.formio-component-content .text-huge{font-size:1.8em}.formio-component-address.formio-component-label-hidden>label.field-required{z-index:1}.formio-component-address.formio-component-label-hidden>label.field-required~.address-autocomplete-container .address-autocomplete-remove-value-icon{right:20px}.address-autocomplete-container{position:relative}.address-autocomplete-container .address-autocomplete-remove-value-icon{cursor:pointer;position:absolute;margin-top:-9px;right:10px;top:50%}.address-autocomplete-container .address-autocomplete-remove-value-icon--hidden{display:none}.autocomplete{background:#fff;font:14px/22px "-apple-system",BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;overflow:auto;box-sizing:border-box;border:1px solid rgba(50,50,50,.6);z-index:11000}.autocomplete>div{cursor:pointer;padding:6px 10px}.autocomplete>div.selected,.autocomplete>div:hover:not(.group){background:#1e90ff;color:#fff}.field-wrapper{display:flex}.field-wrapper--reverse{flex-direction:row-reverse}.field-wrapper .field-label--right{text-align:right}.formio-component-modal-wrapper{margin-bottom:10px}.formio-component-modal-wrapper .open-modal-button{height:auto}.formio-component-modal-wrapper .component-rendering-hidden{visibility:hidden}.formio-component-textarea div.formio-editor-read-only-content[ref=input]{white-space:pre-wrap}.formio-editor-read-only-content img{max-width:100%}.formio-editor-read-only-content li[data-list=bullet]{list-style-type:none}.formio-editor-read-only-content li[data-list=bullet] .ql-ui{padding-right:.5rem}.formio-editor-read-only-content li[data-list=bullet] .ql-ui::before{content:"•"}.formio-editor-read-only-content li[data-list=ordered]{list-style-type:none;counter-reset:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;counter-increment:list-0}.formio-editor-read-only-content li[data-list=ordered] .ql-ui{padding-right:.5rem}.formio-editor-read-only-content li[data-list=ordered] .ql-ui::before{content:counter(list-0,decimal) ". "}.formio-editor-read-only-content figure.table table{border-collapse:collapse;border-spacing:0;width:100%;height:100%;border:1px double #b3b3b3;table-layout:fixed}.formio-editor-read-only-content figure.table table td,.formio-editor-read-only-content figure.table table th{min-width:2em;padding:.4em;border:1px solid #bfbfbf}.formio-component-password .pull-right:not(:last-child),.formio-component-textarea .pull-right:not(:last-child),.formio-component-textfield .pull-right:not(:last-child){padding-left:12px}.formio-form>div>nav>ul.pagination{flex-flow:wrap row}.formio-form>div>nav>ul.pagination .page-link{cursor:pointer;color:#1c74d9}.formio-form>div>nav>ul.pagination .page-item.active .page-link{color:#fff;background-color:#1c74d9;border-color:#1c74d9}.classic-pagination{border-bottom:solid 1px #e0e0e0;padding:0 15px 10px 15px;line-height:1em}.classic-pagination-page{padding:0;position:relative}.classic-pagination-title{color:#595959;font-size:16px;margin-bottom:5px}.classic-pagination-dot{position:absolute;width:30px;height:30px;display:block;background:#fbe8aa;top:40px;left:50%;margin-top:-15px;margin-left:-15px;border-radius:50%}.classic-pagination-dot::after{content:" ";width:14px;height:14px;background:#fbbd19;border-radius:50px;position:absolute;top:8px;left:8px}.classic-pagination .progress,.classic-pagination-progress{position:relative;border-radius:0;height:8px;box-shadow:none;margin:20px 0;border:none;padding:0;background-color:#f6f6f6}.classic-pagination .progress-bar,.classic-pagination-progress-bar{width:0;height:10px;box-shadow:none;background:#fbe8aa}.classic-pagination-page.complete .classic-pagination-progress-bar,.classic-pagination-page.complete .progress-bar{width:100%}.classic-pagination-page.active .classic-pagination-progress-bar,.classic-pagination-page.active .progress-bar{width:50%}.classic-pagination-page.disabled .classic-pagination-dot{background-color:#f5f5f5}.classic-pagination-page.disabled .classic-pagination-dot::after{opacity:0}.classic-pagination-page:first-child .classic-pagination-progress,.classic-pagination-page:first-child .progress{left:50%;width:50%}.classic-pagination-page:first-child.active .classic-pagination-progress-bar,.classic-pagination-page:first-child.active .progress-bar{width:0%}.classic-pagination-page:last-child .classic-pagination-progress,.classic-pagination-page:last-child .progress{width:50%}.classic-pagination-page:last-child.active .classic-pagination-progress-bar,.classic-pagination-page:last-child.active .progress-bar{width:100%}.pac-container{z-index:11000}[ref=buttonMessageContainer].has-error{cursor:pointer}[ref=passwordStrengthIndicator]{display:inline}.formio-security-indicator{display:flex;height:5px}.formio-security-indicator [class^=security-]{width:100%;height:100%}.formio-security-indicator .security-low{background-color:#c51e00}.formio-security-indicator .security-medium{background-color:#ebb400}.formio-security-indicator .security-high{background-color:#bddf00}.formio-security-indicator .security-very-high{background-color:#009118}.formio-component-textarea .formio-editor-read-only-content .text-big{font-size:1.4em}.formio-component-textarea .formio-editor-read-only-content .text-huge{font-size:1.8em}.formio-component-textarea .formio-editor-read-only-content .text-small{font-size:.85em}.formio-component-textarea .formio-editor-read-only-content .text-tiny{font-size:.7em}.formio-component [ref=valueMaskInput]{display:none}.formio-wizard-nav-container{display:flex}.formio-wizard-nav-container li{margin-right:.5rem}@media not all and (min-width:30em){.formio-wizard-nav-container{flex-direction:column}.formio-wizard-nav-container li{margin-right:0}.formio-wizard-nav-container li .btn{width:100%;margin-bottom:.25rem}}.formio-tooltip__trigger{cursor:pointer}.formio-tooltip__body{background-color:#1b1b1b;border-radius:.25rem;bottom:0;color:#f0f0f0;display:none;font-size:1rem;padding:.5rem;position:absolute;left:0;transform:translateX(-50%);width:auto;white-space:pre;z-index:1000}.formio-tooltip__body.formio-tooltip--is-set{display:block}.formio-tooltip__body--whitespace{white-space:normal;width:250px}.formio-tooltip__body--right{top:auto;transform:translateX(0)}.formio-tooltip__body--left{top:auto;left:0;right:auto;transform:translateX(0)}.formio-tooltip__body--bottom{bottom:auto;top:0}.formio-tooltip__wrapper{position:relative}.formio-tooltip__wrapper>span{font-weight:400}span[role=link]{text-decoration:underline;cursor:pointer}.formbuilder{position:relative}.drag-container{padding:10px;border:dotted 2px #e8e8e8}.drag-container:hover{cursor:move;border:dotted 2px #ccc}.drag-container.formio-builder-form,.drag-container.formio-builder-form:hover,.panel-body>.drag-container.formio-builder-components,.panel-body>.drag-container.formio-builder-components:hover,.tab-pane>.drag-container.formio-builder-components,.tab-pane>.drag-container.formio-builder-components:hover{padding:0 0 1rem 0;border:none}.component-btn-group{display:flex;flex-direction:row-reverse;position:absolute;right:0;z-index:1000;margin-top:-2px}.builder-component{position:relative;min-height:15px;margin-bottom:15px}.builder-component .formio-component-htmlelement{border:dotted 2px #e8e8e8}.builder-component .formio-component-htmlelement [ref=html]:empty:before{content:"HTML Content";color:#aaa}.builder-component:not(:hover) .component-btn-group{display:none}.builder-group-button{background-color:transparent;white-space:normal;text-align:left}.form-builder-group-header{padding:0}.component-btn-group .component-settings-button{float:right;z-index:1001;margin:4px 4px 0 0;z-index:1001;-webkit-box-shadow:0 0 10px 1px rgba(48,113,169,.6);-moz-box-shadow:0 0 10px 1px rgba(48,113,169,.6);box-shadow:0 0 10px 1px rgba(48,113,169,.6)}.formbuilder .formio-component-content,.formbuilder .formio-component-datasource,.formbuilder .formio-component-form,.formbuilder .formio-component-hidden{border:2px dashed #ddd}.formbuilder .formio-component-datasource,.formbuilder .formio-component-form,.formbuilder .formio-component-hidden{min-height:3em;text-align:center;color:#aaa;padding-top:.5em}.btn-group-xxs>.btn,.btn-xxs,.component-btn-group .component-settings-button{padding:2px 2px;font-size:10px;line-height:1.2em;border-radius:0;width:18px;height:18px}.formcomponents .formcomponent{text-align:left;padding:5px 5px 5px 8px;margin-top:.2rem;font-size:.8em;line-height:1.2;border-radius:.3em}.form-builder-panel .panel-body{padding:5px}.formio-component-tabs .ui.tabular.menu .item{padding:.8em}.formio-pdf-builder{position:relative}.formio-drop-zone{display:none;position:absolute;z-index:10;background-color:#0d87e9;opacity:.1}.formio-drop-zone.enabled{display:inherit}.component-settings .formio-dialog-content{max-height:100%}.component-btn-group .btn.component-settings-button-paste{display:none}.builder-paste-mode .component-settings-button-paste{display:inherit!important}.wizard-page-label{cursor:pointer;border-radius:0}.panel-body .drag-and-drop-alert{margin-bottom:0}.builder-sidebar_scroll{position:sticky;top:15px;max-height:100vh;overflow-y:auto}.builder-sidebar_search{margin-bottom:10px;appearance:auto}.formio-wizard-builder-component-title{color:#6c757d;text-align:center;padding:.5rem}.formio-wizard-position{position:relative}.formio-settings-help{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc;margin-top:10px}.help-block{margin:0}.builder-sidebar .btn{white-space:normal}.component-settings{padding-top:20px!important;padding-bottom:20px!important}.component-edit-container{height:auto;overflow:hidden}.component-edit-content{height:calc(100% - 4em)}.component-edit-tabs.col-sm-6{height:100%;overflow-y:auto}.component-edit-tabs.col-sm-12{height:calc(100% - 4em);overflow-y:auto}.component-edit-tabs.col-sm-12 .editForm{height:calc(100% - 4em);overflow-y:auto}.progress.pdf-progress{height:2rem}.progress.pdf-progress .progress-bar{font-size:1rem;line-height:2rem}.builder-sidebar.disabled .formcomponent{cursor:not-allowed;opacity:.65;box-shadow:none} \ No newline at end of file diff --git a/dist/formio.contrib.js b/dist/formio.contrib.js index 59f4f2541c..7fa6c4a31e 100644 --- a/dist/formio.contrib.js +++ b/dist/formio.contrib.js @@ -26,7 +26,7 @@ return /******/ (function() { // webpackBootstrap /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _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); 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.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 && !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\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.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.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.some.js */ \"./node_modules/core-js/modules/es.array.some.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.is-array.js */ \"./node_modules/core-js/modules/es.array.is-array.js\");\n\n__webpack_require__(/*! core-js/modules/es.date.to-string.js */ \"./node_modules/core-js/modules/es.date.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.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.array.index-of.js */ \"./node_modules/core-js/modules/es.array.index-of.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\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.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?"); /***/ }), @@ -37,7 +37,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _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 _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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || 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; } 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 : 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 EventEmitter;\n}(_eventemitter.EventEmitter);\n\nexports[\"default\"] = EventEmitter;\n\n//# sourceURL=webpack://Formio/./lib/EventEmitter.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\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.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\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.object.create.js */ \"./node_modules/core-js/modules/es.object.create.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\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.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 || 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; } 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 : 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?"); /***/ }), @@ -48,7 +48,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol /***/ (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); 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\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _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.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 pathParts = path.split('/');\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 } 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: \"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 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 localStorage.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 localStorage.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 Formio.tokens[tokenName] = localStorage.getItem(tokenName) || '';\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\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 localStorage.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 localStorage.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(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 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 return Formio.makeRequest(formio, 'logout', \"\".concat(projectUrl, \"/logout\")).then(function (result) {\n Formio.setToken(null, options);\n Formio.setUser(null, options);\n Formio.clearCache();\n return result;\n }).catch(function (err) {\n Formio.setToken(null, options);\n Formio.setUser(null, options);\n Formio.clearCache();\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 return 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].ready;\n return onload ? onload(lib) : lib;\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.15.0-rc.7';\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.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.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.GlobalFormio = void 0;\n\n__webpack_require__(/*! core-js/modules/es.array.is-array.js */ \"./node_modules/core-js/modules/es.array.is-array.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.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.array.index-of.js */ \"./node_modules/core-js/modules/es.array.index-of.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.parse-int.js */ \"./node_modules/core-js/modules/es.parse-int.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.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.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.array.reduce.js */ \"./node_modules/core-js/modules/es.array.reduce.js\");\n\n__webpack_require__(/*! core-js/modules/es.date.to-string.js */ \"./node_modules/core-js/modules/es.date.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/web.timers.js */ \"./node_modules/core-js/modules/web.timers.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.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 pathParts = path.split('/');\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 } 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: \"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 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 localStorage.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 localStorage.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 Formio.tokens[tokenName] = localStorage.getItem(tokenName) || '';\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\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 localStorage.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 localStorage.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(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 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 return Formio.makeRequest(formio, 'logout', \"\".concat(projectUrl, \"/logout\")).then(function (result) {\n Formio.setToken(null, options);\n Formio.setUser(null, options);\n Formio.clearCache();\n return result;\n })[\"catch\"](function (err) {\n Formio.setToken(null, options);\n Formio.setUser(null, options);\n Formio.clearCache();\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 return 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].ready;\n return onload ? onload(lib) : lib;\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.15.0-rc.8';\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?"); /***/ }), @@ -59,7 +59,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\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _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); 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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || 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 : 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\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.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.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.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.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 _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 || 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 : 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?"); /***/ }), @@ -70,7 +70,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol /***/ (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\");\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?"); /***/ }), @@ -81,7 +81,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\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _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); return Constructor; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get; } 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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || 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 : 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\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.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.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.array.is-array.js */ \"./node_modules/core-js/modules/es.array.is-array.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.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.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.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.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.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.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; } 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 || 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 : 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?"); /***/ }), @@ -92,7 +92,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol /***/ (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\");\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?"); /***/ }), @@ -103,7 +103,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); 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\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.array.is-array.js */ \"./node_modules/core-js/modules/es.array.is-array.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\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?"); /***/ }), @@ -114,7 +114,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\");\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?"); /***/ }), @@ -125,7 +125,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\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _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.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); if (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 = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { 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); return Constructor; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get; } 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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || 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 : 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 return direction === 'right';\n }\n }, {\n key: \"getLabelInfo\",\n value: function getLabelInfo() {\n var isRightPosition = this.rightDirection(this.labelPositions[0]);\n var isLeftPosition = this.labelPositions[0] === 'left';\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 if (refs[ref] === 'single') {\n this.refs[ref] = element.querySelector(\"[ref=\\\"\".concat(ref, \"\\\"]\"));\n } else {\n this.refs[ref] = element.querySelectorAll(\"[ref=\\\"\".concat(ref, \"\\\"]\"));\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(txtArea.value));\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 changed = newValue !== undefined ? this.hasChanged(newValue, this.dataValue) : false;\n\n if (changed) {\n this.dataValue = newValue;\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 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?"); +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.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.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.object.define-properties.js */ \"./node_modules/core-js/modules/es.object.define-properties.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.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.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.index-of.js */ \"./node_modules/core-js/modules/es.array.index-of.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.array.is-array.js */ \"./node_modules/core-js/modules/es.array.is-array.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.array.join.js */ \"./node_modules/core-js/modules/es.array.join.js\");\n\n__webpack_require__(/*! core-js/modules/es.date.to-string.js */ \"./node_modules/core-js/modules/es.date.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.array.splice.js */ \"./node_modules/core-js/modules/es.array.splice.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.reduce.js */ \"./node_modules/core-js/modules/es.array.reduce.js\");\n\n__webpack_require__(/*! core-js/modules/es.parse-int.js */ \"./node_modules/core-js/modules/es.parse-int.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.some.js */ \"./node_modules/core-js/modules/es.array.some.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.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.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\n__webpack_require__(/*! core-js/modules/web.timers.js */ \"./node_modules/core-js/modules/web.timers.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; } 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 || 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 : 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 return direction === 'right';\n }\n }, {\n key: \"getLabelInfo\",\n value: function getLabelInfo() {\n var isRightPosition = this.rightDirection(this.labelPositions[0]);\n var isLeftPosition = this.labelPositions[0] === 'left';\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 if (refs[ref] === 'single') {\n this.refs[ref] = element.querySelector(\"[ref=\\\"\".concat(ref, \"\\\"]\"));\n } else {\n this.refs[ref] = element.querySelectorAll(\"[ref=\\\"\".concat(ref, \"\\\"]\"));\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) && !(_this12.component.clearOnHide && !_this12.visible)) {\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) && !(_this12.component.clearOnHide && !_this12.visible)) {\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(txtArea.value));\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.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?"); /***/ }), @@ -136,7 +136,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _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\n__webpack_require__(/*! core-js/modules/es.array.is-array.js */ \"./node_modules/core-js/modules/es.array.is-array.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\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.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.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?"); /***/ }), @@ -144,10 +144,10 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol /*!**************************************************************************!*\ !*** ./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\");\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?"); /***/ }), @@ -158,7 +158,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\");\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?"); /***/ }), @@ -169,7 +169,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 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}, {\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\");\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}, _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?"); /***/ }), @@ -180,7 +180,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\");\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 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 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?"); /***/ }), @@ -188,10 +188,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\");\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?"); /***/ }), @@ -202,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\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\");\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?"); /***/ }), @@ -213,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 _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\");\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?"); /***/ }), @@ -224,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\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\");\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?"); /***/ }), @@ -235,7 +235,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); if (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 = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { 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); 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.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/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.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.object.define-properties.js */ \"./node_modules/core-js/modules/es.object.define-properties.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.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.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.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?"); /***/ }), @@ -246,7 +246,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\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _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); if (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 = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { 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); return Constructor; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get; } 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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || 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 : 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) {\n return _get(_getPrototypeOf(Field.prototype), \"render\", this).call(this, this.renderTemplate('field', _objectSpread(_objectSpread({}, this.getLabelInfo()), {}, {\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\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.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.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.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.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.object.define-properties.js */ \"./node_modules/core-js/modules/es.object.define-properties.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.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.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__(/*! ../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; } 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 || 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 : 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) {\n return _get(_getPrototypeOf(Field.prototype), \"render\", this).call(this, this.renderTemplate('field', _objectSpread(_objectSpread({}, this.getLabelInfo()), {}, {\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?"); /***/ }), @@ -257,7 +257,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _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); return Constructor; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get; } 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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || 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 : 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.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\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.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.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.bind.js */ \"./node_modules/core-js/modules/es.function.bind.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.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.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.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; } 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 || 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 : 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.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?"); /***/ }), @@ -268,7 +268,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _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); 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; } 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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || 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 : 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\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.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.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.is-array.js */ \"./node_modules/core-js/modules/es.array.is-array.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.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.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/web.timers.js */ \"./node_modules/core-js/modules/web.timers.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.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.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; } 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 || 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 : 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?"); /***/ }), @@ -279,7 +279,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _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); 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; } 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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || 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 : 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 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\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.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.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.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.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.reduce.js */ \"./node_modules/core-js/modules/es.array.reduce.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.every.js */ \"./node_modules/core-js/modules/es.array.every.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.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.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; } 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 || 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 : 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 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?"); /***/ }), @@ -290,7 +290,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _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); return Constructor; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get; } 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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || 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 : 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\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.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.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.reduce.js */ \"./node_modules/core-js/modules/es.array.reduce.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.is-array.js */ \"./node_modules/core-js/modules/es.array.is-array.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.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.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.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.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; } 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 || 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 : 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?"); /***/ }), @@ -301,7 +301,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _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); if (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 = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { 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); return Constructor; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get; } 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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || 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 : 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: \"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\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\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.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.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.object.define-properties.js */ \"./node_modules/core-js/modules/es.object.define-properties.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.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.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.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.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; } 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 || 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 : 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: \"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\n return NestedDataComponent;\n}(_NestedComponent2[\"default\"]);\n\nexports[\"default\"] = NestedDataComponent;\n\n//# sourceURL=webpack://Formio/./lib/components/_classes/nesteddata/NestedDataComponent.js?"); /***/ }), @@ -312,7 +312,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _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); return Constructor; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get; } 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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || 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 : 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.loading = false;\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 (component, path) {\n flattened[path] = component.component;\n components[component.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/#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\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.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.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.index-of.js */ \"./node_modules/core-js/modules/es.array.index-of.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.bind.js */ \"./node_modules/core-js/modules/es.function.bind.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/web.timers.js */ \"./node_modules/core-js/modules/web.timers.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.reduce.js */ \"./node_modules/core-js/modules/es.array.reduce.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.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.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; } 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 || 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 : 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.loading = false;\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' && (error.name !== 'Error' || error.message !== 'Permission denied')) {\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?"); /***/ }), @@ -323,7 +323,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol /***/ (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); if (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 = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { 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\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _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); 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; } 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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || 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 : 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/#datagrid',\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\n__webpack_require__(/*! core-js/modules/es.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.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\n__webpack_require__(/*! core-js/modules/es.object.define-properties.js */ \"./node_modules/core-js/modules/es.object.define-properties.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.is-array.js */ \"./node_modules/core-js/modules/es.array.is-array.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.reduce.js */ \"./node_modules/core-js/modules/es.array.reduce.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.date.to-string.js */ \"./node_modules/core-js/modules/es.date.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.filter.js */ \"./node_modules/core-js/modules/es.array.filter.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.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.bind.js */ \"./node_modules/core-js/modules/es.function.bind.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.parse-int.js */ \"./node_modules/core-js/modules/es.parse-int.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.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.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; } 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 || 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 : 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 _lodash[\"default\"].each(original.children, 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?"); /***/ }), @@ -334,7 +334,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\"] = _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\");\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?"); /***/ }), @@ -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\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _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); return Constructor; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get; } 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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || 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 : 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/#textarea',\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\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.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.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.is-array.js */ \"./node_modules/core-js/modules/es.array.is-array.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.parse-int.js */ \"./node_modules/core-js/modules/es.parse-int.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.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.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.parse-float.js */ \"./node_modules/core-js/modules/es.parse-float.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.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.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; } 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 || 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 : 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?"); /***/ }), @@ -356,7 +356,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol /***/ (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\");\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?"); /***/ }), @@ -364,10 +364,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\");\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?"); /***/ }), @@ -378,7 +378,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\");\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?"); /***/ }), @@ -389,7 +389,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\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (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 = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { 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); 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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || 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; } 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 : 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.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/#textfield',\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\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.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.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.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.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.object.define-properties.js */ \"./node_modules/core-js/modules/es.object.define-properties.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.is-array.js */ \"./node_modules/core-js/modules/es.array.is-array.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.trim.js */ \"./node_modules/core-js/modules/es.string.trim.js\");\n\n__webpack_require__(/*! core-js/modules/es.date.to-string.js */ \"./node_modules/core-js/modules/es.date.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/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.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.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 || 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; } 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 : 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.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?"); /***/ }), @@ -397,10 +397,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\");\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?"); /***/ }), @@ -411,7 +411,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\");\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?"); /***/ }), @@ -419,10 +419,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\");\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?"); /***/ }), @@ -433,7 +433,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__(/*! ../../components/_classes/component/Component.form */ \"./lib/components/_classes/component/Component.form.js\"));\n\nvar _EditTableEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/EditTable.edit.display */ \"./lib/contrib/edittable/editForm/EditTable.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: 'display',\n components: _EditTableEdit.default\n }, {\n key: 'data',\n components: [{\n key: 'defaultValue',\n ignore: true\n }, {\n label: '',\n mask: false,\n tableView: true,\n alwaysEnabled: false,\n type: 'hidden',\n input: true,\n key: 'disableAddingRemovingRows',\n calculateValue: function calculateValue(context) {\n return context.instance.data.enableRowGroups;\n },\n encrypted: false\n }, {\n key: 'enableRowGroups',\n type: 'checkbox',\n label: 'Enable Row Groups',\n weight: 50\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: 51,\n conditional: {\n json: {\n var: 'data.enableRowGroups'\n }\n }\n }]\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/contrib/edittable/EditTable.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\");\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__(/*! ../../components/_classes/component/Component.form */ \"./lib/components/_classes/component/Component.form.js\"));\n\nvar _EditTableEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/EditTable.edit.display */ \"./lib/contrib/edittable/editForm/EditTable.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: 'display',\n components: _EditTableEdit[\"default\"]\n }, {\n key: 'data',\n components: [{\n key: 'defaultValue',\n ignore: true\n }, {\n label: '',\n mask: false,\n tableView: true,\n alwaysEnabled: false,\n type: 'hidden',\n input: true,\n key: 'disableAddingRemovingRows',\n calculateValue: function calculateValue(context) {\n return context.instance.data.enableRowGroups;\n },\n encrypted: false\n }, {\n key: 'enableRowGroups',\n type: 'checkbox',\n label: 'Enable Row Groups',\n weight: 50\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: 51,\n conditional: {\n json: {\n \"var\": 'data.enableRowGroups'\n }\n }\n }]\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/contrib/edittable/EditTable.form.js?"); /***/ }), @@ -444,7 +444,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\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _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.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[\"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.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/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.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 _DataGrid = _interopRequireDefault(__webpack_require__(/*! ../../components/datagrid/DataGrid */ \"./lib/components/datagrid/DataGrid.js\"));\n\nvar _ModalEdit = _interopRequireDefault(__webpack_require__(/*! ../modaledit/ModalEdit */ \"./lib/contrib/modaledit/ModalEdit.js\"));\n\nvar _EditTable = _interopRequireDefault(__webpack_require__(/*! ./EditTable.form */ \"./lib/contrib/edittable/EditTable.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 _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); return Constructor; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get; } 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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || 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 : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar EditTableComponent = /*#__PURE__*/function (_DataGridComponent) {\n _inherits(EditTableComponent, _DataGridComponent);\n\n var _super = _createSuper(EditTableComponent);\n\n function EditTableComponent() {\n var _this;\n\n _classCallCheck(this, EditTableComponent);\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 var groups = _lodash.default.get(_this.component, 'rowGroups', []);\n\n if (_this.hasColumns()) {\n _this.component.components = _this.componentComponents;\n }\n\n if (_this.groupsMode) {\n _this.addEmptyRows(_this.totalRowsNumber(groups));\n }\n\n return _this;\n }\n /**\n * Checks whether columns are available\n * @return {Boolean}\n */\n\n\n _createClass(EditTableComponent, [{\n key: \"hasColumns\",\n value: function hasColumns() {\n return this.getColumns().length > 0;\n }\n /** Don't show last col in header **/\n\n /** @override **/\n\n }, {\n key: \"hasExtraColumn\",\n value: function hasExtraColumn() {\n return false;\n }\n /** @override **/\n\n }, {\n key: \"hasAddButton\",\n value: function hasAddButton() {\n return _get(_getPrototypeOf(EditTableComponent.prototype), \"hasAddButton\", this).call(this) && this.hasColumns();\n }\n }, {\n key: \"componentSchema\",\n value: function componentSchema() {\n for (var _len2 = arguments.length, extend = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n extend[_key2] = arguments[_key2];\n }\n\n return _ModalEdit.default.schema.apply(_ModalEdit.default, [{\n rows: 0,\n editor: 'ckeditor',\n hideLabel: true\n }].concat(extend));\n }\n /**\n * Returns all non-empty columns.\n *\n * @return {Array}\n */\n\n }, {\n key: \"getColumns\",\n value: function getColumns() {\n var _this2 = this;\n\n var cols = _lodash.default.get(this, 'component.columns', []);\n\n return _lodash.default.filter(_lodash.default.map(cols, function (c) {\n return _lodash.default.pick(c, ['label', 'key']);\n }), function (c) {\n return !_lodash.default.isEqual(c, _this2.emptyColumn);\n });\n }\n }, {\n key: \"getGroups\",\n value: function getGroups() {\n return _lodash.default.get(this.component, 'rowGroups', []);\n }\n }, {\n key: \"totalRowsNumber\",\n value: function totalRowsNumber(groups) {\n return _lodash.default.sum(_lodash.default.map(groups, 'numberOfRows'));\n }\n }, {\n key: \"addEmptyRows\",\n value: function addEmptyRows(n) {\n this.dataValue = _lodash.default.range(n).map(function () {\n return {};\n });\n }\n }, {\n key: \"emptyColumn\",\n get: function get() {\n return {\n label: '',\n key: ''\n };\n }\n }, {\n key: \"componentComponents\",\n get: function get() {\n var _this3 = this;\n\n return this.getColumns().map(function (_ref) {\n var label = _ref.label,\n key = _ref.key;\n return _this3.componentSchema({\n label: label,\n key: key\n });\n });\n }\n }, {\n key: \"tableClass\",\n get: function get() {\n var _this4 = this;\n\n var type = _lodash.default.get(this.component, 'type', 'edittable');\n\n var defaultClass = ['table', 'table-bordered', \"table-\".concat(type), 'form-group', \"formio-\".concat(type, \"-table\")].join(' ');\n\n var className = _lodash.default.get(this.component, 'tableClass');\n\n if (className === '' || !_lodash.default.isString(className)) {\n className = defaultClass;\n }\n\n ['striped', 'bordered', 'hover', 'condensed'].forEach(function (prop) {\n if (_this4.component[prop]) {\n className = \"\".concat(className, \" table-\").concat(prop);\n }\n });\n return className;\n }\n }, {\n key: \"groupsMode\",\n get: function get() {\n return _lodash.default.get(this.component, 'enableRowGroups', false);\n }\n /** @override **/\n\n }, {\n key: \"build\",\n value: function build() {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n _get(_getPrototypeOf(EditTableComponent.prototype), \"build\", this).call(this, state);\n\n this.tableElement.className = this.tableClass;\n\n if (this.builderMode && !this.hasColumns()) {\n this.element.appendChild(this.builderView());\n }\n\n this.setMeta();\n }\n }, {\n key: \"buildRows\",\n value: function buildRows() {\n _get(_getPrototypeOf(EditTableComponent.prototype), \"buildRows\", this).call(this);\n\n if (this.groupsMode) {\n this.buildGroups();\n }\n }\n }, {\n key: \"buildGroups\",\n value: function buildGroups() {\n var _this5 = this;\n\n var groups = _lodash.default.get(this.component, 'rowGroups', []);\n\n var ranges = _lodash.default.map(groups, 'numberOfRows');\n\n var rows = this.tableElement.querySelectorAll('tbody>tr');\n var tbody = this.tableElement.querySelector('tbody');\n var chunks = this.getRowChunks(ranges, rows);\n var firstElements = chunks.map(_lodash.default.head);\n var groupElements = groups.map(function (g) {\n return _this5.buildGroup(g);\n });\n groupElements.forEach(function (elt, index) {\n var row = firstElements[index];\n\n if (row) {\n tbody.insertBefore(elt, row);\n }\n });\n }\n /**\n * @param {Numbers[]} groups\n * @param {Array} coll - collection\n *\n * @return {Array}\n */\n\n }, {\n key: \"getRowChunks\",\n value: function getRowChunks(groups, coll) {\n var _groups$reduce = groups.reduce(function (_ref2, size) {\n var _ref3 = _slicedToArray(_ref2, 2),\n startIndex = _ref3[0],\n acc = _ref3[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, [coll].concat(_toConsumableArray(range)));\n });\n }\n }, {\n key: \"buildGroup\",\n value: function buildGroup(_ref4) {\n var label = _ref4.label;\n var colsNumber = this.getColumns().length;\n var cell = this.ce('td', {\n colspan: colsNumber,\n class: 'edittable-group-label'\n }, label);\n return this.ce('tr', null, cell);\n }\n /** @override **/\n\n }, {\n key: \"buildRow\",\n value: function buildRow(row, index) {\n var _this6 = this;\n\n var state = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n if (this.builderMode) {\n return null;\n }\n\n this.rows[index] = {};\n var colSchemes = this.componentComponents;\n var lastIndex = colSchemes.length - 1;\n var columns = colSchemes.map(function (col, colIndex) {\n var colContainer = _this6.buildComponent(col, colIndex, row, index, _this6.getComponentState(col, state));\n\n if (_this6.hasRemoveButtons() && colIndex === lastIndex) {\n colContainer.append(_this6.removeButton(index));\n }\n\n return colContainer;\n });\n return this.ce('tr', null, columns);\n }\n /** override **/\n\n }, {\n key: \"removeButton\",\n value: function removeButton(index) {\n var _this7 = this;\n\n var type = _lodash.default.get(this.component, 'type', 'edittable');\n\n var button = this.ce('button', {\n type: 'button',\n class: \"btn btn-xxs btn-danger formio-\".concat(type, \"-remove\")\n }, this.ce('i', {\n class: this.iconClass('remove')\n }));\n this.addEventListener(button, 'click', function (event) {\n event.preventDefault();\n\n _this7.removeValue(index);\n });\n return button;\n }\n }, {\n key: \"builderView\",\n value: function builderView() {\n return this.ce('div', {\n class: 'well edittable-placeholder'\n }, [this.ce('i', {\n class: this.iconClass('warning-sign')\n }), ' ', this.t('No columns provided')]);\n }\n }, {\n key: \"getMeta\",\n value: function getMeta() {\n var groups = this.getGroups();\n\n if (this.hasColumns && groups.length) {\n return groups.reduce(function (info, g) {\n info[g.label] = g.numberOfRows;\n return info;\n }, {});\n } else {\n return null;\n }\n }\n }, {\n key: \"setMeta\",\n value: function setMeta() {\n var key = _lodash.default.get(this.component, 'key');\n\n var data = this.getMeta();\n\n if (key && data) {\n _lodash.default.set(this.root, ['_submission', 'metadata', key], data);\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 _DataGrid.default.schema.apply(_DataGrid.default, [{\n label: 'Edit Table',\n key: 'editTable',\n type: 'edittable',\n input: true,\n tree: true,\n components: [],\n columns: []\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Edit Table',\n icon: 'th',\n group: 'data',\n weight: 50,\n schema: EditTableComponent.schema()\n };\n }\n }]);\n\n return EditTableComponent;\n}(_DataGrid.default);\n\nexports[\"default\"] = EditTableComponent;\nEditTableComponent.editForm = _EditTable.default;\n\n//# sourceURL=webpack://Formio/./lib/contrib/edittable/EditTable.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\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.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.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.array.is-array.js */ \"./node_modules/core-js/modules/es.array.is-array.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.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[\"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.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.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.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.reduce.js */ \"./node_modules/core-js/modules/es.array.reduce.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.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.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 _DataGrid = _interopRequireDefault(__webpack_require__(/*! ../../components/datagrid/DataGrid */ \"./lib/components/datagrid/DataGrid.js\"));\n\nvar _ModalEdit = _interopRequireDefault(__webpack_require__(/*! ../modaledit/ModalEdit */ \"./lib/contrib/modaledit/ModalEdit.js\"));\n\nvar _EditTable = _interopRequireDefault(__webpack_require__(/*! ./EditTable.form */ \"./lib/contrib/edittable/EditTable.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 _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; } 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 || 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 : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar EditTableComponent = /*#__PURE__*/function (_DataGridComponent) {\n _inherits(EditTableComponent, _DataGridComponent);\n\n var _super = _createSuper(EditTableComponent);\n\n function EditTableComponent() {\n var _this;\n\n _classCallCheck(this, EditTableComponent);\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 var groups = _lodash[\"default\"].get(_this.component, 'rowGroups', []);\n\n if (_this.hasColumns()) {\n _this.component.components = _this.componentComponents;\n }\n\n if (_this.groupsMode) {\n _this.addEmptyRows(_this.totalRowsNumber(groups));\n }\n\n return _this;\n }\n /**\n * Checks whether columns are available\n * @return {Boolean}\n */\n\n\n _createClass(EditTableComponent, [{\n key: \"hasColumns\",\n value: function hasColumns() {\n return this.getColumns().length > 0;\n }\n /** Don't show last col in header **/\n\n /** @override **/\n\n }, {\n key: \"hasExtraColumn\",\n value: function hasExtraColumn() {\n return false;\n }\n /** @override **/\n\n }, {\n key: \"hasAddButton\",\n value: function hasAddButton() {\n return _get(_getPrototypeOf(EditTableComponent.prototype), \"hasAddButton\", this).call(this) && this.hasColumns();\n }\n }, {\n key: \"componentSchema\",\n value: function componentSchema() {\n for (var _len2 = arguments.length, extend = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n extend[_key2] = arguments[_key2];\n }\n\n return _ModalEdit[\"default\"].schema.apply(_ModalEdit[\"default\"], [{\n rows: 0,\n editor: 'ckeditor',\n hideLabel: true\n }].concat(extend));\n }\n /**\n * Returns all non-empty columns.\n *\n * @return {Array}\n */\n\n }, {\n key: \"getColumns\",\n value: function getColumns() {\n var _this2 = this;\n\n var cols = _lodash[\"default\"].get(this, 'component.columns', []);\n\n return _lodash[\"default\"].filter(_lodash[\"default\"].map(cols, function (c) {\n return _lodash[\"default\"].pick(c, ['label', 'key']);\n }), function (c) {\n return !_lodash[\"default\"].isEqual(c, _this2.emptyColumn);\n });\n }\n }, {\n key: \"getGroups\",\n value: function getGroups() {\n return _lodash[\"default\"].get(this.component, 'rowGroups', []);\n }\n }, {\n key: \"totalRowsNumber\",\n value: function totalRowsNumber(groups) {\n return _lodash[\"default\"].sum(_lodash[\"default\"].map(groups, 'numberOfRows'));\n }\n }, {\n key: \"addEmptyRows\",\n value: function addEmptyRows(n) {\n this.dataValue = _lodash[\"default\"].range(n).map(function () {\n return {};\n });\n }\n }, {\n key: \"emptyColumn\",\n get: function get() {\n return {\n label: '',\n key: ''\n };\n }\n }, {\n key: \"componentComponents\",\n get: function get() {\n var _this3 = this;\n\n return this.getColumns().map(function (_ref) {\n var label = _ref.label,\n key = _ref.key;\n return _this3.componentSchema({\n label: label,\n key: key\n });\n });\n }\n }, {\n key: \"tableClass\",\n get: function get() {\n var _this4 = this;\n\n var type = _lodash[\"default\"].get(this.component, 'type', 'edittable');\n\n var defaultClass = ['table', 'table-bordered', \"table-\".concat(type), 'form-group', \"formio-\".concat(type, \"-table\")].join(' ');\n\n var className = _lodash[\"default\"].get(this.component, 'tableClass');\n\n if (className === '' || !_lodash[\"default\"].isString(className)) {\n className = defaultClass;\n }\n\n ['striped', 'bordered', 'hover', 'condensed'].forEach(function (prop) {\n if (_this4.component[prop]) {\n className = \"\".concat(className, \" table-\").concat(prop);\n }\n });\n return className;\n }\n }, {\n key: \"groupsMode\",\n get: function get() {\n return _lodash[\"default\"].get(this.component, 'enableRowGroups', false);\n }\n /** @override **/\n\n }, {\n key: \"build\",\n value: function build() {\n var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n _get(_getPrototypeOf(EditTableComponent.prototype), \"build\", this).call(this, state);\n\n this.tableElement.className = this.tableClass;\n\n if (this.builderMode && !this.hasColumns()) {\n this.element.appendChild(this.builderView());\n }\n\n this.setMeta();\n }\n }, {\n key: \"buildRows\",\n value: function buildRows() {\n _get(_getPrototypeOf(EditTableComponent.prototype), \"buildRows\", this).call(this);\n\n if (this.groupsMode) {\n this.buildGroups();\n }\n }\n }, {\n key: \"buildGroups\",\n value: function buildGroups() {\n var _this5 = this;\n\n var groups = _lodash[\"default\"].get(this.component, 'rowGroups', []);\n\n var ranges = _lodash[\"default\"].map(groups, 'numberOfRows');\n\n var rows = this.tableElement.querySelectorAll('tbody>tr');\n var tbody = this.tableElement.querySelector('tbody');\n var chunks = this.getRowChunks(ranges, rows);\n var firstElements = chunks.map(_lodash[\"default\"].head);\n var groupElements = groups.map(function (g) {\n return _this5.buildGroup(g);\n });\n groupElements.forEach(function (elt, index) {\n var row = firstElements[index];\n\n if (row) {\n tbody.insertBefore(elt, row);\n }\n });\n }\n /**\n * @param {Numbers[]} groups\n * @param {Array} coll - collection\n *\n * @return {Array}\n */\n\n }, {\n key: \"getRowChunks\",\n value: function getRowChunks(groups, coll) {\n var _groups$reduce = groups.reduce(function (_ref2, size) {\n var _ref3 = _slicedToArray(_ref2, 2),\n startIndex = _ref3[0],\n acc = _ref3[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\"], [coll].concat(_toConsumableArray(range)));\n });\n }\n }, {\n key: \"buildGroup\",\n value: function buildGroup(_ref4) {\n var label = _ref4.label;\n var colsNumber = this.getColumns().length;\n var cell = this.ce('td', {\n colspan: colsNumber,\n \"class\": 'edittable-group-label'\n }, label);\n return this.ce('tr', null, cell);\n }\n /** @override **/\n\n }, {\n key: \"buildRow\",\n value: function buildRow(row, index) {\n var _this6 = this;\n\n var state = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n if (this.builderMode) {\n return null;\n }\n\n this.rows[index] = {};\n var colSchemes = this.componentComponents;\n var lastIndex = colSchemes.length - 1;\n var columns = colSchemes.map(function (col, colIndex) {\n var colContainer = _this6.buildComponent(col, colIndex, row, index, _this6.getComponentState(col, state));\n\n if (_this6.hasRemoveButtons() && colIndex === lastIndex) {\n colContainer.append(_this6.removeButton(index));\n }\n\n return colContainer;\n });\n return this.ce('tr', null, columns);\n }\n /** override **/\n\n }, {\n key: \"removeButton\",\n value: function removeButton(index) {\n var _this7 = this;\n\n var type = _lodash[\"default\"].get(this.component, 'type', 'edittable');\n\n var button = this.ce('button', {\n type: 'button',\n \"class\": \"btn btn-xxs btn-danger formio-\".concat(type, \"-remove\")\n }, this.ce('i', {\n \"class\": this.iconClass('remove')\n }));\n this.addEventListener(button, 'click', function (event) {\n event.preventDefault();\n\n _this7.removeValue(index);\n });\n return button;\n }\n }, {\n key: \"builderView\",\n value: function builderView() {\n return this.ce('div', {\n \"class\": 'well edittable-placeholder'\n }, [this.ce('i', {\n \"class\": this.iconClass('warning-sign')\n }), ' ', this.t('No columns provided')]);\n }\n }, {\n key: \"getMeta\",\n value: function getMeta() {\n var groups = this.getGroups();\n\n if (this.hasColumns && groups.length) {\n return groups.reduce(function (info, g) {\n info[g.label] = g.numberOfRows;\n return info;\n }, {});\n } else {\n return null;\n }\n }\n }, {\n key: \"setMeta\",\n value: function setMeta() {\n var key = _lodash[\"default\"].get(this.component, 'key');\n\n var data = this.getMeta();\n\n if (key && data) {\n _lodash[\"default\"].set(this.root, ['_submission', 'metadata', key], data);\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 _DataGrid[\"default\"].schema.apply(_DataGrid[\"default\"], [{\n label: 'Edit Table',\n key: 'editTable',\n type: 'edittable',\n input: true,\n tree: true,\n components: [],\n columns: []\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Edit Table',\n icon: 'th',\n group: 'data',\n weight: 50,\n schema: EditTableComponent.schema()\n };\n }\n }]);\n\n return EditTableComponent;\n}(_DataGrid[\"default\"]);\n\nexports[\"default\"] = EditTableComponent;\nEditTableComponent.editForm = _EditTable[\"default\"];\n\n//# sourceURL=webpack://Formio/./lib/contrib/edittable/EditTable.js?"); /***/ }), @@ -452,10 +452,10 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol /*!******************************************************************!*\ !*** ./lib/contrib/edittable/editForm/EditTable.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: 'columns',\n type: 'datagrid',\n input: true,\n label: 'Columns',\n weight: 100,\n reorder: true,\n components: [{\n key: 'label',\n label: 'Column Label',\n type: 'textfield',\n input: true\n }, {\n key: 'key',\n label: 'Column Key',\n type: 'textfield',\n allowCalculateOverride: true,\n input: true,\n calculateValue: {\n _camelCase: [{\n var: 'row.label'\n }]\n }\n }]\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/contrib/edittable/editForm/EditTable.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\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n key: 'columns',\n type: 'datagrid',\n input: true,\n label: 'Columns',\n weight: 100,\n reorder: true,\n components: [{\n key: 'label',\n label: 'Column Label',\n type: 'textfield',\n input: true\n }, {\n key: 'key',\n label: 'Column Key',\n type: 'textfield',\n allowCalculateOverride: true,\n input: true,\n calculateValue: {\n _camelCase: [{\n \"var\": 'row.label'\n }]\n }\n }]\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/contrib/edittable/editForm/EditTable.edit.display.js?"); /***/ }), @@ -466,7 +466,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.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 _Stripe = _interopRequireDefault(__webpack_require__(/*! ./stripe/stripe/Stripe */ \"./lib/contrib/stripe/stripe/Stripe.js\"));\n\nvar _StripeCheckout = _interopRequireDefault(__webpack_require__(/*! ./stripe/checkout/StripeCheckout */ \"./lib/contrib/stripe/checkout/StripeCheckout.js\"));\n\nvar _Location = _interopRequireDefault(__webpack_require__(/*! ./location/Location */ \"./lib/contrib/location/Location.js\"));\n\nvar _EditTable = _interopRequireDefault(__webpack_require__(/*! ./edittable/EditTable */ \"./lib/contrib/edittable/EditTable.js\"));\n\nvar _ModalEdit = _interopRequireDefault(__webpack_require__(/*! ./modaledit/ModalEdit */ \"./lib/contrib/modaledit/ModalEdit.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nvar Contrib = {\n stripe: {\n stripe: _Stripe.default,\n checkout: _StripeCheckout.default\n },\n location: _Location.default,\n edittable: _EditTable.default,\n modaledit: _ModalEdit.default\n};\nvar _default = Contrib;\nexports[\"default\"] = _default;\n\nif ((typeof __webpack_require__.g === \"undefined\" ? \"undefined\" : _typeof(__webpack_require__.g)) === 'object' && __webpack_require__.g.Formio) {\n __webpack_require__.g.Formio.contrib = Contrib;\n}\n\n//# sourceURL=webpack://Formio/./lib/contrib/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\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 _Stripe = _interopRequireDefault(__webpack_require__(/*! ./stripe/stripe/Stripe */ \"./lib/contrib/stripe/stripe/Stripe.js\"));\n\nvar _StripeCheckout = _interopRequireDefault(__webpack_require__(/*! ./stripe/checkout/StripeCheckout */ \"./lib/contrib/stripe/checkout/StripeCheckout.js\"));\n\nvar _Location = _interopRequireDefault(__webpack_require__(/*! ./location/Location */ \"./lib/contrib/location/Location.js\"));\n\nvar _EditTable = _interopRequireDefault(__webpack_require__(/*! ./edittable/EditTable */ \"./lib/contrib/edittable/EditTable.js\"));\n\nvar _ModalEdit = _interopRequireDefault(__webpack_require__(/*! ./modaledit/ModalEdit */ \"./lib/contrib/modaledit/ModalEdit.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\nvar Contrib = {\n stripe: {\n stripe: _Stripe[\"default\"],\n checkout: _StripeCheckout[\"default\"]\n },\n location: _Location[\"default\"],\n edittable: _EditTable[\"default\"],\n modaledit: _ModalEdit[\"default\"]\n};\nvar _default = Contrib;\nexports[\"default\"] = _default;\n\nif ((typeof __webpack_require__.g === \"undefined\" ? \"undefined\" : _typeof(__webpack_require__.g)) === 'object' && __webpack_require__.g.Formio) {\n __webpack_require__.g.Formio.contrib = Contrib;\n}\n\n//# sourceURL=webpack://Formio/./lib/contrib/index.js?"); /***/ }), @@ -477,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\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _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.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 _TextField = _interopRequireDefault(__webpack_require__(/*! ../../components/textfield/TextField */ \"./lib/components/textfield/TextField.js\"));\n\nvar _Formio = __webpack_require__(/*! ../../Formio */ \"./lib/Formio.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); return Constructor; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get; } 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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || 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 : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar LocationComponent = /*#__PURE__*/function (_TextFieldComponent) {\n _inherits(LocationComponent, _TextFieldComponent);\n\n var _super = _createSuper(LocationComponent);\n\n function LocationComponent() {\n _classCallCheck(this, LocationComponent);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(LocationComponent, [{\n key: \"init\",\n value: function init() {\n _get(_getPrototypeOf(LocationComponent.prototype), \"init\", this).call(this); // Get the source for Google Maps API\n\n\n var src = 'https://maps.googleapis.com/maps/api/js?v=3&libraries=places&callback=googleMapsCallback';\n\n if (this.component.map && this.component.map.key) {\n src += \"&key=\".concat(this.component.map.key);\n }\n\n if (this.component.map && this.component.map.region) {\n src += \"®ion=\".concat(this.component.map.region);\n }\n\n _Formio.GlobalFormio.requireLibrary('googleMaps', 'google.maps.places', src);\n }\n }, {\n key: \"defaultSchema\",\n get: function get() {\n return LocationComponent.schema();\n }\n }, {\n key: \"emptyValue\",\n get: function get() {\n return '';\n }\n }, {\n key: \"inputInfo\",\n get: function get() {\n var info = _get(_getPrototypeOf(LocationComponent.prototype), \"inputInfo\", this);\n\n info.attr.class += ' Gmap-search';\n return info;\n }\n }, {\n key: \"renderElement\",\n value: function renderElement(value, index) {\n return _get(_getPrototypeOf(LocationComponent.prototype), \"renderElement\", this).call(this, value, index) + this.renderTemplate('map', {\n mapId: this.component.map.gmapId\n });\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n var ret = _get(_getPrototypeOf(LocationComponent.prototype), \"attach\", this).call(this, element);\n\n this.loadRefs(element, {\n gmapElement: 'multiple'\n });\n return ret;\n }\n }, {\n key: \"attachElement\",\n value: function attachElement(element, index) {\n var _this = this;\n\n _get(_getPrototypeOf(LocationComponent.prototype), \"attachElement\", this).call(this, element, index);\n\n _Formio.GlobalFormio.libraryReady('googleMaps').then(function () {\n var defaultLatlng = new google.maps.LatLng(45.5041482, -73.5574125);\n var options = {\n zoom: 19,\n center: defaultLatlng,\n mapTypeId: google.maps.MapTypeId.ROADMAP,\n styles: [{\n 'featureType': 'poi',\n 'stylers': [{\n 'visibility': 'off'\n }]\n }, {\n 'featureType': 'transit',\n 'stylers': [{\n 'visibility': 'off'\n }]\n }]\n };\n\n if (!_this.refs.gmapElement[index]) {\n return;\n }\n\n element.map = new google.maps.Map(_this.refs.gmapElement[index], options);\n\n _this.addMarker(defaultLatlng, 'Default Marker', element);\n\n var autocompleteOptions = {};\n\n if (_this.component.map) {\n autocompleteOptions = _this.component.map.autocompleteOptions || {};\n }\n\n var autocomplete = new google.maps.places.Autocomplete(element, autocompleteOptions);\n autocomplete.addListener('place_changed', function () {\n var place = autocomplete.getPlace();\n\n if (!place.geometry) {\n console.log('Autocomplete\\'s returned place contains no geometry');\n return;\n } // If the place has a geometry, then present it on a map.\n\n\n if (place.geometry.viewport) {\n element.map.fitBounds(place.geometry.viewport);\n } else {\n element.map.setCenter(place.geometry.location);\n element.map.setZoom(17); // Why 17? Because it looks good.\n }\n\n element.marker.setIcon(\n /** @type {google.maps.Icon} */\n {\n url: place.icon,\n size: new google.maps.Size(71, 71),\n origin: new google.maps.Point(0, 0),\n anchor: new google.maps.Point(17, 34),\n scaledSize: new google.maps.Size(35, 35)\n });\n element.marker.setPosition(place.geometry.location);\n\n _this.setValue(place.name);\n });\n });\n }\n }, {\n key: \"addMarker\",\n value: function addMarker(latlng, title, element) {\n var _this2 = this;\n\n element.marker = new google.maps.Marker({\n position: latlng,\n map: element.map,\n title: title,\n draggable: true\n });\n element.marker.addListener('dragend', function (event) {\n var geocoder = new google.maps.Geocoder();\n var latlng = {\n lat: parseFloat(event.latLng.lat()),\n lng: parseFloat(event.latLng.lng())\n };\n geocoder.geocode({\n 'location': latlng\n }, function (results, status) {\n if (status === google.maps.GeocoderStatus.OK) {\n if (results[1]) {\n _this2.setValue(results[0].formatted_address);\n } else {\n console.log('No results found');\n }\n } else {\n console.log(\"Geocoder failed due to: \".concat(status));\n }\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 _TextField.default.schema.apply(_TextField.default, [{\n type: 'location',\n label: 'Location',\n key: 'location',\n map: {\n key: '',\n region: '',\n gmapId: '',\n autocompleteOptions: {}\n }\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Location',\n group: 'advanced',\n icon: 'map',\n weight: 36,\n schema: LocationComponent.schema()\n };\n }\n }]);\n\n return LocationComponent;\n}(_TextField.default);\n\nexports[\"default\"] = LocationComponent;\n\n//# sourceURL=webpack://Formio/./lib/contrib/location/Location.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\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.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.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.function.name.js */ \"./node_modules/core-js/modules/es.function.name.js\");\n\n__webpack_require__(/*! core-js/modules/es.parse-float.js */ \"./node_modules/core-js/modules/es.parse-float.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.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.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__(/*! ../../components/textfield/TextField */ \"./lib/components/textfield/TextField.js\"));\n\nvar _Formio = __webpack_require__(/*! ../../Formio */ \"./lib/Formio.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; } 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 || 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 : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar LocationComponent = /*#__PURE__*/function (_TextFieldComponent) {\n _inherits(LocationComponent, _TextFieldComponent);\n\n var _super = _createSuper(LocationComponent);\n\n function LocationComponent() {\n _classCallCheck(this, LocationComponent);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(LocationComponent, [{\n key: \"init\",\n value: function init() {\n _get(_getPrototypeOf(LocationComponent.prototype), \"init\", this).call(this); // Get the source for Google Maps API\n\n\n var src = 'https://maps.googleapis.com/maps/api/js?v=3&libraries=places&callback=googleMapsCallback';\n\n if (this.component.map && this.component.map.key) {\n src += \"&key=\".concat(this.component.map.key);\n }\n\n if (this.component.map && this.component.map.region) {\n src += \"®ion=\".concat(this.component.map.region);\n }\n\n _Formio.GlobalFormio.requireLibrary('googleMaps', 'google.maps.places', src);\n }\n }, {\n key: \"defaultSchema\",\n get: function get() {\n return LocationComponent.schema();\n }\n }, {\n key: \"emptyValue\",\n get: function get() {\n return '';\n }\n }, {\n key: \"inputInfo\",\n get: function get() {\n var info = _get(_getPrototypeOf(LocationComponent.prototype), \"inputInfo\", this);\n\n info.attr[\"class\"] += ' Gmap-search';\n return info;\n }\n }, {\n key: \"renderElement\",\n value: function renderElement(value, index) {\n return _get(_getPrototypeOf(LocationComponent.prototype), \"renderElement\", this).call(this, value, index) + this.renderTemplate('map', {\n mapId: this.component.map.gmapId\n });\n }\n }, {\n key: \"attach\",\n value: function attach(element) {\n var ret = _get(_getPrototypeOf(LocationComponent.prototype), \"attach\", this).call(this, element);\n\n this.loadRefs(element, {\n gmapElement: 'multiple'\n });\n return ret;\n }\n }, {\n key: \"attachElement\",\n value: function attachElement(element, index) {\n var _this = this;\n\n _get(_getPrototypeOf(LocationComponent.prototype), \"attachElement\", this).call(this, element, index);\n\n _Formio.GlobalFormio.libraryReady('googleMaps').then(function () {\n var defaultLatlng = new google.maps.LatLng(45.5041482, -73.5574125);\n var options = {\n zoom: 19,\n center: defaultLatlng,\n mapTypeId: google.maps.MapTypeId.ROADMAP,\n styles: [{\n 'featureType': 'poi',\n 'stylers': [{\n 'visibility': 'off'\n }]\n }, {\n 'featureType': 'transit',\n 'stylers': [{\n 'visibility': 'off'\n }]\n }]\n };\n\n if (!_this.refs.gmapElement[index]) {\n return;\n }\n\n element.map = new google.maps.Map(_this.refs.gmapElement[index], options);\n\n _this.addMarker(defaultLatlng, 'Default Marker', element);\n\n var autocompleteOptions = {};\n\n if (_this.component.map) {\n autocompleteOptions = _this.component.map.autocompleteOptions || {};\n }\n\n var autocomplete = new google.maps.places.Autocomplete(element, autocompleteOptions);\n autocomplete.addListener('place_changed', function () {\n var place = autocomplete.getPlace();\n\n if (!place.geometry) {\n console.log('Autocomplete\\'s returned place contains no geometry');\n return;\n } // If the place has a geometry, then present it on a map.\n\n\n if (place.geometry.viewport) {\n element.map.fitBounds(place.geometry.viewport);\n } else {\n element.map.setCenter(place.geometry.location);\n element.map.setZoom(17); // Why 17? Because it looks good.\n }\n\n element.marker.setIcon(\n /** @type {google.maps.Icon} */\n {\n url: place.icon,\n size: new google.maps.Size(71, 71),\n origin: new google.maps.Point(0, 0),\n anchor: new google.maps.Point(17, 34),\n scaledSize: new google.maps.Size(35, 35)\n });\n element.marker.setPosition(place.geometry.location);\n\n _this.setValue(place.name);\n });\n });\n }\n }, {\n key: \"addMarker\",\n value: function addMarker(latlng, title, element) {\n var _this2 = this;\n\n element.marker = new google.maps.Marker({\n position: latlng,\n map: element.map,\n title: title,\n draggable: true\n });\n element.marker.addListener('dragend', function (event) {\n var geocoder = new google.maps.Geocoder();\n var latlng = {\n lat: parseFloat(event.latLng.lat()),\n lng: parseFloat(event.latLng.lng())\n };\n geocoder.geocode({\n 'location': latlng\n }, function (results, status) {\n if (status === google.maps.GeocoderStatus.OK) {\n if (results[1]) {\n _this2.setValue(results[0].formatted_address);\n } else {\n console.log('No results found');\n }\n } else {\n console.log(\"Geocoder failed due to: \".concat(status));\n }\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 _TextField[\"default\"].schema.apply(_TextField[\"default\"], [{\n type: 'location',\n label: 'Location',\n key: 'location',\n map: {\n key: '',\n region: '',\n gmapId: '',\n autocompleteOptions: {}\n }\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Location',\n group: 'advanced',\n icon: 'map',\n weight: 36,\n schema: LocationComponent.schema()\n };\n }\n }]);\n\n return LocationComponent;\n}(_TextField[\"default\"]);\n\nexports[\"default\"] = LocationComponent;\n\n//# sourceURL=webpack://Formio/./lib/contrib/location/Location.js?"); /***/ }), @@ -488,7 +488,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol /***/ (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.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\"] = _default;\n\n__webpack_require__(/*! core-js/modules/es.array.concat.js */ \"./node_modules/core-js/modules/es.array.concat.js\");\n\nvar _ModalEditEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/ModalEdit.edit.display */ \"./lib/contrib/modaledit/editForm/ModalEdit.edit.display.js\"));\n\nvar _TextArea = _interopRequireDefault(__webpack_require__(/*! ../../components/textarea/TextArea.form */ \"./lib/components/textarea/TextArea.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 _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 _TextArea.default.apply(void 0, [[{\n key: 'display',\n components: [{\n key: 'rows',\n ignore: true\n }, {\n key: 'multiple',\n ignore: true\n }].concat(_toConsumableArray(_ModalEditEdit.default))\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/contrib/modaledit/ModalEdit.form.js?"); +eval("\n\n__webpack_require__(/*! core-js/modules/es.array.is-array.js */ \"./node_modules/core-js/modules/es.array.is-array.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.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.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.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\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 _ModalEditEdit = _interopRequireDefault(__webpack_require__(/*! ./editForm/ModalEdit.edit.display */ \"./lib/contrib/modaledit/editForm/ModalEdit.edit.display.js\"));\n\nvar _TextArea = _interopRequireDefault(__webpack_require__(/*! ../../components/textarea/TextArea.form */ \"./lib/components/textarea/TextArea.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 _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 _TextArea[\"default\"].apply(void 0, [[{\n key: 'display',\n components: [{\n key: 'rows',\n ignore: true\n }, {\n key: 'multiple',\n ignore: true\n }].concat(_toConsumableArray(_ModalEditEdit[\"default\"]))\n }]].concat(extend));\n}\n\n//# sourceURL=webpack://Formio/./lib/contrib/modaledit/ModalEdit.form.js?"); /***/ }), @@ -499,7 +499,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\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _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\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[\"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.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 _TextArea = _interopRequireDefault(__webpack_require__(/*! ../../components/textarea/TextArea */ \"./lib/components/textarea/TextArea.js\"));\n\nvar _ModalEdit = _interopRequireDefault(__webpack_require__(/*! ./ModalEdit.form */ \"./lib/contrib/modaledit/ModalEdit.form.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 ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (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 = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { 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); return Constructor; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get; } 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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || 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 : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar ModalEditComponent = /*#__PURE__*/function (_TextAreaComponent) {\n _inherits(ModalEditComponent, _TextAreaComponent);\n\n var _super = _createSuper(ModalEditComponent);\n\n function ModalEditComponent() {\n _classCallCheck(this, ModalEditComponent);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(ModalEditComponent, [{\n key: \"renderElement\",\n value:\n /** @override **/\n function renderElement() {\n var content = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n return this.renderTemplate('modaledit', {\n content: content\n });\n }\n /** @override **/\n\n }, {\n key: \"attach\",\n value: function attach(element) {\n this.loadRefs(element, {\n container: 'single',\n edit: 'single'\n });\n return _get(_getPrototypeOf(ModalEditComponent.prototype), \"attach\", this).call(this, element);\n }\n /** @override **/\n\n }, {\n key: \"attachElement\",\n value: function attachElement(element) {\n // Allow work with div as if it would be plain input\n Object.defineProperty(element, 'value', {\n get: function get() {\n return this.innerHTML;\n },\n set: function set(value) {\n this.innerHTML = value;\n }\n });\n var show = this.showModal.bind(this);\n this.addEventListener(this.refs.container, 'dblclick', show);\n this.addEventListener(this.refs.edit, 'click', show);\n }\n /** @override **/\n\n }, {\n key: \"createModal\",\n value: function createModal(element) {\n var _this = this;\n\n var self = this;\n var dialog = this.ce('div');\n this.setContent(dialog, this.renderTemplate('modaldialog'));\n dialog.refs = {};\n this.loadRefs.call(dialog, dialog, {\n overlay: 'single',\n content: 'single',\n inner: 'single',\n close: 'single'\n });\n var rect = this.getElementRect(this.refs.container);\n var layout = this.getModalLayout(rect);\n var styles = this.getModalStyle(layout);\n Object.assign(dialog.refs.content.style, styles);\n dialog.refs.inner.appendChild(element);\n this.addEventListener(dialog.refs.overlay, 'click', function (event) {\n event.preventDefault();\n dialog.close();\n });\n this.addEventListener(dialog.refs.close, 'click', function (event) {\n event.preventDefault();\n dialog.close();\n });\n this.addEventListener(dialog, 'close', function () {\n _this.removeChildFrom(dialog, document.body);\n });\n\n dialog.close = function () {\n dialog.dispatchEvent(new CustomEvent('close'));\n self.removeChildFrom(dialog, document.body);\n };\n\n document.body.appendChild(dialog);\n return dialog;\n }\n /** @override **/\n\n }, {\n key: \"updateOnChange\",\n value: function updateOnChange(flags) {\n var changed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n if (_get(_getPrototypeOf(ModalEditComponent.prototype), \"updateOnChange\", this).call(this, flags, changed)) {\n this.updateContentView(this.dataValue);\n }\n }\n }, {\n key: \"showModal\",\n value: function showModal() {\n var elt = this.ce('div');\n this.setContent(elt, _get(_getPrototypeOf(ModalEditComponent.prototype), \"renderElement\", this).call(this, this.dataValue));\n var editor = elt.children[0];\n\n if (this.isPlain) {\n editor.style.resize = 'vertical';\n }\n\n _get(_getPrototypeOf(ModalEditComponent.prototype), \"attachElement\", this).call(this, editor);\n\n this.createModal(editor);\n }\n }, {\n key: \"updateContentView\",\n value: function updateContentView() {\n var content = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n\n var view = _lodash.default.get(this, 'refs.input[0]', null);\n\n return this.setContent(view, content);\n }\n }, {\n key: \"getElementRect\",\n value: function getElementRect(elt) {\n return elt.getBoundingClientRect();\n }\n }, {\n key: \"getModalStyle\",\n value: function getModalStyle(args) {\n var overrides = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var defaultStyles = {\n position: 'absolute',\n height: 'auto'\n };\n\n var layout = _lodash.default.mapValues(_lodash.default.pick(args, ['top', 'left', 'width']), function (p) {\n return \"\".concat(p, \"px\");\n });\n\n return _objectSpread(_objectSpread(_objectSpread({}, defaultStyles), overrides), layout);\n }\n }, {\n key: \"getModalLayout\",\n value: function getModalLayout(rect) {\n var _this$getModalSize = this.getModalSize(rect.width, rect.height),\n width = _this$getModalSize.width,\n minHeight = _this$getModalSize.height;\n\n return {\n left: rect.left,\n minHeight: minHeight,\n top: rect.top,\n width: width\n };\n }\n }, {\n key: \"getModalSize\",\n value: function getModalSize(currentWidth, currentHeight) {\n var _this$defaultModalSiz = _slicedToArray(this.defaultModalSize, 2),\n dw = _this$defaultModalSiz[0],\n dh = _this$defaultModalSiz[1];\n\n var type = _lodash.default.get(this.component, 'modalLayout', 'fixed');\n\n var _this$layoutProps$typ = this.layoutProps[type],\n widthProp = _this$layoutProps$typ.widthProp,\n heightProp = _this$layoutProps$typ.heightProp;\n\n var width = _lodash.default.get(this.component, widthProp, dw);\n\n var height = _lodash.default.get(this.component, heightProp, dh);\n\n if (type === 'fluid') {\n return {\n width: Math.max(currentWidth, width),\n height: Math.max(currentHeight, height)\n };\n }\n\n return {\n width: width,\n height: height\n };\n }\n }, {\n key: \"defaultModalSize\",\n get: function get() {\n return [475, 300];\n }\n }, {\n key: \"layoutProps\",\n get: function get() {\n return {\n fixed: {\n widthProp: 'width',\n heightProp: 'height'\n },\n fluid: {\n widthProp: 'minWidth',\n heightProp: 'minHeight'\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 _TextArea.default.schema.apply(_TextArea.default, [{\n type: 'modaledit',\n label: 'Modal Edit',\n key: 'modalEdit',\n modalLayout: 'fixed'\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Modal Edit',\n group: 'data',\n icon: 'font',\n weight: 40,\n schema: ModalEditComponent.schema()\n };\n }\n }]);\n\n return ModalEditComponent;\n}(_TextArea.default);\n\nexports[\"default\"] = ModalEditComponent;\nModalEditComponent.editForm = _ModalEdit.default;\n\n//# sourceURL=webpack://Formio/./lib/contrib/modaledit/ModalEdit.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\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.object.create.js */ \"./node_modules/core-js/modules/es.object.create.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.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.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.object.define-properties.js */ \"./node_modules/core-js/modules/es.object.define-properties.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.is-array.js */ \"./node_modules/core-js/modules/es.array.is-array.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.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.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\n\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.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/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.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 _TextArea = _interopRequireDefault(__webpack_require__(/*! ../../components/textarea/TextArea */ \"./lib/components/textarea/TextArea.js\"));\n\nvar _ModalEdit = _interopRequireDefault(__webpack_require__(/*! ./ModalEdit.form */ \"./lib/contrib/modaledit/ModalEdit.form.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 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; } 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 || 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 : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar ModalEditComponent = /*#__PURE__*/function (_TextAreaComponent) {\n _inherits(ModalEditComponent, _TextAreaComponent);\n\n var _super = _createSuper(ModalEditComponent);\n\n function ModalEditComponent() {\n _classCallCheck(this, ModalEditComponent);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(ModalEditComponent, [{\n key: \"renderElement\",\n value:\n /** @override **/\n function renderElement() {\n var content = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n return this.renderTemplate('modaledit', {\n content: content\n });\n }\n /** @override **/\n\n }, {\n key: \"attach\",\n value: function attach(element) {\n this.loadRefs(element, {\n container: 'single',\n edit: 'single'\n });\n return _get(_getPrototypeOf(ModalEditComponent.prototype), \"attach\", this).call(this, element);\n }\n /** @override **/\n\n }, {\n key: \"attachElement\",\n value: function attachElement(element) {\n // Allow work with div as if it would be plain input\n Object.defineProperty(element, 'value', {\n get: function get() {\n return this.innerHTML;\n },\n set: function set(value) {\n this.innerHTML = value;\n }\n });\n var show = this.showModal.bind(this);\n this.addEventListener(this.refs.container, 'dblclick', show);\n this.addEventListener(this.refs.edit, 'click', show);\n }\n /** @override **/\n\n }, {\n key: \"createModal\",\n value: function createModal(element) {\n var _this = this;\n\n var self = this;\n var dialog = this.ce('div');\n this.setContent(dialog, this.renderTemplate('modaldialog'));\n dialog.refs = {};\n this.loadRefs.call(dialog, dialog, {\n overlay: 'single',\n content: 'single',\n inner: 'single',\n close: 'single'\n });\n var rect = this.getElementRect(this.refs.container);\n var layout = this.getModalLayout(rect);\n var styles = this.getModalStyle(layout);\n Object.assign(dialog.refs.content.style, styles);\n dialog.refs.inner.appendChild(element);\n this.addEventListener(dialog.refs.overlay, 'click', function (event) {\n event.preventDefault();\n dialog.close();\n });\n this.addEventListener(dialog.refs.close, 'click', function (event) {\n event.preventDefault();\n dialog.close();\n });\n this.addEventListener(dialog, 'close', function () {\n _this.removeChildFrom(dialog, document.body);\n });\n\n dialog.close = function () {\n dialog.dispatchEvent(new CustomEvent('close'));\n self.removeChildFrom(dialog, document.body);\n };\n\n document.body.appendChild(dialog);\n return dialog;\n }\n /** @override **/\n\n }, {\n key: \"updateOnChange\",\n value: function updateOnChange(flags) {\n var changed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n if (_get(_getPrototypeOf(ModalEditComponent.prototype), \"updateOnChange\", this).call(this, flags, changed)) {\n this.updateContentView(this.dataValue);\n }\n }\n }, {\n key: \"showModal\",\n value: function showModal() {\n var elt = this.ce('div');\n this.setContent(elt, _get(_getPrototypeOf(ModalEditComponent.prototype), \"renderElement\", this).call(this, this.dataValue));\n var editor = elt.children[0];\n\n if (this.isPlain) {\n editor.style.resize = 'vertical';\n }\n\n _get(_getPrototypeOf(ModalEditComponent.prototype), \"attachElement\", this).call(this, editor);\n\n this.createModal(editor);\n }\n }, {\n key: \"updateContentView\",\n value: function updateContentView() {\n var content = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n\n var view = _lodash[\"default\"].get(this, 'refs.input[0]', null);\n\n return this.setContent(view, content);\n }\n }, {\n key: \"getElementRect\",\n value: function getElementRect(elt) {\n return elt.getBoundingClientRect();\n }\n }, {\n key: \"getModalStyle\",\n value: function getModalStyle(args) {\n var overrides = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var defaultStyles = {\n position: 'absolute',\n height: 'auto'\n };\n\n var layout = _lodash[\"default\"].mapValues(_lodash[\"default\"].pick(args, ['top', 'left', 'width']), function (p) {\n return \"\".concat(p, \"px\");\n });\n\n return _objectSpread(_objectSpread(_objectSpread({}, defaultStyles), overrides), layout);\n }\n }, {\n key: \"getModalLayout\",\n value: function getModalLayout(rect) {\n var _this$getModalSize = this.getModalSize(rect.width, rect.height),\n width = _this$getModalSize.width,\n minHeight = _this$getModalSize.height;\n\n return {\n left: rect.left,\n minHeight: minHeight,\n top: rect.top,\n width: width\n };\n }\n }, {\n key: \"getModalSize\",\n value: function getModalSize(currentWidth, currentHeight) {\n var _this$defaultModalSiz = _slicedToArray(this.defaultModalSize, 2),\n dw = _this$defaultModalSiz[0],\n dh = _this$defaultModalSiz[1];\n\n var type = _lodash[\"default\"].get(this.component, 'modalLayout', 'fixed');\n\n var _this$layoutProps$typ = this.layoutProps[type],\n widthProp = _this$layoutProps$typ.widthProp,\n heightProp = _this$layoutProps$typ.heightProp;\n\n var width = _lodash[\"default\"].get(this.component, widthProp, dw);\n\n var height = _lodash[\"default\"].get(this.component, heightProp, dh);\n\n if (type === 'fluid') {\n return {\n width: Math.max(currentWidth, width),\n height: Math.max(currentHeight, height)\n };\n }\n\n return {\n width: width,\n height: height\n };\n }\n }, {\n key: \"defaultModalSize\",\n get: function get() {\n return [475, 300];\n }\n }, {\n key: \"layoutProps\",\n get: function get() {\n return {\n fixed: {\n widthProp: 'width',\n heightProp: 'height'\n },\n fluid: {\n widthProp: 'minWidth',\n heightProp: 'minHeight'\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 _TextArea[\"default\"].schema.apply(_TextArea[\"default\"], [{\n type: 'modaledit',\n label: 'Modal Edit',\n key: 'modalEdit',\n modalLayout: 'fixed'\n }].concat(extend));\n }\n }, {\n key: \"builderInfo\",\n get: function get() {\n return {\n title: 'Modal Edit',\n group: 'data',\n icon: 'font',\n weight: 40,\n schema: ModalEditComponent.schema()\n };\n }\n }]);\n\n return ModalEditComponent;\n}(_TextArea[\"default\"]);\n\nexports[\"default\"] = ModalEditComponent;\nModalEditComponent.editForm = _ModalEdit[\"default\"];\n\n//# sourceURL=webpack://Formio/./lib/contrib/modaledit/ModalEdit.js?"); /***/ }), @@ -507,10 +507,10 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol /*!******************************************************************!*\ !*** ./lib/contrib/modaledit/editForm/ModalEdit.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: 'radio',\n key: 'modalLayout',\n input: true,\n label: 'Layout Type',\n inline: true,\n values: [{\n label: 'Fixed',\n value: 'fixed'\n }, {\n label: 'Fluid',\n value: 'fluid'\n }],\n defaultValue: 'fluid',\n tooltip: 'Fixed - modal with fixed width.\\nFluid - Width of modal will be equal to preview width or minmal width.'\n}, {\n type: 'number',\n key: 'width',\n label: 'Fixed Width',\n input: true,\n defaultValue: 300,\n conditional: {\n json: {\n '===': [{\n var: 'data.modalLayout'\n }, 'fixed']\n }\n }\n}, {\n type: 'number',\n key: 'minWidth',\n label: 'Minimum Width',\n input: true,\n defaultValue: 300,\n conditional: {\n json: {\n '===': [{\n var: 'data.modalLayout'\n }, 'fluid']\n }\n }\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/contrib/modaledit/editForm/ModalEdit.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\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\nvar _default = [{\n type: 'radio',\n key: 'modalLayout',\n input: true,\n label: 'Layout Type',\n inline: true,\n values: [{\n label: 'Fixed',\n value: 'fixed'\n }, {\n label: 'Fluid',\n value: 'fluid'\n }],\n defaultValue: 'fluid',\n tooltip: 'Fixed - modal with fixed width.\\nFluid - Width of modal will be equal to preview width or minmal width.'\n}, {\n type: 'number',\n key: 'width',\n label: 'Fixed Width',\n input: true,\n defaultValue: 300,\n conditional: {\n json: {\n '===': [{\n \"var\": 'data.modalLayout'\n }, 'fixed']\n }\n }\n}, {\n type: 'number',\n key: 'minWidth',\n label: 'Minimum Width',\n input: true,\n defaultValue: 300,\n conditional: {\n json: {\n '===': [{\n \"var\": 'data.modalLayout'\n }, 'fluid']\n }\n }\n}];\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/contrib/modaledit/editForm/ModalEdit.edit.display.js?"); /***/ }), @@ -521,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.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.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 _Button = _interopRequireDefault(__webpack_require__(/*! ../../../components/button/Button */ \"./lib/components/button/Button.js\"));\n\nvar _Formio = __webpack_require__(/*! ../../../Formio */ \"./lib/Formio.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _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); return Constructor; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get; } 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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || 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 : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar StripeCheckoutComponent = /*#__PURE__*/function (_ButtonComponent) {\n _inherits(StripeCheckoutComponent, _ButtonComponent);\n\n var _super = _createSuper(StripeCheckoutComponent);\n\n function StripeCheckoutComponent(component, options, data) {\n var _this;\n\n _classCallCheck(this, StripeCheckoutComponent);\n\n _this = _super.call(this, component, options, data); // Get the source for Stripe API\n\n var src = 'https://checkout.stripe.com/checkout.js';\n /**\n * Promise when Stripe is ready.\n * @type {Promise}\n */\n\n _this.stripeCheckoutReady = _Formio.GlobalFormio.requireLibrary('stripeCheckout', 'StripeCheckout', src, true);\n /**\n * Keep initial component action\n * @type {String}\n */\n\n _this.componentAction = _this.component.action; // Force button to handle event action to build button\n\n _this.component.action = 'event';\n return _this;\n }\n\n _createClass(StripeCheckoutComponent, [{\n key: \"getValue\",\n value: function getValue() {\n return this.dataValue;\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 * Handle event dispatched by Stripe library\n * @param {Object} token - The token returned by Stripe.\n */\n\n }, {\n key: \"onToken\",\n value: function onToken(token) {\n this.setValue(token.id); // In case of submit, submit the form\n\n if (this.componentAction === 'submit') {\n this.emit('submitButton');\n } else {\n this.addClass(this.element, 'btn-success');\n this.disabled = true;\n }\n }\n /**\n * Handle customEvent event on the button\n * @param {Object} event - The event returned by ButtonComponent.\n */\n\n }, {\n key: \"onClickButton\",\n value: function onClickButton(event) {\n var _this2 = this;\n\n // Return if component call is not the current component\n if (this.component.key !== event.component.key) {\n return;\n } // Open Checkout with further options:\n\n\n var popupConfiguration = _lodash.default.cloneDeep(this.component.stripe.popupConfiguration) || {};\n\n _lodash.default.each(popupConfiguration, function (value, key) {\n popupConfiguration[key] = _this2.t(value);\n });\n\n if (this.componentAction === 'submit') {\n // In case of submit, validate the form before opening button\n if (this.root.isValid(event.data, true)) {\n this.handler.open(popupConfiguration);\n } else {\n // If the form is not valid, submit it to draw errors\n this.emit('submitButton');\n }\n } else {\n this.handler.open(popupConfiguration);\n }\n }\n }, {\n key: \"build\",\n value: function build() {\n var _this3 = this;\n\n // Build button\n _get(_getPrototypeOf(StripeCheckoutComponent.prototype), \"build\", this).call(this); // In case of submit, add event listeners\n\n\n if (this.componentAction === 'submit') {\n this.on('submitButton', function () {\n _this3.loading = true;\n _this3.disabled = true;\n }, true);\n this.on('submitDone', function () {\n _this3.loading = false;\n _this3.disabled = false;\n }, true);\n this.on('change', function (value) {\n _this3.loading = false;\n _this3.disabled = _this3.component.disableOnInvalid && !_this3.root.isValid(value.data, true);\n }, true);\n this.on('error', function () {\n _this3.loading = false;\n }, true);\n } // When stripe checkout is ready, create the handler and add event listeners\n\n\n this.stripeCheckoutReady.then(function () {\n var handlerConfiguration = _lodash.default.cloneDeep(_this3.component.stripe.handlerConfiguration) || {};\n handlerConfiguration.key = _this3.component.stripe.apiKey;\n handlerConfiguration.token = _this3.onToken.bind(_this3);\n\n if (typeof handlerConfiguration.locale === 'undefined') {\n handlerConfiguration.locale = _this3.options.language;\n }\n\n _this3.handler = StripeCheckout.configure(handlerConfiguration);\n\n _this3.on('customEvent', _this3.onClickButton.bind(_this3));\n\n _this3.addEventListener(window, 'popstate', function () {\n _this3.handler.close();\n });\n });\n }\n }], [{\n key: \"builderInfo\",\n get: function get() {\n return {\n group: false,\n schema: _Button.default.schema()\n };\n }\n }]);\n\n return StripeCheckoutComponent;\n}(_Button.default);\n\nexports[\"default\"] = StripeCheckoutComponent;\n\nif ((typeof __webpack_require__.g === \"undefined\" ? \"undefined\" : _typeof(__webpack_require__.g)) === 'object' && __webpack_require__.g.Formio && __webpack_require__.g.Formio.registerComponent) {\n __webpack_require__.g.Formio.registerComponent('stripeCheckout', StripeCheckoutComponent);\n}\n\n//# sourceURL=webpack://Formio/./lib/contrib/stripe/checkout/StripeCheckout.js?"); +eval("\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.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.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.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.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 _Button = _interopRequireDefault(__webpack_require__(/*! ../../../components/button/Button */ \"./lib/components/button/Button.js\"));\n\nvar _Formio = __webpack_require__(/*! ../../../Formio */ \"./lib/Formio.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; } 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 || 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 : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar StripeCheckoutComponent = /*#__PURE__*/function (_ButtonComponent) {\n _inherits(StripeCheckoutComponent, _ButtonComponent);\n\n var _super = _createSuper(StripeCheckoutComponent);\n\n function StripeCheckoutComponent(component, options, data) {\n var _this;\n\n _classCallCheck(this, StripeCheckoutComponent);\n\n _this = _super.call(this, component, options, data); // Get the source for Stripe API\n\n var src = 'https://checkout.stripe.com/checkout.js';\n /**\n * Promise when Stripe is ready.\n * @type {Promise}\n */\n\n _this.stripeCheckoutReady = _Formio.GlobalFormio.requireLibrary('stripeCheckout', 'StripeCheckout', src, true);\n /**\n * Keep initial component action\n * @type {String}\n */\n\n _this.componentAction = _this.component.action; // Force button to handle event action to build button\n\n _this.component.action = 'event';\n return _this;\n }\n\n _createClass(StripeCheckoutComponent, [{\n key: \"getValue\",\n value: function getValue() {\n return this.dataValue;\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 * Handle event dispatched by Stripe library\n * @param {Object} token - The token returned by Stripe.\n */\n\n }, {\n key: \"onToken\",\n value: function onToken(token) {\n this.setValue(token.id); // In case of submit, submit the form\n\n if (this.componentAction === 'submit') {\n this.emit('submitButton');\n } else {\n this.addClass(this.element, 'btn-success');\n this.disabled = true;\n }\n }\n /**\n * Handle customEvent event on the button\n * @param {Object} event - The event returned by ButtonComponent.\n */\n\n }, {\n key: \"onClickButton\",\n value: function onClickButton(event) {\n var _this2 = this;\n\n // Return if component call is not the current component\n if (this.component.key !== event.component.key) {\n return;\n } // Open Checkout with further options:\n\n\n var popupConfiguration = _lodash[\"default\"].cloneDeep(this.component.stripe.popupConfiguration) || {};\n\n _lodash[\"default\"].each(popupConfiguration, function (value, key) {\n popupConfiguration[key] = _this2.t(value);\n });\n\n if (this.componentAction === 'submit') {\n // In case of submit, validate the form before opening button\n if (this.root.isValid(event.data, true)) {\n this.handler.open(popupConfiguration);\n } else {\n // If the form is not valid, submit it to draw errors\n this.emit('submitButton');\n }\n } else {\n this.handler.open(popupConfiguration);\n }\n }\n }, {\n key: \"build\",\n value: function build() {\n var _this3 = this;\n\n // Build button\n _get(_getPrototypeOf(StripeCheckoutComponent.prototype), \"build\", this).call(this); // In case of submit, add event listeners\n\n\n if (this.componentAction === 'submit') {\n this.on('submitButton', function () {\n _this3.loading = true;\n _this3.disabled = true;\n }, true);\n this.on('submitDone', function () {\n _this3.loading = false;\n _this3.disabled = false;\n }, true);\n this.on('change', function (value) {\n _this3.loading = false;\n _this3.disabled = _this3.component.disableOnInvalid && !_this3.root.isValid(value.data, true);\n }, true);\n this.on('error', function () {\n _this3.loading = false;\n }, true);\n } // When stripe checkout is ready, create the handler and add event listeners\n\n\n this.stripeCheckoutReady.then(function () {\n var handlerConfiguration = _lodash[\"default\"].cloneDeep(_this3.component.stripe.handlerConfiguration) || {};\n handlerConfiguration.key = _this3.component.stripe.apiKey;\n handlerConfiguration.token = _this3.onToken.bind(_this3);\n\n if (typeof handlerConfiguration.locale === 'undefined') {\n handlerConfiguration.locale = _this3.options.language;\n }\n\n _this3.handler = StripeCheckout.configure(handlerConfiguration);\n\n _this3.on('customEvent', _this3.onClickButton.bind(_this3));\n\n _this3.addEventListener(window, 'popstate', function () {\n _this3.handler.close();\n });\n });\n }\n }], [{\n key: \"builderInfo\",\n get: function get() {\n return {\n group: false,\n schema: _Button[\"default\"].schema()\n };\n }\n }]);\n\n return StripeCheckoutComponent;\n}(_Button[\"default\"]);\n\nexports[\"default\"] = StripeCheckoutComponent;\n\nif ((typeof __webpack_require__.g === \"undefined\" ? \"undefined\" : _typeof(__webpack_require__.g)) === 'object' && __webpack_require__.g.Formio && __webpack_require__.g.Formio.registerComponent) {\n __webpack_require__.g.Formio.registerComponent('stripeCheckout', StripeCheckoutComponent);\n}\n\n//# sourceURL=webpack://Formio/./lib/contrib/stripe/checkout/StripeCheckout.js?"); /***/ }), @@ -532,7 +532,7 @@ eval("\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.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\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.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 _Validator = _interopRequireDefault(__webpack_require__(/*! ../../../validator/Validator */ \"./lib/validator/Validator.js\"));\n\nvar _Component2 = _interopRequireDefault(__webpack_require__(/*! ../../../components/_classes/component/Component */ \"./lib/components/_classes/component/Component.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\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _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); return Constructor; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get; } 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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || 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 : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n// Register a custom validor to use card validition from Stripe\nif (typeof _Validator.default.validators.stripe === 'undefined') {\n _Validator.default.validators.stripe = {\n key: 'validate.stripe',\n message: function message(component) {\n var stripeMessage = '';\n\n if (component.lastResult && component.lastResult.error) {\n stripeMessage = component.lastResult.error.message;\n }\n\n return component.t(component.errorMessage('stripe'), {\n field: component.errorLabel,\n stripe: stripeMessage,\n stripeError: component.lastResult.error,\n data: component.data\n });\n },\n check: function check(component, setting, value) {\n if (!component.paymentDone && component.lastResult) {\n return !component.lastResult.error && !component.isEmpty(value);\n }\n\n return true;\n }\n };\n}\n/**\n * This is the StripeComponent class.\n */\n\n\nvar StripeComponent = /*#__PURE__*/function (_Component) {\n _inherits(StripeComponent, _Component);\n\n var _super = _createSuper(StripeComponent);\n\n function StripeComponent(component, options, data) {\n var _this;\n\n _classCallCheck(this, StripeComponent);\n\n _this = _super.call(this, component, options, data); // Get the source for Stripe API\n\n var src = 'https://js.stripe.com/v3/';\n /**\n * Promise when Stripe is ready.\n * @type {Promise}\n */\n\n _this.stripeReady = _Formio.GlobalFormio.requireLibrary('stripe', 'Stripe', src, true);\n /**\n * The last result returned by Stripe.\n * @type {Object}\n */\n\n _this.lastResult = null;\n /**\n * The state of the payment.\n * @type {Boolean}\n */\n\n _this.paymentDone = false; // Use stripe validator\n\n _this.validators.push('stripe');\n\n return _this;\n }\n\n _createClass(StripeComponent, [{\n key: \"elementInfo\",\n value: function elementInfo() {\n var info = _get(_getPrototypeOf(StripeComponent.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 * Set CSS classes for pending authorization\n */\n\n }, {\n key: \"authorizePending\",\n value: function authorizePending() {\n this.addClass(this.element, 'stripe-submitting');\n this.removeClass(this.element, 'stripe-error');\n this.removeClass(this.element, 'stripe-submitted');\n }\n /**\n * Set CSS classes and display error when error occurs during authorization\n * @param {Object} resultError - The result error returned by Stripe API.\n */\n\n }, {\n key: \"authorizeError\",\n value: function authorizeError(resultError) {\n this.removeClass(this.element, 'stripe-submitting');\n this.addClass(this.element, 'stripe-submit-error');\n this.removeClass(this.element, 'stripe-submitted');\n\n if (!this.lastResult) {\n this.lastResult = {};\n }\n\n this.lastResult.error = resultError;\n this.setValue(this.getValue(), {\n changed: true\n });\n }\n /**\n * Set CSS classes and save token when authorization successed\n * @param {Object} result - The result returned by Stripe API.\n */\n\n }, {\n key: \"authorizeDone\",\n value: function authorizeDone(result) {\n this.removeClass(this.element, 'stripe-submit-error');\n this.removeClass(this.element, 'stripe-submitting');\n this.addClass(this.element, 'stripe-submitted');\n this.stripeSuccess.style.display = 'block';\n\n if (this.component.stripe.payButton && this.component.stripe.payButton.enable) {\n this.stripeElementPayButton.style.display = 'none';\n this.stripeSeparator.style.display = 'none';\n }\n\n this.stripeElementCard.style.display = 'none'; // Store token in hidden input\n\n this.setValue(result.token.id);\n this.paymentDone = true;\n }\n /**\n * Call Stripe API to get token\n */\n\n }, {\n key: \"authorize\",\n value: function authorize() {\n if (this.paymentDone) {\n return;\n }\n\n var that = this;\n return new _nativePromiseOnly.default(function (resolve, reject) {\n that.authorizePending(); // Get all additionnal data to send to Stripe\n\n var cardData = _lodash.default.cloneDeep(that.component.stripe.cardData) || {};\n\n _lodash.default.each(cardData, function (value, key) {\n cardData[key] = that.t(value);\n });\n\n return that.stripe.createToken(that.stripeCard, cardData).then(function (result) {\n if (result.error) {\n that.authorizeError(result.error);\n reject(result.error);\n } else {\n that.authorizeDone(result);\n resolve();\n }\n });\n });\n }\n /**\n * Handle event dispatched by Stripe library\n * @param {Object} result - The result returned by Stripe.\n */\n\n }, {\n key: \"onElementCardChange\",\n value: function onElementCardChange(result) {\n // If the field is not required and the field is empty, do not throw an error\n if (result.empty && (!this.component.validate || !this.component.validate.required)) {\n delete result.error;\n } // Force change when complete or when an error is thrown or fixed\n\n\n var changed = result.complete || this.lastResult && !!this.lastResult.error !== !!result.error || this.lastResult && this.lastResult.error && result.error && this.lastResult.error.code !== result.error.code || false;\n this.lastResult = result; // When the field is not empty, use \".\" as value to not trigger \"required\" validator\n\n var value = result.empty ? '' : '.';\n this.setValue(value, {\n changed: changed\n });\n }\n }, {\n key: \"beforeSubmit\",\n value: function beforeSubmit() {\n // Get the token before submitting when the field is not empty or required\n if (this.lastResult && !this.lastResult.empty || this.component.validate && this.component.validate.required) {\n return this.authorize();\n }\n }\n }, {\n key: \"build\",\n value: function build() {\n var _this2 = this;\n\n _get(_getPrototypeOf(StripeComponent.prototype), \"build\", this).call(this);\n\n var successLabel = this.component.stripe.payButton.successLabel || 'Payment successful';\n this.stripeSuccess = this.ce('div', {\n class: 'Stripe-success',\n style: 'display: none'\n }, this.t(successLabel));\n this.element.appendChild(this.stripeSuccess); // Add container for pay button\n\n if (this.component.stripe.payButton && this.component.stripe.payButton.enable) {\n this.stripeElementPayButton = this.ce('div', {\n class: 'Stripe-paybutton'\n });\n this.element.appendChild(this.stripeElementPayButton);\n var separatorLabel = this.component.stripe.payButton.separatorLabel || 'Or';\n this.stripeSeparator = this.ce('div', {\n class: 'Stripe-separator',\n style: 'display: none'\n }, this.t(separatorLabel));\n this.element.appendChild(this.stripeSeparator);\n } // Create container for stripe cart input\n\n\n this.stripeElementCard = this.ce('div');\n this.element.appendChild(this.stripeElementCard);\n this.stripeReady.then(function () {\n _this2.stripe = new Stripe(_this2.component.stripe.apiKey); // Create an instance of Elements\n\n var stripeElementsOptions = {};\n\n if (_this2.component.stripe) {\n stripeElementsOptions = _lodash.default.cloneDeep(_this2.component.stripe.stripeElementsOptions) || {};\n }\n\n if (typeof stripeElementsOptions.locale === 'undefined') {\n stripeElementsOptions.locale = _this2.options.language;\n }\n\n var elements = _this2.stripe.elements(stripeElementsOptions); // Create an instance of the card Element\n\n\n var stripeElementOptions = {};\n\n if (_this2.component.stripe) {\n stripeElementOptions = _this2.component.stripe.stripeElementOptions || {};\n }\n\n _this2.stripeCard = elements.create('card', stripeElementOptions); // Add an instance of the card Element into the `card-element`
\n\n _this2.stripeCard.mount(_this2.stripeElementCard); // Handle real-time validation errors from the card Element.\n\n\n _this2.addEventListener(_this2.stripeCard, 'change', _this2.onElementCardChange.bind(_this2)); // If there is a pay button, then create it and add listener\n\n\n if (_this2.component.stripe.payButton && _this2.component.stripe.payButton.enable) {\n var paymentRequest = _this2.stripe.paymentRequest(_this2.component.stripe.payButton.paymentRequest);\n\n _this2.addEventListener(paymentRequest, 'token', function (result) {\n _this2.authorizeDone(result, true);\n\n result.complete('success');\n });\n\n var stripeOptionsPayButton = {};\n\n if (_this2.component.stripe.payButton) {\n stripeOptionsPayButton = _this2.component.stripe.payButton.stripeOptions || {};\n }\n\n stripeOptionsPayButton.paymentRequest = paymentRequest;\n var paymentRequestElement = elements.create('paymentRequestButton', stripeOptionsPayButton);\n paymentRequest.canMakePayment().then(function (result) {\n if (result) {\n // Display label separator\n _this2.stripeSeparator.style.display = 'block';\n paymentRequestElement.mount(_this2.stripeElementPayButton);\n }\n });\n }\n });\n }\n }]);\n\n return StripeComponent;\n}(_Component2.default);\n\nexports[\"default\"] = StripeComponent;\n\nif ((typeof __webpack_require__.g === \"undefined\" ? \"undefined\" : _typeof(__webpack_require__.g)) === 'object' && __webpack_require__.g.Formio && __webpack_require__.g.Formio.registerComponent) {\n __webpack_require__.g.Formio.registerComponent('stripe', StripeComponent);\n}\n\n//# sourceURL=webpack://Formio/./lib/contrib/stripe/stripe/Stripe.js?"); +eval("\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.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.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.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.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 _Validator = _interopRequireDefault(__webpack_require__(/*! ../../../validator/Validator */ \"./lib/validator/Validator.js\"));\n\nvar _Component2 = _interopRequireDefault(__webpack_require__(/*! ../../../components/_classes/component/Component */ \"./lib/components/_classes/component/Component.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\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; } 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 || 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 : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n// Register a custom validor to use card validition from Stripe\nif (typeof _Validator[\"default\"].validators.stripe === 'undefined') {\n _Validator[\"default\"].validators.stripe = {\n key: 'validate.stripe',\n message: function message(component) {\n var stripeMessage = '';\n\n if (component.lastResult && component.lastResult.error) {\n stripeMessage = component.lastResult.error.message;\n }\n\n return component.t(component.errorMessage('stripe'), {\n field: component.errorLabel,\n stripe: stripeMessage,\n stripeError: component.lastResult.error,\n data: component.data\n });\n },\n check: function check(component, setting, value) {\n if (!component.paymentDone && component.lastResult) {\n return !component.lastResult.error && !component.isEmpty(value);\n }\n\n return true;\n }\n };\n}\n/**\n * This is the StripeComponent class.\n */\n\n\nvar StripeComponent = /*#__PURE__*/function (_Component) {\n _inherits(StripeComponent, _Component);\n\n var _super = _createSuper(StripeComponent);\n\n function StripeComponent(component, options, data) {\n var _this;\n\n _classCallCheck(this, StripeComponent);\n\n _this = _super.call(this, component, options, data); // Get the source for Stripe API\n\n var src = 'https://js.stripe.com/v3/';\n /**\n * Promise when Stripe is ready.\n * @type {Promise}\n */\n\n _this.stripeReady = _Formio.GlobalFormio.requireLibrary('stripe', 'Stripe', src, true);\n /**\n * The last result returned by Stripe.\n * @type {Object}\n */\n\n _this.lastResult = null;\n /**\n * The state of the payment.\n * @type {Boolean}\n */\n\n _this.paymentDone = false; // Use stripe validator\n\n _this.validators.push('stripe');\n\n return _this;\n }\n\n _createClass(StripeComponent, [{\n key: \"elementInfo\",\n value: function elementInfo() {\n var info = _get(_getPrototypeOf(StripeComponent.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 * Set CSS classes for pending authorization\n */\n\n }, {\n key: \"authorizePending\",\n value: function authorizePending() {\n this.addClass(this.element, 'stripe-submitting');\n this.removeClass(this.element, 'stripe-error');\n this.removeClass(this.element, 'stripe-submitted');\n }\n /**\n * Set CSS classes and display error when error occurs during authorization\n * @param {Object} resultError - The result error returned by Stripe API.\n */\n\n }, {\n key: \"authorizeError\",\n value: function authorizeError(resultError) {\n this.removeClass(this.element, 'stripe-submitting');\n this.addClass(this.element, 'stripe-submit-error');\n this.removeClass(this.element, 'stripe-submitted');\n\n if (!this.lastResult) {\n this.lastResult = {};\n }\n\n this.lastResult.error = resultError;\n this.setValue(this.getValue(), {\n changed: true\n });\n }\n /**\n * Set CSS classes and save token when authorization successed\n * @param {Object} result - The result returned by Stripe API.\n */\n\n }, {\n key: \"authorizeDone\",\n value: function authorizeDone(result) {\n this.removeClass(this.element, 'stripe-submit-error');\n this.removeClass(this.element, 'stripe-submitting');\n this.addClass(this.element, 'stripe-submitted');\n this.stripeSuccess.style.display = 'block';\n\n if (this.component.stripe.payButton && this.component.stripe.payButton.enable) {\n this.stripeElementPayButton.style.display = 'none';\n this.stripeSeparator.style.display = 'none';\n }\n\n this.stripeElementCard.style.display = 'none'; // Store token in hidden input\n\n this.setValue(result.token.id);\n this.paymentDone = true;\n }\n /**\n * Call Stripe API to get token\n */\n\n }, {\n key: \"authorize\",\n value: function authorize() {\n if (this.paymentDone) {\n return;\n }\n\n var that = this;\n return new _nativePromiseOnly[\"default\"](function (resolve, reject) {\n that.authorizePending(); // Get all additionnal data to send to Stripe\n\n var cardData = _lodash[\"default\"].cloneDeep(that.component.stripe.cardData) || {};\n\n _lodash[\"default\"].each(cardData, function (value, key) {\n cardData[key] = that.t(value);\n });\n\n return that.stripe.createToken(that.stripeCard, cardData).then(function (result) {\n if (result.error) {\n that.authorizeError(result.error);\n reject(result.error);\n } else {\n that.authorizeDone(result);\n resolve();\n }\n });\n });\n }\n /**\n * Handle event dispatched by Stripe library\n * @param {Object} result - The result returned by Stripe.\n */\n\n }, {\n key: \"onElementCardChange\",\n value: function onElementCardChange(result) {\n // If the field is not required and the field is empty, do not throw an error\n if (result.empty && (!this.component.validate || !this.component.validate.required)) {\n delete result.error;\n } // Force change when complete or when an error is thrown or fixed\n\n\n var changed = result.complete || this.lastResult && !!this.lastResult.error !== !!result.error || this.lastResult && this.lastResult.error && result.error && this.lastResult.error.code !== result.error.code || false;\n this.lastResult = result; // When the field is not empty, use \".\" as value to not trigger \"required\" validator\n\n var value = result.empty ? '' : '.';\n this.setValue(value, {\n changed: changed\n });\n }\n }, {\n key: \"beforeSubmit\",\n value: function beforeSubmit() {\n // Get the token before submitting when the field is not empty or required\n if (this.lastResult && !this.lastResult.empty || this.component.validate && this.component.validate.required) {\n return this.authorize();\n }\n }\n }, {\n key: \"build\",\n value: function build() {\n var _this2 = this;\n\n _get(_getPrototypeOf(StripeComponent.prototype), \"build\", this).call(this);\n\n var successLabel = this.component.stripe.payButton.successLabel || 'Payment successful';\n this.stripeSuccess = this.ce('div', {\n \"class\": 'Stripe-success',\n style: 'display: none'\n }, this.t(successLabel));\n this.element.appendChild(this.stripeSuccess); // Add container for pay button\n\n if (this.component.stripe.payButton && this.component.stripe.payButton.enable) {\n this.stripeElementPayButton = this.ce('div', {\n \"class\": 'Stripe-paybutton'\n });\n this.element.appendChild(this.stripeElementPayButton);\n var separatorLabel = this.component.stripe.payButton.separatorLabel || 'Or';\n this.stripeSeparator = this.ce('div', {\n \"class\": 'Stripe-separator',\n style: 'display: none'\n }, this.t(separatorLabel));\n this.element.appendChild(this.stripeSeparator);\n } // Create container for stripe cart input\n\n\n this.stripeElementCard = this.ce('div');\n this.element.appendChild(this.stripeElementCard);\n this.stripeReady.then(function () {\n _this2.stripe = new Stripe(_this2.component.stripe.apiKey); // Create an instance of Elements\n\n var stripeElementsOptions = {};\n\n if (_this2.component.stripe) {\n stripeElementsOptions = _lodash[\"default\"].cloneDeep(_this2.component.stripe.stripeElementsOptions) || {};\n }\n\n if (typeof stripeElementsOptions.locale === 'undefined') {\n stripeElementsOptions.locale = _this2.options.language;\n }\n\n var elements = _this2.stripe.elements(stripeElementsOptions); // Create an instance of the card Element\n\n\n var stripeElementOptions = {};\n\n if (_this2.component.stripe) {\n stripeElementOptions = _this2.component.stripe.stripeElementOptions || {};\n }\n\n _this2.stripeCard = elements.create('card', stripeElementOptions); // Add an instance of the card Element into the `card-element`
\n\n _this2.stripeCard.mount(_this2.stripeElementCard); // Handle real-time validation errors from the card Element.\n\n\n _this2.addEventListener(_this2.stripeCard, 'change', _this2.onElementCardChange.bind(_this2)); // If there is a pay button, then create it and add listener\n\n\n if (_this2.component.stripe.payButton && _this2.component.stripe.payButton.enable) {\n var paymentRequest = _this2.stripe.paymentRequest(_this2.component.stripe.payButton.paymentRequest);\n\n _this2.addEventListener(paymentRequest, 'token', function (result) {\n _this2.authorizeDone(result, true);\n\n result.complete('success');\n });\n\n var stripeOptionsPayButton = {};\n\n if (_this2.component.stripe.payButton) {\n stripeOptionsPayButton = _this2.component.stripe.payButton.stripeOptions || {};\n }\n\n stripeOptionsPayButton.paymentRequest = paymentRequest;\n var paymentRequestElement = elements.create('paymentRequestButton', stripeOptionsPayButton);\n paymentRequest.canMakePayment().then(function (result) {\n if (result) {\n // Display label separator\n _this2.stripeSeparator.style.display = 'block';\n paymentRequestElement.mount(_this2.stripeElementPayButton);\n }\n });\n }\n });\n }\n }]);\n\n return StripeComponent;\n}(_Component2[\"default\"]);\n\nexports[\"default\"] = StripeComponent;\n\nif ((typeof __webpack_require__.g === \"undefined\" ? \"undefined\" : _typeof(__webpack_require__.g)) === 'object' && __webpack_require__.g.Formio && __webpack_require__.g.Formio.registerComponent) {\n __webpack_require__.g.Formio.registerComponent('stripe', StripeComponent);\n}\n\n//# sourceURL=webpack://Formio/./lib/contrib/stripe/stripe/Stripe.js?"); /***/ }), @@ -543,7 +543,7 @@ eval("\n\n__webpack_require__(/*! core-js/modules/es.object.to-string.js */ \"./ /***/ (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\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _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\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.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\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.date.to-string.js */ \"./node_modules/core-js/modules/es.date.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/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\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 _native2 = 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 _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?"); /***/ }), @@ -565,7 +565,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); 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\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\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?"); /***/ }), @@ -576,7 +576,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); 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.array.is-array.js */ \"./node_modules/core-js/modules/es.array.is-array.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.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\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.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?"); /***/ }), @@ -587,7 +587,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\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _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); 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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || 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 : 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\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.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.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.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.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 _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 || 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 : 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?"); /***/ }), @@ -598,7 +598,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _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); return Constructor; }\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get; } 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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || 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 : 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\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.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.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.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.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; } 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 || 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 : 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?"); /***/ }), @@ -609,7 +609,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _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); 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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || 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 : 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\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.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.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.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.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.some.js */ \"./node_modules/core-js/modules/es.array.some.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.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 || 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 : 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?"); /***/ }), @@ -620,7 +620,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _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); 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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || 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 : 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\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.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.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.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.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 _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 || 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 : 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?"); /***/ }), @@ -631,7 +631,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol /***/ (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.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.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\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?"); /***/ }), @@ -639,10 +639,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\");\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?"); /***/ }), @@ -653,7 +653,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\");\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?"); /***/ }), @@ -664,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\"] = 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\");\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?"); /***/ }), @@ -675,7 +675,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\");\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?"); /***/ }), @@ -686,7 +686,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 dropbox = function dropbox(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 = 'dropbox';\n response.size = file.size;\n response.type = file.type;\n response.groupId = groupId;\n response.groupPermissions = groupPermissions;\n response.url = response.path_lower;\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/dropbox\"));\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/dropbox?path_lower=\").concat(file.path_lower).concat(token ? \"&x-jwt-token=\".concat(token) : '');\n return _nativePromiseOnly.default.resolve(file);\n }\n };\n};\n\ndropbox.title = 'Dropbox';\nvar _default = dropbox;\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/providers/storage/dropbox.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\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 dropbox = function dropbox(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 = 'dropbox';\n response.size = file.size;\n response.type = file.type;\n response.groupId = groupId;\n response.groupPermissions = groupPermissions;\n response.url = response.path_lower;\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/dropbox\"));\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/dropbox?path_lower=\").concat(file.path_lower).concat(token ? \"&x-jwt-token=\".concat(token) : '');\n return _nativePromiseOnly[\"default\"].resolve(file);\n }\n };\n};\n\ndropbox.title = 'Dropbox';\nvar _default = dropbox;\nexports[\"default\"] = _default;\n\n//# sourceURL=webpack://Formio/./lib/providers/storage/dropbox.js?"); /***/ }), @@ -697,7 +697,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\");\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?"); /***/ }), @@ -708,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\"] = void 0;\n\nvar _base = _interopRequireDefault(__webpack_require__(/*! ./base64 */ \"./lib/providers/storage/base64.js\"));\n\nvar _dropbox = _interopRequireDefault(__webpack_require__(/*! ./dropbox */ \"./lib/providers/storage/dropbox.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 dropbox: _dropbox.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\");\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 _dropbox = _interopRequireDefault(__webpack_require__(/*! ./dropbox */ \"./lib/providers/storage/dropbox.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 dropbox: _dropbox[\"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?"); /***/ }), @@ -719,7 +719,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\");\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?"); /***/ }), @@ -730,7 +730,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\");\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?"); /***/ }), @@ -741,7 +741,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); 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\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\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.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?"); /***/ }), @@ -752,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\"] = 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.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.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.index-of.js */ \"./node_modules/core-js/modules/es.array.index-of.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?"); /***/ }), @@ -763,7 +763,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\");\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?"); /***/ }), @@ -774,7 +774,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); 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\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\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?"); /***/ }), @@ -805,7 +805,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\");\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?"); /***/ }), @@ -826,7 +826,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\");\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?"); /***/ }), @@ -847,7 +847,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\");\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?"); /***/ }), @@ -868,7 +868,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\");\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?"); /***/ }), @@ -889,7 +889,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\");\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?"); /***/ }), @@ -910,7 +910,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\");\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?"); /***/ }), @@ -931,7 +931,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\");\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?"); /***/ }), @@ -952,7 +952,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\");\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?"); /***/ }), @@ -973,7 +973,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\");\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?"); /***/ }), @@ -994,7 +994,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\");\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?"); /***/ }), @@ -1025,7 +1025,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\");\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?"); /***/ }), @@ -1056,7 +1056,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\");\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?"); /***/ }), @@ -1077,7 +1077,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\");\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?"); /***/ }), @@ -1098,7 +1098,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\");\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?"); /***/ }), @@ -1119,7 +1119,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\");\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?"); /***/ }), @@ -1140,7 +1140,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\");\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?"); /***/ }), @@ -1161,7 +1161,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\");\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?"); /***/ }), @@ -1169,10 +1169,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\");\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?"); /***/ }), @@ -1182,7 +1182,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?"); /***/ }), @@ -1203,7 +1203,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\");\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?"); /***/ }), @@ -1224,7 +1224,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\");\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?"); /***/ }), @@ -1245,7 +1245,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\");\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?"); /***/ }), @@ -1276,7 +1276,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\");\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?"); /***/ }), @@ -1307,7 +1307,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\");\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?"); /***/ }), @@ -1328,7 +1328,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\");\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?"); /***/ }), @@ -1359,7 +1359,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\");\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?"); /***/ }), @@ -1380,7 +1380,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\");\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?"); /***/ }), @@ -1401,7 +1401,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\");\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?"); /***/ }), @@ -1422,7 +1422,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\");\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?"); /***/ }), @@ -1443,7 +1443,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\");\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?"); /***/ }), @@ -1454,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\"] = 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\");\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?"); /***/ }), @@ -1465,7 +1465,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); if (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 = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { 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.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.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.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.object.define-properties.js */ \"./node_modules/core-js/modules/es.object.define-properties.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.date.to-string.js */ \"./node_modules/core-js/modules/es.date.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/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.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?"); /***/ }), @@ -1496,7 +1496,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\");\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?"); /***/ }), @@ -1517,7 +1517,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\");\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?"); /***/ }), @@ -1538,7 +1538,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\");\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?"); /***/ }), @@ -1559,7 +1559,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\");\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?"); /***/ }), @@ -1580,7 +1580,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\");\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?"); /***/ }), @@ -1601,7 +1601,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\");\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?"); /***/ }), @@ -1622,7 +1622,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\");\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?"); /***/ }), @@ -1643,7 +1643,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\");\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?"); /***/ }), @@ -1664,7 +1664,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\");\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?"); /***/ }), @@ -1685,7 +1685,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\");\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?"); /***/ }), @@ -1706,7 +1706,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\");\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?"); /***/ }), @@ -1727,7 +1727,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\");\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?"); /***/ }), @@ -1748,7 +1748,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\");\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?"); /***/ }), @@ -1769,7 +1769,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\");\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?"); /***/ }), @@ -1790,7 +1790,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\");\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?"); /***/ }), @@ -1811,7 +1811,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\");\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?"); /***/ }), @@ -1842,7 +1842,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\");\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?"); /***/ }), @@ -1863,7 +1863,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\");\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?"); /***/ }), @@ -1894,7 +1894,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\");\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?"); /***/ }), @@ -1925,7 +1925,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\");\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?"); /***/ }), @@ -1956,7 +1956,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\");\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?"); /***/ }), @@ -1987,7 +1987,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\");\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?"); /***/ }), @@ -2018,7 +2018,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\");\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?"); /***/ }), @@ -2039,7 +2039,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\");\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?"); /***/ }), @@ -2060,7 +2060,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\");\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?"); /***/ }), @@ -2081,7 +2081,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\");\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?"); /***/ }), @@ -2102,7 +2102,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\");\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?"); /***/ }), @@ -2143,7 +2143,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\");\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?"); /***/ }), @@ -2164,7 +2164,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\");\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?"); /***/ }), @@ -2195,7 +2195,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\");\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?"); /***/ }), @@ -2216,7 +2216,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\");\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?"); /***/ }), @@ -2237,7 +2237,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\");\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?"); /***/ }), @@ -2258,7 +2258,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\");\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?"); /***/ }), @@ -2268,7 +2268,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
  • \\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?"); /***/ }), @@ -2279,7 +2279,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/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\");\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?"); /***/ }), @@ -2290,7 +2290,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 _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\");\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?"); /***/ }), @@ -2298,10 +2298,10 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /*!********************************!*\ !*** ./lib/translations/en.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 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("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\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 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?"); /***/ }), @@ -2312,7 +2312,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.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; } 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 || 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\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _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("\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.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-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.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.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/es.array.is-array.js */ \"./node_modules/core-js/modules/es.array.is-array.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.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; } 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 || 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?"); /***/ }), @@ -2323,7 +2323,7 @@ eval("\n\n__webpack_require__(/*! core-js/modules/es.array.from.js */ \"./node_m /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "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("\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\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\n__webpack_require__(/*! core-js/modules/es.array.index-of.js */ \"./node_modules/core-js/modules/es.array.index-of.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?"); /***/ }), @@ -2334,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.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\");\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.array.is-array.js */ \"./node_modules/core-js/modules/es.array.is-array.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.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.index-of.js */ \"./node_modules/core-js/modules/es.array.index-of.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.parse-float.js */ \"./node_modules/core-js/modules/es.parse-float.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.date.to-string.js */ \"./node_modules/core-js/modules/es.date.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.array.map.js */ \"./node_modules/core-js/modules/es.array.map.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.reverse.js */ \"./node_modules/core-js/modules/es.array.reverse.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', 'tagpad'].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?"); /***/ }), @@ -2342,10 +2342,10 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /*!******************************************!*\ !*** ./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\");\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?"); /***/ }), @@ -2356,7 +2356,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\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _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\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.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.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.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.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.date.to-iso-string.js */ \"./node_modules/core-js/modules/es.date.to-iso-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.index-of.js */ \"./node_modules/core-js/modules/es.array.index-of.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.date.to-string.js */ \"./node_modules/core-js/modules/es.date.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.parse-float.js */ \"./node_modules/core-js/modules/es.parse-float.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.is-array.js */ \"./node_modules/core-js/modules/es.array.is-array.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/web.timers.js */ \"./node_modules/core-js/modules/web.timers.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.parse-int.js */ \"./node_modules/core-js/modules/es.parse-int.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.array.every.js */ \"./node_modules/core-js/modules/es.array.every.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.some.js */ \"./node_modules/core-js/modules/es.array.some.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\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 _char2 = value[i] || '';\n\n var charPart = inputMask[i];\n\n if (!(_lodash[\"default\"].isRegExp(charPart) && charPart.test(_char2) || charPart === _char2)) {\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?"); /***/ }), @@ -2367,7 +2367,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); if (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 = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { 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); 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.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/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.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.object.define-properties.js */ \"./node_modules/core-js/modules/es.object.define-properties.js\");\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports[\"default\"] = void 0;\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.js\");\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?"); /***/ }), @@ -2378,7 +2378,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); 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.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.array.some.js */ \"./node_modules/core-js/modules/es.array.some.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.array.reduce.js */ \"./node_modules/core-js/modules/es.array.reduce.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.date.to-string.js */ \"./node_modules/core-js/modules/es.date.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.is-array.js */ \"./node_modules/core-js/modules/es.array.is-array.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.parse-float.js */ \"./node_modules/core-js/modules/es.parse-float.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.parse-int.js */ \"./node_modules/core-js/modules/es.parse-int.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/es.array.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.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.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.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?"); /***/ }), @@ -2389,7 +2389,7 @@ eval("\n\n__webpack_require__(/*! core-js/modules/es.symbol.js */ \"./node_modul /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _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); 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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || 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 : 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\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.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.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\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.object.create.js */ \"./node_modules/core-js/modules/es.object.create.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.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.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 || 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 : 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?"); /***/ }), @@ -2400,7 +2400,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _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); 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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || 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 : 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\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.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.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\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.create.js */ \"./node_modules/core-js/modules/es.object.create.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.date.to-string.js */ \"./node_modules/core-js/modules/es.date.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/es.regexp.to-string.js */ \"./node_modules/core-js/modules/es.regexp.to-string.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.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 || 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 : 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?"); /***/ }), @@ -2411,7 +2411,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _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); 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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || 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 : 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\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.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.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\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.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n\n__webpack_require__(/*! core-js/modules/es.array.is-array.js */ \"./node_modules/core-js/modules/es.array.is-array.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\n__webpack_require__(/*! core-js/modules/es.parse-int.js */ \"./node_modules/core-js/modules/es.parse-int.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.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 || 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 : 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?"); /***/ }), @@ -2422,7 +2422,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _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); 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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || 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 : 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\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.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.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\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.object.create.js */ \"./node_modules/core-js/modules/es.object.create.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.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.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 || 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 : 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?"); /***/ }), @@ -2433,7 +2433,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _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); 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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || 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 : 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\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.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.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\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.object.create.js */ \"./node_modules/core-js/modules/es.object.create.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.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.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 || 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 : 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?"); /***/ }), @@ -2444,7 +2444,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _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); 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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || 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 : 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\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.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.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\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.object.create.js */ \"./node_modules/core-js/modules/es.object.create.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.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.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 || 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 : 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?"); /***/ }), @@ -2455,7 +2455,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _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); 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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || 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 : 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\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.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.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\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.object.create.js */ \"./node_modules/core-js/modules/es.object.create.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.parse-float.js */ \"./node_modules/core-js/modules/es.parse-float.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.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.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 || 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 : 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?"); /***/ }), @@ -2466,7 +2466,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _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); 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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || 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 : 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\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.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.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\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.object.create.js */ \"./node_modules/core-js/modules/es.object.create.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.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.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 || 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 : 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?"); /***/ }), @@ -2477,7 +2477,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _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); 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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || 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 : 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\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.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.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\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.object.create.js */ \"./node_modules/core-js/modules/es.object.create.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.parse-int.js */ \"./node_modules/core-js/modules/es.parse-int.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.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 || 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 : 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?"); /***/ }), @@ -2488,7 +2488,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _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); 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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || 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 : 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\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.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.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\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.object.create.js */ \"./node_modules/core-js/modules/es.object.create.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.parse-int.js */ \"./node_modules/core-js/modules/es.parse-int.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.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.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 || 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 : 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?"); /***/ }), @@ -2499,7 +2499,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _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); 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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || 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 : 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\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.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.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\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.object.create.js */ \"./node_modules/core-js/modules/es.object.create.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.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.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 || 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 : 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?"); /***/ }), @@ -2510,7 +2510,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _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); 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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || 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 : 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\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.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.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\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.object.create.js */ \"./node_modules/core-js/modules/es.object.create.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.parse-float.js */ \"./node_modules/core-js/modules/es.parse-float.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.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.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 || 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 : 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?"); /***/ }), @@ -2521,7 +2521,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _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); 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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || 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 : 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\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.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.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\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.object.create.js */ \"./node_modules/core-js/modules/es.object.create.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.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.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 || 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 : 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?"); /***/ }), @@ -2532,7 +2532,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _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); 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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || 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 : 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\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.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.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\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.object.create.js */ \"./node_modules/core-js/modules/es.object.create.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.parse-int.js */ \"./node_modules/core-js/modules/es.parse-int.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.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 || 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 : 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?"); /***/ }), @@ -2543,7 +2543,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _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); 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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || 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 : 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\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.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.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\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.object.create.js */ \"./node_modules/core-js/modules/es.object.create.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.parse-int.js */ \"./node_modules/core-js/modules/es.parse-int.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.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.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 || 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 : 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?"); /***/ }), @@ -2554,7 +2554,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _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); 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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || 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 : 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\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.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.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\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.object.create.js */ \"./node_modules/core-js/modules/es.object.create.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.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.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 || 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 : 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?"); /***/ }), @@ -2565,7 +2565,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _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); 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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || 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 : 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\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.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.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\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.object.create.js */ \"./node_modules/core-js/modules/es.object.create.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\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.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 || 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 : 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?"); /***/ }), @@ -2576,7 +2576,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _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); 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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || 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 : 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\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.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.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\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.object.create.js */ \"./node_modules/core-js/modules/es.object.create.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.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.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 || 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 : 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?"); /***/ }), @@ -2584,10 +2584,10 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol /*!*************************************!*\ !*** ./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); 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\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?"); /***/ }), @@ -2598,7 +2598,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\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _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); 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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || 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 : 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\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.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.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\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.create.js */ \"./node_modules/core-js/modules/es.object.create.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\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.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 || 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 : 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?"); /***/ }), @@ -2609,7 +2609,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _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); 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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || 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 : 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\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.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.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\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.object.create.js */ \"./node_modules/core-js/modules/es.object.create.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.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.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 || 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 : 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?"); /***/ }), @@ -2620,7 +2620,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _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); 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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || 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 : 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\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.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.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\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.create.js */ \"./node_modules/core-js/modules/es.object.create.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.date.to-string.js */ \"./node_modules/core-js/modules/es.date.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/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.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 || 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 : 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?"); /***/ }), @@ -2631,7 +2631,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _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); 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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || 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 : 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\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.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.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\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.object.create.js */ \"./node_modules/core-js/modules/es.object.create.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.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.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 || 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 : 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?"); /***/ }), @@ -2653,7 +2653,7 @@ eval("\n\nvar custom = __webpack_require__(/*! ./Custom */ \"./lib/validator/rul /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _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/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.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.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\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 _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); if (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 = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { 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); 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; } 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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || 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 : 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 = 'https://cdn.form.io/';\nvar JSDELIVR_CDN_URL = 'https://cdn.jsdelivr.net';\nvar CDN_FLATPICKR_LOCALE_URL = 'https://cdnjs.cloudflare.com/ajax/libs/flatpickr/4.6.9/l10n';\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 _this.settings.dateFormat = _this.settings.format;\n } else if (_this.settings.time_24hr) {\n _this.settings.format = _this.settings.format.replace(/hh:mm a$/g, 'HH:mm');\n }\n\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 (!(0, _utils.zonesLoaded)() && (0, _utils.shouldLoadZones)(timezone)) {\n (0, _utils.loadZones)(timezone).then(function () {\n return _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).concat(this.flatpickrType, \"/flatpickr.min.css\")\n }], true);\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).concat(_this3.flatpickrType, \"/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_FLATPICKR_LOCALE_URL, \"/\").concat(locale, \".min.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\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 (event) {\n event.stopPropagation();\n\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 });\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 key: \"flatpickrType\",\n get: function get() {\n return 'flatpickr';\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 if (this.isValueISO8601(value)) {\n this.calendar.setDate((0, _moment.default)(value).toDate(), false);\n } else if (value) {\n var zonesLoading = this.loadZones();\n\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.settings.enableTime || _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\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.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.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.for-each.js */ \"./node_modules/core-js/modules/es.array.for-each.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.object.define-properties.js */ \"./node_modules/core-js/modules/es.object.define-properties.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.date.now.js */ \"./node_modules/core-js/modules/es.date.now.js\");\n\n__webpack_require__(/*! core-js/modules/es.date.to-string.js */ \"./node_modules/core-js/modules/es.date.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.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.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\n__webpack_require__(/*! core-js/modules/es.array.is-array.js */ \"./node_modules/core-js/modules/es.array.is-array.js\");\n\n__webpack_require__(/*! core-js/modules/es.function.bind.js */ \"./node_modules/core-js/modules/es.function.bind.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.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 _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; } 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 || 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 : 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 = 'https://cdn.form.io/';\nvar JSDELIVR_CDN_URL = 'https://cdn.jsdelivr.net';\nvar CDN_FLATPICKR_LOCALE_URL = 'https://cdnjs.cloudflare.com/ajax/libs/flatpickr/4.6.9/l10n';\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 _this.settings.dateFormat = _this.settings.format;\n } else if (_this.settings.time_24hr) {\n _this.settings.format = _this.settings.format.replace(/hh:mm a$/g, 'HH:mm');\n }\n\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 (!(0, _utils.zonesLoaded)() && (0, _utils.shouldLoadZones)(timezone)) {\n (0, _utils.loadZones)(timezone).then(function () {\n return _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).concat(this.flatpickrType, \"/flatpickr.min.css\")\n }], true);\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).concat(_this3.flatpickrType, \"/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_FLATPICKR_LOCALE_URL, \"/\").concat(locale, \".min.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\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 (event) {\n event.stopPropagation();\n\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 });\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 key: \"flatpickrType\",\n get: function get() {\n return 'flatpickr';\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 if (this.isValueISO8601(value)) {\n this.calendar.setDate((0, _moment[\"default\"])(value).toDate(), false);\n } else if (value) {\n var zonesLoading = this.loadZones();\n\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.settings.enableTime || _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?"); /***/ }), @@ -2664,7 +2664,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _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 _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); 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 } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || 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 : 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: \"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\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.object.create.js */ \"./node_modules/core-js/modules/es.object.create.js\");\n\n__webpack_require__(/*! core-js/modules/es.object.define-property.js */ \"./node_modules/core-js/modules/es.object.define-property.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.set-prototype-of.js */ \"./node_modules/core-js/modules/es.object.set-prototype-of.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 _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 || 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 : 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: \"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?"); /***/ }), @@ -2675,157 +2675,7 @@ eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol /***/ (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?"); - -/***/ }), - -/***/ "./node_modules/@babel/runtime/helpers/arrayLikeToArray.js": -/*!*****************************************************************!*\ - !*** ./node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***! - \*****************************************************************/ -/***/ (function(module) { - -eval("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++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nmodule.exports = _arrayLikeToArray;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n\n//# sourceURL=webpack://Formio/./node_modules/@babel/runtime/helpers/arrayLikeToArray.js?"); - -/***/ }), - -/***/ "./node_modules/@babel/runtime/helpers/arrayWithHoles.js": -/*!***************************************************************!*\ - !*** ./node_modules/@babel/runtime/helpers/arrayWithHoles.js ***! - \***************************************************************/ -/***/ (function(module) { - -eval("function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nmodule.exports = _arrayWithHoles;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n\n//# sourceURL=webpack://Formio/./node_modules/@babel/runtime/helpers/arrayWithHoles.js?"); - -/***/ }), - -/***/ "./node_modules/@babel/runtime/helpers/assertThisInitialized.js": -/*!**********************************************************************!*\ - !*** ./node_modules/@babel/runtime/helpers/assertThisInitialized.js ***! - \**********************************************************************/ -/***/ (function(module) { - -eval("function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nmodule.exports = _assertThisInitialized;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n\n//# sourceURL=webpack://Formio/./node_modules/@babel/runtime/helpers/assertThisInitialized.js?"); - -/***/ }), - -/***/ "./node_modules/@babel/runtime/helpers/classCallCheck.js": -/*!***************************************************************!*\ - !*** ./node_modules/@babel/runtime/helpers/classCallCheck.js ***! - \***************************************************************/ -/***/ (function(module) { - -eval("function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nmodule.exports = _classCallCheck;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n\n//# sourceURL=webpack://Formio/./node_modules/@babel/runtime/helpers/classCallCheck.js?"); - -/***/ }), - -/***/ "./node_modules/@babel/runtime/helpers/createClass.js": -/*!************************************************************!*\ - !*** ./node_modules/@babel/runtime/helpers/createClass.js ***! - \************************************************************/ -/***/ (function(module) { - -eval("function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nmodule.exports = _createClass;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n\n//# sourceURL=webpack://Formio/./node_modules/@babel/runtime/helpers/createClass.js?"); - -/***/ }), - -/***/ "./node_modules/@babel/runtime/helpers/defineProperty.js": -/*!***************************************************************!*\ - !*** ./node_modules/@babel/runtime/helpers/defineProperty.js ***! - \***************************************************************/ -/***/ (function(module) { - -eval("function _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\nmodule.exports = _defineProperty;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n\n//# sourceURL=webpack://Formio/./node_modules/@babel/runtime/helpers/defineProperty.js?"); - -/***/ }), - -/***/ "./node_modules/@babel/runtime/helpers/getPrototypeOf.js": -/*!***************************************************************!*\ - !*** ./node_modules/@babel/runtime/helpers/getPrototypeOf.js ***! - \***************************************************************/ -/***/ (function(module) { - -eval("function _getPrototypeOf(o) {\n module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n module.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n return _getPrototypeOf(o);\n}\n\nmodule.exports = _getPrototypeOf;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n\n//# sourceURL=webpack://Formio/./node_modules/@babel/runtime/helpers/getPrototypeOf.js?"); - -/***/ }), - -/***/ "./node_modules/@babel/runtime/helpers/inherits.js": -/*!*********************************************************!*\ - !*** ./node_modules/@babel/runtime/helpers/inherits.js ***! - \*********************************************************/ -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -eval("var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ \"./node_modules/@babel/runtime/helpers/setPrototypeOf.js\");\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}\n\nmodule.exports = _inherits;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n\n//# sourceURL=webpack://Formio/./node_modules/@babel/runtime/helpers/inherits.js?"); - -/***/ }), - -/***/ "./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js": -/*!*********************************************************************!*\ - !*** ./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***! - \*********************************************************************/ -/***/ (function(module) { - -eval("function _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nmodule.exports = _iterableToArrayLimit;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n\n//# sourceURL=webpack://Formio/./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js?"); - -/***/ }), - -/***/ "./node_modules/@babel/runtime/helpers/nonIterableRest.js": -/*!****************************************************************!*\ - !*** ./node_modules/@babel/runtime/helpers/nonIterableRest.js ***! - \****************************************************************/ -/***/ (function(module) { - -eval("function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nmodule.exports = _nonIterableRest;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n\n//# sourceURL=webpack://Formio/./node_modules/@babel/runtime/helpers/nonIterableRest.js?"); - -/***/ }), - -/***/ "./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js": -/*!**************************************************************************!*\ - !*** ./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***! - \**************************************************************************/ -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -eval("var _typeof = (__webpack_require__(/*! @babel/runtime/helpers/typeof */ \"./node_modules/@babel/runtime/helpers/typeof.js\")[\"default\"]);\n\nvar assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized.js */ \"./node_modules/@babel/runtime/helpers/assertThisInitialized.js\");\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return assertThisInitialized(self);\n}\n\nmodule.exports = _possibleConstructorReturn;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n\n//# sourceURL=webpack://Formio/./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js?"); - -/***/ }), - -/***/ "./node_modules/@babel/runtime/helpers/setPrototypeOf.js": -/*!***************************************************************!*\ - !*** ./node_modules/@babel/runtime/helpers/setPrototypeOf.js ***! - \***************************************************************/ -/***/ (function(module) { - -eval("function _setPrototypeOf(o, p) {\n module.exports = _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n module.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n return _setPrototypeOf(o, p);\n}\n\nmodule.exports = _setPrototypeOf;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n\n//# sourceURL=webpack://Formio/./node_modules/@babel/runtime/helpers/setPrototypeOf.js?"); - -/***/ }), - -/***/ "./node_modules/@babel/runtime/helpers/slicedToArray.js": -/*!**************************************************************!*\ - !*** ./node_modules/@babel/runtime/helpers/slicedToArray.js ***! - \**************************************************************/ -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -eval("var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ \"./node_modules/@babel/runtime/helpers/arrayWithHoles.js\");\n\nvar iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ \"./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js\");\n\nvar unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ \"./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js\");\n\nvar nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ \"./node_modules/@babel/runtime/helpers/nonIterableRest.js\");\n\nfunction _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}\n\nmodule.exports = _slicedToArray;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n\n//# sourceURL=webpack://Formio/./node_modules/@babel/runtime/helpers/slicedToArray.js?"); - -/***/ }), - -/***/ "./node_modules/@babel/runtime/helpers/typeof.js": -/*!*******************************************************!*\ - !*** ./node_modules/@babel/runtime/helpers/typeof.js ***! - \*******************************************************/ -/***/ (function(module) { - -eval("function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n module.exports = _typeof = function _typeof(obj) {\n return typeof obj;\n };\n\n module.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n } else {\n module.exports = _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n\n module.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n }\n\n return _typeof(obj);\n}\n\nmodule.exports = _typeof;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n\n//# sourceURL=webpack://Formio/./node_modules/@babel/runtime/helpers/typeof.js?"); - -/***/ }), - -/***/ "./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js": -/*!***************************************************************************!*\ - !*** ./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***! - \***************************************************************************/ -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { - -eval("var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ \"./node_modules/@babel/runtime/helpers/arrayLikeToArray.js\");\n\nfunction _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\nmodule.exports = _unsupportedIterableToArray;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n\n//# sourceURL=webpack://Formio/./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.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\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?"); /***/ }), @@ -3046,7 +2896,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?"); /***/ }), @@ -5709,7 +5559,17 @@ eval("var fails = __webpack_require__(/*! ../internals/fails */ \"./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\");\n\nmodule.exports = function (METHOD_NAME, argument) {\n var method = [][METHOD_NAME];\n return !!method && fails(function () {\n // eslint-disable-next-line no-useless-call,no-throw-literal -- required for testing\n method.call(null, argument || function () { throw 1; }, 1);\n });\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/array-method-is-strict.js?"); +eval("\nvar fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\n\nmodule.exports = function (METHOD_NAME, argument) {\n var method = [][METHOD_NAME];\n return !!method && fails(function () {\n // eslint-disable-next-line no-useless-call -- required for testing\n method.call(null, argument || function () { return 1; }, 1);\n });\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/array-method-is-strict.js?"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/array-reduce.js": +/*!********************************************************!*\ + !*** ./node_modules/core-js/internals/array-reduce.js ***! + \********************************************************/ +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +eval("var global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js/internals/global.js\");\nvar aCallable = __webpack_require__(/*! ../internals/a-callable */ \"./node_modules/core-js/internals/a-callable.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\");\nvar lengthOfArrayLike = __webpack_require__(/*! ../internals/length-of-array-like */ \"./node_modules/core-js/internals/length-of-array-like.js\");\n\nvar TypeError = global.TypeError;\n\n// `Array.prototype.{ reduce, reduceRight }` methods implementation\nvar createMethod = function (IS_RIGHT) {\n return function (that, callbackfn, argumentsLength, memo) {\n aCallable(callbackfn);\n var O = toObject(that);\n var self = IndexedObject(O);\n var length = lengthOfArrayLike(O);\n var index = IS_RIGHT ? length - 1 : 0;\n var i = IS_RIGHT ? -1 : 1;\n if (argumentsLength < 2) while (true) {\n if (index in self) {\n memo = self[index];\n index += i;\n break;\n }\n index += i;\n if (IS_RIGHT ? index < 0 : length <= index) {\n throw TypeError('Reduce of empty array with no initial value');\n }\n }\n for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {\n memo = callbackfn(memo, self[index], index, O);\n }\n return memo;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.reduce` method\n // https://tc39.es/ecma262/#sec-array.prototype.reduce\n left: createMethod(false),\n // `Array.prototype.reduceRight` method\n // https://tc39.es/ecma262/#sec-array.prototype.reduceright\n right: createMethod(true)\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/array-reduce.js?"); /***/ }), @@ -5831,7 +5691,7 @@ eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/ \***********************************************************************/ /***/ (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 ownKeys = __webpack_require__(/*! ../internals/own-keys */ \"./node_modules/core-js/internals/own-keys.js\");\nvar getOwnPropertyDescriptorModule = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ \"./node_modules/core-js/internals/object-get-own-property-descriptor.js\");\nvar definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ \"./node_modules/core-js/internals/object-define-property.js\");\n\nmodule.exports = function (target, source) {\n var keys = ownKeys(source);\n var defineProperty = definePropertyModule.f;\n var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n if (!hasOwn(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));\n }\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/copy-constructor-properties.js?"); +eval("var hasOwn = __webpack_require__(/*! ../internals/has-own-property */ \"./node_modules/core-js/internals/has-own-property.js\");\nvar ownKeys = __webpack_require__(/*! ../internals/own-keys */ \"./node_modules/core-js/internals/own-keys.js\");\nvar getOwnPropertyDescriptorModule = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ \"./node_modules/core-js/internals/object-get-own-property-descriptor.js\");\nvar definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ \"./node_modules/core-js/internals/object-define-property.js\");\n\nmodule.exports = function (target, source, exceptions) {\n var keys = ownKeys(source);\n var defineProperty = definePropertyModule.f;\n var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) {\n defineProperty(target, key, getOwnPropertyDescriptor(source, key));\n }\n }\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/copy-constructor-properties.js?"); /***/ }), @@ -5897,6 +5757,17 @@ 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 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 padStart = (__webpack_require__(/*! ../internals/string-pad */ \"./node_modules/core-js/internals/string-pad.js\").start);\n\nvar RangeError = global.RangeError;\nvar abs = Math.abs;\nvar DatePrototype = Date.prototype;\nvar n$DateToISOString = DatePrototype.toISOString;\nvar getTime = 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 n$DateToISOString.call(new Date(-5e13 - 1)) != '0385-07-25T07:06:39.999Z';\n}) || !fails(function () {\n n$DateToISOString.call(new Date(NaN));\n})) ? function toISOString() {\n if (!isFinite(getTime(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} : n$DateToISOString;\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/date-to-iso-string.js?"); + +/***/ }), + /***/ "./node_modules/core-js/internals/define-iterator.js": /*!***********************************************************!*\ !*** ./node_modules/core-js/internals/define-iterator.js ***! @@ -6113,9 +5984,9 @@ eval("var fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules /*!**********************************************************!*\ !*** ./node_modules/core-js/internals/function-apply.js ***! \**********************************************************/ -/***/ (function(module) { +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { -eval("var FunctionPrototype = Function.prototype;\nvar apply = FunctionPrototype.apply;\nvar bind = FunctionPrototype.bind;\nvar call = FunctionPrototype.call;\n\n// eslint-disable-next-line es/no-reflect -- safe\nmodule.exports = typeof Reflect == 'object' && Reflect.apply || (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?"); /***/ }), @@ -6125,7 +5996,17 @@ eval("var FunctionPrototype = Function.prototype;\nvar apply = FunctionPrototype \*****************************************************************/ /***/ (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\");\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 : 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 */ \"./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?"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/function-bind-native.js": +/*!****************************************************************!*\ + !*** ./node_modules/core-js/internals/function-bind-native.js ***! + \****************************************************************/ +/***/ (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 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?"); /***/ }), @@ -6136,7 +6017,7 @@ eval("var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-th /***/ (function(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 aCallable = __webpack_require__(/*! ../internals/a-callable */ \"./node_modules/core-js/internals/a-callable.js\");\nvar isObject = __webpack_require__(/*! ../internals/is-object */ \"./node_modules/core-js/internals/is-object.js\");\nvar hasOwn = __webpack_require__(/*! ../internals/has-own-property */ \"./node_modules/core-js/internals/has-own-property.js\");\nvar arraySlice = __webpack_require__(/*! ../internals/array-slice */ \"./node_modules/core-js/internals/array-slice.js\");\n\nvar Function = global.Function;\nvar concat = uncurryThis([].concat);\nvar join = uncurryThis([].join);\nvar factories = {};\n\nvar construct = function (C, argsLength, args) {\n if (!hasOwn(factories, argsLength)) {\n for (var list = [], i = 0; i < argsLength; i++) list[i] = 'a[' + i + ']';\n factories[argsLength] = Function('C,a', 'return new C(' + join(list, ',') + ')');\n } return factories[argsLength](C, args);\n};\n\n// `Function.prototype.bind` method implementation\n// https://tc39.es/ecma262/#sec-function.prototype.bind\nmodule.exports = Function.bind || function bind(that /* , ...args */) {\n var F = aCallable(this);\n var Prototype = F.prototype;\n var partArgs = arraySlice(arguments, 1);\n var boundFunction = function bound(/* args... */) {\n var args = concat(partArgs, arraySlice(arguments));\n return this instanceof boundFunction ? construct(F, args.length, args) : F.apply(that, args);\n };\n if (isObject(Prototype)) boundFunction.prototype = Prototype;\n return boundFunction;\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/function-bind.js?"); +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 aCallable = __webpack_require__(/*! ../internals/a-callable */ \"./node_modules/core-js/internals/a-callable.js\");\nvar isObject = __webpack_require__(/*! ../internals/is-object */ \"./node_modules/core-js/internals/is-object.js\");\nvar hasOwn = __webpack_require__(/*! ../internals/has-own-property */ \"./node_modules/core-js/internals/has-own-property.js\");\nvar arraySlice = __webpack_require__(/*! ../internals/array-slice */ \"./node_modules/core-js/internals/array-slice.js\");\nvar NATIVE_BIND = __webpack_require__(/*! ../internals/function-bind-native */ \"./node_modules/core-js/internals/function-bind-native.js\");\n\nvar Function = global.Function;\nvar concat = uncurryThis([].concat);\nvar join = uncurryThis([].join);\nvar factories = {};\n\nvar construct = function (C, argsLength, args) {\n if (!hasOwn(factories, argsLength)) {\n for (var list = [], i = 0; i < argsLength; i++) list[i] = 'a[' + i + ']';\n factories[argsLength] = Function('C,a', 'return new C(' + join(list, ',') + ')');\n } return factories[argsLength](C, args);\n};\n\n// `Function.prototype.bind` method implementation\n// https://tc39.es/ecma262/#sec-function.prototype.bind\nmodule.exports = NATIVE_BIND ? Function.bind : function bind(that /* , ...args */) {\n var F = aCallable(this);\n var Prototype = F.prototype;\n var partArgs = arraySlice(arguments, 1);\n var boundFunction = function bound(/* args... */) {\n var args = concat(partArgs, arraySlice(arguments));\n return this instanceof boundFunction ? construct(F, args.length, args) : F.apply(that, args);\n };\n if (isObject(Prototype)) boundFunction.prototype = Prototype;\n return boundFunction;\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/function-bind.js?"); /***/ }), @@ -6144,9 +6025,9 @@ eval("\nvar global = __webpack_require__(/*! ../internals/global */ \"./node_mod /*!*********************************************************!*\ !*** ./node_modules/core-js/internals/function-call.js ***! \*********************************************************/ -/***/ (function(module) { +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { -eval("var call = Function.prototype.call;\n\nmodule.exports = call.bind ? call.bind(call) : function () {\n return call.apply(call, arguments);\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/function-call.js?"); +eval("var NATIVE_BIND = __webpack_require__(/*! ../internals/function-bind-native */ \"./node_modules/core-js/internals/function-bind-native.js\");\n\nvar call = Function.prototype.call;\n\nmodule.exports = NATIVE_BIND ? call.bind(call) : function () {\n return call.apply(call, arguments);\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/function-call.js?"); /***/ }), @@ -6164,9 +6045,9 @@ eval("var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./ /*!*****************************************************************!*\ !*** ./node_modules/core-js/internals/function-uncurry-this.js ***! \*****************************************************************/ -/***/ (function(module) { +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { -eval("var FunctionPrototype = Function.prototype;\nvar bind = FunctionPrototype.bind;\nvar call = FunctionPrototype.call;\nvar callBind = bind && bind.bind(call);\n\nmodule.exports = bind ? function (fn) {\n return fn && callBind(call, 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 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?"); /***/ }), @@ -6276,7 +6157,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// Thank's IE8 for his funny defineProperty\nmodule.exports = !DESCRIPTORS && !fails(function () {\n // eslint-disable-next-line es/no-object-defineproperty -- requied 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?"); /***/ }), @@ -6366,7 +6247,7 @@ eval("// `IsCallable` abstract operation\n// https://tc39.es/ecma262/#sec-iscall \**********************************************************/ /***/ (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 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 classof = __webpack_require__(/*! ../internals/classof */ \"./node_modules/core-js/internals/classof.js\");\nvar getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ \"./node_modules/core-js/internals/get-built-in.js\");\nvar inspectSource = __webpack_require__(/*! ../internals/inspect-source */ \"./node_modules/core-js/internals/inspect-source.js\");\n\nvar noop = function () { /* empty */ };\nvar empty = [];\nvar construct = getBuiltIn('Reflect', 'construct');\nvar constructorRegExp = /^\\s*(?:class|function)\\b/;\nvar exec = uncurryThis(constructorRegExp.exec);\nvar INCORRECT_TO_STRING = !constructorRegExp.exec(noop);\n\nvar isConstructorModern = function (argument) {\n if (!isCallable(argument)) return false;\n try {\n construct(noop, empty, argument);\n return true;\n } catch (error) {\n return false;\n }\n};\n\nvar isConstructorLegacy = function (argument) {\n if (!isCallable(argument)) return false;\n switch (classof(argument)) {\n case 'AsyncFunction':\n case 'GeneratorFunction':\n case 'AsyncGeneratorFunction': return false;\n // we can't check .prototype since constructors produced by .bind haven't it\n } return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));\n};\n\n// `IsConstructor` abstract operation\n// https://tc39.es/ecma262/#sec-isconstructor\nmodule.exports = !construct || fails(function () {\n var called;\n return isConstructorModern(isConstructorModern.call)\n || !isConstructorModern(Object)\n || !isConstructorModern(function () { called = true; })\n || called;\n}) ? isConstructorLegacy : isConstructorModern;\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/is-constructor.js?"); +eval("var 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 isCallable = __webpack_require__(/*! ../internals/is-callable */ \"./node_modules/core-js/internals/is-callable.js\");\nvar classof = __webpack_require__(/*! ../internals/classof */ \"./node_modules/core-js/internals/classof.js\");\nvar getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ \"./node_modules/core-js/internals/get-built-in.js\");\nvar inspectSource = __webpack_require__(/*! ../internals/inspect-source */ \"./node_modules/core-js/internals/inspect-source.js\");\n\nvar noop = function () { /* empty */ };\nvar empty = [];\nvar construct = getBuiltIn('Reflect', 'construct');\nvar constructorRegExp = /^\\s*(?:class|function)\\b/;\nvar exec = uncurryThis(constructorRegExp.exec);\nvar INCORRECT_TO_STRING = !constructorRegExp.exec(noop);\n\nvar isConstructorModern = function isConstructor(argument) {\n if (!isCallable(argument)) return false;\n try {\n construct(noop, empty, argument);\n return true;\n } catch (error) {\n return false;\n }\n};\n\nvar isConstructorLegacy = function isConstructor(argument) {\n if (!isCallable(argument)) return false;\n switch (classof(argument)) {\n case 'AsyncFunction':\n case 'GeneratorFunction':\n case 'AsyncGeneratorFunction': return false;\n }\n try {\n // we can't check .prototype since constructors produced by .bind haven't it\n // `Function#toString` throws on some built-it function in some legacy engines\n // (for example, `DOMQuad` and similar in FF41-)\n return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));\n } catch (error) {\n return true;\n }\n};\n\nisConstructorLegacy.sham = true;\n\n// `IsConstructor` abstract operation\n// https://tc39.es/ecma262/#sec-isconstructor\nmodule.exports = !construct || fails(function () {\n var called;\n return isConstructorModern(isConstructorModern.call)\n || !isConstructorModern(Object)\n || !isConstructorModern(function () { called = true; })\n || called;\n}) ? isConstructorLegacy : isConstructorModern;\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/is-constructor.js?"); /***/ }), @@ -6542,6 +6423,16 @@ eval("var global = __webpack_require__(/*! ../internals/global */ \"./node_modul /***/ }), +/***/ "./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 n$ParseFloat = global.parseFloat;\nvar Symbol = global.Symbol;\nvar ITERATOR = Symbol && Symbol.iterator;\nvar FORCED = 1 / n$ParseFloat(whitespaces + '-0') !== -Infinity\n // MS Edge 18- broken with boxed symbols\n || (ITERATOR && !fails(function () { n$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 = n$ParseFloat(trimmedString);\n return result === 0 && charAt(trimmedString, 0) == '-' ? -0 : result;\n} : n$ParseFloat;\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/number-parse-float.js?"); + +/***/ }), + /***/ "./node_modules/core-js/internals/number-parse-int.js": /*!************************************************************!*\ !*** ./node_modules/core-js/internals/number-parse-int.js ***! @@ -6569,7 +6460,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 defineProperties = __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\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 : defineProperties(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\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?"); /***/ }), @@ -6577,9 +6468,9 @@ eval("/* global ActiveXObject -- old IE, WSH */\nvar anObject = __webpack_requir /*!********************************************************************!*\ !*** ./node_modules/core-js/internals/object-define-properties.js ***! \********************************************************************/ -/***/ (function(module, __unused_webpack_exports, __webpack_require__) { +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { -eval("var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./node_modules/core-js/internals/descriptors.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\nmodule.exports = DESCRIPTORS ? 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?"); /***/ }), @@ -6589,7 +6480,7 @@ eval("var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./ \******************************************************************/ /***/ (function(__unused_webpack_module, 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 IE8_DOM_DEFINE = __webpack_require__(/*! ../internals/ie8-dom-define */ \"./node_modules/core-js/internals/ie8-dom-define.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 = global.TypeError;\n// eslint-disable-next-line es/no-object-defineproperty -- safe\nvar $defineProperty = Object.defineProperty;\n\n// `Object.defineProperty` method\n// https://tc39.es/ecma262/#sec-object.defineproperty\nexports.f = DESCRIPTORS ? $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 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 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 = global.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?"); /***/ }), @@ -6786,6 +6677,16 @@ eval("var anObject = __webpack_require__(/*! ../internals/an-object */ \"./node_ /***/ }), +/***/ "./node_modules/core-js/internals/queue.js": +/*!*************************************************!*\ + !*** ./node_modules/core-js/internals/queue.js ***! + \*************************************************/ +/***/ (function(module) { + +eval("var Queue = function () {\n this.head = null;\n this.tail = null;\n};\n\nQueue.prototype = {\n add: function (item) {\n var entry = { item: item, next: null };\n if (this.head) this.tail.next = entry;\n else this.head = entry;\n this.tail = entry;\n },\n get: function () {\n var entry = this.head;\n if (entry) {\n this.head = entry.next;\n if (this.tail === entry) this.tail = null;\n return entry.item;\n }\n }\n};\n\nmodule.exports = Queue;\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/queue.js?"); + +/***/ }), + /***/ "./node_modules/core-js/internals/redefine-all.js": /*!********************************************************!*\ !*** ./node_modules/core-js/internals/redefine-all.js ***! @@ -6915,7 +6816,7 @@ eval("\nvar getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ \" \*************************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { -eval("var defineProperty = (__webpack_require__(/*! ../internals/object-define-property */ \"./node_modules/core-js/internals/object-define-property.js\").f);\nvar hasOwn = __webpack_require__(/*! ../internals/has-own-property */ \"./node_modules/core-js/internals/has-own-property.js\");\nvar wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js/internals/well-known-symbol.js\");\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n\nmodule.exports = function (it, TAG, STATIC) {\n if (it && !hasOwn(it = STATIC ? it : it.prototype, TO_STRING_TAG)) {\n defineProperty(it, TO_STRING_TAG, { configurable: true, value: TAG });\n }\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/set-to-string-tag.js?"); +eval("var defineProperty = (__webpack_require__(/*! ../internals/object-define-property */ \"./node_modules/core-js/internals/object-define-property.js\").f);\nvar hasOwn = __webpack_require__(/*! ../internals/has-own-property */ \"./node_modules/core-js/internals/has-own-property.js\");\nvar wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js/internals/well-known-symbol.js\");\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n\nmodule.exports = function (target, TAG, STATIC) {\n if (target && !STATIC) target = target.prototype;\n if (target && !hasOwn(target, TO_STRING_TAG)) {\n defineProperty(target, TO_STRING_TAG, { configurable: true, value: TAG });\n }\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/set-to-string-tag.js?"); /***/ }), @@ -6945,7 +6846,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.19.3',\n mode: IS_PURE ? 'pure' : 'global',\n copyright: '© 2021 Denis Pushkarev (zloirock.ru)'\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.21.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.21.1/LICENSE',\n source: 'https://github.com/zloirock/core-js'\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/shared.js?"); /***/ }), @@ -6969,6 +6870,16 @@ eval("var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-th /***/ }), +/***/ "./node_modules/core-js/internals/string-pad.js": +/*!******************************************************!*\ + !*** ./node_modules/core-js/internals/string-pad.js ***! + \******************************************************/ +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +eval("// https://github.com/tc39/proposal-string-pad-start-end\nvar uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ \"./node_modules/core-js/internals/function-uncurry-this.js\");\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 $repeat = __webpack_require__(/*! ../internals/string-repeat */ \"./node_modules/core-js/internals/string-repeat.js\");\nvar requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ \"./node_modules/core-js/internals/require-object-coercible.js\");\n\nvar repeat = uncurryThis($repeat);\nvar stringSlice = uncurryThis(''.slice);\nvar ceil = Math.ceil;\n\n// `String.prototype.{ padStart, padEnd }` methods implementation\nvar createMethod = function (IS_END) {\n return function ($this, maxLength, fillString) {\n var S = toString(requireObjectCoercible($this));\n var intMaxLength = toLength(maxLength);\n var stringLength = S.length;\n var fillStr = fillString === undefined ? ' ' : toString(fillString);\n var fillLen, stringFiller;\n if (intMaxLength <= stringLength || fillStr == '') return S;\n fillLen = intMaxLength - stringLength;\n stringFiller = repeat(fillStr, ceil(fillLen / fillStr.length));\n if (stringFiller.length > fillLen) stringFiller = stringSlice(stringFiller, 0, fillLen);\n return IS_END ? S + stringFiller : stringFiller + S;\n };\n};\n\nmodule.exports = {\n // `String.prototype.padStart` method\n // https://tc39.es/ecma262/#sec-string.prototype.padstart\n start: createMethod(false),\n // `String.prototype.padEnd` method\n // https://tc39.es/ecma262/#sec-string.prototype.padend\n end: createMethod(true)\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/string-pad.js?"); + +/***/ }), + /***/ "./node_modules/core-js/internals/string-repeat.js": /*!*********************************************************!*\ !*** ./node_modules/core-js/internals/string-repeat.js ***! @@ -7006,7 +6917,7 @@ eval("var uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-th \************************************************/ /***/ (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 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(fn) {\n var args = arraySlice(arguments, 1);\n queue[++counter] = function () {\n apply(isCallable(fn) ? fn : Function(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?"); /***/ }), @@ -7140,6 +7051,26 @@ eval("/* eslint-disable es/no-symbol -- required for testing */\nvar NATIVE_SYMB /***/ }), +/***/ "./node_modules/core-js/internals/v8-prototype-define-bug.js": +/*!*******************************************************************!*\ + !*** ./node_modules/core-js/internals/v8-prototype-define-bug.js ***! + \*******************************************************************/ +/***/ (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/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?"); + +/***/ }), + +/***/ "./node_modules/core-js/internals/validate-arguments-length.js": +/*!*********************************************************************!*\ + !*** ./node_modules/core-js/internals/validate-arguments-length.js ***! + \*********************************************************************/ +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +eval("var global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js/internals/global.js\");\n\nvar TypeError = global.TypeError;\n\nmodule.exports = function (passed, required) {\n if (passed < required) throw TypeError('Not enough arguments');\n return passed;\n};\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/internals/validate-arguments-length.js?"); + +/***/ }), + /***/ "./node_modules/core-js/internals/well-known-symbol-wrapped.js": /*!*********************************************************************!*\ !*** ./node_modules/core-js/internals/well-known-symbol-wrapped.js ***! @@ -7181,6 +7112,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 ***! @@ -7214,6 +7156,17 @@ 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 ***! @@ -7235,6 +7188,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 */ \"./node_modules/core-js/internals/function-uncurry-this.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 un$IndexOf = uncurryThis([].indexOf);\n\nvar NEGATIVE_ZERO = !!un$IndexOf && 1 / un$IndexOf([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 ? un$IndexOf(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 ***! @@ -7242,7 +7216,7 @@ eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; -eval("\nvar toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ \"./node_modules/core-js/internals/to-indexed-object.js\");\nvar addToUnscopables = __webpack_require__(/*! ../internals/add-to-unscopables */ \"./node_modules/core-js/internals/add-to-unscopables.js\");\nvar Iterators = __webpack_require__(/*! ../internals/iterators */ \"./node_modules/core-js/internals/iterators.js\");\nvar InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ \"./node_modules/core-js/internals/internal-state.js\");\nvar defineIterator = __webpack_require__(/*! ../internals/define-iterator */ \"./node_modules/core-js/internals/define-iterator.js\");\n\nvar ARRAY_ITERATOR = 'Array Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);\n\n// `Array.prototype.entries` method\n// https://tc39.es/ecma262/#sec-array.prototype.entries\n// `Array.prototype.keys` method\n// https://tc39.es/ecma262/#sec-array.prototype.keys\n// `Array.prototype.values` method\n// https://tc39.es/ecma262/#sec-array.prototype.values\n// `Array.prototype[@@iterator]` method\n// https://tc39.es/ecma262/#sec-array.prototype-@@iterator\n// `CreateArrayIterator` internal method\n// https://tc39.es/ecma262/#sec-createarrayiterator\nmodule.exports = defineIterator(Array, 'Array', function (iterated, kind) {\n setInternalState(this, {\n type: ARRAY_ITERATOR,\n target: toIndexedObject(iterated), // target\n index: 0, // next index\n kind: kind // kind\n });\n// `%ArrayIteratorPrototype%.next` method\n// https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next\n}, function () {\n var state = getInternalState(this);\n var target = state.target;\n var kind = state.kind;\n var index = state.index++;\n if (!target || index >= target.length) {\n state.target = undefined;\n return { value: undefined, done: true };\n }\n if (kind == 'keys') return { value: index, done: false };\n if (kind == 'values') return { value: target[index], done: false };\n return { value: [index, target[index]], done: false };\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values%\n// https://tc39.es/ecma262/#sec-createunmappedargumentsobject\n// https://tc39.es/ecma262/#sec-createmappedargumentsobject\nIterators.Arguments = Iterators.Array;\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/es.array.iterator.js?"); +eval("\nvar toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ \"./node_modules/core-js/internals/to-indexed-object.js\");\nvar addToUnscopables = __webpack_require__(/*! ../internals/add-to-unscopables */ \"./node_modules/core-js/internals/add-to-unscopables.js\");\nvar Iterators = __webpack_require__(/*! ../internals/iterators */ \"./node_modules/core-js/internals/iterators.js\");\nvar InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ \"./node_modules/core-js/internals/internal-state.js\");\nvar defineProperty = (__webpack_require__(/*! ../internals/object-define-property */ \"./node_modules/core-js/internals/object-define-property.js\").f);\nvar defineIterator = __webpack_require__(/*! ../internals/define-iterator */ \"./node_modules/core-js/internals/define-iterator.js\");\nvar IS_PURE = __webpack_require__(/*! ../internals/is-pure */ \"./node_modules/core-js/internals/is-pure.js\");\nvar DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./node_modules/core-js/internals/descriptors.js\");\n\nvar ARRAY_ITERATOR = 'Array Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);\n\n// `Array.prototype.entries` method\n// https://tc39.es/ecma262/#sec-array.prototype.entries\n// `Array.prototype.keys` method\n// https://tc39.es/ecma262/#sec-array.prototype.keys\n// `Array.prototype.values` method\n// https://tc39.es/ecma262/#sec-array.prototype.values\n// `Array.prototype[@@iterator]` method\n// https://tc39.es/ecma262/#sec-array.prototype-@@iterator\n// `CreateArrayIterator` internal method\n// https://tc39.es/ecma262/#sec-createarrayiterator\nmodule.exports = defineIterator(Array, 'Array', function (iterated, kind) {\n setInternalState(this, {\n type: ARRAY_ITERATOR,\n target: toIndexedObject(iterated), // target\n index: 0, // next index\n kind: kind // kind\n });\n// `%ArrayIteratorPrototype%.next` method\n// https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next\n}, function () {\n var state = getInternalState(this);\n var target = state.target;\n var kind = state.kind;\n var index = state.index++;\n if (!target || index >= target.length) {\n state.target = undefined;\n return { value: undefined, done: true };\n }\n if (kind == 'keys') return { value: index, done: false };\n if (kind == 'values') return { value: target[index], done: false };\n return { value: [index, target[index]], done: false };\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values%\n// https://tc39.es/ecma262/#sec-createunmappedargumentsobject\n// https://tc39.es/ecma262/#sec-createmappedargumentsobject\nvar values = Iterators.Arguments = Iterators.Array;\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');\n\n// V8 ~ Chrome 45- bug\nif (!IS_PURE && DESCRIPTORS && values.name !== 'values') try {\n defineProperty(values, 'name', { value: 'values' });\n} catch (error) { /* empty */ }\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/es.array.iterator.js?"); /***/ }), @@ -7268,6 +7242,28 @@ eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/ /***/ }), +/***/ "./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 un$Reverse = 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 un$Reverse(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 ***! @@ -7279,6 +7275,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 ***! @@ -7301,6 +7308,46 @@ 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("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 uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ \"./node_modules/core-js/internals/function-uncurry-this.js\");\n\nvar Date = global.Date;\nvar getTime = 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 getTime(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-string.js": +/*!***********************************************************!*\ + !*** ./node_modules/core-js/modules/es.date.to-string.js ***! + \***********************************************************/ +/***/ (function(__unused_webpack_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 redefine = __webpack_require__(/*! ../internals/redefine */ \"./node_modules/core-js/internals/redefine.js\");\n\nvar DatePrototype = Date.prototype;\nvar INVALID_DATE = 'Invalid Date';\nvar TO_STRING = 'toString';\nvar un$DateToString = uncurryThis(DatePrototype[TO_STRING]);\nvar getTime = 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 redefine(DatePrototype, TO_STRING, function toString() {\n var value = getTime(this);\n // eslint-disable-next-line no-self-compare -- NaN check\n return value === value ? un$DateToString(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("var $ = __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 ***! @@ -7359,7 +7406,7 @@ eval("var $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/co /***/ (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 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 toIntegerOrInfinity = __webpack_require__(/*! ../internals/to-integer-or-infinity */ \"./node_modules/core-js/internals/to-integer-or-infinity.js\");\nvar thisNumberValue = __webpack_require__(/*! ../internals/this-number-value */ \"./node_modules/core-js/internals/this-number-value.js\");\nvar $repeat = __webpack_require__(/*! ../internals/string-repeat */ \"./node_modules/core-js/internals/string-repeat.js\");\nvar fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\n\nvar RangeError = global.RangeError;\nvar String = global.String;\nvar floor = Math.floor;\nvar repeat = uncurryThis($repeat);\nvar stringSlice = uncurryThis(''.slice);\nvar un$ToFixed = uncurryThis(1.0.toFixed);\n\nvar pow = function (x, n, acc) {\n return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc);\n};\n\nvar log = function (x) {\n var n = 0;\n var x2 = x;\n while (x2 >= 4096) {\n n += 12;\n x2 /= 4096;\n }\n while (x2 >= 2) {\n n += 1;\n x2 /= 2;\n } return n;\n};\n\nvar multiply = function (data, n, c) {\n var index = -1;\n var c2 = c;\n while (++index < 6) {\n c2 += n * data[index];\n data[index] = c2 % 1e7;\n c2 = floor(c2 / 1e7);\n }\n};\n\nvar divide = function (data, n) {\n var index = 6;\n var c = 0;\n while (--index >= 0) {\n c += data[index];\n data[index] = floor(c / n);\n c = (c % n) * 1e7;\n }\n};\n\nvar dataToString = function (data) {\n var index = 6;\n var s = '';\n while (--index >= 0) {\n if (s !== '' || index === 0 || data[index] !== 0) {\n var t = String(data[index]);\n s = s === '' ? t : s + repeat('0', 7 - t.length) + t;\n }\n } return s;\n};\n\nvar FORCED = fails(function () {\n return un$ToFixed(0.00008, 3) !== '0.000' ||\n un$ToFixed(0.9, 0) !== '1' ||\n un$ToFixed(1.255, 2) !== '1.25' ||\n un$ToFixed(1000000000000000128.0, 0) !== '1000000000000000128';\n}) || !fails(function () {\n // V8 ~ Android 4.3-\n un$ToFixed({});\n});\n\n// `Number.prototype.toFixed` method\n// https://tc39.es/ecma262/#sec-number.prototype.tofixed\n$({ target: 'Number', proto: true, forced: FORCED }, {\n toFixed: function toFixed(fractionDigits) {\n var number = thisNumberValue(this);\n var fractDigits = toIntegerOrInfinity(fractionDigits);\n var data = [0, 0, 0, 0, 0, 0];\n var sign = '';\n var result = '0';\n var e, z, j, k;\n\n if (fractDigits < 0 || fractDigits > 20) throw RangeError('Incorrect fraction digits');\n // eslint-disable-next-line no-self-compare -- NaN check\n if (number != number) return 'NaN';\n if (number <= -1e21 || number >= 1e21) return String(number);\n if (number < 0) {\n sign = '-';\n number = -number;\n }\n if (number > 1e-21) {\n e = log(number * pow(2, 69, 1)) - 69;\n z = e < 0 ? number * pow(2, -e, 1) : number / pow(2, e, 1);\n z *= 0x10000000000000;\n e = 52 - e;\n if (e > 0) {\n multiply(data, 0, z);\n j = fractDigits;\n while (j >= 7) {\n multiply(data, 1e7, 0);\n j -= 7;\n }\n multiply(data, pow(10, j, 1), 0);\n j = e - 1;\n while (j >= 23) {\n divide(data, 1 << 23);\n j -= 23;\n }\n divide(data, 1 << j);\n multiply(data, 1, 1);\n divide(data, 2);\n result = dataToString(data);\n } else {\n multiply(data, 0, z);\n multiply(data, 1 << -e, 0);\n result = dataToString(data) + repeat('0', fractDigits);\n }\n }\n if (fractDigits > 0) {\n k = result.length;\n result = sign + (k <= fractDigits\n ? '0.' + repeat('0', fractDigits - k) + result\n : stringSlice(result, 0, k - fractDigits) + '.' + stringSlice(result, k - fractDigits));\n } else {\n result = sign + result;\n } return result;\n }\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/es.number.to-fixed.js?"); +eval("\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 uncurryThis = __webpack_require__(/*! ../internals/function-uncurry-this */ \"./node_modules/core-js/internals/function-uncurry-this.js\");\nvar toIntegerOrInfinity = __webpack_require__(/*! ../internals/to-integer-or-infinity */ \"./node_modules/core-js/internals/to-integer-or-infinity.js\");\nvar thisNumberValue = __webpack_require__(/*! ../internals/this-number-value */ \"./node_modules/core-js/internals/this-number-value.js\");\nvar $repeat = __webpack_require__(/*! ../internals/string-repeat */ \"./node_modules/core-js/internals/string-repeat.js\");\nvar fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\n\nvar RangeError = global.RangeError;\nvar String = global.String;\nvar floor = Math.floor;\nvar repeat = uncurryThis($repeat);\nvar stringSlice = uncurryThis(''.slice);\nvar un$ToFixed = uncurryThis(1.0.toFixed);\n\nvar pow = function (x, n, acc) {\n return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc);\n};\n\nvar log = function (x) {\n var n = 0;\n var x2 = x;\n while (x2 >= 4096) {\n n += 12;\n x2 /= 4096;\n }\n while (x2 >= 2) {\n n += 1;\n x2 /= 2;\n } return n;\n};\n\nvar multiply = function (data, n, c) {\n var index = -1;\n var c2 = c;\n while (++index < 6) {\n c2 += n * data[index];\n data[index] = c2 % 1e7;\n c2 = floor(c2 / 1e7);\n }\n};\n\nvar divide = function (data, n) {\n var index = 6;\n var c = 0;\n while (--index >= 0) {\n c += data[index];\n data[index] = floor(c / n);\n c = (c % n) * 1e7;\n }\n};\n\nvar dataToString = function (data) {\n var index = 6;\n var s = '';\n while (--index >= 0) {\n if (s !== '' || index === 0 || data[index] !== 0) {\n var t = String(data[index]);\n s = s === '' ? t : s + repeat('0', 7 - t.length) + t;\n }\n } return s;\n};\n\nvar FORCED = fails(function () {\n return un$ToFixed(0.00008, 3) !== '0.000' ||\n un$ToFixed(0.9, 0) !== '1' ||\n un$ToFixed(1.255, 2) !== '1.25' ||\n un$ToFixed(1000000000000000128.0, 0) !== '1000000000000000128';\n}) || !fails(function () {\n // V8 ~ Android 4.3-\n un$ToFixed({});\n});\n\n// `Number.prototype.toFixed` method\n// https://tc39.es/ecma262/#sec-number.prototype.tofixed\n$({ target: 'Number', proto: true, forced: FORCED }, {\n toFixed: function toFixed(fractionDigits) {\n var number = thisNumberValue(this);\n var fractDigits = toIntegerOrInfinity(fractionDigits);\n var data = [0, 0, 0, 0, 0, 0];\n var sign = '';\n var result = '0';\n var e, z, j, k;\n\n // TODO: ES2018 increased the maximum number of fraction digits to 100, need to improve the implementation\n if (fractDigits < 0 || fractDigits > 20) throw RangeError('Incorrect fraction digits');\n // eslint-disable-next-line no-self-compare -- NaN check\n if (number != number) return 'NaN';\n if (number <= -1e21 || number >= 1e21) return String(number);\n if (number < 0) {\n sign = '-';\n number = -number;\n }\n if (number > 1e-21) {\n e = log(number * pow(2, 69, 1)) - 69;\n z = e < 0 ? number * pow(2, -e, 1) : number / pow(2, e, 1);\n z *= 0x10000000000000;\n e = 52 - e;\n if (e > 0) {\n multiply(data, 0, z);\n j = fractDigits;\n while (j >= 7) {\n multiply(data, 1e7, 0);\n j -= 7;\n }\n multiply(data, pow(10, j, 1), 0);\n j = e - 1;\n while (j >= 23) {\n divide(data, 1 << 23);\n j -= 23;\n }\n divide(data, 1 << j);\n multiply(data, 1, 1);\n divide(data, 2);\n result = dataToString(data);\n } else {\n multiply(data, 0, z);\n multiply(data, 1 << -e, 0);\n result = dataToString(data) + repeat('0', fractDigits);\n }\n }\n if (fractDigits > 0) {\n k = result.length;\n result = sign + (k <= fractDigits\n ? '0.' + repeat('0', fractDigits - k) + result\n : stringSlice(result, 0, k - fractDigits) + '.' + stringSlice(result, k - fractDigits));\n } else {\n result = sign + result;\n } return result;\n }\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/es.number.to-fixed.js?"); /***/ }), @@ -7373,6 +7420,16 @@ eval("var $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/co /***/ }), +/***/ "./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("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 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?"); + +/***/ }), + /***/ "./node_modules/core-js/modules/es.object.define-getter.js": /*!*****************************************************************!*\ !*** ./node_modules/core-js/modules/es.object.define-getter.js ***! @@ -7384,6 +7441,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 ***! @@ -7445,6 +7522,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 ***! @@ -7465,6 +7552,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.finally.js": /*!************************************************************!*\ !*** ./node_modules/core-js/modules/es.promise.finally.js ***! @@ -7472,7 +7579,7 @@ eval("var $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/co /***/ (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 IS_PURE = __webpack_require__(/*! ../internals/is-pure */ \"./node_modules/core-js/internals/is-pure.js\");\nvar NativePromise = __webpack_require__(/*! ../internals/native-promise-constructor */ \"./node_modules/core-js/internals/native-promise-constructor.js\");\nvar fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\nvar getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ \"./node_modules/core-js/internals/get-built-in.js\");\nvar isCallable = __webpack_require__(/*! ../internals/is-callable */ \"./node_modules/core-js/internals/is-callable.js\");\nvar speciesConstructor = __webpack_require__(/*! ../internals/species-constructor */ \"./node_modules/core-js/internals/species-constructor.js\");\nvar promiseResolve = __webpack_require__(/*! ../internals/promise-resolve */ \"./node_modules/core-js/internals/promise-resolve.js\");\nvar redefine = __webpack_require__(/*! ../internals/redefine */ \"./node_modules/core-js/internals/redefine.js\");\n\n// Safari bug https://bugs.webkit.org/show_bug.cgi?id=200829\nvar NON_GENERIC = !!NativePromise && fails(function () {\n NativePromise.prototype['finally'].call({ then: function () { /* empty */ } }, function () { /* empty */ });\n});\n\n// `Promise.prototype.finally` method\n// https://tc39.es/ecma262/#sec-promise.prototype.finally\n$({ target: 'Promise', proto: true, real: true, forced: NON_GENERIC }, {\n 'finally': function (onFinally) {\n var C = speciesConstructor(this, getBuiltIn('Promise'));\n var isFunction = isCallable(onFinally);\n return this.then(\n isFunction ? function (x) {\n return promiseResolve(C, onFinally()).then(function () { return x; });\n } : onFinally,\n isFunction ? function (e) {\n return promiseResolve(C, onFinally()).then(function () { throw e; });\n } : onFinally\n );\n }\n});\n\n// makes sure that native promise-based APIs `Promise#finally` properly works with patched `Promise#then`\nif (!IS_PURE && isCallable(NativePromise)) {\n var method = getBuiltIn('Promise').prototype['finally'];\n if (NativePromise.prototype['finally'] !== method) {\n redefine(NativePromise.prototype, 'finally', method, { unsafe: true });\n }\n}\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/es.promise.finally.js?"); +eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\nvar IS_PURE = __webpack_require__(/*! ../internals/is-pure */ \"./node_modules/core-js/internals/is-pure.js\");\nvar NativePromise = __webpack_require__(/*! ../internals/native-promise-constructor */ \"./node_modules/core-js/internals/native-promise-constructor.js\");\nvar fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\nvar getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ \"./node_modules/core-js/internals/get-built-in.js\");\nvar isCallable = __webpack_require__(/*! ../internals/is-callable */ \"./node_modules/core-js/internals/is-callable.js\");\nvar speciesConstructor = __webpack_require__(/*! ../internals/species-constructor */ \"./node_modules/core-js/internals/species-constructor.js\");\nvar promiseResolve = __webpack_require__(/*! ../internals/promise-resolve */ \"./node_modules/core-js/internals/promise-resolve.js\");\nvar redefine = __webpack_require__(/*! ../internals/redefine */ \"./node_modules/core-js/internals/redefine.js\");\n\n// Safari bug https://bugs.webkit.org/show_bug.cgi?id=200829\nvar NON_GENERIC = !!NativePromise && fails(function () {\n // eslint-disable-next-line unicorn/no-thenable -- required for testing\n NativePromise.prototype['finally'].call({ then: function () { /* empty */ } }, function () { /* empty */ });\n});\n\n// `Promise.prototype.finally` method\n// https://tc39.es/ecma262/#sec-promise.prototype.finally\n$({ target: 'Promise', proto: true, real: true, forced: NON_GENERIC }, {\n 'finally': function (onFinally) {\n var C = speciesConstructor(this, getBuiltIn('Promise'));\n var isFunction = isCallable(onFinally);\n return this.then(\n isFunction ? function (x) {\n return promiseResolve(C, onFinally()).then(function () { return x; });\n } : onFinally,\n isFunction ? function (e) {\n return promiseResolve(C, onFinally()).then(function () { throw e; });\n } : onFinally\n );\n }\n});\n\n// makes sure that native promise-based APIs `Promise#finally` properly works with patched `Promise#then`\nif (!IS_PURE && isCallable(NativePromise)) {\n var method = getBuiltIn('Promise').prototype['finally'];\n if (NativePromise.prototype['finally'] !== method) {\n redefine(NativePromise.prototype, 'finally', method, { unsafe: true });\n }\n}\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/es.promise.finally.js?"); /***/ }), @@ -7483,7 +7590,7 @@ eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/ /***/ (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 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 getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ \"./node_modules/core-js/internals/get-built-in.js\");\nvar call = __webpack_require__(/*! ../internals/function-call */ \"./node_modules/core-js/internals/function-call.js\");\nvar NativePromise = __webpack_require__(/*! ../internals/native-promise-constructor */ \"./node_modules/core-js/internals/native-promise-constructor.js\");\nvar redefine = __webpack_require__(/*! ../internals/redefine */ \"./node_modules/core-js/internals/redefine.js\");\nvar redefineAll = __webpack_require__(/*! ../internals/redefine-all */ \"./node_modules/core-js/internals/redefine-all.js\");\nvar setPrototypeOf = __webpack_require__(/*! ../internals/object-set-prototype-of */ \"./node_modules/core-js/internals/object-set-prototype-of.js\");\nvar setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ \"./node_modules/core-js/internals/set-to-string-tag.js\");\nvar setSpecies = __webpack_require__(/*! ../internals/set-species */ \"./node_modules/core-js/internals/set-species.js\");\nvar aCallable = __webpack_require__(/*! ../internals/a-callable */ \"./node_modules/core-js/internals/a-callable.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 anInstance = __webpack_require__(/*! ../internals/an-instance */ \"./node_modules/core-js/internals/an-instance.js\");\nvar inspectSource = __webpack_require__(/*! ../internals/inspect-source */ \"./node_modules/core-js/internals/inspect-source.js\");\nvar iterate = __webpack_require__(/*! ../internals/iterate */ \"./node_modules/core-js/internals/iterate.js\");\nvar checkCorrectnessOfIteration = __webpack_require__(/*! ../internals/check-correctness-of-iteration */ \"./node_modules/core-js/internals/check-correctness-of-iteration.js\");\nvar speciesConstructor = __webpack_require__(/*! ../internals/species-constructor */ \"./node_modules/core-js/internals/species-constructor.js\");\nvar task = (__webpack_require__(/*! ../internals/task */ \"./node_modules/core-js/internals/task.js\").set);\nvar microtask = __webpack_require__(/*! ../internals/microtask */ \"./node_modules/core-js/internals/microtask.js\");\nvar promiseResolve = __webpack_require__(/*! ../internals/promise-resolve */ \"./node_modules/core-js/internals/promise-resolve.js\");\nvar hostReportErrors = __webpack_require__(/*! ../internals/host-report-errors */ \"./node_modules/core-js/internals/host-report-errors.js\");\nvar newPromiseCapabilityModule = __webpack_require__(/*! ../internals/new-promise-capability */ \"./node_modules/core-js/internals/new-promise-capability.js\");\nvar perform = __webpack_require__(/*! ../internals/perform */ \"./node_modules/core-js/internals/perform.js\");\nvar InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ \"./node_modules/core-js/internals/internal-state.js\");\nvar isForced = __webpack_require__(/*! ../internals/is-forced */ \"./node_modules/core-js/internals/is-forced.js\");\nvar wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js/internals/well-known-symbol.js\");\nvar IS_BROWSER = __webpack_require__(/*! ../internals/engine-is-browser */ \"./node_modules/core-js/internals/engine-is-browser.js\");\nvar IS_NODE = __webpack_require__(/*! ../internals/engine-is-node */ \"./node_modules/core-js/internals/engine-is-node.js\");\nvar V8_VERSION = __webpack_require__(/*! ../internals/engine-v8-version */ \"./node_modules/core-js/internals/engine-v8-version.js\");\n\nvar SPECIES = wellKnownSymbol('species');\nvar PROMISE = 'Promise';\n\nvar getInternalState = InternalStateModule.getterFor(PROMISE);\nvar setInternalState = InternalStateModule.set;\nvar getInternalPromiseState = InternalStateModule.getterFor(PROMISE);\nvar NativePromisePrototype = NativePromise && NativePromise.prototype;\nvar PromiseConstructor = NativePromise;\nvar PromisePrototype = NativePromisePrototype;\nvar TypeError = global.TypeError;\nvar document = global.document;\nvar process = global.process;\nvar newPromiseCapability = newPromiseCapabilityModule.f;\nvar newGenericPromiseCapability = newPromiseCapability;\n\nvar DISPATCH_EVENT = !!(document && document.createEvent && global.dispatchEvent);\nvar NATIVE_REJECTION_EVENT = isCallable(global.PromiseRejectionEvent);\nvar UNHANDLED_REJECTION = 'unhandledrejection';\nvar REJECTION_HANDLED = 'rejectionhandled';\nvar PENDING = 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\nvar HANDLED = 1;\nvar UNHANDLED = 2;\nvar SUBCLASSING = false;\n\nvar Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;\n\nvar FORCED = isForced(PROMISE, function () {\n var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(PromiseConstructor);\n var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(PromiseConstructor);\n // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables\n // https://bugs.chromium.org/p/chromium/issues/detail?id=830565\n // We can't detect it synchronously, so just check versions\n if (!GLOBAL_CORE_JS_PROMISE && V8_VERSION === 66) return true;\n // We need Promise#finally in the pure version for preventing prototype pollution\n if (IS_PURE && !PromisePrototype['finally']) return true;\n // We can't use @@species feature detection in V8 since it causes\n // deoptimization and performance degradation\n // https://github.com/zloirock/core-js/issues/679\n if (V8_VERSION >= 51 && /native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) return false;\n // Detect correctness of subclassing with @@species support\n var promise = new PromiseConstructor(function (resolve) { resolve(1); });\n var FakePromise = function (exec) {\n exec(function () { /* empty */ }, function () { /* empty */ });\n };\n var constructor = promise.constructor = {};\n constructor[SPECIES] = FakePromise;\n SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;\n if (!SUBCLASSING) return true;\n // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test\n return !GLOBAL_CORE_JS_PROMISE && IS_BROWSER && !NATIVE_REJECTION_EVENT;\n});\n\nvar INCORRECT_ITERATION = FORCED || !checkCorrectnessOfIteration(function (iterable) {\n PromiseConstructor.all(iterable)['catch'](function () { /* empty */ });\n});\n\n// helpers\nvar isThenable = function (it) {\n var then;\n return isObject(it) && isCallable(then = it.then) ? then : false;\n};\n\nvar notify = function (state, isReject) {\n if (state.notified) return;\n state.notified = true;\n var chain = state.reactions;\n microtask(function () {\n var value = state.value;\n var ok = state.state == FULFILLED;\n var index = 0;\n // variable length - can't use forEach\n while (chain.length > index) {\n var reaction = chain[index++];\n var handler = ok ? reaction.ok : reaction.fail;\n var resolve = reaction.resolve;\n var reject = reaction.reject;\n var domain = reaction.domain;\n var result, then, exited;\n try {\n if (handler) {\n if (!ok) {\n if (state.rejection === UNHANDLED) onHandleUnhandled(state);\n state.rejection = HANDLED;\n }\n if (handler === true) result = value;\n else {\n if (domain) domain.enter();\n result = handler(value); // can throw\n if (domain) {\n domain.exit();\n exited = true;\n }\n }\n if (result === reaction.promise) {\n reject(TypeError('Promise-chain cycle'));\n } else if (then = isThenable(result)) {\n call(then, result, resolve, reject);\n } else resolve(result);\n } else reject(value);\n } catch (error) {\n if (domain && !exited) domain.exit();\n reject(error);\n }\n }\n state.reactions = [];\n state.notified = false;\n if (isReject && !state.rejection) onUnhandled(state);\n });\n};\n\nvar dispatchEvent = function (name, promise, reason) {\n var event, handler;\n if (DISPATCH_EVENT) {\n event = document.createEvent('Event');\n event.promise = promise;\n event.reason = reason;\n event.initEvent(name, false, true);\n global.dispatchEvent(event);\n } else event = { promise: promise, reason: reason };\n if (!NATIVE_REJECTION_EVENT && (handler = global['on' + name])) handler(event);\n else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);\n};\n\nvar onUnhandled = function (state) {\n call(task, global, function () {\n var promise = state.facade;\n var value = state.value;\n var IS_UNHANDLED = isUnhandled(state);\n var result;\n if (IS_UNHANDLED) {\n result = perform(function () {\n if (IS_NODE) {\n process.emit('unhandledRejection', value, promise);\n } else dispatchEvent(UNHANDLED_REJECTION, promise, value);\n });\n // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should\n state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;\n if (result.error) throw result.value;\n }\n });\n};\n\nvar isUnhandled = function (state) {\n return state.rejection !== HANDLED && !state.parent;\n};\n\nvar onHandleUnhandled = function (state) {\n call(task, global, function () {\n var promise = state.facade;\n if (IS_NODE) {\n process.emit('rejectionHandled', promise);\n } else dispatchEvent(REJECTION_HANDLED, promise, state.value);\n });\n};\n\nvar bind = function (fn, state, unwrap) {\n return function (value) {\n fn(state, value, unwrap);\n };\n};\n\nvar internalReject = function (state, value, unwrap) {\n if (state.done) return;\n state.done = true;\n if (unwrap) state = unwrap;\n state.value = value;\n state.state = REJECTED;\n notify(state, true);\n};\n\nvar internalResolve = function (state, value, unwrap) {\n if (state.done) return;\n state.done = true;\n if (unwrap) state = unwrap;\n try {\n if (state.facade === value) throw TypeError(\"Promise can't be resolved itself\");\n var then = isThenable(value);\n if (then) {\n microtask(function () {\n var wrapper = { done: false };\n try {\n call(then, value,\n bind(internalResolve, wrapper, state),\n bind(internalReject, wrapper, state)\n );\n } catch (error) {\n internalReject(wrapper, error, state);\n }\n });\n } else {\n state.value = value;\n state.state = FULFILLED;\n notify(state, false);\n }\n } catch (error) {\n internalReject({ done: false }, error, state);\n }\n};\n\n// constructor polyfill\nif (FORCED) {\n // 25.4.3.1 Promise(executor)\n PromiseConstructor = function Promise(executor) {\n anInstance(this, PromisePrototype);\n aCallable(executor);\n call(Internal, this);\n var state = getInternalState(this);\n try {\n executor(bind(internalResolve, state), bind(internalReject, state));\n } catch (error) {\n internalReject(state, error);\n }\n };\n PromisePrototype = PromiseConstructor.prototype;\n // eslint-disable-next-line no-unused-vars -- required for `.length`\n Internal = function Promise(executor) {\n setInternalState(this, {\n type: PROMISE,\n done: false,\n notified: false,\n parent: false,\n reactions: [],\n rejection: false,\n state: PENDING,\n value: undefined\n });\n };\n Internal.prototype = redefineAll(PromisePrototype, {\n // `Promise.prototype.then` method\n // https://tc39.es/ecma262/#sec-promise.prototype.then\n then: function then(onFulfilled, onRejected) {\n var state = getInternalPromiseState(this);\n var reactions = state.reactions;\n var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor));\n reaction.ok = isCallable(onFulfilled) ? onFulfilled : true;\n reaction.fail = isCallable(onRejected) && onRejected;\n reaction.domain = IS_NODE ? process.domain : undefined;\n state.parent = true;\n reactions[reactions.length] = reaction;\n if (state.state != PENDING) notify(state, false);\n return reaction.promise;\n },\n // `Promise.prototype.catch` method\n // https://tc39.es/ecma262/#sec-promise.prototype.catch\n 'catch': function (onRejected) {\n return this.then(undefined, onRejected);\n }\n });\n OwnPromiseCapability = function () {\n var promise = new Internal();\n var state = getInternalState(promise);\n this.promise = promise;\n this.resolve = bind(internalResolve, state);\n this.reject = bind(internalReject, state);\n };\n newPromiseCapabilityModule.f = newPromiseCapability = function (C) {\n return C === PromiseConstructor || C === PromiseWrapper\n ? new OwnPromiseCapability(C)\n : newGenericPromiseCapability(C);\n };\n\n if (!IS_PURE && isCallable(NativePromise) && NativePromisePrototype !== Object.prototype) {\n nativeThen = NativePromisePrototype.then;\n\n if (!SUBCLASSING) {\n // make `Promise#then` return a polyfilled `Promise` for native promise-based APIs\n redefine(NativePromisePrototype, 'then', function then(onFulfilled, onRejected) {\n var that = this;\n return new PromiseConstructor(function (resolve, reject) {\n call(nativeThen, that, resolve, reject);\n }).then(onFulfilled, onRejected);\n // https://github.com/zloirock/core-js/issues/640\n }, { unsafe: true });\n\n // makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`\n redefine(NativePromisePrototype, 'catch', PromisePrototype['catch'], { unsafe: true });\n }\n\n // make `.constructor === Promise` work for native promise-based APIs\n try {\n delete NativePromisePrototype.constructor;\n } catch (error) { /* empty */ }\n\n // make `instanceof Promise` work for native promise-based APIs\n if (setPrototypeOf) {\n setPrototypeOf(NativePromisePrototype, PromisePrototype);\n }\n }\n}\n\n$({ global: true, wrap: true, forced: FORCED }, {\n Promise: PromiseConstructor\n});\n\nsetToStringTag(PromiseConstructor, PROMISE, false, true);\nsetSpecies(PROMISE);\n\nPromiseWrapper = getBuiltIn(PROMISE);\n\n// statics\n$({ target: PROMISE, stat: true, forced: FORCED }, {\n // `Promise.reject` method\n // https://tc39.es/ecma262/#sec-promise.reject\n reject: function reject(r) {\n var capability = newPromiseCapability(this);\n call(capability.reject, undefined, r);\n return capability.promise;\n }\n});\n\n$({ target: PROMISE, stat: true, forced: IS_PURE || FORCED }, {\n // `Promise.resolve` method\n // https://tc39.es/ecma262/#sec-promise.resolve\n resolve: function resolve(x) {\n return promiseResolve(IS_PURE && this === PromiseWrapper ? PromiseConstructor : this, x);\n }\n});\n\n$({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {\n // `Promise.all` method\n // https://tc39.es/ecma262/#sec-promise.all\n all: function all(iterable) {\n var C = this;\n var capability = newPromiseCapability(C);\n var resolve = capability.resolve;\n var reject = capability.reject;\n var result = perform(function () {\n var $promiseResolve = aCallable(C.resolve);\n var values = [];\n var counter = 0;\n var remaining = 1;\n iterate(iterable, function (promise) {\n var index = counter++;\n var alreadyCalled = false;\n remaining++;\n call($promiseResolve, C, promise).then(function (value) {\n if (alreadyCalled) return;\n alreadyCalled = true;\n values[index] = value;\n --remaining || resolve(values);\n }, reject);\n });\n --remaining || resolve(values);\n });\n if (result.error) reject(result.value);\n return capability.promise;\n },\n // `Promise.race` method\n // https://tc39.es/ecma262/#sec-promise.race\n race: function race(iterable) {\n var C = this;\n var capability = newPromiseCapability(C);\n var reject = capability.reject;\n var result = perform(function () {\n var $promiseResolve = aCallable(C.resolve);\n iterate(iterable, function (promise) {\n call($promiseResolve, C, promise).then(capability.resolve, reject);\n });\n });\n if (result.error) reject(result.value);\n return capability.promise;\n }\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/es.promise.js?"); +eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/core-js/internals/export.js\");\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 getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ \"./node_modules/core-js/internals/get-built-in.js\");\nvar call = __webpack_require__(/*! ../internals/function-call */ \"./node_modules/core-js/internals/function-call.js\");\nvar NativePromise = __webpack_require__(/*! ../internals/native-promise-constructor */ \"./node_modules/core-js/internals/native-promise-constructor.js\");\nvar redefine = __webpack_require__(/*! ../internals/redefine */ \"./node_modules/core-js/internals/redefine.js\");\nvar redefineAll = __webpack_require__(/*! ../internals/redefine-all */ \"./node_modules/core-js/internals/redefine-all.js\");\nvar setPrototypeOf = __webpack_require__(/*! ../internals/object-set-prototype-of */ \"./node_modules/core-js/internals/object-set-prototype-of.js\");\nvar setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ \"./node_modules/core-js/internals/set-to-string-tag.js\");\nvar setSpecies = __webpack_require__(/*! ../internals/set-species */ \"./node_modules/core-js/internals/set-species.js\");\nvar aCallable = __webpack_require__(/*! ../internals/a-callable */ \"./node_modules/core-js/internals/a-callable.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 anInstance = __webpack_require__(/*! ../internals/an-instance */ \"./node_modules/core-js/internals/an-instance.js\");\nvar inspectSource = __webpack_require__(/*! ../internals/inspect-source */ \"./node_modules/core-js/internals/inspect-source.js\");\nvar iterate = __webpack_require__(/*! ../internals/iterate */ \"./node_modules/core-js/internals/iterate.js\");\nvar checkCorrectnessOfIteration = __webpack_require__(/*! ../internals/check-correctness-of-iteration */ \"./node_modules/core-js/internals/check-correctness-of-iteration.js\");\nvar speciesConstructor = __webpack_require__(/*! ../internals/species-constructor */ \"./node_modules/core-js/internals/species-constructor.js\");\nvar task = (__webpack_require__(/*! ../internals/task */ \"./node_modules/core-js/internals/task.js\").set);\nvar microtask = __webpack_require__(/*! ../internals/microtask */ \"./node_modules/core-js/internals/microtask.js\");\nvar promiseResolve = __webpack_require__(/*! ../internals/promise-resolve */ \"./node_modules/core-js/internals/promise-resolve.js\");\nvar hostReportErrors = __webpack_require__(/*! ../internals/host-report-errors */ \"./node_modules/core-js/internals/host-report-errors.js\");\nvar newPromiseCapabilityModule = __webpack_require__(/*! ../internals/new-promise-capability */ \"./node_modules/core-js/internals/new-promise-capability.js\");\nvar perform = __webpack_require__(/*! ../internals/perform */ \"./node_modules/core-js/internals/perform.js\");\nvar Queue = __webpack_require__(/*! ../internals/queue */ \"./node_modules/core-js/internals/queue.js\");\nvar InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ \"./node_modules/core-js/internals/internal-state.js\");\nvar isForced = __webpack_require__(/*! ../internals/is-forced */ \"./node_modules/core-js/internals/is-forced.js\");\nvar wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js/internals/well-known-symbol.js\");\nvar IS_BROWSER = __webpack_require__(/*! ../internals/engine-is-browser */ \"./node_modules/core-js/internals/engine-is-browser.js\");\nvar IS_NODE = __webpack_require__(/*! ../internals/engine-is-node */ \"./node_modules/core-js/internals/engine-is-node.js\");\nvar V8_VERSION = __webpack_require__(/*! ../internals/engine-v8-version */ \"./node_modules/core-js/internals/engine-v8-version.js\");\n\nvar SPECIES = wellKnownSymbol('species');\nvar PROMISE = 'Promise';\n\nvar getInternalState = InternalStateModule.getterFor(PROMISE);\nvar setInternalState = InternalStateModule.set;\nvar getInternalPromiseState = InternalStateModule.getterFor(PROMISE);\nvar NativePromisePrototype = NativePromise && NativePromise.prototype;\nvar PromiseConstructor = NativePromise;\nvar PromisePrototype = NativePromisePrototype;\nvar TypeError = global.TypeError;\nvar document = global.document;\nvar process = global.process;\nvar newPromiseCapability = newPromiseCapabilityModule.f;\nvar newGenericPromiseCapability = newPromiseCapability;\n\nvar DISPATCH_EVENT = !!(document && document.createEvent && global.dispatchEvent);\nvar NATIVE_REJECTION_EVENT = isCallable(global.PromiseRejectionEvent);\nvar UNHANDLED_REJECTION = 'unhandledrejection';\nvar REJECTION_HANDLED = 'rejectionhandled';\nvar PENDING = 0;\nvar FULFILLED = 1;\nvar REJECTED = 2;\nvar HANDLED = 1;\nvar UNHANDLED = 2;\nvar SUBCLASSING = false;\n\nvar Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;\n\nvar FORCED = isForced(PROMISE, function () {\n var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(PromiseConstructor);\n var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(PromiseConstructor);\n // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables\n // https://bugs.chromium.org/p/chromium/issues/detail?id=830565\n // We can't detect it synchronously, so just check versions\n if (!GLOBAL_CORE_JS_PROMISE && V8_VERSION === 66) return true;\n // We need Promise#finally in the pure version for preventing prototype pollution\n if (IS_PURE && !PromisePrototype['finally']) return true;\n // We can't use @@species feature detection in V8 since it causes\n // deoptimization and performance degradation\n // https://github.com/zloirock/core-js/issues/679\n if (V8_VERSION >= 51 && /native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) return false;\n // Detect correctness of subclassing with @@species support\n var promise = new PromiseConstructor(function (resolve) { resolve(1); });\n var FakePromise = function (exec) {\n exec(function () { /* empty */ }, function () { /* empty */ });\n };\n var constructor = promise.constructor = {};\n constructor[SPECIES] = FakePromise;\n SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;\n if (!SUBCLASSING) return true;\n // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test\n return !GLOBAL_CORE_JS_PROMISE && IS_BROWSER && !NATIVE_REJECTION_EVENT;\n});\n\nvar INCORRECT_ITERATION = FORCED || !checkCorrectnessOfIteration(function (iterable) {\n PromiseConstructor.all(iterable)['catch'](function () { /* empty */ });\n});\n\n// helpers\nvar isThenable = function (it) {\n var then;\n return isObject(it) && isCallable(then = it.then) ? then : false;\n};\n\nvar callReaction = function (reaction, state) {\n var value = state.value;\n var ok = state.state == FULFILLED;\n var handler = ok ? reaction.ok : reaction.fail;\n var resolve = reaction.resolve;\n var reject = reaction.reject;\n var domain = reaction.domain;\n var result, then, exited;\n try {\n if (handler) {\n if (!ok) {\n if (state.rejection === UNHANDLED) onHandleUnhandled(state);\n state.rejection = HANDLED;\n }\n if (handler === true) result = value;\n else {\n if (domain) domain.enter();\n result = handler(value); // can throw\n if (domain) {\n domain.exit();\n exited = true;\n }\n }\n if (result === reaction.promise) {\n reject(TypeError('Promise-chain cycle'));\n } else if (then = isThenable(result)) {\n call(then, result, resolve, reject);\n } else resolve(result);\n } else reject(value);\n } catch (error) {\n if (domain && !exited) domain.exit();\n reject(error);\n }\n};\n\nvar notify = function (state, isReject) {\n if (state.notified) return;\n state.notified = true;\n microtask(function () {\n var reactions = state.reactions;\n var reaction;\n while (reaction = reactions.get()) {\n callReaction(reaction, state);\n }\n state.notified = false;\n if (isReject && !state.rejection) onUnhandled(state);\n });\n};\n\nvar dispatchEvent = function (name, promise, reason) {\n var event, handler;\n if (DISPATCH_EVENT) {\n event = document.createEvent('Event');\n event.promise = promise;\n event.reason = reason;\n event.initEvent(name, false, true);\n global.dispatchEvent(event);\n } else event = { promise: promise, reason: reason };\n if (!NATIVE_REJECTION_EVENT && (handler = global['on' + name])) handler(event);\n else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);\n};\n\nvar onUnhandled = function (state) {\n call(task, global, function () {\n var promise = state.facade;\n var value = state.value;\n var IS_UNHANDLED = isUnhandled(state);\n var result;\n if (IS_UNHANDLED) {\n result = perform(function () {\n if (IS_NODE) {\n process.emit('unhandledRejection', value, promise);\n } else dispatchEvent(UNHANDLED_REJECTION, promise, value);\n });\n // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should\n state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;\n if (result.error) throw result.value;\n }\n });\n};\n\nvar isUnhandled = function (state) {\n return state.rejection !== HANDLED && !state.parent;\n};\n\nvar onHandleUnhandled = function (state) {\n call(task, global, function () {\n var promise = state.facade;\n if (IS_NODE) {\n process.emit('rejectionHandled', promise);\n } else dispatchEvent(REJECTION_HANDLED, promise, state.value);\n });\n};\n\nvar bind = function (fn, state, unwrap) {\n return function (value) {\n fn(state, value, unwrap);\n };\n};\n\nvar internalReject = function (state, value, unwrap) {\n if (state.done) return;\n state.done = true;\n if (unwrap) state = unwrap;\n state.value = value;\n state.state = REJECTED;\n notify(state, true);\n};\n\nvar internalResolve = function (state, value, unwrap) {\n if (state.done) return;\n state.done = true;\n if (unwrap) state = unwrap;\n try {\n if (state.facade === value) throw TypeError(\"Promise can't be resolved itself\");\n var then = isThenable(value);\n if (then) {\n microtask(function () {\n var wrapper = { done: false };\n try {\n call(then, value,\n bind(internalResolve, wrapper, state),\n bind(internalReject, wrapper, state)\n );\n } catch (error) {\n internalReject(wrapper, error, state);\n }\n });\n } else {\n state.value = value;\n state.state = FULFILLED;\n notify(state, false);\n }\n } catch (error) {\n internalReject({ done: false }, error, state);\n }\n};\n\n// constructor polyfill\nif (FORCED) {\n // 25.4.3.1 Promise(executor)\n PromiseConstructor = function Promise(executor) {\n anInstance(this, PromisePrototype);\n aCallable(executor);\n call(Internal, this);\n var state = getInternalState(this);\n try {\n executor(bind(internalResolve, state), bind(internalReject, state));\n } catch (error) {\n internalReject(state, error);\n }\n };\n PromisePrototype = PromiseConstructor.prototype;\n // eslint-disable-next-line no-unused-vars -- required for `.length`\n Internal = function Promise(executor) {\n setInternalState(this, {\n type: PROMISE,\n done: false,\n notified: false,\n parent: false,\n reactions: new Queue(),\n rejection: false,\n state: PENDING,\n value: undefined\n });\n };\n Internal.prototype = redefineAll(PromisePrototype, {\n // `Promise.prototype.then` method\n // https://tc39.es/ecma262/#sec-promise.prototype.then\n // eslint-disable-next-line unicorn/no-thenable -- safe\n then: function then(onFulfilled, onRejected) {\n var state = getInternalPromiseState(this);\n var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor));\n state.parent = true;\n reaction.ok = isCallable(onFulfilled) ? onFulfilled : true;\n reaction.fail = isCallable(onRejected) && onRejected;\n reaction.domain = IS_NODE ? process.domain : undefined;\n if (state.state == PENDING) state.reactions.add(reaction);\n else microtask(function () {\n callReaction(reaction, state);\n });\n return reaction.promise;\n },\n // `Promise.prototype.catch` method\n // https://tc39.es/ecma262/#sec-promise.prototype.catch\n 'catch': function (onRejected) {\n return this.then(undefined, onRejected);\n }\n });\n OwnPromiseCapability = function () {\n var promise = new Internal();\n var state = getInternalState(promise);\n this.promise = promise;\n this.resolve = bind(internalResolve, state);\n this.reject = bind(internalReject, state);\n };\n newPromiseCapabilityModule.f = newPromiseCapability = function (C) {\n return C === PromiseConstructor || C === PromiseWrapper\n ? new OwnPromiseCapability(C)\n : newGenericPromiseCapability(C);\n };\n\n if (!IS_PURE && isCallable(NativePromise) && NativePromisePrototype !== Object.prototype) {\n nativeThen = NativePromisePrototype.then;\n\n if (!SUBCLASSING) {\n // make `Promise#then` return a polyfilled `Promise` for native promise-based APIs\n redefine(NativePromisePrototype, 'then', function then(onFulfilled, onRejected) {\n var that = this;\n return new PromiseConstructor(function (resolve, reject) {\n call(nativeThen, that, resolve, reject);\n }).then(onFulfilled, onRejected);\n // https://github.com/zloirock/core-js/issues/640\n }, { unsafe: true });\n\n // makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`\n redefine(NativePromisePrototype, 'catch', PromisePrototype['catch'], { unsafe: true });\n }\n\n // make `.constructor === Promise` work for native promise-based APIs\n try {\n delete NativePromisePrototype.constructor;\n } catch (error) { /* empty */ }\n\n // make `instanceof Promise` work for native promise-based APIs\n if (setPrototypeOf) {\n setPrototypeOf(NativePromisePrototype, PromisePrototype);\n }\n }\n}\n\n$({ global: true, wrap: true, forced: FORCED }, {\n Promise: PromiseConstructor\n});\n\nsetToStringTag(PromiseConstructor, PROMISE, false, true);\nsetSpecies(PROMISE);\n\nPromiseWrapper = getBuiltIn(PROMISE);\n\n// statics\n$({ target: PROMISE, stat: true, forced: FORCED }, {\n // `Promise.reject` method\n // https://tc39.es/ecma262/#sec-promise.reject\n reject: function reject(r) {\n var capability = newPromiseCapability(this);\n call(capability.reject, undefined, r);\n return capability.promise;\n }\n});\n\n$({ target: PROMISE, stat: true, forced: IS_PURE || FORCED }, {\n // `Promise.resolve` method\n // https://tc39.es/ecma262/#sec-promise.resolve\n resolve: function resolve(x) {\n return promiseResolve(IS_PURE && this === PromiseWrapper ? PromiseConstructor : this, x);\n }\n});\n\n$({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {\n // `Promise.all` method\n // https://tc39.es/ecma262/#sec-promise.all\n all: function all(iterable) {\n var C = this;\n var capability = newPromiseCapability(C);\n var resolve = capability.resolve;\n var reject = capability.reject;\n var result = perform(function () {\n var $promiseResolve = aCallable(C.resolve);\n var values = [];\n var counter = 0;\n var remaining = 1;\n iterate(iterable, function (promise) {\n var index = counter++;\n var alreadyCalled = false;\n remaining++;\n call($promiseResolve, C, promise).then(function (value) {\n if (alreadyCalled) return;\n alreadyCalled = true;\n values[index] = value;\n --remaining || resolve(values);\n }, reject);\n });\n --remaining || resolve(values);\n });\n if (result.error) reject(result.value);\n return capability.promise;\n },\n // `Promise.race` method\n // https://tc39.es/ecma262/#sec-promise.race\n race: function race(iterable) {\n var C = this;\n var capability = newPromiseCapability(C);\n var reject = capability.reject;\n var result = perform(function () {\n var $promiseResolve = aCallable(C.resolve);\n iterate(iterable, function (promise) {\n call($promiseResolve, C, promise).then(capability.resolve, reject);\n });\n });\n if (result.error) reject(result.value);\n return capability.promise;\n }\n});\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/es.promise.js?"); /***/ }), @@ -7675,7 +7782,7 @@ eval("var defineWellKnownSymbol = __webpack_require__(/*! ../internals/define-we /***/ (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 global = __webpack_require__(/*! ../internals/global */ \"./node_modules/core-js/internals/global.js\");\nvar getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ \"./node_modules/core-js/internals/get-built-in.js\");\nvar apply = __webpack_require__(/*! ../internals/function-apply */ \"./node_modules/core-js/internals/function-apply.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 IS_PURE = __webpack_require__(/*! ../internals/is-pure */ \"./node_modules/core-js/internals/is-pure.js\");\nvar DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./node_modules/core-js/internals/descriptors.js\");\nvar NATIVE_SYMBOL = __webpack_require__(/*! ../internals/native-symbol */ \"./node_modules/core-js/internals/native-symbol.js\");\nvar fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\nvar hasOwn = __webpack_require__(/*! ../internals/has-own-property */ \"./node_modules/core-js/internals/has-own-property.js\");\nvar isArray = __webpack_require__(/*! ../internals/is-array */ \"./node_modules/core-js/internals/is-array.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 isPrototypeOf = __webpack_require__(/*! ../internals/object-is-prototype-of */ \"./node_modules/core-js/internals/object-is-prototype-of.js\");\nvar isSymbol = __webpack_require__(/*! ../internals/is-symbol */ \"./node_modules/core-js/internals/is-symbol.js\");\nvar anObject = __webpack_require__(/*! ../internals/an-object */ \"./node_modules/core-js/internals/an-object.js\");\nvar toObject = __webpack_require__(/*! ../internals/to-object */ \"./node_modules/core-js/internals/to-object.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 $toString = __webpack_require__(/*! ../internals/to-string */ \"./node_modules/core-js/internals/to-string.js\");\nvar createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ \"./node_modules/core-js/internals/create-property-descriptor.js\");\nvar nativeObjectCreate = __webpack_require__(/*! ../internals/object-create */ \"./node_modules/core-js/internals/object-create.js\");\nvar objectKeys = __webpack_require__(/*! ../internals/object-keys */ \"./node_modules/core-js/internals/object-keys.js\");\nvar getOwnPropertyNamesModule = __webpack_require__(/*! ../internals/object-get-own-property-names */ \"./node_modules/core-js/internals/object-get-own-property-names.js\");\nvar getOwnPropertyNamesExternal = __webpack_require__(/*! ../internals/object-get-own-property-names-external */ \"./node_modules/core-js/internals/object-get-own-property-names-external.js\");\nvar getOwnPropertySymbolsModule = __webpack_require__(/*! ../internals/object-get-own-property-symbols */ \"./node_modules/core-js/internals/object-get-own-property-symbols.js\");\nvar getOwnPropertyDescriptorModule = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ \"./node_modules/core-js/internals/object-get-own-property-descriptor.js\");\nvar definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ \"./node_modules/core-js/internals/object-define-property.js\");\nvar propertyIsEnumerableModule = __webpack_require__(/*! ../internals/object-property-is-enumerable */ \"./node_modules/core-js/internals/object-property-is-enumerable.js\");\nvar arraySlice = __webpack_require__(/*! ../internals/array-slice */ \"./node_modules/core-js/internals/array-slice.js\");\nvar redefine = __webpack_require__(/*! ../internals/redefine */ \"./node_modules/core-js/internals/redefine.js\");\nvar shared = __webpack_require__(/*! ../internals/shared */ \"./node_modules/core-js/internals/shared.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\");\nvar uid = __webpack_require__(/*! ../internals/uid */ \"./node_modules/core-js/internals/uid.js\");\nvar wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js/internals/well-known-symbol.js\");\nvar wrappedWellKnownSymbolModule = __webpack_require__(/*! ../internals/well-known-symbol-wrapped */ \"./node_modules/core-js/internals/well-known-symbol-wrapped.js\");\nvar defineWellKnownSymbol = __webpack_require__(/*! ../internals/define-well-known-symbol */ \"./node_modules/core-js/internals/define-well-known-symbol.js\");\nvar setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ \"./node_modules/core-js/internals/set-to-string-tag.js\");\nvar InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ \"./node_modules/core-js/internals/internal-state.js\");\nvar $forEach = (__webpack_require__(/*! ../internals/array-iteration */ \"./node_modules/core-js/internals/array-iteration.js\").forEach);\n\nvar HIDDEN = sharedKey('hidden');\nvar SYMBOL = 'Symbol';\nvar PROTOTYPE = 'prototype';\nvar TO_PRIMITIVE = wellKnownSymbol('toPrimitive');\n\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(SYMBOL);\n\nvar ObjectPrototype = Object[PROTOTYPE];\nvar $Symbol = global.Symbol;\nvar SymbolPrototype = $Symbol && $Symbol[PROTOTYPE];\nvar TypeError = global.TypeError;\nvar QObject = global.QObject;\nvar $stringify = getBuiltIn('JSON', 'stringify');\nvar nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\nvar nativeDefineProperty = definePropertyModule.f;\nvar nativeGetOwnPropertyNames = getOwnPropertyNamesExternal.f;\nvar nativePropertyIsEnumerable = propertyIsEnumerableModule.f;\nvar push = uncurryThis([].push);\n\nvar AllSymbols = shared('symbols');\nvar ObjectPrototypeSymbols = shared('op-symbols');\nvar StringToSymbolRegistry = shared('string-to-symbol-registry');\nvar SymbolToStringRegistry = shared('symbol-to-string-registry');\nvar WellKnownSymbolsStore = shared('wks');\n\n// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173\nvar USE_SETTER = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;\n\n// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687\nvar setSymbolDescriptor = DESCRIPTORS && fails(function () {\n return nativeObjectCreate(nativeDefineProperty({}, 'a', {\n get: function () { return nativeDefineProperty(this, 'a', { value: 7 }).a; }\n })).a != 7;\n}) ? function (O, P, Attributes) {\n var ObjectPrototypeDescriptor = nativeGetOwnPropertyDescriptor(ObjectPrototype, P);\n if (ObjectPrototypeDescriptor) delete ObjectPrototype[P];\n nativeDefineProperty(O, P, Attributes);\n if (ObjectPrototypeDescriptor && O !== ObjectPrototype) {\n nativeDefineProperty(ObjectPrototype, P, ObjectPrototypeDescriptor);\n }\n} : nativeDefineProperty;\n\nvar wrap = function (tag, description) {\n var symbol = AllSymbols[tag] = nativeObjectCreate(SymbolPrototype);\n setInternalState(symbol, {\n type: SYMBOL,\n tag: tag,\n description: description\n });\n if (!DESCRIPTORS) symbol.description = description;\n return symbol;\n};\n\nvar $defineProperty = function defineProperty(O, P, Attributes) {\n if (O === ObjectPrototype) $defineProperty(ObjectPrototypeSymbols, P, Attributes);\n anObject(O);\n var key = toPropertyKey(P);\n anObject(Attributes);\n if (hasOwn(AllSymbols, key)) {\n if (!Attributes.enumerable) {\n if (!hasOwn(O, HIDDEN)) nativeDefineProperty(O, HIDDEN, createPropertyDescriptor(1, {}));\n O[HIDDEN][key] = true;\n } else {\n if (hasOwn(O, HIDDEN) && O[HIDDEN][key]) O[HIDDEN][key] = false;\n Attributes = nativeObjectCreate(Attributes, { enumerable: createPropertyDescriptor(0, false) });\n } return setSymbolDescriptor(O, key, Attributes);\n } return nativeDefineProperty(O, key, Attributes);\n};\n\nvar $defineProperties = function defineProperties(O, Properties) {\n anObject(O);\n var properties = toIndexedObject(Properties);\n var keys = objectKeys(properties).concat($getOwnPropertySymbols(properties));\n $forEach(keys, function (key) {\n if (!DESCRIPTORS || call($propertyIsEnumerable, properties, key)) $defineProperty(O, key, properties[key]);\n });\n return O;\n};\n\nvar $create = function create(O, Properties) {\n return Properties === undefined ? nativeObjectCreate(O) : $defineProperties(nativeObjectCreate(O), Properties);\n};\n\nvar $propertyIsEnumerable = function propertyIsEnumerable(V) {\n var P = toPropertyKey(V);\n var enumerable = call(nativePropertyIsEnumerable, this, P);\n if (this === ObjectPrototype && hasOwn(AllSymbols, P) && !hasOwn(ObjectPrototypeSymbols, P)) return false;\n return enumerable || !hasOwn(this, P) || !hasOwn(AllSymbols, P) || hasOwn(this, HIDDEN) && this[HIDDEN][P]\n ? enumerable : true;\n};\n\nvar $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(O, P) {\n var it = toIndexedObject(O);\n var key = toPropertyKey(P);\n if (it === ObjectPrototype && hasOwn(AllSymbols, key) && !hasOwn(ObjectPrototypeSymbols, key)) return;\n var descriptor = nativeGetOwnPropertyDescriptor(it, key);\n if (descriptor && hasOwn(AllSymbols, key) && !(hasOwn(it, HIDDEN) && it[HIDDEN][key])) {\n descriptor.enumerable = true;\n }\n return descriptor;\n};\n\nvar $getOwnPropertyNames = function getOwnPropertyNames(O) {\n var names = nativeGetOwnPropertyNames(toIndexedObject(O));\n var result = [];\n $forEach(names, function (key) {\n if (!hasOwn(AllSymbols, key) && !hasOwn(hiddenKeys, key)) push(result, key);\n });\n return result;\n};\n\nvar $getOwnPropertySymbols = function getOwnPropertySymbols(O) {\n var IS_OBJECT_PROTOTYPE = O === ObjectPrototype;\n var names = nativeGetOwnPropertyNames(IS_OBJECT_PROTOTYPE ? ObjectPrototypeSymbols : toIndexedObject(O));\n var result = [];\n $forEach(names, function (key) {\n if (hasOwn(AllSymbols, key) && (!IS_OBJECT_PROTOTYPE || hasOwn(ObjectPrototype, key))) {\n push(result, AllSymbols[key]);\n }\n });\n return result;\n};\n\n// `Symbol` constructor\n// https://tc39.es/ecma262/#sec-symbol-constructor\nif (!NATIVE_SYMBOL) {\n $Symbol = function Symbol() {\n if (isPrototypeOf(SymbolPrototype, this)) throw TypeError('Symbol is not a constructor');\n var description = !arguments.length || arguments[0] === undefined ? undefined : $toString(arguments[0]);\n var tag = uid(description);\n var setter = function (value) {\n if (this === ObjectPrototype) call(setter, ObjectPrototypeSymbols, value);\n if (hasOwn(this, HIDDEN) && hasOwn(this[HIDDEN], tag)) this[HIDDEN][tag] = false;\n setSymbolDescriptor(this, tag, createPropertyDescriptor(1, value));\n };\n if (DESCRIPTORS && USE_SETTER) setSymbolDescriptor(ObjectPrototype, tag, { configurable: true, set: setter });\n return wrap(tag, description);\n };\n\n SymbolPrototype = $Symbol[PROTOTYPE];\n\n redefine(SymbolPrototype, 'toString', function toString() {\n return getInternalState(this).tag;\n });\n\n redefine($Symbol, 'withoutSetter', function (description) {\n return wrap(uid(description), description);\n });\n\n propertyIsEnumerableModule.f = $propertyIsEnumerable;\n definePropertyModule.f = $defineProperty;\n getOwnPropertyDescriptorModule.f = $getOwnPropertyDescriptor;\n getOwnPropertyNamesModule.f = getOwnPropertyNamesExternal.f = $getOwnPropertyNames;\n getOwnPropertySymbolsModule.f = $getOwnPropertySymbols;\n\n wrappedWellKnownSymbolModule.f = function (name) {\n return wrap(wellKnownSymbol(name), name);\n };\n\n if (DESCRIPTORS) {\n // https://github.com/tc39/proposal-Symbol-description\n nativeDefineProperty(SymbolPrototype, 'description', {\n configurable: true,\n get: function description() {\n return getInternalState(this).description;\n }\n });\n if (!IS_PURE) {\n redefine(ObjectPrototype, 'propertyIsEnumerable', $propertyIsEnumerable, { unsafe: true });\n }\n }\n}\n\n$({ global: true, wrap: true, forced: !NATIVE_SYMBOL, sham: !NATIVE_SYMBOL }, {\n Symbol: $Symbol\n});\n\n$forEach(objectKeys(WellKnownSymbolsStore), function (name) {\n defineWellKnownSymbol(name);\n});\n\n$({ target: SYMBOL, stat: true, forced: !NATIVE_SYMBOL }, {\n // `Symbol.for` method\n // https://tc39.es/ecma262/#sec-symbol.for\n 'for': function (key) {\n var string = $toString(key);\n if (hasOwn(StringToSymbolRegistry, string)) return StringToSymbolRegistry[string];\n var symbol = $Symbol(string);\n StringToSymbolRegistry[string] = symbol;\n SymbolToStringRegistry[symbol] = string;\n return symbol;\n },\n // `Symbol.keyFor` method\n // https://tc39.es/ecma262/#sec-symbol.keyfor\n keyFor: function keyFor(sym) {\n if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol');\n if (hasOwn(SymbolToStringRegistry, sym)) return SymbolToStringRegistry[sym];\n },\n useSetter: function () { USE_SETTER = true; },\n useSimple: function () { USE_SETTER = false; }\n});\n\n$({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL, sham: !DESCRIPTORS }, {\n // `Object.create` method\n // https://tc39.es/ecma262/#sec-object.create\n create: $create,\n // `Object.defineProperty` method\n // https://tc39.es/ecma262/#sec-object.defineproperty\n defineProperty: $defineProperty,\n // `Object.defineProperties` method\n // https://tc39.es/ecma262/#sec-object.defineproperties\n defineProperties: $defineProperties,\n // `Object.getOwnPropertyDescriptor` method\n // https://tc39.es/ecma262/#sec-object.getownpropertydescriptors\n getOwnPropertyDescriptor: $getOwnPropertyDescriptor\n});\n\n$({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL }, {\n // `Object.getOwnPropertyNames` method\n // https://tc39.es/ecma262/#sec-object.getownpropertynames\n getOwnPropertyNames: $getOwnPropertyNames,\n // `Object.getOwnPropertySymbols` method\n // https://tc39.es/ecma262/#sec-object.getownpropertysymbols\n getOwnPropertySymbols: $getOwnPropertySymbols\n});\n\n// Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives\n// https://bugs.chromium.org/p/v8/issues/detail?id=3443\n$({ target: 'Object', stat: true, forced: fails(function () { getOwnPropertySymbolsModule.f(1); }) }, {\n getOwnPropertySymbols: function getOwnPropertySymbols(it) {\n return getOwnPropertySymbolsModule.f(toObject(it));\n }\n});\n\n// `JSON.stringify` method behavior with symbols\n// https://tc39.es/ecma262/#sec-json.stringify\nif ($stringify) {\n var FORCED_JSON_STRINGIFY = !NATIVE_SYMBOL || fails(function () {\n var symbol = $Symbol();\n // MS Edge converts symbol values to JSON as {}\n return $stringify([symbol]) != '[null]'\n // WebKit converts symbol values to JSON as null\n || $stringify({ a: symbol }) != '{}'\n // V8 throws on boxed symbols\n || $stringify(Object(symbol)) != '{}';\n });\n\n $({ target: 'JSON', stat: true, forced: FORCED_JSON_STRINGIFY }, {\n // eslint-disable-next-line no-unused-vars -- required for `.length`\n stringify: function stringify(it, replacer, space) {\n var args = arraySlice(arguments);\n var $replacer = replacer;\n if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined\n if (!isArray(replacer)) replacer = function (key, value) {\n if (isCallable($replacer)) value = call($replacer, this, key, value);\n if (!isSymbol(value)) return value;\n };\n args[1] = replacer;\n return apply($stringify, null, args);\n }\n });\n}\n\n// `Symbol.prototype[@@toPrimitive]` method\n// https://tc39.es/ecma262/#sec-symbol.prototype-@@toprimitive\nif (!SymbolPrototype[TO_PRIMITIVE]) {\n var valueOf = SymbolPrototype.valueOf;\n // eslint-disable-next-line no-unused-vars -- required for .length\n redefine(SymbolPrototype, TO_PRIMITIVE, function (hint) {\n // TODO: improve hint logic\n return call(valueOf, this);\n });\n}\n// `Symbol.prototype[@@toStringTag]` property\n// https://tc39.es/ecma262/#sec-symbol.prototype-@@tostringtag\nsetToStringTag($Symbol, SYMBOL);\n\nhiddenKeys[HIDDEN] = true;\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/es.symbol.js?"); +eval("\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 getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ \"./node_modules/core-js/internals/get-built-in.js\");\nvar apply = __webpack_require__(/*! ../internals/function-apply */ \"./node_modules/core-js/internals/function-apply.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 IS_PURE = __webpack_require__(/*! ../internals/is-pure */ \"./node_modules/core-js/internals/is-pure.js\");\nvar DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ \"./node_modules/core-js/internals/descriptors.js\");\nvar NATIVE_SYMBOL = __webpack_require__(/*! ../internals/native-symbol */ \"./node_modules/core-js/internals/native-symbol.js\");\nvar fails = __webpack_require__(/*! ../internals/fails */ \"./node_modules/core-js/internals/fails.js\");\nvar hasOwn = __webpack_require__(/*! ../internals/has-own-property */ \"./node_modules/core-js/internals/has-own-property.js\");\nvar isArray = __webpack_require__(/*! ../internals/is-array */ \"./node_modules/core-js/internals/is-array.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 isPrototypeOf = __webpack_require__(/*! ../internals/object-is-prototype-of */ \"./node_modules/core-js/internals/object-is-prototype-of.js\");\nvar isSymbol = __webpack_require__(/*! ../internals/is-symbol */ \"./node_modules/core-js/internals/is-symbol.js\");\nvar anObject = __webpack_require__(/*! ../internals/an-object */ \"./node_modules/core-js/internals/an-object.js\");\nvar toObject = __webpack_require__(/*! ../internals/to-object */ \"./node_modules/core-js/internals/to-object.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 $toString = __webpack_require__(/*! ../internals/to-string */ \"./node_modules/core-js/internals/to-string.js\");\nvar createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ \"./node_modules/core-js/internals/create-property-descriptor.js\");\nvar nativeObjectCreate = __webpack_require__(/*! ../internals/object-create */ \"./node_modules/core-js/internals/object-create.js\");\nvar objectKeys = __webpack_require__(/*! ../internals/object-keys */ \"./node_modules/core-js/internals/object-keys.js\");\nvar getOwnPropertyNamesModule = __webpack_require__(/*! ../internals/object-get-own-property-names */ \"./node_modules/core-js/internals/object-get-own-property-names.js\");\nvar getOwnPropertyNamesExternal = __webpack_require__(/*! ../internals/object-get-own-property-names-external */ \"./node_modules/core-js/internals/object-get-own-property-names-external.js\");\nvar getOwnPropertySymbolsModule = __webpack_require__(/*! ../internals/object-get-own-property-symbols */ \"./node_modules/core-js/internals/object-get-own-property-symbols.js\");\nvar getOwnPropertyDescriptorModule = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ \"./node_modules/core-js/internals/object-get-own-property-descriptor.js\");\nvar definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ \"./node_modules/core-js/internals/object-define-property.js\");\nvar definePropertiesModule = __webpack_require__(/*! ../internals/object-define-properties */ \"./node_modules/core-js/internals/object-define-properties.js\");\nvar propertyIsEnumerableModule = __webpack_require__(/*! ../internals/object-property-is-enumerable */ \"./node_modules/core-js/internals/object-property-is-enumerable.js\");\nvar arraySlice = __webpack_require__(/*! ../internals/array-slice */ \"./node_modules/core-js/internals/array-slice.js\");\nvar redefine = __webpack_require__(/*! ../internals/redefine */ \"./node_modules/core-js/internals/redefine.js\");\nvar shared = __webpack_require__(/*! ../internals/shared */ \"./node_modules/core-js/internals/shared.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\");\nvar uid = __webpack_require__(/*! ../internals/uid */ \"./node_modules/core-js/internals/uid.js\");\nvar wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ \"./node_modules/core-js/internals/well-known-symbol.js\");\nvar wrappedWellKnownSymbolModule = __webpack_require__(/*! ../internals/well-known-symbol-wrapped */ \"./node_modules/core-js/internals/well-known-symbol-wrapped.js\");\nvar defineWellKnownSymbol = __webpack_require__(/*! ../internals/define-well-known-symbol */ \"./node_modules/core-js/internals/define-well-known-symbol.js\");\nvar setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ \"./node_modules/core-js/internals/set-to-string-tag.js\");\nvar InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ \"./node_modules/core-js/internals/internal-state.js\");\nvar $forEach = (__webpack_require__(/*! ../internals/array-iteration */ \"./node_modules/core-js/internals/array-iteration.js\").forEach);\n\nvar HIDDEN = sharedKey('hidden');\nvar SYMBOL = 'Symbol';\nvar PROTOTYPE = 'prototype';\nvar TO_PRIMITIVE = wellKnownSymbol('toPrimitive');\n\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(SYMBOL);\n\nvar ObjectPrototype = Object[PROTOTYPE];\nvar $Symbol = global.Symbol;\nvar SymbolPrototype = $Symbol && $Symbol[PROTOTYPE];\nvar TypeError = global.TypeError;\nvar QObject = global.QObject;\nvar $stringify = getBuiltIn('JSON', 'stringify');\nvar nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\nvar nativeDefineProperty = definePropertyModule.f;\nvar nativeGetOwnPropertyNames = getOwnPropertyNamesExternal.f;\nvar nativePropertyIsEnumerable = propertyIsEnumerableModule.f;\nvar push = uncurryThis([].push);\n\nvar AllSymbols = shared('symbols');\nvar ObjectPrototypeSymbols = shared('op-symbols');\nvar StringToSymbolRegistry = shared('string-to-symbol-registry');\nvar SymbolToStringRegistry = shared('symbol-to-string-registry');\nvar WellKnownSymbolsStore = shared('wks');\n\n// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173\nvar USE_SETTER = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;\n\n// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687\nvar setSymbolDescriptor = DESCRIPTORS && fails(function () {\n return nativeObjectCreate(nativeDefineProperty({}, 'a', {\n get: function () { return nativeDefineProperty(this, 'a', { value: 7 }).a; }\n })).a != 7;\n}) ? function (O, P, Attributes) {\n var ObjectPrototypeDescriptor = nativeGetOwnPropertyDescriptor(ObjectPrototype, P);\n if (ObjectPrototypeDescriptor) delete ObjectPrototype[P];\n nativeDefineProperty(O, P, Attributes);\n if (ObjectPrototypeDescriptor && O !== ObjectPrototype) {\n nativeDefineProperty(ObjectPrototype, P, ObjectPrototypeDescriptor);\n }\n} : nativeDefineProperty;\n\nvar wrap = function (tag, description) {\n var symbol = AllSymbols[tag] = nativeObjectCreate(SymbolPrototype);\n setInternalState(symbol, {\n type: SYMBOL,\n tag: tag,\n description: description\n });\n if (!DESCRIPTORS) symbol.description = description;\n return symbol;\n};\n\nvar $defineProperty = function defineProperty(O, P, Attributes) {\n if (O === ObjectPrototype) $defineProperty(ObjectPrototypeSymbols, P, Attributes);\n anObject(O);\n var key = toPropertyKey(P);\n anObject(Attributes);\n if (hasOwn(AllSymbols, key)) {\n if (!Attributes.enumerable) {\n if (!hasOwn(O, HIDDEN)) nativeDefineProperty(O, HIDDEN, createPropertyDescriptor(1, {}));\n O[HIDDEN][key] = true;\n } else {\n if (hasOwn(O, HIDDEN) && O[HIDDEN][key]) O[HIDDEN][key] = false;\n Attributes = nativeObjectCreate(Attributes, { enumerable: createPropertyDescriptor(0, false) });\n } return setSymbolDescriptor(O, key, Attributes);\n } return nativeDefineProperty(O, key, Attributes);\n};\n\nvar $defineProperties = function defineProperties(O, Properties) {\n anObject(O);\n var properties = toIndexedObject(Properties);\n var keys = objectKeys(properties).concat($getOwnPropertySymbols(properties));\n $forEach(keys, function (key) {\n if (!DESCRIPTORS || call($propertyIsEnumerable, properties, key)) $defineProperty(O, key, properties[key]);\n });\n return O;\n};\n\nvar $create = function create(O, Properties) {\n return Properties === undefined ? nativeObjectCreate(O) : $defineProperties(nativeObjectCreate(O), Properties);\n};\n\nvar $propertyIsEnumerable = function propertyIsEnumerable(V) {\n var P = toPropertyKey(V);\n var enumerable = call(nativePropertyIsEnumerable, this, P);\n if (this === ObjectPrototype && hasOwn(AllSymbols, P) && !hasOwn(ObjectPrototypeSymbols, P)) return false;\n return enumerable || !hasOwn(this, P) || !hasOwn(AllSymbols, P) || hasOwn(this, HIDDEN) && this[HIDDEN][P]\n ? enumerable : true;\n};\n\nvar $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(O, P) {\n var it = toIndexedObject(O);\n var key = toPropertyKey(P);\n if (it === ObjectPrototype && hasOwn(AllSymbols, key) && !hasOwn(ObjectPrototypeSymbols, key)) return;\n var descriptor = nativeGetOwnPropertyDescriptor(it, key);\n if (descriptor && hasOwn(AllSymbols, key) && !(hasOwn(it, HIDDEN) && it[HIDDEN][key])) {\n descriptor.enumerable = true;\n }\n return descriptor;\n};\n\nvar $getOwnPropertyNames = function getOwnPropertyNames(O) {\n var names = nativeGetOwnPropertyNames(toIndexedObject(O));\n var result = [];\n $forEach(names, function (key) {\n if (!hasOwn(AllSymbols, key) && !hasOwn(hiddenKeys, key)) push(result, key);\n });\n return result;\n};\n\nvar $getOwnPropertySymbols = function getOwnPropertySymbols(O) {\n var IS_OBJECT_PROTOTYPE = O === ObjectPrototype;\n var names = nativeGetOwnPropertyNames(IS_OBJECT_PROTOTYPE ? ObjectPrototypeSymbols : toIndexedObject(O));\n var result = [];\n $forEach(names, function (key) {\n if (hasOwn(AllSymbols, key) && (!IS_OBJECT_PROTOTYPE || hasOwn(ObjectPrototype, key))) {\n push(result, AllSymbols[key]);\n }\n });\n return result;\n};\n\n// `Symbol` constructor\n// https://tc39.es/ecma262/#sec-symbol-constructor\nif (!NATIVE_SYMBOL) {\n $Symbol = function Symbol() {\n if (isPrototypeOf(SymbolPrototype, this)) throw TypeError('Symbol is not a constructor');\n var description = !arguments.length || arguments[0] === undefined ? undefined : $toString(arguments[0]);\n var tag = uid(description);\n var setter = function (value) {\n if (this === ObjectPrototype) call(setter, ObjectPrototypeSymbols, value);\n if (hasOwn(this, HIDDEN) && hasOwn(this[HIDDEN], tag)) this[HIDDEN][tag] = false;\n setSymbolDescriptor(this, tag, createPropertyDescriptor(1, value));\n };\n if (DESCRIPTORS && USE_SETTER) setSymbolDescriptor(ObjectPrototype, tag, { configurable: true, set: setter });\n return wrap(tag, description);\n };\n\n SymbolPrototype = $Symbol[PROTOTYPE];\n\n redefine(SymbolPrototype, 'toString', function toString() {\n return getInternalState(this).tag;\n });\n\n redefine($Symbol, 'withoutSetter', function (description) {\n return wrap(uid(description), description);\n });\n\n propertyIsEnumerableModule.f = $propertyIsEnumerable;\n definePropertyModule.f = $defineProperty;\n definePropertiesModule.f = $defineProperties;\n getOwnPropertyDescriptorModule.f = $getOwnPropertyDescriptor;\n getOwnPropertyNamesModule.f = getOwnPropertyNamesExternal.f = $getOwnPropertyNames;\n getOwnPropertySymbolsModule.f = $getOwnPropertySymbols;\n\n wrappedWellKnownSymbolModule.f = function (name) {\n return wrap(wellKnownSymbol(name), name);\n };\n\n if (DESCRIPTORS) {\n // https://github.com/tc39/proposal-Symbol-description\n nativeDefineProperty(SymbolPrototype, 'description', {\n configurable: true,\n get: function description() {\n return getInternalState(this).description;\n }\n });\n if (!IS_PURE) {\n redefine(ObjectPrototype, 'propertyIsEnumerable', $propertyIsEnumerable, { unsafe: true });\n }\n }\n}\n\n$({ global: true, wrap: true, forced: !NATIVE_SYMBOL, sham: !NATIVE_SYMBOL }, {\n Symbol: $Symbol\n});\n\n$forEach(objectKeys(WellKnownSymbolsStore), function (name) {\n defineWellKnownSymbol(name);\n});\n\n$({ target: SYMBOL, stat: true, forced: !NATIVE_SYMBOL }, {\n // `Symbol.for` method\n // https://tc39.es/ecma262/#sec-symbol.for\n 'for': function (key) {\n var string = $toString(key);\n if (hasOwn(StringToSymbolRegistry, string)) return StringToSymbolRegistry[string];\n var symbol = $Symbol(string);\n StringToSymbolRegistry[string] = symbol;\n SymbolToStringRegistry[symbol] = string;\n return symbol;\n },\n // `Symbol.keyFor` method\n // https://tc39.es/ecma262/#sec-symbol.keyfor\n keyFor: function keyFor(sym) {\n if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol');\n if (hasOwn(SymbolToStringRegistry, sym)) return SymbolToStringRegistry[sym];\n },\n useSetter: function () { USE_SETTER = true; },\n useSimple: function () { USE_SETTER = false; }\n});\n\n$({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL, sham: !DESCRIPTORS }, {\n // `Object.create` method\n // https://tc39.es/ecma262/#sec-object.create\n create: $create,\n // `Object.defineProperty` method\n // https://tc39.es/ecma262/#sec-object.defineproperty\n defineProperty: $defineProperty,\n // `Object.defineProperties` method\n // https://tc39.es/ecma262/#sec-object.defineproperties\n defineProperties: $defineProperties,\n // `Object.getOwnPropertyDescriptor` method\n // https://tc39.es/ecma262/#sec-object.getownpropertydescriptors\n getOwnPropertyDescriptor: $getOwnPropertyDescriptor\n});\n\n$({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL }, {\n // `Object.getOwnPropertyNames` method\n // https://tc39.es/ecma262/#sec-object.getownpropertynames\n getOwnPropertyNames: $getOwnPropertyNames,\n // `Object.getOwnPropertySymbols` method\n // https://tc39.es/ecma262/#sec-object.getownpropertysymbols\n getOwnPropertySymbols: $getOwnPropertySymbols\n});\n\n// Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives\n// https://bugs.chromium.org/p/v8/issues/detail?id=3443\n$({ target: 'Object', stat: true, forced: fails(function () { getOwnPropertySymbolsModule.f(1); }) }, {\n getOwnPropertySymbols: function getOwnPropertySymbols(it) {\n return getOwnPropertySymbolsModule.f(toObject(it));\n }\n});\n\n// `JSON.stringify` method behavior with symbols\n// https://tc39.es/ecma262/#sec-json.stringify\nif ($stringify) {\n var FORCED_JSON_STRINGIFY = !NATIVE_SYMBOL || fails(function () {\n var symbol = $Symbol();\n // MS Edge converts symbol values to JSON as {}\n return $stringify([symbol]) != '[null]'\n // WebKit converts symbol values to JSON as null\n || $stringify({ a: symbol }) != '{}'\n // V8 throws on boxed symbols\n || $stringify(Object(symbol)) != '{}';\n });\n\n $({ target: 'JSON', stat: true, forced: FORCED_JSON_STRINGIFY }, {\n // eslint-disable-next-line no-unused-vars -- required for `.length`\n stringify: function stringify(it, replacer, space) {\n var args = arraySlice(arguments);\n var $replacer = replacer;\n if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined\n if (!isArray(replacer)) replacer = function (key, value) {\n if (isCallable($replacer)) value = call($replacer, this, key, value);\n if (!isSymbol(value)) return value;\n };\n args[1] = replacer;\n return apply($stringify, null, args);\n }\n });\n}\n\n// `Symbol.prototype[@@toPrimitive]` method\n// https://tc39.es/ecma262/#sec-symbol.prototype-@@toprimitive\nif (!SymbolPrototype[TO_PRIMITIVE]) {\n var valueOf = SymbolPrototype.valueOf;\n // eslint-disable-next-line no-unused-vars -- required for .length\n redefine(SymbolPrototype, TO_PRIMITIVE, function (hint) {\n // TODO: improve hint logic\n return call(valueOf, this);\n });\n}\n// `Symbol.prototype[@@toStringTag]` property\n// https://tc39.es/ecma262/#sec-symbol.prototype-@@tostringtag\nsetToStringTag($Symbol, SYMBOL);\n\nhiddenKeys[HIDDEN] = true;\n\n\n//# sourceURL=webpack://Formio/./node_modules/core-js/modules/es.symbol.js?"); /***/ }), @@ -7686,7 +7793,7 @@ eval("\nvar $ = __webpack_require__(/*! ../internals/export */ \"./node_modules/ /***/ (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 redefineAll = __webpack_require__(/*! ../internals/redefine-all */ \"./node_modules/core-js/internals/redefine-all.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 enforceIternalState = (__webpack_require__(/*! ../internals/internal-state */ \"./node_modules/core-js/internals/internal-state.js\").enforce);\nvar NATIVE_WEAK_MAP = __webpack_require__(/*! ../internals/native-weak-map */ \"./node_modules/core-js/internals/native-weak-map.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 redefineAll(WeakMapPrototype, {\n 'delete': function (key) {\n if (isObject(key) && !isExtensible(key)) {\n var state = enforceIternalState(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 = enforceIternalState(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 = enforceIternalState(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 = enforceIternalState(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.js?"); +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 redefineAll = __webpack_require__(/*! ../internals/redefine-all */ \"./node_modules/core-js/internals/redefine-all.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/native-weak-map */ \"./node_modules/core-js/internals/native-weak-map.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 redefineAll(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.js?"); /***/ }), @@ -7710,6 +7817,16 @@ eval("var global = __webpack_require__(/*! ../internals/global */ \"./node_modul /***/ }), +/***/ "./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("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 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 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 };\n};\n\n// ie9- setTimeout & setInterval additional parameters fix\n// https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#timers\n$({ global: true, bind: true, forced: MSIE }, {\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/modules/web.timers.js?"); + +/***/ }), + /***/ "./node_modules/custom-event-polyfill/polyfill.js": /*!********************************************************!*\ !*** ./node_modules/custom-event-polyfill/polyfill.js ***! @@ -7726,7 +7843,7 @@ eval("// Polyfill for creating CustomEvents on IE9/10/11\n\n// code pulled from: \***********************************************/ /***/ (function(module) { -eval("/*! @license DOMPurify 2.3.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.3.4/LICENSE */\n\n(function (global, factory) {\n true ? module.exports = factory() :\n 0;\n}(this, function () { 'use strict';\n\n function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\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 new (Function.prototype.bind.apply(Func, [null].concat(_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\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\n var regExpTest = unapply(RegExp.prototype.test);\n\n var typeErrorCreate = unconstruct(TypeError);\n\n function unapply(func) {\n return function (thisArg) {\n for (var _len = arguments.length, args = 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\n function unconstruct(func) {\n return function () {\n for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return construct(func, args);\n };\n }\n\n /* Add properties to a lookup table */\n function addToSet(set, array) {\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 while (l--) {\n var element = array[l];\n if (typeof element === 'string') {\n var lcElement = stringToLowerCase(element);\n if (lcElement !== element) {\n // Config presets (e.g. tags.js, attrs.js) are immutable.\n if (!isFrozen(array)) {\n array[l] = lcElement;\n }\n\n element = lcElement;\n }\n }\n\n set[element] = true;\n }\n\n return set;\n }\n\n /* Shallow clone an object */\n function clone(object) {\n var newObject = create(null);\n\n var property = void 0;\n for (property in object) {\n if (apply(hasOwnProperty, object, [property])) {\n newObject[property] = object[property];\n }\n }\n\n return newObject;\n }\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 function lookupGetter(object, prop) {\n while (object !== null) {\n var desc = getOwnPropertyDescriptor(object, prop);\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 = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'section', 'select', 'shadow', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']);\n\n // SVG\n var svg = 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\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']);\n\n // List of SVG elements that are disallowed by default.\n // We still need to know them so that we can do namespace\n // checks properly in case one wants to add them to\n // allow-list.\n 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\n var mathMl = 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']);\n\n // Similarly to SVG, we want to know all MathML elements,\n // even those that we disallow by default.\n var mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']);\n\n var text = freeze(['#text']);\n\n var html$1 = 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\n var svg$1 = 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', '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\n var mathMl$1 = 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\n var xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);\n\n // eslint-disable-next-line unicorn/better-regex\n var MUSTACHE_EXPR = seal(/\\{\\{[\\s\\S]*|[\\s\\S]*\\}\\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode\n var ERB_EXPR = seal(/<%[\\s\\S]*|[\\s\\S]*%>/gm);\n var DATA_ATTR = seal(/^data-[\\-\\w.\\u00B7-\\uFFFF]/); // eslint-disable-line no-useless-escape\n var ARIA_ATTR = seal(/^aria-[\\-\\w]+$/); // eslint-disable-line no-useless-escape\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\n var _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n function _toConsumableArray$1(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }\n\n var getGlobal = function getGlobal() {\n return typeof window === 'undefined' ? null : window;\n };\n\n /**\n * Creates a no-op policy for internal use only.\n * Don't export this function outside this module!\n * @param {?TrustedTypePolicyFactory} trustedTypes The policy factory.\n * @param {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 var _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, document) {\n if ((typeof trustedTypes === 'undefined' ? 'undefined' : _typeof(trustedTypes)) !== 'object' || typeof trustedTypes.createPolicy !== 'function') {\n return null;\n }\n\n // Allow the callers to control the unique policy name\n // by adding a data-tt-policy-suffix to the script element with the DOMPurify.\n // Policy creation with duplicate names throws in Trusted Types.\n var suffix = null;\n var ATTR_NAME = 'data-tt-policy-suffix';\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$$1) {\n return html$$1;\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 /**\n * Version label, exposed for easier checks\n * if DOMPurify is up to date or not\n */\n DOMPurify.version = '2.3.4';\n\n /**\n * Array of elements that DOMPurify removed during sanitation.\n * Empty if nothing was removed.\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\n return DOMPurify;\n }\n\n var originalDocument = window.document;\n\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 === undefined ? window.NamedNodeMap || window.MozNamedAttrMap : _window$NamedNodeMap,\n HTMLFormElement = window.HTMLFormElement,\n DOMParser = window.DOMParser,\n trustedTypes = window.trustedTypes;\n\n\n var ElementPrototype = Element.prototype;\n\n var cloneNode = lookupGetter(ElementPrototype, 'cloneNode');\n var getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');\n var getChildNodes = lookupGetter(ElementPrototype, 'childNodes');\n var getParentNode = lookupGetter(ElementPrototype, 'parentNode');\n\n // As per issue #47, the web-components registry is inherited by a\n // new document created via createHTMLDocument. As per the spec\n // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)\n // a new empty registry is used when creating a template contents owner\n // document, so we use that as our parent document to ensure nothing\n // is inherited.\n if (typeof HTMLTemplateElement === 'function') {\n var template = document.createElement('template');\n if (template.content && template.content.ownerDocument) {\n document = template.content.ownerDocument;\n }\n }\n\n var trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, originalDocument);\n var emptyHTML = trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML('') : '';\n\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\n\n var documentMode = {};\n try {\n documentMode = clone(document).documentMode ? document.documentMode : {};\n } catch (_) {}\n\n var hooks = {};\n\n /**\n * Expose whether this browser supports running the full DOMPurify.\n */\n DOMPurify.isSupported = typeof getParentNode === 'function' && implementation && typeof implementation.createHTMLDocument !== 'undefined' && documentMode !== 9;\n\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 /**\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$1(html), _toConsumableArray$1(svg), _toConsumableArray$1(svgFilters), _toConsumableArray$1(mathMl), _toConsumableArray$1(text)));\n\n /* Allowed attribute names */\n var ALLOWED_ATTR = null;\n var DEFAULT_ALLOWED_ATTR = addToSet({}, [].concat(_toConsumableArray$1(html$1), _toConsumableArray$1(svg$1), _toConsumableArray$1(mathMl$1), _toConsumableArray$1(xml)));\n\n /*\n * Configure how DOMPUrify should handle custom elements and their attributes as well as customized built-in elements.\n * @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements)\n * @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list)\n * @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`.\n */\n 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\n /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */\n var FORBID_TAGS = null;\n\n /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */\n var FORBID_ATTR = null;\n\n /* Decide if ARIA attributes are okay */\n var ALLOW_ARIA_ATTR = true;\n\n /* Decide if custom data attributes are okay */\n var ALLOW_DATA_ATTR = true;\n\n /* Decide if unknown protocols are okay */\n var ALLOW_UNKNOWN_PROTOCOLS = false;\n\n /* Output should be safe for common template engines.\n * This means, DOMPurify removes data attributes, mustaches and ERB\n */\n var SAFE_FOR_TEMPLATES = false;\n\n /* Decide if document with ... should be returned */\n var WHOLE_DOCUMENT = false;\n\n /* Track whether config is already set on this instance of DOMPurify. */\n var SET_CONFIG = false;\n\n /* Decide if all elements (e.g. style, script) must be children of\n * document.body. By default, browsers might move them to document.head */\n var FORCE_BODY = false;\n\n /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported).\n * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead\n */\n var RETURN_DOM = false;\n\n /* Decide if a DOM `DocumentFragment` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported) */\n var RETURN_DOM_FRAGMENT = false;\n\n /* Try to return a Trusted Type object instead of a string, return a string in\n * case Trusted Types are not supported */\n var RETURN_TRUSTED_TYPE = false;\n\n /* Output should be free from DOM clobbering attacks? */\n var SANITIZE_DOM = true;\n\n /* Keep element content when removing element? */\n var KEEP_CONTENT = true;\n\n /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead\n * of importing it into a new Document and returning a sanitized copy */\n var IN_PLACE = false;\n\n /* Allow usage of profiles like html, svg and mathMl */\n var USE_PROFILES = {};\n\n /* Tags to ignore content of when KEEP_CONTENT is true */\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\n /* Tags that are safe for data: URIs */\n var DATA_URI_TAGS = null;\n var DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);\n\n /* Attributes safe for values like \"javascript:\" */\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\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 var NAMESPACE = HTML_NAMESPACE;\n var IS_EMPTY_INPUT = false;\n\n /* Parsing of strict XHTML documents */\n var PARSER_MEDIA_TYPE = void 0;\n var SUPPORTED_PARSER_MEDIA_TYPES = ['application/xhtml+xml', 'text/html'];\n var DEFAULT_PARSER_MEDIA_TYPE = 'text/html';\n var transformCaseFunc = void 0;\n\n /* Keep a reference to config to pass to hooks */\n var CONFIG = null;\n\n /* Ideally, do not touch anything below this line */\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 /**\n * _parseConfig\n *\n * @param {Object} cfg optional config literal\n */\n // eslint-disable-next-line complexity\n var _parseConfig = function _parseConfig(cfg) {\n if (CONFIG && CONFIG === cfg) {\n return;\n }\n\n /* Shield configuration object from tampering */\n if (!cfg || (typeof cfg === 'undefined' ? 'undefined' : _typeof(cfg)) !== 'object') {\n cfg = {};\n }\n\n /* Shield configuration object from prototype pollution */\n cfg = clone(cfg);\n\n /* Set configuration parameters */\n ALLOWED_TAGS = 'ALLOWED_TAGS' in cfg ? addToSet({}, cfg.ALLOWED_TAGS) : DEFAULT_ALLOWED_TAGS;\n ALLOWED_ATTR = 'ALLOWED_ATTR' in cfg ? addToSet({}, cfg.ALLOWED_ATTR) : DEFAULT_ALLOWED_ATTR;\n URI_SAFE_ATTRIBUTES = 'ADD_URI_SAFE_ATTR' in cfg ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), cfg.ADD_URI_SAFE_ATTR) : DEFAULT_URI_SAFE_ATTRIBUTES;\n DATA_URI_TAGS = 'ADD_DATA_URI_TAGS' in cfg ? addToSet(clone(DEFAULT_DATA_URI_TAGS), cfg.ADD_DATA_URI_TAGS) : DEFAULT_DATA_URI_TAGS;\n FORBID_CONTENTS = 'FORBID_CONTENTS' in cfg ? addToSet({}, cfg.FORBID_CONTENTS) : DEFAULT_FORBID_CONTENTS;\n FORBID_TAGS = 'FORBID_TAGS' in cfg ? addToSet({}, cfg.FORBID_TAGS) : {};\n FORBID_ATTR = 'FORBID_ATTR' in cfg ? addToSet({}, cfg.FORBID_ATTR) : {};\n USE_PROFILES = 'USE_PROFILES' in cfg ? cfg.USE_PROFILES : false;\n ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true\n ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true\n ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false\n SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false\n WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false\n RETURN_DOM = cfg.RETURN_DOM || false; // Default false\n RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false\n RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false\n FORCE_BODY = cfg.FORCE_BODY || false; // Default false\n SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true\n KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true\n IN_PLACE = cfg.IN_PLACE || false; // Default false\n IS_ALLOWED_URI$$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI$$1;\n NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;\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 PARSER_MEDIA_TYPE =\n // 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;\n\n // HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.\n transformCaseFunc = PARSER_MEDIA_TYPE === 'application/xhtml+xml' ? function (x) {\n return x;\n } : stringToLowerCase;\n\n if (SAFE_FOR_TEMPLATES) {\n ALLOW_DATA_ATTR = false;\n }\n\n if (RETURN_DOM_FRAGMENT) {\n RETURN_DOM = true;\n }\n\n /* Parse profile info */\n if (USE_PROFILES) {\n ALLOWED_TAGS = addToSet({}, [].concat(_toConsumableArray$1(text)));\n ALLOWED_ATTR = [];\n if (USE_PROFILES.html === true) {\n addToSet(ALLOWED_TAGS, html);\n addToSet(ALLOWED_ATTR, html$1);\n }\n\n if (USE_PROFILES.svg === true) {\n addToSet(ALLOWED_TAGS, svg);\n addToSet(ALLOWED_ATTR, svg$1);\n addToSet(ALLOWED_ATTR, xml);\n }\n\n if (USE_PROFILES.svgFilters === true) {\n addToSet(ALLOWED_TAGS, svgFilters);\n addToSet(ALLOWED_ATTR, svg$1);\n addToSet(ALLOWED_ATTR, xml);\n }\n\n if (USE_PROFILES.mathMl === true) {\n addToSet(ALLOWED_TAGS, mathMl);\n addToSet(ALLOWED_ATTR, mathMl$1);\n addToSet(ALLOWED_ATTR, xml);\n }\n }\n\n /* Merge configuration parameters */\n if (cfg.ADD_TAGS) {\n if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {\n ALLOWED_TAGS = clone(ALLOWED_TAGS);\n }\n\n addToSet(ALLOWED_TAGS, cfg.ADD_TAGS);\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);\n }\n\n if (cfg.ADD_URI_SAFE_ATTR) {\n addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR);\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);\n }\n\n /* Add #text in case KEEP_CONTENT is set to true */\n if (KEEP_CONTENT) {\n ALLOWED_TAGS['#text'] = true;\n }\n\n /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */\n if (WHOLE_DOCUMENT) {\n addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);\n }\n\n /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */\n if (ALLOWED_TAGS.table) {\n addToSet(ALLOWED_TAGS, ['tbody']);\n delete FORBID_TAGS.tbody;\n }\n\n // Prevent further manipulation of configuration.\n // Not available in IE8, Safari 5, etc.\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\n var HTML_INTEGRATION_POINTS = addToSet({}, ['foreignobject', 'desc', 'title', 'annotation-xml']);\n\n /* Keep track of all possible SVG and MathML tags\n * so that we can perform the namespace checks\n * correctly. */\n var ALL_SVG_TAGS = addToSet({}, svg);\n addToSet(ALL_SVG_TAGS, svgFilters);\n addToSet(ALL_SVG_TAGS, svgDisallowed);\n\n var ALL_MATHML_TAGS = addToSet({}, mathMl);\n addToSet(ALL_MATHML_TAGS, mathMlDisallowed);\n\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 var _checkValidNamespace = function _checkValidNamespace(element) {\n var parent = getParentNode(element);\n\n // In JSDOM, if we're inside shadow DOM, then parentNode\n // can be null. We just simulate parent in this case.\n if (!parent || !parent.tagName) {\n parent = {\n namespaceURI: 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 }\n\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 if (parent.namespaceURI === MATHML_NAMESPACE) {\n return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);\n }\n\n // We only allow elements that are defined in SVG\n // spec. All others are disallowed in SVG namespace.\n return Boolean(ALL_SVG_TAGS[tagName]);\n }\n\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 }\n\n // The only way to switch from SVG to MathML is via\n // and HTML integration points\n if (parent.namespaceURI === SVG_NAMESPACE) {\n return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];\n }\n\n // We only allow elements that are defined in MathML\n // spec. All others are disallowed in MathML namespace.\n return Boolean(ALL_MATHML_TAGS[tagName]);\n }\n\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 }\n\n // Certain elements are allowed in both SVG and HTML\n // namespace. We need to specify them explicitly\n // so that they don't get erronously deleted from\n // HTML namespace.\n var commonSvgAndHTMLElements = addToSet({}, ['title', 'style', 'font', 'a', 'script']);\n\n // We disallow tags that are specific for MathML\n // or SVG and should never appear in HTML namespace\n return !ALL_MATHML_TAGS[tagName] && (commonSvgAndHTMLElements[tagName] || !ALL_SVG_TAGS[tagName]);\n }\n\n // The code should never reach this place (this means\n // that the element somehow got namespace that is not\n // HTML, SVG or MathML). Return false just in case.\n return false;\n };\n\n /**\n * _forceRemove\n *\n * @param {Node} node a DOM node\n */\n var _forceRemove = function _forceRemove(node) {\n arrayPush(DOMPurify.removed, { element: node });\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 /**\n * _removeAttribute\n *\n * @param {String} name an Attribute name\n * @param {Node} node a DOM node\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);\n\n // We void attribute values for unremovable \"is\"\" attributes\n if (name === 'is' && !ALLOWED_ATTR[name]) {\n if (RETURN_DOM || RETURN_DOM_FRAGMENT) {\n try {\n _forceRemove(node);\n } catch (_) {}\n } else {\n try {\n node.setAttribute(name, '');\n } catch (_) {}\n }\n }\n };\n\n /**\n * _initDocument\n *\n * @param {String} dirty a string of dirty markup\n * @return {Document} a DOM, filled with the dirty markup\n */\n var _initDocument = function _initDocument(dirty) {\n /* Create a HTML document */\n var doc = void 0;\n var leadingWhitespace = void 0;\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 if (NAMESPACE === HTML_NAMESPACE) {\n try {\n doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);\n } catch (_) {}\n }\n\n /* Use createHTMLDocument in case DOMParser is not available */\n if (!doc || !doc.documentElement) {\n doc = implementation.createDocument(NAMESPACE, 'template', null);\n try {\n doc.documentElement.innerHTML = IS_EMPTY_INPUT ? '' : dirtyPayload;\n } catch (_) {\n // 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\n /* Work on whole document or just its body */\n if (NAMESPACE === HTML_NAMESPACE) {\n return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? 'html' : 'body')[0];\n }\n\n return WHOLE_DOCUMENT ? doc.documentElement : body;\n };\n\n /**\n * _createIterator\n *\n * @param {Document} root document/fragment to create iterator for\n * @return {Iterator} iterator instance\n */\n var _createIterator = function _createIterator(root) {\n return createNodeIterator.call(root.ownerDocument || root, root, NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT, null, false);\n };\n\n /**\n * _isClobbered\n *\n * @param {Node} elm element to check for clobbering attacks\n * @return {Boolean} true if clobbered, false if safe\n */\n 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 /**\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 var _isNode = function _isNode(object) {\n return (typeof Node === 'undefined' ? 'undefined' : _typeof(Node)) === 'object' ? object instanceof Node : object && (typeof object === 'undefined' ? 'undefined' : _typeof(object)) === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string';\n };\n\n /**\n * _executeHook\n * Execute user configurable hooks\n *\n * @param {String} entryPoint Name of the hook's entry point\n * @param {Node} currentNode node to work on with the hook\n * @param {Object} data additional hook parameters\n */\n 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 /**\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 var _sanitizeElements = function _sanitizeElements(currentNode) {\n var content = void 0;\n\n /* Execute a hook if present */\n _executeHook('beforeSanitizeElements', currentNode, null);\n\n /* Check if element is clobbered or can clobber */\n if (_isClobbered(currentNode)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Check if tagname contains Unicode */\n if (stringMatch(currentNode.nodeName, /[\\u0080-\\uFFFF]/)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Now let's check the element's type and name */\n var tagName = transformCaseFunc(currentNode.nodeName);\n\n /* Execute a hook if present */\n _executeHook('uponSanitizeElement', currentNode, {\n tagName: tagName,\n allowedTags: ALLOWED_TAGS\n });\n\n /* Detect mXSS attempts abusing namespace confusion */\n if (!_isNode(currentNode.firstElementChild) && (!_isNode(currentNode.content) || !_isNode(currentNode.content.firstElementChild)) && regExpTest(/<[/\\w]/g, currentNode.innerHTML) && regExpTest(/<[/\\w]/g, currentNode.textContent)) {\n _forceRemove(currentNode);\n return true;\n }\n\n /* Mitigate a problem with templates inside select */\n if (tagName === 'select' && regExpTest(/