diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index bc94f01..2fbb2b4 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -37,7 +37,7 @@ jobs:
fi
- name: Set up Node.js ${{ env.NODE_VERSION }}
- uses: actions/setup-node@v3
+ uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: "npm"
@@ -46,7 +46,7 @@ jobs:
run: yarn install --frozen-lockfile
- name: Cache node modules
- uses: actions/cache@v3
+ uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
@@ -59,7 +59,7 @@ jobs:
cmd: build
- name: Upload build artifact
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: build-artifact
path: |
@@ -75,7 +75,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Download build artifact
- uses: actions/download-artifact@v3
+ uses: actions/download-artifact@v4
with:
name: build-artifact
path: ./
diff --git a/.gitignore b/.gitignore
index bfe990a..e60abe0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,5 @@
.idea
.DS_Store
node_modules
+dist
+lib
diff --git a/dist/protected-eval.js b/dist/protected-eval.js
deleted file mode 100644
index 92dcf8f..0000000
--- a/dist/protected-eval.js
+++ /dev/null
@@ -1,2 +0,0 @@
-/*! For license information please see protected-eval.js.LICENSE.txt */
-!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["protected-eval"]=t():e["protected-eval"]=t()}(self,(()=>(()=>{var __webpack_modules__={14434:function(e,t,n){"use strict";var i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,n=1,i=arguments.length;n{var t;window,t=()=>(()=>{"use strict";var e={282:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.clearChoices=t.activateChoices=t.filterChoices=t.addChoice=void 0;var i=n(883);t.addChoice=function(e){var t=e.value,n=e.label,r=e.id,o=e.groupId,s=e.disabled,a=e.elementId,l=e.customProperties,u=e.placeholder,c=e.keyCode;return{type:i.ACTION_TYPES.ADD_CHOICE,value:t,label:n,id:r,groupId:o,disabled:s,elementId:a,customProperties:l,placeholder:u,keyCode:c}},t.filterChoices=function(e){return{type:i.ACTION_TYPES.FILTER_CHOICES,results:e}},t.activateChoices=function(e){return void 0===e&&(e=!0),{type:i.ACTION_TYPES.ACTIVATE_CHOICES,active:e}},t.clearChoices=function(){return{type:i.ACTION_TYPES.CLEAR_CHOICES}}},783:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.addGroup=void 0;var i=n(883);t.addGroup=function(e){var t=e.value,n=e.id,r=e.active,o=e.disabled;return{type:i.ACTION_TYPES.ADD_GROUP,value:t,id:n,active:r,disabled:o}}},464:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.highlightItem=t.removeItem=t.addItem=void 0;var i=n(883);t.addItem=function(e){var t=e.value,n=e.label,r=e.id,o=e.choiceId,s=e.groupId,a=e.customProperties,l=e.placeholder,u=e.keyCode;return{type:i.ACTION_TYPES.ADD_ITEM,value:t,label:n,id:r,choiceId:o,groupId:s,customProperties:a,placeholder:l,keyCode:u}},t.removeItem=function(e,t){return{type:i.ACTION_TYPES.REMOVE_ITEM,id:e,choiceId:t}},t.highlightItem=function(e,t){return{type:i.ACTION_TYPES.HIGHLIGHT_ITEM,id:e,highlighted:t}}},137:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.setIsLoading=t.resetTo=t.clearAll=void 0;var i=n(883);t.clearAll=function(){return{type:i.ACTION_TYPES.CLEAR_ALL}},t.resetTo=function(e){return{type:i.ACTION_TYPES.RESET_TO,state:e}},t.setIsLoading=function(e){return{type:i.ACTION_TYPES.SET_IS_LOADING,isLoading:e}}},373:function(e,t,n){var i=this&&this.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var i,r=0,o=t.length;r {e.exports=function(e,t,n,i){for(var r=e.length,o=n+(i?1:-1);i?o--:++o '+(null==(t=e.t(e.componentInfo.title,{_userInput:!0}))?"":t)+" "+(null==(t=e.t("Component"))?"":t)+" "+(null==(t=e.t("error"))?"":t)+"\n ",e.options.vpat&&(n+='\n \n '),n+="\n "+(null==(t=e.t("No storage has been set for this field. File uploads are disabled until storage is set up."))?"":t)+" "+(null==(t=e.t("File API & FileReader API not supported."))?"":t)+" "+(null==(t=e.t("XHR2's FormData is not supported."))?"":t)+" "+(null==(t=e.t("XHR2's upload progress isn't supported."))?"":t)+" ${this.t("complete")} Success ${e.statusText?e.statusText:""} ${e.status?e.status:e} =t&&n.push([i,r]),i=-1)}return e[o-1]&&o-i>=t&&n.push([i,o-1]),n}(g,a);e.length?l&&(C.indices=e):C.isMatch=!1}return C}(e,t,h,{location:i+p,distance:r,threshold:o,findAllMatches:s,minMatchCharLength:a,includeMatches:n,ignoreLocation:l});f&&(d=!0),c+=m,f&&g&&(u=[...u,...g])}));let h={isMatch:d,score:d?c/this.chunks.length:1};return d&&n&&(h.indices=u),h}}class C{constructor(e){this.pattern=e}static isMultiMatch(e){return O(e,this.multiRegex)}static isSingleMatch(e){return O(e,this.singleRegex)}search(){}}function O(e,t){const n=e.match(t);return n?n[1]:null}class S extends C{constructor(e,{location:t=v.location,threshold:n=v.threshold,distance:i=v.distance,includeMatches:r=v.includeMatches,findAllMatches:o=v.findAllMatches,minMatchCharLength:s=v.minMatchCharLength,isCaseSensitive:a=v.isCaseSensitive,ignoreLocation:l=v.ignoreLocation}={}){super(e),this._bitapSearch=new E(e,{location:t,threshold:n,distance:i,includeMatches:r,findAllMatches:o,minMatchCharLength:s,isCaseSensitive:a,ignoreLocation:l})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class P extends C{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t,n=0;const i=[],r=this.pattern.length;for(;(t=e.indexOf(this.pattern,n))>-1;)n=t+r,i.push([t,n-1]);const o=!!i.length;return{isMatch:o,score:o?0:1,indices:i}}}const A=[class extends C{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}},P,class extends C{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}},class extends C{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},class extends C{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},class extends C{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}},class extends C{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const t=-1===e.indexOf(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},S],M=A.length,T=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,R=new Set([S.type,P.type]);const D=[];function j(e,t){for(let n=0,i=D.length;n!(!e[I]&&!e.$or),V=e=>({[I]:Object.keys(e).map((t=>({[t]:e[t]})))});function F(e,t,{auto:n=!0}={}){const o=e=>{let a=Object.keys(e);const l=(e=>!!e[L])(e);if(!l&&a.length>1&&!N(e))return o(V(e));if((e=>!i(e)&&s(e)&&!N(e))(e)){const i=l?e[L]:a[0],o=l?e.$val:e[i];if(!r(o))throw new Error((e=>`Invalid value for key ${e}`)(i));const s={keyId:g(i),pattern:o};return n&&(s.searcher=j(o,t)),s}let u={children:[],operator:a[0]};return a.forEach((t=>{const n=e[t];i(n)&&n.forEach((e=>{u.children.push(o(e))}))})),u};return N(e)||(e=V(e)),o(e)}function U(e,t){const n=e.matches;t.matches=[],a(n)&&n.forEach((e=>{if(!a(e.indices)||!e.indices.length)return;const{indices:n,value:i}=e;let r={indices:n,value:i};e.key&&(r.key=e.key.src),e.idx>-1&&(r.refIndex=e.idx),t.matches.push(r)}))}function B(e,t){t.score=e.score}class ${constructor(e,t={},n){this.options={...v,...t},this.options.useExtendedSearch,this._keyStore=new p(this.options.keys),this.setCollection(e,n)}setCollection(e,t){if(this._docs=e,t&&!(t instanceof b))throw new Error("Incorrect 'index' type");this._myIndex=t||_(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){a(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=(()=>!1)){const t=[];for(let n=0,i=this._docs.length;n{let n=1;e.matches.forEach((({key:e,norm:i,score:r})=>{const o=e?e.weight:null;n*=Math.pow(0===r&&o?Number.EPSILON:r,(o||1)*(t?1:i))})),e.score=n}))}(u,{ignoreFieldNorm:l}),s&&u.sort(a),o(t)&&t>-1&&(u=u.slice(0,t)),function(e,t,{includeMatches:n=v.includeMatches,includeScore:i=v.includeScore}={}){const r=[];return n&&r.push(U),i&&r.push(B),e.map((e=>{const{idx:n}=e,i={item:t[n],refIndex:n};return r.length&&r.forEach((t=>{t(e,i)})),i}))}(u,this._docs,{includeMatches:n,includeScore:i})}_searchStringList(e){const t=j(e,this.options),{records:n}=this._myIndex,i=[];return n.forEach((({v:e,i:n,n:r})=>{if(!a(e))return;const{isMatch:o,score:s,indices:l}=t.searchIn(e);o&&i.push({item:e,idx:n,matches:[{score:s,value:e,norm:r,indices:l}]})})),i}_searchLogical(e){const t=F(e,this.options),n=(e,t,i)=>{if(!e.children){const{keyId:n,searcher:r}=e,o=this._findMatches({key:this._keyStore.get(n),value:this._myIndex.getValueForItemAtKeyId(t,n),searcher:r});return o&&o.length?[{idx:i,item:t,matches:o}]:[]}const r=[];for(let o=0,s=e.children.length;o{if(a(e)){let s=n(t,e,i);s.length&&(r[i]||(r[i]={idx:i,item:e,matches:[]},o.push(r[i])),s.forEach((({matches:e})=>{r[i].matches.push(...e)})))}})),o}_searchObjectList(e){const t=j(e,this.options),{keys:n,records:i}=this._myIndex,r=[];return i.forEach((({$:e,i})=>{if(!a(e))return;let o=[];n.forEach(((n,i)=>{o.push(...this._findMatches({key:n,value:e[i],searcher:t}))})),o.length&&r.push({idx:i,item:e,matches:o})})),r}_findMatches({key:e,value:t,searcher:n}){if(!a(t))return[];let r=[];if(i(t))t.forEach((({v:t,i,n:o})=>{if(!a(t))return;const{isMatch:s,score:l,indices:u}=n.searchIn(t);s&&r.push({score:l,key:e,value:t,idx:i,norm:o,indices:u})}));else{const{v:i,n:o}=t,{isMatch:s,score:a,indices:l}=n.searchIn(i);s&&r.push({score:a,key:e,value:i,norm:o,indices:l})}return r}}$.version="6.6.2",$.createIndex=_,$.parseIndex=function(e,{getFn:t=v.getFn,fieldNormWeight:n=v.fieldNormWeight}={}){const{keys:i,records:r}=e,o=new b({getFn:t,fieldNormWeight:n});return o.setKeys(i),o.setIndexRecords(r),o},$.config=v,$.parseQuery=F,function(...e){D.push(...e)}(class{constructor(e,{isCaseSensitive:t=v.isCaseSensitive,includeMatches:n=v.includeMatches,minMatchCharLength:i=v.minMatchCharLength,ignoreLocation:r=v.ignoreLocation,findAllMatches:o=v.findAllMatches,location:s=v.location,threshold:a=v.threshold,distance:l=v.distance}={}){this.query=null,this.options={isCaseSensitive:t,includeMatches:n,minMatchCharLength:i,findAllMatches:o,ignoreLocation:r,location:s,threshold:a,distance:l},this.pattern=t?e:e.toLowerCase(),this.query=function(e,t={}){return e.split("|").map((e=>{let n=e.trim().split(T).filter((e=>e&&!!e.trim())),i=[];for(let e=0,r=n.length;e\n \n
"}},37680:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.html=void 0;const i=n(8845).A;t.html=i},39655:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.datatable=void 0,t.datatable=o(n(37680))},86614:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=o(n(39655));t.default={bootstrap:s}},48410:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Formio=t.use=t.useModule=t.usePlugin=void 0,n(96522);const r=n(94394);Object.defineProperty(t,"Formio",{enumerable:!0,get:function(){return r.Formio}});const o=n(12068),s=n(84679),a=n(70919);r.Formio.render=a.render,r.Formio.Components=a.Components,r.Formio.Validator=r.Formio.Rules=o.Validator,r.Formio.Evaluator=s.Evaluator,r.Formio.Utils=s.Utils,r.Formio.Templates=a.Template;const l=n(21823);function u(e,t){switch(e){case"options":if(!r.Formio.options)return;r.Formio.options=(0,l.merge)(r.Formio.options,t);break;case"templates":if(!r.Formio.Templates)return;const n=r.Formio.Templates.framework||"bootstrap";for(const e of Object.keys(t))r.Formio.Templates.extendTemplate(e,t[e]);t[n]&&(r.Formio.Templates.current=t[n]);break;case"components":if(!r.Formio.Components)return;r.Formio.Components.setComponents(t);break;case"framework":if(!r.Formio.Templates)return;r.Formio.Templates.framework=t;break;case"fetch":for(const e of Object.keys(t))r.Formio.registerPlugin(t[e],e);break;case"rules":if(!r.Formio.Rules)return;r.Formio.Rules.addRules(t);break;case"evaluator":if(!r.Formio.Evaluator)return;r.Formio.Evaluator.registerEvaluator(t);break;default:console.log("Unknown plugin option",e)}}function c(e){if("object"==typeof e)for(const t of Object.keys(e))u(t,e[t])}function d(...e){e.forEach((e=>{Array.isArray(e)?e.forEach((e=>c(e))):c(e)}))}t.usePlugin=u,t.useModule=c,t.use=d,r.Formio.useModule=c,r.Formio.usePlugin=u,r.Formio.use=d;const h=i(n(55438));r.Formio.use(h.default);const p=i(n(12191));r.Formio.use(p.default)},35349:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(48410),t),r(n(70919),t),r(n(53127),t),r(n(12191),t),r(n(84679),t),r(n(55438),t),r(n(12068),t)},46181:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.EventEmitterBase=t.EventEmitter=void 0;const r=i(n(30228));t.EventEmitterBase=r.default,t.EventEmitter=function(e){return e||(e=class{}),class extends e{constructor(){super(...arguments),this.parent=null,this.events=new r.default}bubble(e,...t){return this.parent?this.parent.bubble(e,...t):this.emit(e,...t)}emit(e,...t){return this.events.emit(e,...t)}on(e,t,...n){return this.events.on(e,t,...n)}once(e,t,...n){return this.events.once(e,t,...n)}off(e,...t){return this.events.off(e,...t)}}}},66930:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return r(t,e),t},s=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.Model=void 0;const a=o(n(21823)),l=n(46181);t.Model=function(e={}){return e.schema||(e.schema={}),e.schema.key||(e.schema.key=""),function(t){return class n extends((0,l.EventEmitter)(t)){static schema(){return e.schema}constructor(e={},t={},n={}){super(e,t,n),this.component=e,this.options=t,this.data=n,this.root=null,this.validator=null,this.id=`e${Math.random().toString(36).substring(7)}`,this.component=a.merge({},this.defaultSchema,this.component),this.options=Object.assign(Object.assign({},this.defaultOptions),this.options),this.options.noInit||this.init()}get defaultOptions(){return{}}get defaultSchema(){return n.schema()}init(){this.hook("init"),this.options.validator&&(this.validator=this.options.validator.fromComponent(this))}checkComponentValidity(){return s(this,void 0,void 0,(function*(){return!this.validator||this.validator.check()}))}checkValidity(){return s(this,void 0,void 0,(function*(){return this.checkComponentValidity()}))}get errors(){return this.validator.errors}get emptyValue(){return null}isEmpty(e=this.dataValue){const t=!(!a.isArray(e)||1!==e.length)&&a.isEqual(e[0],this.emptyValue);return null==e||0===e.length||a.isEqual(e,this.emptyValue)||t}get dataValue(){return a.get(this.data,this.component.key)}set dataValue(e){this.component.key&&a.set(this.data,this.component.key,e)}hasChanged(e){return String(e)!==String(this.dataValue)}updateValue(e){const t=this.hasChanged(e);return this.dataValue=e,t&&this.bubble("change",e),t}getValue(){return this.dataValue}hook(e,...t){if(this.options&&this.options.hooks&&this.options.hooks[e])return this.options.hooks[e].apply(this,t);{const e="function"==typeof t[t.length-1]?t[t.length-1]:null;return e?e(null,t[1]):t[1]}}}}}},2722:function(e,t,n){"use strict";var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var r=Object.getOwnPropertyDescriptor(t,n);r&&!("get"in r?!t.__esModule:r.writable||r.configurable)||(r={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,r)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.NestedArrayModel=void 0;const s=o(n(21823)),a=n(36851);t.NestedArrayModel=function(e={}){return function(t){return class extends((0,a.NestedDataModel)(e)(t)){get defaultValue(){return[]}row(e){return e\n ',e.component.components.forEach((function(e){n+="\n \n \n \n ",e.instance.rows.forEach((function(e){n+="\n "+(null==(t=e.label||e.key)?"":t)+" \n "})),n+="\n \n ",e.forEach((function(e){n+="\n \n "})),n+="\n \n"+(null==(t=e.dataValue)?"":t)+" \n "})),n+="\n 0&&void 0!==arguments[0]?arguments[0]:o,t=e.length;if(e===o||e[0]===m[0]&&1===t)return m.split(o).concat([h]).concat(v.split(o));if(e===C&&x)return m.split(o).concat(["0",C,h]).concat(v.split(o));var r=e[0]===l&&T;r&&(e=e.toString().substr(1));var s=e.lastIndexOf(C),a=-1!==s,f=void 0,g=void 0,y=void 0;if(e.slice(-1*N)===v&&(e=e.slice(0,-1*N)),a&&(x||A)?(f=e.slice(e.slice(0,L)===m?L:0,s),g=n((g=e.slice(s+1,t)).replace(c,o))):f=e.slice(0,L)===m?e.slice(L):e,I&&(void 0===I?"undefined":i(I))===d){var _="."===w?"[.]":""+w,k=(f.match(new RegExp(_,"g"))||[]).length;f=f.slice(0,I+k*V)}return f=f.replace(c,o),D||(f=f.replace(/^0+(0$|[^0])/,"$1")),y=n(f=b?function(e,t){return e.replace(/\B(?=(\d{3})+(?!\d))/g,t)}(f,w):f),(a&&x||!0===A)&&(e[s-1]!==C&&y.push(p),y.push(C,p),g&&((void 0===S?"undefined":i(S))===d&&(g=g.slice(0,S)),y=y.concat(g)),!0===A&&e[s-1]===C&&y.push(h)),L>0&&(y=m.split(o).concat(y)),r&&(y.length===L&&y.push(h),y=[u].concat(y)),v.length>0&&(y=y.concat(v.split(o))),y}var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},f=t.prefix,m=void 0===f?r:f,g=t.suffix,v=void 0===g?o:g,y=t.includeThousandsSeparator,b=void 0===y||y,_=t.thousandsSeparatorSymbol,w=void 0===_?s:_,k=t.allowDecimal,x=void 0!==k&&k,E=t.decimalSymbol,C=void 0===E?a:E,O=t.decimalLimit,S=void 0===O?2:O,P=t.requireDecimal,A=void 0!==P&&P,M=t.allowNegative,T=void 0!==M&&M,R=t.allowLeadingZeroes,D=void 0!==R&&R,j=t.integerLimit,I=void 0===j?null:j,L=m&&m.length||0,N=v&&v.length||0,V=w&&w.length||0;return e.instanceOf="createNumberMask",e};var r="$",o="",s=",",a=".",l="-",u=/-/,c=/\D+/g,d="number",h=/\d/,p="[]"},function(e,t,n){"use strict";function i(e,t,n){var i=[];return e[t]===n?i.push(n):i.push(h,n),i.push(h),i}function r(e,t,n,i){var r=c;return-1!==t&&(r=-1===n?e.slice(t+1,e.length):e.slice(t+1,n)),(r=r.replace(new RegExp("[\\s"+i+"]",f),c))===d?l:r.length<1?p:r[r.length-1]===u?r.slice(0,r.length-1):r}function o(e,t,n,i){var r=c;return-1!==t&&(r=e.slice(t+1,e.length)),0===(r=r.replace(new RegExp("[\\s"+n+".]",f),c)).length?e[t-1]===u&&i!==e.length?l:c:r}function s(e,t){return e.split(c).map((function(e){return e===p?e:t?g:m}))}Object.defineProperty(t,"__esModule",{value:!0});var a=function(e){return e&&e.__esModule?e:{default:e}}(n(4)),l="*",u=".",c="",d="@",h="[]",p=" ",f="g",m=/[^\s]/,g=/[^.\s]/,v=/\s/g;t.default={mask:function(e,t){e=e.replace(v,c);var n=t.placeholderChar,a=t.currentCaretPosition,l=e.indexOf(d),h=e.lastIndexOf(u),p=h`${o.keyPrefix}${u}${e}`)):o.keyPrefix?`${o.keyPrefix}${u}${e}`:e,i.t(c,o)};return"string"==typeof e?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=n,r}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=t.lng||this.resolvedLanguage||this.languages[0],i=!!this.options&&this.options.fallbackLng,r=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;const o=(e,t)=>{const n=this.services.backendConnector.state[`${e}|${t}`];return-1===n||2===n};if(t.precheck){const e=t.precheck(this,o);if(void 0!==e)return e}return!(!this.hasResourceBundle(n,e)&&this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages)&&(!o(n,e)||i&&!o(r,e)))}loadNamespaces(e,t){const n=o();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((e=>{this.options.ns.indexOf(e)<0&&this.options.ns.push(e)})),this.loadResources((e=>{n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=o();"string"==typeof e&&(e=[e]);const i=this.options.preload||[],r=e.filter((e=>i.indexOf(e)<0));return r.length?(this.options.preload=i.concat(r),this.loadResources((e=>{n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const t=this.services&&this.services.languageUtils||new k(j());return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){return new N(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}cloneInstance(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:L;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const i={...this.options,...e,isClone:!0},r=new N(i);return void 0===e.debug&&void 0===e.prefix||(r.logger=r.logger.clone(e)),["store","services","language"].forEach((e=>{r[e]=this[e]})),r.services={...this.services},r.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},n&&(r.store=new v(this.store.data,i),r.services.resourceStore=r.store),r.translator=new _(r.services,i),r.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i>":r=o>>s;break;case">>>":r=o>>>s;break;case"in":s instanceof i.Object||this.throwException(this.TYPE_ERROR,"'in' expects an object, not '"+s+"'"),r=this.hasProperty(s,o);break;case"instanceof":this.isa(s,this.FUNCTION)||this.throwException(this.TYPE_ERROR,"'instanceof' expects an object, not '"+s+"'"),r=o instanceof i.Object&&this.isa(o,s);break;default:throw SyntaxError("Unknown binary operator: "+n.operator)}e[e.length-1].value=r},i.prototype.stepBlockStatement=function(e,t,n){var r=t.n_||0,o=n.body[r];if(o)return t.n_=r+1,new i.State(o,t.scope);e.pop()},i.prototype.stepBreakStatement=function(e,t,n){var r=n.label&&n.label.name;this.unwind(i.Completion.BREAK,void 0,r)},i.prototype.evalCodeNumber_=0,i.prototype.stepCallExpression=function(e,t,n){if(!t.doneCallee_){t.doneCallee_=1;var r=new i.State(n.callee,t.scope);return r.components=!0,r}if(1===t.doneCallee_){t.doneCallee_=2;var o=t.value;if(Array.isArray(o)){if(t.func_=this.getValue(o),o[0]===i.SCOPE_REFERENCE?t.directEval_="eval"===o[1]:t.funcThis_=o[0],o=t.func_,this.getterStep_)return t.doneCallee_=1,this.createGetter_(o,t.value)}else t.func_=o;t.arguments_=[],t.n_=0}if(o=t.func_,!t.doneArgs_){if(0!==t.n_&&t.arguments_.push(t.value),n.arguments[t.n_])return new i.State(n.arguments[t.n_++],t.scope);if("NewExpression"===n.type){if(o instanceof i.Object&&!o.illegalConstructor||this.throwException(this.TYPE_ERROR,this.nodeSummary(n.callee)+" is not a constructor"),o===this.ARRAY)t.funcThis_=this.createArray();else{var s=o.properties.prototype;"object"==typeof s&&null!==s||(s=this.OBJECT_PROTO),t.funcThis_=this.createObjectProto(s)}t.isConstructor=!0}t.doneArgs_=!0}if(t.doneExec_)e.pop(),t.isConstructor&&"object"!=typeof t.value?e[e.length-1].value=t.funcThis_:e[e.length-1].value=t.value;else{t.doneExec_=!0,o instanceof i.Object||this.throwException(this.TYPE_ERROR,this.nodeSummary(n.callee)+" is not a function");var a=o.node;if(a){for(var l=this.createScope(a.body,o.parentScope),u=this.createArray(),c=0;c=a?l:l*("desc"==n[i]?-1:1)}return e.index-t.index}(e,t,n)}));i--;)e[i]=e[i].value;return e}(r)}function $i(e,t,n){for(var i=-1,r=t.length,o={};++io?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var s=i(o);++r'+(null==(t=e.t("Preview"))?"":t)+'
\n \n \n
\n \n ",e.hasHeader&&(n+="\n \n
\n"}},87078:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='\n ",e.component.reorder&&(n+=" \n \n "),n+='\n \n ',e.rows.forEach((function(i,r){n+="\n ",e.hasGroups&&e.groups[r]&&(n+='\n "),n+="\n ",e.columns.forEach((function(i){n+='\n \n '+(null==(t=i.hideLabel?"":e.t(i.label||i.title,{_userInput:!0}))?"":t)+"\n ",i.tooltip&&(n+=' '),n+="\n \n "})),n+="\n ",e.hasExtraColumn&&(n+='\n \n '+(null==(t=e.t("Add/Remove"))?"":t)+"\n ",!e.builder&&e.hasAddButton&&e.hasTopSubmit&&(n+='\n \n "),n+="\n \n "),n+="\n \n \n "),n+='\n '+(null==(t=e.groups[r].label)?"":t)+" \n \n ',e.component.reorder&&(n+='\n \n "})),n+="\n \n ",!e.builder&&e.hasAddButton&&e.hasBottomSubmit&&(n+='\n \n \n \n \n '),n+="\n ",e.columns.forEach((function(r){n+='\n \n "+(null==(t=i[r.key])?"":t)+"\n \n "})),n+="\n ",e.hasExtraColumn&&(n+="\n ",e.hasRemoveButtons&&(n+='\n \n \n \n '),n+="\n ",e.canAddColumn&&(n+='\n \n '+(null==(t=e.placeholder)?"":t)+"\n \n "),n+="\n "),n+="\n \n \n \n "),n+="\n\n \n \n \n ',e.hasHeader&&(n+="\n \n
\n"}},31373:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(65069),r=n(87078);t.default={form:i.default,html:r.default}},63481:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='\n ",e.columns.forEach((function(i){n+='\n \n \n "),n+="\n \n ",e.rows.forEach((function(i){n+="\n \n '+(null==(t=i.hideLabel?"":e.t(i.label||i.title,{_userInput:!0}))?"":t)+"\n ",i.tooltip&&(n+=' '),n+="\n \n "})),n+="\n \n ",e.columns.forEach((function(r){n+='\n \n "})),n+="\n \n\n '+(null==(t=i[r.key])?"":t)+"\n \n "})),n+="\n \n ',e.header&&(n+='\n
\n",!e.readOnly&&e.hasAddButton&&(n+='\n\n"),n+="\n"}},47762:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='\n ',e.header&&(n+='\n
\n"}},23665:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(90409),r=n(47762);t.default={form:i.default,html:r.default}},8943:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='\n ',e.header&&(n+='\n \n '+(null==(t=e.header)?"":t)+"\n \n "),n+='\n \n ',e.rows.forEach((function(i,r){n+='\n
\n \n '+(null==(t=i)?"":t)+"\n ",e.openRows[r]&&!e.readOnly&&(n+='\n \n "})),n+="\n \n ",e.footer&&(n+="\n \n \n \n "),n+="\n ",e.errors[r]&&(n+='\n \n \n "),n+="\n \n "+(null==(t=e.footer)?"":t)+"\n \n \n "),n+="\n \n ',e.header&&(n+='\n \n '+(null==(t=e.header)?"":t)+"\n \n "),n+='\n \n ',e.rows.forEach((function(i,r){n+='\n
\n \n '+(null==(t=i)?"":t)+"\n ",e.openRows[r]&&!e.readOnly&&(n+='\n \n "})),n+="\n \n ",e.footer&&(n+="\n \n \n \n "),n+="\n ",e.errors[r]&&(n+='\n \n \n "),n+="\n \n "+(null==(t=e.footer)?"":t)+"\n \n \n "),n+="\n \n ",e.errors.forEach((function(e){n+='\n
\n"}},96034:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(38644);t.default={form:i.default}},96012:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='\n ',e.disabled||(n+='\n \n '),n+="\n \n
\n \n ",e.files.forEach((function(i){n+='\n
\n"),n+="\n",e.disabled||!e.component.multiple&&e.files.length||(n+="\n ",e.self.useWebViewCamera?n+='\n
\n\n\n\n \n"}},16557:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(52749);t.default={form:i.default}},45753:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='\n '+(null==(t=e.element)?"":t)+"\n \n ",e.disabled||(n+='\n \n \n \n '),n+"\n\n \n '+(null==(t=e.rows)?"":t)+"\n ",e.disabled||(n+='\n
\n"}},83041:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(45753);t.default={form:i.default}},54464:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";for(var i in Array.prototype.join,n+='\n \n "),n+"\n \n\n \n \n '+(null==(t=e.t("Upload a PDF File"))?"":t)+'
\n \n \n \n
\n"}},29256:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(41090);t.default={form:i.default}},15193:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";for(var i in Array.prototype.join,n+='\n\n'}},51202:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='\n \n \n '+(null==(t=e.element)?"":t)+'\n \n \n \n \n\n \n \n \n'}},84001:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(89721),r=n(25730);t.default={form:i.default,html:r.default}},99903:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='
\n \n
\n"}},62724:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='\n \n \n \n ",e.component.questions.forEach((function(i){n+="\n \n ',e.component.values.forEach((function(i){n+='\n \n '+(null==(t=e.t(i.label,{_userInput:!0}))?"":t)+"\n ",i.tooltip&&(n+='\n \n '),n+="\n \n "})),n+="\n \n \n "})),n+="\n \n\n "+(null==(t=e.t(i.label))?"":t)+"\n ",i.tooltip&&(n+='\n \n '),n+="\n \n ",e.component.values.forEach((function(r){n+='\n \n \n \n '})),n+="\n \n \n ',e.component.questions.forEach((function(i){n+="\n
\n"}},43279:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(99903),r=n(62724);t.default={form:i.default,html:r.default}},3607:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,e.component.components.forEach((function(i,r){n+='\n \n \n "})),n+="\n \n"+(null==(t=e.t(i.label))?"":t)+" \n \n ",e.component.values.forEach((function(r){n+="\n ",e.value&&e.value.hasOwnProperty(i.value)&&e.value[i.value]===r.value&&(n+="\n "+(null==(t=e.t(r.label))?"":t)+"\n "),n+="\n "})),n+="\n \n '+(null==(t=e.t(i.label,{_userInput:!0}))?"":t)+'
\n \n ',e.component.components.forEach((function(i,r){n+='\n \n "})),n+="\n
\n \n
\n"}},54455:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(65063);t.default={form:i.default}},11107:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,e.children.forEach((function(e){n+='\n \n ",e.component.header.forEach((function(i){n+="\n \n \n "),n+="\n \n ",e.tableComponents.forEach((function(i,r){n+='\n "+(null==(t=e.t(i))?"":t)+" \n "})),n+="\n \n ',i.forEach((function(i,o){n+='\n \n "})),n+="\n \n"+(null==(t=i)?"":t)+" \n "})),n+="\n \n '+(null==(t=e)?"":t)+"\n \n"})),n+="\n"}},31179:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(11107);t.default={form:i.default}},53873:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,e.node.isRoot?n+='\n \n '+(null==(t=e.childNodes.join(""))?"":t)+"\n
\n "),n+="\n",e.node.isRoot?n+="\n \n ',e.buttonOrder.forEach((function(i){n+="\n ","cancel"===i&&e.buttons.cancel&&(n+='\n
\n"}},68195:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(51707);t.default={form:i.default}},57423:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n="";return Array.prototype.join,n+='\n
\n",mask:!1,spellcheck:!0,tableView:!1,delimiter:!1,requireDecimal:!1,inputFormat:"plain",validate:{required:!0,min:1,max:128},key:"maxEntropy",type:"number",input:!0},{label:"Style",tooltip:"Specifies the background color style using bootstrap classes",tableView:!0,data:{values:[{label:"Danger",value:"danger"},{label:"Warning",value:"warning"},{label:"Info",value:"info"},{label:"Success",value:"success"}]},selectThreshold:.3,validate:{onlyAvailableItems:!1},key:"style",type:"select",indexeddb:{filter:{}},input:!0},{label:"Color",placeholder:"#0079c0",tooltip:"Specifies a color of the indicator element",tableView:!0,key:"color",type:"textfield",input:!0}]},{label:"Update On",tableView:!0,data:{values:[{label:"Strength Level Change",value:"levelChange"},{label:"Entropy Change",value:"entropyChange"}]},selectThreshold:.3,validate:{onlyAvailableItems:!1},key:"updateOn",type:"select",indexeddb:{filter:{}},input:!0},{label:"Rules",reorder:!1,addAnotherPosition:"bottom",layoutFixed:!1,enableRowGroups:!1,initEmpty:!1,tableView:!1,defaultValue:[{}],key:"rulesSettings",type:"datagrid",input:!0,components:[{label:"Name",tableView:!0,data:{values:[{label:"Length",value:"length"},{label:"Lower Case",value:"lowerCase"},{label:"Upper Case",value:"upperCase"},{label:"Numeric",value:"numeric"},{label:"Symbols",value:"symbols"}]},selectThreshold:.3,validate:{required:!0,onlyAvailableItems:!1},key:"name",type:"select",indexeddb:{filter:{}},input:!0},{label:"Error Message",tableView:!0,key:"errorMessage",type:"textfield",input:!0},{label:"Required",tableView:!1,key:"required",type:"checkbox",input:!0,defaultValue:!1}]},{label:"Custom Rules",tableView:!1,rowDrafts:!1,key:"customRules",type:"editgrid",input:!0,components:[{label:"Name",tableView:!0,validate:{required:!0},key:"name",type:"textfield",input:!0},r.default.javaScriptValue("Check","check","",1100,'Example:
valid = !value.includes(data.email) ? true : "Password should not be variation of the email";
Example:
valid = entropy > maxEntropy / 2 ;
values = [ data.name, data.dataOfBirth, data.favoriteColor ];","","",!0),{label:"Disable Blacklisted Words",tooltip:"Check if you want to disable submitting passwords containing words form the clack list",tableView:!1,key:"disableBlacklistedWords",type:"checkbox",input:!0,defaultValue:!1},{label:"Location",hideLabel:!1,tableView:!1,key:"location",type:"container",input:!0,components:[{label:"Insert",tooltip:"Specifies where the indicator will be inserted: before or aftre an element",tableView:!0,data:{values:[{label:"Before",value:"before"},{label:"After",value:"after"}]},selectThreshold:.3,validate:{onlyAvailableItems:!1},key:"insert",type:"select",indexeddb:{filter:{}},input:!0},{label:"Selector",placeholder:"[ref='element']",description:"Specifies the selector of the element which will be used as a reference to insert the indicator template",tableView:!0,key:"selector",type:"textfield",input:!0}]},{label:"Template",editor:"ace",tableView:!0,key:"template",type:"textarea",input:!0,as:"html"}]},60918:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=i(n(2543)),o=i(n(18975)),s=i(n(42584));class a extends o.default{static get info(){return{supportedComponents:["password"],name:"passwordStrength",components:s.default,label:"Password Strength",defaultSettings:{rulesSettings:[{name:"length",required:!1,message:"Value should be longer"},{name:"upperCase",required:!1,message:"Value should have uppercase letters"},{name:"numeric",required:!1,message:"Value should have numeric symbols"},{name:"lowerCase",required:!1,message:"Value should be have lowercase letters"},{name:"symbols",required:!1,message:"Value should have symbols"}],updateOn:"levelChange",required:!0,levels:[{name:"Low",maxEntropy:28,style:"danger"},{name:"Medium",maxEntropy:45,style:"warning"},{name:"High",maxEntropy:59,style:"info"},{name:"Very High",maxEntropy:85,style:"success"}],blackList:[],template:"\n
You must assign the show variable a boolean result.
Note: Advanced Conditional logic will override the results of the Simple Conditional logic.
show = !!data.showMe;",'')]},60406:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=i(n(33844));t.default=[{weight:0,type:"checkbox",label:"Multiple Values",tooltip:"Allows multiple values to be entered for this field.",key:"multiple",input:!0},{type:"textfield",label:"Default Value",key:"defaultValue",weight:5,placeholder:"Default Value",tooltip:"The Default Value will be the value for this field, before user interaction. Having a default value will override the placeholder text.",input:!0},{weight:30,type:"radio",label:"Persistent",tooltip:"A persistent field will be stored in database when the form is submitted.",key:"persistent",input:!0,inline:!0,defaultValue:!0,values:[{label:"None",value:!1},{label:"Server",value:!0},{label:"Client",value:"client-only"}]},{weight:150,type:"checkbox",label:"Protected",tooltip:"A protected field will not be returned when queried via API.",key:"protected",input:!0},{type:"checkbox",input:!0,weight:200,key:"dbIndex",label:"Database Index",tooltip:"Set this field as an index within the database. Increases performance for submission queries."},{weight:400,type:"checkbox",label:"Encrypted",tooltip:"Encrypt this field on the server. This is two way encryption which is not suitable for passwords.",key:"encrypted",input:!0,logic:[{name:"disabled",trigger:{type:"javascript",javascript:"result = !instance.root.options.sac;"},actions:[{name:"disabled",type:"property",property:{label:"Disabled",value:"disabled",type:"boolean"},state:!0}]},{name:"disabledToolTip",trigger:{type:"javascript",javascript:"result = !instance.root.options.sac;"},actions:[{name:"addDisabledTooltip",type:"property",property:{label:"Tooltip",value:"tooltip",type:"string"},text:"Only available with Security Module. Contact sales@form.io for more information."}]}]},{type:"select",input:!0,key:"redrawOn",label:"Redraw On",weight:600,tooltip:"Redraw this component if another component changes. This is useful if interpolating parts of the component like the label.",dataSrc:"custom",valueProperty:"value",data:{custom(e){var t=[];return t.push({label:"Any Change",value:"data"}),e.utils.eachComponent(e.instance.options.editForm.components,(function(n,i){n.key!==e.data.key&&t.push({label:n.label||n.key,value:i})})),t}},conditional:{json:{"!":[{var:"data.dataSrc"}]}}},{weight:700,type:"checkbox",label:"Clear Value When Hidden",key:"clearOnHide",defaultValue:!0,tooltip:"When a field is hidden, clear the value.",input:!0},r.default.javaScriptValue("Custom Default Value","customDefaultValue","customDefaultValue",1e3,'
value = data.firstName + " " + data.lastName;','
{"cat": [{"var": "data.firstName"}, " ", {"var": "data.lastName"}]}'),r.default.javaScriptValue("Calculated Value","calculateValue","calculateValue",1100,"value = data.a + data.b + data.c;",'
{"+": [{"var": "data.a"}, {"var": "data.b"}, {"var": "data.c"}]}',"Enter custom validation code.
\nYou must assign the valid variable as either true or an error message if validation fails.
\nvalid = (input === 'Joe') ? true : 'Your name must be \"Joe\"';\n "},{type:"well",components:[{weight:100,type:"checkbox",label:"Secret Validation",tooltip:"Check this if you wish to perform the validation ONLY on the server side. This keeps your validation logic private and secret.",description:"Check this if you wish to perform the validation ONLY on the server side. This keeps your validation logic private and secret.",key:"validate.customPrivate",input:!0}]}]},{type:"panel",title:"JSONLogic Validation",collapsible:!0,collapsed:!0,key:"json-validation-json",weight:400,components:[{type:"htmlelement",tag:"div",content:'
Execute custom logic using JSONLogic.
'+JSON.stringify({if:[{"===":[{var:"input"},"Bob"]},!0,"Your name must be 'Bob'!"]},null,2)+""},{type:"textarea",key:"validate.json",hideLabel:!0,rows:5,editor:"ace",as:"json",input:!0}]},{type:"panel",title:"Custom Errors",collapsible:!0,collapsed:!0,key:"errors",weight:400,components:[{type:"textarea",key:"errors",hideLabel:!0,rows:5,editor:"ace",as:"json",input:!0},{type:"htmlelement",tag:"div",content:'\n This allows you to set different custom error messages for different errors\n (in contrast to “Custom Error Message”, 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):
\nDepending on the error message some of the following template variables can be used in the script:
\n{{ field }} is replaced with the label of the field.{{ min }}{{ max }}{{ length }}{{ pattern }}{{ minDate }}{{ maxDate }}{{ minYear }}{{ maxYear }}{{ regex }}The following variables are available in all scripts.
| form | The complete form JSON object |
|---|---|
| submission | The complete submission object. |
| data | The complete submission data object. |
| row | Contextual "row" data, used within DataGrid, EditGrid, and Container components |
| component | The current component JSON |
| instance | The current component instance. |
| value | The current value of the component. |
| moment | The moment.js library for date manipulation. |
| _ | An instance of Lodash. |
| utils | An instance of the FormioUtils object. |
| util | An alias for "utils". |
Enter custom javascript code.
${r}`}]},{type:"panel",title:"JSONLogic",collapsible:!0,collapsed:!0,key:`${t}-json`,components:[{type:"htmlelement",tag:"div",content:'Execute custom logic using JSONLogic.
Full Lodash support is provided using an "_" before each operation, such as {"_sum": {var: "data.a"}}
| ${n} | `})),e+="\n
|---|
| ',n.isInputComponent&&n.visible&&!n.skipInEmail&&(e+=n.getView(n.dataValue,t)),e+=" | "})),e+="
| ${n.label} | \n${n.getView(n.dataValue,t)} | \n
|---|
| ${e.label} | \n${e.component&&"html"===e.component.inputFormat&&i.test(r)?r:``} | \n
|---|
| ${i} | \n${this.getView(e[i],t)} | \n
|---|
| ${i} | \n${this.getView(e[i],t)} | \n
|---|
// Disable all weekends\n "}]},{type:"checkbox",input:!0,key:"datePicker.disableWeekends",label:"Disable weekends",tooltip:"Check to disable weekends",weight:23},{type:"checkbox",input:!0,key:"datePicker.disableWeekdays",label:"Disable weekdays",tooltip:"Check to disable weekdays",weight:23}]},70202:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=[{type:"select",input:!0,key:"displayInTimezone",label:"Display in Timezone",tooltip:"This will display the captured date time in the select timezone.",weight:30,defaultValue:"viewer",dataSrc:"values",data:{values:[{label:"of Viewer",value:"viewer"},{label:"of Submission",value:"submission"},{label:"of Location",value:"location"},{label:"UTC",value:"utc"}]}},{type:"select",input:!0,key:"timezone",label:"Select Timezone",tooltip:"Select the timezone you wish to display this Date",weight:31,lazyLoad:!0,defaultValue:"",valueProperty:"name",dataSrc:"url",data:{url:"{{options.cdnUrl}}/timezones.json"},template:"{{ item.label }}",conditional:{json:{"===":[{var:"data.displayInTimezone"},"location"]}}},{type:"checkbox",input:!0,key:"useLocaleSettings",label:"Use Locale Settings",tooltip:"Use locale settings to display date and time.",weight:51},{type:"checkbox",input:!0,key:"allowInput",label:"Allow Manual Input",tooltip:"Check this if you would like to allow the user to manually enter in the date.",weight:51},{type:"textfield",input:!0,key:"format",label:"Format",placeholder:"Format",description:'Use formats provided by DateParser Codes',tooltip:"The date format for displaying the datetime value.",weight:52},{type:"editgrid",input:!0,key:"shortcutButtons",label:"Shortcut Buttons",description:"You can specify few buttons which will be shown above the calendar. Use Label to specify the name of the button and onClick to specify which date/time will be set when user clicks the button. E.g, date = new Date()",templates:{header:'
date.getDay() === 0 || date.getDay() === 6
value = data.firstName + " " + data.lastName;','
{"cat": [{"var": "data.firstName"}, " ", {"var": "data.lastName"}]}'),r.default.javaScriptValue("Calculated Value","calculateValue","calculateValue",130,"value = data.a + data.b + data.c;",'
{"+": [{"var": "data.a"}, {"var": "data.b"}, {"var": "data.c"}]}'),{weight:140,type:"checkbox",label:"Clear Value When Hidden",key:"clearOnHide",defaultValue:!0,tooltip:"When a field is hidden, clear the value.",input:!0}]},21086:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=[{key:"labelPosition",ignore:!0},{key:"placeholder",ignore:!0},{key:"description",ignore:!0},{key:"tooltip",ignore:!0},{key:"tabIndex",ignore:!0},{key:"autofocus",ignore:!0}]},86892:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=[{type:"select",input:!0,dataSrc:"url",data:{url:"/form?limit=1000000&select=_id,title,display"},searchField:"title__regex",template:"{{ item.title }}",valueProperty:"_id",authenticate:!0,label:"Form",key:"form",weight:10,lazyLoad:!1,tooltip:"The form to load within this form component.",validate:{required:!0}},{label:"Lazy Load",inputType:"checkbox",defaultValue:!0,clearOnHide:!0,errorLabel:"",key:"lazyLoad",type:"checkbox",tooltip:"if it is checked, the subform is loaded after navigation to the page with this component within the wizard.",input:!0,customConditional({instance:e,data:t}){var n,i,r,o;const s=null===(i=null===(n=e.root)||void 0===n?void 0:n.getComponent("form"))||void 0===i?void 0:i.defaultDownloadedResources.find((e=>e._id===t.form)),a="wizard";return(null===(o=null===(r=e.options)||void 0===r?void 0:r.editForm)||void 0===o?void 0:o.display)===a&&s&&s.display!==a}},{type:"select",input:!0,dataSrc:"url",data:{url:"/form/{{ data.form }}/v"},searchField:"title__regex",template:"{{ item._vid }}",valueProperty:"_id",authenticate:!0,label:"Form Revision",key:"revision",weight:10,lazyLoad:!0,tooltip:"You can lock the nested form to a specific revision by choosing the revision number here.",customConditional:"show = !!data.form"},{type:"checkbox",input:!0,weight:19,key:"useOriginalRevision",label:"Use Original Revision while Submissions Viewing",tooltip:"Using this option will make form load the original revision (the one which was used to make a submission) when viewing a submission."},{type:"checkbox",input:!0,weight:20,key:"reference",label:"Save as reference",tooltip:"Using this option will save this field as a reference and link its value to the value of the origin record."}]},78665:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=i(n(87422)),o=i(n(18106)),s=i(n(19274));t.default=function(...e){return r.default.baseEditForm([{key:"display",components:o.default},{key:"data",components:s.default},{key:"validation",ignore:!0},{key:"conditional",ignore:!0}],...e)}},68905:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=i(n(17389));class o extends r.default{static schema(...e){return r.default.schema({type:"hidden",tableView:!1,inputType:"hidden"},...e)}static get builderInfo(){return{title:"Hidden",group:"data",icon:"user-secret",weight:0,documentation:"/userguide/form-building/data-components#hidden",schema:o.schema()}}get defaultSchema(){return o.schema()}get inputInfo(){const e=super.elementInfo();return e.type="input",e.attr.type="hidden",e.changeEvent="change",e}get skipInEmail(){return!0}validateMultiple(){return!1}labelIsHidden(){return!0}get emptyValue(){return""}setValue(e,t={}){return this.updateValue(e,t)}getValue(){return this.dataValue}}t.default=o},19274:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=[{key:"multiple",ignore:!0},{key:"clearOnHide",ignore:!0},{key:"allowCalculateOverride",ignore:!0}]},18106:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=[{key:"labelPosition",ignore:!0},{key:"placeholder",ignore:!0},{key:"description",ignore:!0},{key:"tooltip",ignore:!0},{key:"hideLabel",ignore:!0},{key:"autofocus",ignore:!0},{key:"tabindex",ignore:!0},{key:"hidden",ignore:!0},{key:"tableView",ignore:!0},{key:"disabled",ignore:!0}]},50983:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=i(n(87422)),o=i(n(21026)),s=i(n(16022));t.default=function(...e){return r.default.baseEditForm([{key:"display",components:o.default},{key:"data",ignore:!0},{key:"validation",ignore:!0},{key:"logic",components:s.default}],...e)}},3571:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=i(n(96877)),o=i(n(2543));class s extends r.default{static schema(...e){return r.default.schema({label:"HTML",type:"htmlelement",tag:"p",attrs:[],content:"",input:!1,persistent:!1},...e)}static get builderInfo(){return{title:"HTML Element",group:"layout",icon:"code",weight:0,documentation:"/userguide/form-building/layout-components#html-element",schema:s.schema()}}get defaultSchema(){return s.schema()}get content(){if(this.builderMode)return this.component.content;if("select"===this.component.content.replace(/(<(\/?[^>]+)>)/g,"").trim())return` ${this.component.content} `;const e=o.default.get(this.root,"submission",{}),t=this.component.content?this.interpolate(this.component.content,{metadata:e.metadata||{},submission:e,data:this.rootValue,row:this.data}):"";return this.sanitize(t,this.shouldSanitizeValue)}get singleTags(){return["br","img","hr"]}checkRefreshOn(e){super.checkRefreshOn(e),!this.builderMode&&this.component.refreshOnChange&&this.element&&!o.default.isUndefined(e)&&(o.default.isBoolean(e)&&e||!o.default.isEmpty(e))&&this.conditionallyVisible(this.data,this.row)&&this.setContent(this.element,this.renderContent())}renderContent(){const e=o.default.get(this.root,"submission",{});return this.renderTemplate("html",{component:this.component,tag:this.component.tag,attrs:(this.component.attrs||[]).map((t=>({attr:t.attr,value:this.interpolate(t.value,{metadata:e.metadata||{},submission:e,data:this.rootValue,row:this.data})}))),content:this.content,singleTags:this.singleTags})}render(){return super.render(this.renderContent())}attach(e){return this.loadRefs(e,{html:"single"}),super.attach(e)}}t.default=s},21026:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=[{key:"labelPosition",ignore:!0},{key:"placeholder",ignore:!0},{key:"description",ignore:!0},{key:"tooltip",ignore:!0},{key:"hideLabel",ignore:!0},{key:"autofocus",ignore:!0},{key:"disabled",ignore:!0},{key:"tabindex",ignore:!0},{key:"tableView",ignore:!0},{type:"textfield",input:!0,key:"tag",weight:50,label:"HTML Tag",placeholder:"HTML Element Tag",tooltip:"The tag of this HTML element."},{type:"textfield",input:!0,key:"className",weight:60,label:"CSS Class",placeholder:"CSS Class",tooltip:"The CSS class for this HTML element."},{type:"datagrid",input:!0,label:"Attributes",key:"attrs",tooltip:"The attributes for this HTML element. Only safe attributes are allowed, such as src, href, and title.",weight:70,components:[{label:"Attribute",key:"attr",input:!0,type:"textfield"},{label:"Value",key:"value",input:!0,type:"textfield"}]},{type:"textarea",input:!0,editor:"ace",rows:10,as:"html",label:"Content",tooltip:"The content of this HTML element.",defaultValue:'You must assign the next variable with the API key of the next page.
\nThe global variable data is provided, and allows you to access the data of any form component, by using its API key.
\nAlso moment library is available, and allows you to manipulate dates in a convenient way.
\nnext = data.addComment ? 'page3' : 'page4';\n","\n
Submission data is available as JsonLogic variables, with the same api key as your components.
\n");t.default=[Object.assign(Object.assign({},u),{customConditional(e){let t=!1;if("wizard"===e.instance.options.editForm.display){const{components:n}=e.instance.options.editForm,i=e.instance.options.editComponent;n&&i&&(t=n.some((e=>{const t=(0,a.default)((0,l.default)(e),(0,l.default)(i))||[];return t.push("components"),(0,o.default)((0,s.default)(e,t),(0,s.default)(i,t))})))}return t}})]},13266:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=i(n(2404)),o=i(n(90179)),s=i(n(66245)),a=i(n(95950));t.default=[{key:"labelPosition",ignore:!0},{key:"placeholder",ignore:!0},{key:"description",ignore:!0},{key:"autofocus",ignore:!0},{key:"tableView",ignore:!0},{key:"label",hidden:!0,calculateValue:e=>e.data.title},{key:"tabindex",hidden:!0},{weight:1,type:"textfield",input:!0,placeholder:"Panel Title",label:"Title",key:"title",tooltip:"The title text that appears in the header of this panel."},{weight:20,type:"textarea",input:!0,key:"tooltip",label:"Tooltip",placeholder:"To add a tooltip to this field, enter text here.",tooltip:"Adds a tooltip to the side of this field."},{weight:30,type:"select",input:!0,label:"Theme",key:"theme",dataSrc:"values",data:{values:[{label:"Default",value:"default"},{label:"Primary",value:"primary"},{label:"Info",value:"info"},{label:"Success",value:"success"},{label:"Danger",value:"danger"},{label:"Warning",value:"warning"}]}},{weight:40,type:"fieldset",input:!1,components:[{type:"select",input:!0,label:"Breadcrumb Type",key:"breadcrumb",dataSrc:"values",data:{values:[{label:"Default",value:"default"},{label:"Condensed",value:"condensed"},{label:"Hidden",value:"none"}]}},{input:!0,type:"checkbox",label:"Allow click on Breadcrumb",key:"breadcrumbClickable",defaultValue:!0,conditional:{json:{"!==":[{var:"data.breadcrumb"},"none"]}}},{input:!0,type:"checkbox",label:"Allow Previous",key:"allowPrevious",defaultValue:!1,tooltip:"Determines if the breadcrumb bar is clickable or not for visited tabs.",conditional:{json:{"===":[{var:"data.breadcrumbClickable"},!1]}}},{weight:50,label:"Panel Navigation Buttons",optionsLabelPosition:"right",values:[{label:"Previous",value:"previous"},{label:"Cancel",value:"cancel"},{label:"Next",value:"next"}],inline:!0,type:"selectboxes",key:"buttonSettings",input:!0,inputType:"checkbox",defaultValue:{previous:!0,cancel:!0,next:!0}},{weight:55,label:"Navigate Wizard on Enter",type:"checkbox",key:"navigateOnEnter",input:!0,inputType:"checkbox",defaultValue:!1,tooltip:"Use the Enter key to go forward through pages."},{weight:56,label:"Save on Enter",type:"checkbox",key:"saveOnEnter",input:!0,inputType:"checkbox",defaultValue:!1,tooltip:"Use the Enter key to submit form on last page."},{weight:60,label:"Scroll up on page opening",type:"checkbox",key:"scrollToTop",input:!0,inputType:"checkbox",defaultValue:!1,tooltip:"Scroll to the top of the wizard page when user navigates to it"}],customConditional(e){let t=!1;if("wizard"===e.instance.options.editForm.display){const{components:n}=e.instance.options.editForm,i=e.instance.options.editComponent;n&&i&&(t=n.some((e=>{const t=(0,s.default)((0,a.default)(e),(0,a.default)(i))||[];return t.push("components"),(0,r.default)((0,o.default)(e,t),(0,o.default)(i,t))})))}return t}},{weight:650,type:"checkbox",label:"Collapsible",tooltip:"If checked, this will turn this Panel into a collapsible panel.",key:"collapsible",input:!0},{weight:651,type:"checkbox",label:"Initially Collapsed",tooltip:"Determines the initial collapsed state of this Panel.",key:"collapsed",input:!0,conditional:{json:{"===":[{var:"data.collapsible"},!0]}}}]},44103:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=i(n(94259)),o=i(n(99878)),s=i(n(11998)),a=i(n(9157));t.default=function(...e){return(0,r.default)([{key:"data",components:s.default},{key:"display",components:o.default},{key:"validation",components:a.default}],...e)}},66387:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=i(n(41767)),o=i(n(2543));class s extends r.default{static schema(...e){return r.default.schema({type:"password",label:"Password",key:"password",protected:!0,tableView:!1},...e)}static get builderInfo(){return{title:"Password",icon:"asterisk",group:"basic",documentation:"/userguide/form-building/form-components#password",weight:40,schema:s.schema()}}get defaultSchema(){return o.default.omit(s.schema(),["protected","tableView"])}get inputInfo(){const e=super.inputInfo;return e.attr.type="password",e}get autocompleteDisableAttrName(){return"new-password"}}t.default=s},11998:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=[{key:"inputFormat",ignore:!0},{key:"persistent",ignore:!0},{key:"protected",ignore:!0},{key:"dbIndex",ignore:!0},{key:"encrypted",ignore:!0},{key:"multiple",ignore:!0},{key:"defaultValue",ignore:!0},{key:"customDefaultValuePanel",ignore:!0},{key:"calculateValuePanel",ignore:!0},{key:"passwordInfo",weight:0,type:"htmlelement",tag:"div",className:"alert alert-info",content:"Password fields are automatically encrypted using 1-way salted bcrypt hashes. These hashes are also protected and not returned in the API."}]},99878:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=[{ignore:!0,key:"mask"},{key:"inputMask",ignore:!0},{key:"allowMultipleMasks",ignore:!0}]},9157:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=[{key:"unique",ignore:!0},{key:"validate.minWords",ignore:!0},{key:"validate.maxWords",ignore:!0}]},31739:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=i(n(94259)),o=i(n(17795));t.default=function(...e){return(0,r.default)([{key:"display",components:[{key:"showWordCount",ignore:!0},{key:"showCharCount",ignore:!0}]},{key:"validation",components:o.default}],...e)}},63983:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=i(n(41767));class o extends r.default{static schema(...e){return r.default.schema({type:"phoneNumber",label:"Phone Number",key:"phoneNumber",inputType:"tel",inputMask:"(999) 999-9999",inputMode:"decimal",displayMask:""},...e)}static get builderInfo(){return{title:"Phone Number",group:"advanced",icon:"phone-square",weight:30,documentation:"/userguide/form-building/advanced-components#phone-number",schema:o.schema()}}get defaultSchema(){return o.schema()}}t.default=o},17795:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=[{key:"validate.minLength",ignore:!0},{key:"validate.maxLength",ignore:!0},{key:"validate.pattern",ignore:!0},{key:"validate.minWords",ignore:!0},{key:"validate.maxWords",ignore:!0}]},59287:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=i(n(52850)),o=i(n(73368)),s=i(n(9784)),a=i(n(66323));t.default=function(...e){return(0,r.default)([{key:"display",components:s.default},{key:"data",components:o.default},{key:"validation",components:a.default}],...e)}},15811:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=i(n(2543)),o=i(n(80460)),s=i(n(53632)),a=n(29857),l=n(34600);class u extends o.default{static schema(...e){return o.default.schema({type:"radio",inputType:"radio",label:"Radio",key:"radio",values:[{label:"",value:""}],data:{url:""},fieldSet:!1},...e)}static get builderInfo(){return{title:"Radio",group:"basic",icon:"dot-circle-o",weight:80,documentation:"/userguide/form-building/form-components#radio",schema:u.schema()}}constructor(e,t,n){super(e,t,n),this.previousValue=this.dataValue||null}get defaultSchema(){return u.schema()}get defaultValue(){let e=super.defaultValue;return e||!1!==this.component.defaultValue||(e=this.component.defaultValue),e}get inputInfo(){var e;const t=super.elementInfo();return t.type="input",t.changeEvent="click",t.attr.class="form-check-input",t.attr.name=t.attr.name+=`[${null===(e=this.root)||void 0===e?void 0:e.id}-${this.id}]`,t}get emptyValue(){return""}get isRadio(){return"radio"===this.component.inputType}get optionSelectedClass(){return"radio-selected"}init(){super.init(),this.templateData={},this.validators=this.validators.concat(["select","onlyAvailableItems","availableValueProperty"]);let e=[];const t=r.default.debounce(((...t)=>(e=[],this.updateItems.apply(this,t))),100);this.triggerUpdate=(...n)=>("function"==typeof this.itemsLoadedResolve&&this.itemsLoadedResolve(),this.itemsLoaded=new s.default((e=>{this.itemsLoadedResolve=e})),n.length&&(e=n),t(...e)),this.itemsLoaded=new s.default((e=>{this.itemsLoadedResolve=e})),this.shouldLoad=!0,this.loadedOptions=[]}render(){return super.render(this.renderTemplate("radio",{input:this.inputInfo,inline:this.component.inline,values:"values"===this.component.dataSrc?this.component.values:this.loadedOptions,value:this.dataValue,row:this.row}))}attach(e){return this.loadRefs(e,{input:"multiple",wrapper:"multiple"}),this.refs.input.forEach(((e,t)=>{if(this.addEventListener(e,this.inputInfo.changeEvent,(()=>{this.updateValue(null,{modified:!0})})),this.component.values[t]&&this.addShortcut(e,this.component.values[t].shortcut),this.isRadio){let t=this.dataValue;r.default.isString(this.dataValue)||(t=r.default.toString(this.dataValue)),e.checked=t===e.value&&(e.value||"url"!==this.component.dataSrc),this.addEventListener(e,"keyup",(n=>{" "===n.key&&t===e.value&&(n.preventDefault(),this.updateValue(null,{modified:!0}))}))}})),this.triggerUpdate(),this.setSelectedClasses(),super.attach(e)}detach(e){e&&this.refs.input&&this.refs.input.forEach(((e,t)=>{this.component.values[t]&&this.removeShortcut(e,this.component.values[t].shortcut)})),super.detach()}getValue(){if(this.viewOnly||!this.refs.input||!this.refs.input.length)return this.dataValue;let e=this.dataValue;return this.refs.input.forEach((t=>{t.checked&&(e=t.value)})),e}validateValueProperty(){return"values"===this.component.dataSrc||!r.default.some(this.refs.wrapper,((e,t)=>this.refs.input[t].checked&&this.loadedOptions[t].invalid))}validateValueAvailability(e,t){if(!(0,l.boolValue)(e)||!t)return!0;const n=this.component.values;return!!n&&-1!==n.findIndex((({value:e})=>this.normalizeValue(e)===t))}getValueAsString(e){if(r.default.isString(e)||(e=r.default.toString(e)),"values"!==this.component.dataSrc)return e;const t=r.default.find(this.component.values,(t=>t.value===e));return r.default.get(t,"label","")}setValueAt(e,t){if(this.refs.input&&this.refs.input[e]&&null!=t){const n=this.refs.input[e].value;this.refs.input[e].checked=n===t.toString()}}loadItems(e,t,n,i,r,o){"GET"===(r=r||"GET").toUpperCase()&&(o=null),i.ignoreCache=this.component.ignoreCache,i.header=n,this.shouldLoad&&(this.loading=!0,a.Formio.makeRequest(this.options.formio,"select",e,r,o,i).then((e=>{this.loading=!1,this.error=null,this.setItems(e),this.shouldLoad=!1,this.redraw()})).catch((e=>{this.handleLoadingError(e)})))}setItems(e){null==e||e.forEach(((e,t)=>{this.loadedOptions[t]={value:e[this.component.valueProperty],label:this.itemTemplate(e,e[this.component.valueProperty])},(r.default.isUndefined(e[this.component.valueProperty])||r.default.isObject(e[this.component.valueProperty])||!this.isRadio&&r.default.isBoolean(e[this.component.valueProperty]))&&(this.loadedOptions[t].invalid=!0)}))}setSelectedClasses(){if(this.refs.wrapper){const e=this.dataValue;this.refs.wrapper.forEach(((t,n)=>{const i=this.refs.input[n];("checkbox"===i.type?e[i.value]:i.value.toString()===e.toString())?(this.addClass(t,this.optionSelectedClass),i.setAttribute("checked","true")):(this.removeClass(t,this.optionSelectedClass),i.removeAttribute("checked"))}))}}updateValue(e,t){const n=super.updateValue(e,t);return n&&this.setSelectedClasses(),t&&t.modified&&this.isRadio?(this.currentValue=this.dataValue,t&&t.modified&&!t.noUpdateEvent&&this.previousValue===this.currentValue&&(this.resetValue(),this.triggerChange(t),this.setSelectedClasses()),this.previousValue=this.dataValue,n):(n&&(this.previousValue=this.dataValue),n)}normalizeValue(e){return e===this.emptyValue?e:(!isNaN(parseFloat(e))&&isFinite(e)&&(e=+e),"true"===e&&(e=!0),"false"===e&&(e=!1),super.normalizeValue(e))}}t.default=u},73368:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=i(n(87338)),o=i(n(2543));t.default=[{key:"multiple",ignore:!0},{key:"dataSrc",data:{values:[{label:"Values",value:"values"},{label:"URL",value:"url"}]},validate:{required:!0},onChange(e){e&&e.flags&&e.flags&&e.flags.modified&&(e.data.values=[{label:"",value:""}])}},{type:"datagrid",input:!0,label:"Values",key:"values",tooltip:"The radio button values that can be picked for this field. Values are text submitted with the form data. Labels are text that appears next to the radio buttons on the form.",weight:10,reorder:!0,defaultValue:[{label:"",value:""}],components:[{label:"Label",key:"label",input:!0,type:"textfield"},{label:"Value",key:"value",input:!0,type:"textfield",allowCalculateOverride:!0,calculateValue:"value = _.camelCase(row.label);",validate:{required:!0}},{type:"select",input:!0,weight:180,label:"Shortcut",key:"shortcut",tooltip:"The shortcut key for this option.",dataSrc:"custom",valueProperty:"value",customDefaultValue:()=>"",template:"{{ item.label }}",data:{custom:e=>r.default.getAvailableShortcuts(o.default.get(e,"instance.options.editForm",{}),o.default.get(e,"instance.options.editComponent",{}))}}],conditional:{json:{"===":[{var:"data.dataSrc"},"values"]}}},{key:"template",conditional:{json:{"===":[{var:"data.dataSrc"},"url"]}}}]},9784:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=[{key:"placeholder",ignore:!0},{type:"select",input:!0,label:"Options Label Position",key:"optionsLabelPosition",tooltip:"Position for the label for options for this field.",dataSrc:"values",weight:32,defaultValue:"right",data:{values:[{label:"Top",value:"top"},{label:"Left",value:"left"},{label:"Right",value:"right"},{label:"Bottom",value:"bottom"}]}},{type:"checkbox",input:!0,key:"inline",label:"Inline Layout",tooltip:"Displays the checkboxes/radios horizontally.",weight:650}]},66323:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=[{key:"validateOn",ignore:!0},{key:"unique",ignore:!0},{weight:52,type:"checkbox",label:"Allow only available values",tooltip:"Check this if you would like to perform a validation check to ensure the selected value is an available option.",key:"validate.onlyAvailableItems",input:!0}]},22859:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=i(n(87422)),o=i(n(77408));t.default=function(){return r.default.baseEditForm([{key:"display",components:o.default},{key:"data",ignore:!0},{key:"validation",ignore:!0},{key:"conditional",ignore:!0},{key:"logic",ignore:!0}])}},92383:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=i(n(96877)),o=n(29857),s=i(n(58156)),a=i(n(38221)),l=i(n(53632));class u extends r.default{static schema(...e){return r.default.schema({type:"recaptcha",key:"recaptcha",label:"reCAPTCHA"},...e)}static get builderInfo(){return{title:"reCAPTCHA",group:"premium",icon:"refresh",documentation:"/userguide/form-building/premium-components#recaptcha",weight:40,schema:u.schema()}}render(){return this.recaptchaResult=null,this.builderMode?super.render("reCAPTCHA"):super.render("",!0)}createInput(){if(this.builderMode)this.append(this.text(this.name));else{const e=(0,s.default)(this.root.form,"settings.recaptcha.siteKey");if(e){const t=`https://www.google.com/recaptcha/api.js?render=${e}`;this.recaptchaApiReady=o.Formio.requireLibrary("googleRecaptcha","grecaptcha",t,!0)}else console.warn("There is no Site Key specified in settings in form JSON")}}createLabel(){}verify(e){const t=(0,s.default)(this.root.form,"settings.recaptcha.siteKey");if(t){if(!this.recaptchaApiReady){const e=`https://www.google.com/recaptcha/api.js?render=${(0,s.default)(this.root.form,"settings.recaptcha.siteKey")}`;this.recaptchaApiReady=o.Formio.requireLibrary("googleRecaptcha","grecaptcha",e,!0)}this.recaptchaApiReady&&(this.recaptchaVerifiedPromise=new l.default(((n,i)=>{this.recaptchaApiReady.then((()=>{this.isLoading||(this.isLoading=!0,grecaptcha.ready((0,a.default)((()=>{grecaptcha.execute(t,{action:e}).then((e=>this.sendVerificationRequest(e).then((({verificationResult:e,token:t})=>(this.recaptchaResult=Object.assign(Object.assign({},e),{token:t}),this.updateValue(this.recaptchaResult),n(e)))))).catch((()=>{this.isLoading=!1}))}),1e3)))})).catch((()=>i()))})).then((()=>{this.isLoading=!1})))}else console.warn("There is no Site Key specified in settings in form JSON")}beforeSubmit(){return this.recaptchaVerifiedPromise?this.recaptchaVerifiedPromise.then((()=>super.beforeSubmit())):super.beforeSubmit()}sendVerificationRequest(e){return o.Formio.makeStaticRequest(`${o.Formio.projectUrl}/recaptcha?recaptchaToken=${e}`).then((t=>({verificationResult:t,token:e})))}checkComponentValidity(e,t,n,i={}){e=e||this.rootValue,n=n||this.data;const{async:r=!1}=i;if(!r)return super.checkComponentValidity(e,t,n,i);const o=n[this.component.key];return o&&o.token?o.success?this.hook("validateReCaptcha",o.token,(()=>l.default.resolve(!0))).then((e=>e)).catch((e=>(this.setCustomValidity(e.message||e),!1))):(this.setCustomValidity("ReCAPTCHA: Token validation error"),l.default.resolve(!1)):(this.setCustomValidity("ReCAPTCHA: Token is not specified in submission"),l.default.resolve(!1))}normalizeValue(e){return this.recaptchaResult?this.recaptchaResult:e}}t.default=u},77408:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(34600);t.default=[{key:"eventType",label:"Type of event",tooltip:"Specify type of event that this reCAPTCHA would react to",type:"radio",values:[{label:"Form Load",value:"formLoad"},{label:"Button Click",value:"buttonClick"}],weight:650},{type:"select",input:!0,label:"Button Key",key:"buttonKey",dataSrc:"custom",valueProperty:"value",tooltip:"Specify key of button on this form that this reCAPTCHA should react to",weight:660,customConditional:e=>"buttonClick"===e.data.eventType,data:{custom:e=>(0,i.getContextButtons)(e)}},{key:"label",ignore:!0},{key:"hideLabel",ignore:!0},{key:"labelPosition",ignore:!0},{key:"placeholder",ignore:!0},{key:"description",ignore:!0},{key:"tooltip",ignore:!0},{key:"errorLabel",ignore:!0},{key:"customClass",ignore:!0},{key:"tabindex",ignore:!0},{key:"multiple",ignore:!0},{key:"clearOnHide",ignore:!0},{key:"hidden",ignore:!0},{key:"mask",ignore:!0},{key:"dataGridLabel",ignore:!0},{key:"disabled",ignore:!0},{key:"autofocus",ignore:!0},{key:"tableView",ignore:!0}]},10837:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=i(n(87422)),o=i(n(51602));t.default=function(...e){return r.default.baseEditForm([{key:"display",components:o.default}],...e)}},74429:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=i(n(43397));class o extends r.default{static schema(...e){return r.default.schema({type:"resource",label:"Resource",key:"resource",dataSrc:"resource",resource:"",project:"",template:"{{ item.data }}"},...e)}static get builderInfo(){return{title:"Resource",group:"premium",icon:"files-o",weight:90,documentation:"/userguide/form-building/form-components#resource",schema:o.schema()}}init(){super.init(),this.component.dataSrc="resource",this.component.data={resource:this.component.resource}}get defaultSchema(){return o.schema()}}t.default=o},51602:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=[{key:"resourceInfo",weight:-10,type:"htmlelement",tag:"div",className:"alert alert-danger",content:'The Resource component is deprecated. Use the Select component with data source of "Resource" instead.'},{type:"select",input:!0,dataSrc:"url",data:{url:"/form?type=resource&limit=1000000&select=_id,title"},authenticate:!0,template:"{{ item.title }}",valueProperty:"_id",label:"Resource",key:"resource",weight:50,tooltip:"The resource to be used with this field."},{type:"tags",input:!0,key:"selectFields",label:"Select Fields",tooltip:"The properties on the resource to return as part of the options. If left blank, all properties will be returned.",placeholder:"Enter the fields to select.",weight:51},{type:"tags",input:!0,key:"searchFields",label:"Search Fields",tooltip:"A list of search filters based on the fields of the resource. See the Resource.js documentation for the format of these filters.",placeholder:"The fields to query on the server",weight:52},{type:"textfield",input:!0,key:"filter",label:"Filter Query",weight:53,description:"The filter query for results.",tooltip:"Use this to provide additional filtering using query parameters."},{type:"textfield",input:!0,key:"sort",label:"Sort Query",weight:53,description:"The sort query for results",tooltip:"Use this to provide additional sorting using query parameters"},{type:"textarea",input:!0,key:"template",label:"Item Template",editor:"ace",as:"html",rows:3,weight:53,tooltip:"The HTML template for the result data items."},{type:"checkbox",input:!0,weight:54,key:"addResource",label:"Add Resource",tooltip:"Allows to create a new resource while entering a submission.",conditional:{json:{"===":[{var:"data.dataSrc"},"resource"]}}},{type:"textfield",label:"Add Resource Label",key:"addResourceLabel",tooltip:"Set the text of the Add Resource button.",placeholder:"Add Resource",weight:55,input:!0,conditional:{json:{and:[{"===":[{var:"data.dataSrc"},"resource"]},{"!!":{var:"data.addResource"}}]}}}]},63357:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=i(n(52850)),o=i(n(17938)),s=i(n(40770)),a=i(n(71465));t.default=function(...e){return(0,r.default)([{key:"display",components:s.default},{key:"data",components:o.default},{key:"validation",components:a.default}],...e)}},43397:function(e,t,n){"use strict";var i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const r=i(n(2543)),o=n(29857),s=i(n(80460)),a=i(n(18633)),l=i(n(53632)),u=n(34600),c=i(n(62646));class d extends s.default{static schema(...e){return s.default.schema({type:"select",label:"Select",key:"select",idPath:"id",data:{values:[{label:"",value:""}],json:"",url:"",resource:"",custom:""},clearOnRefresh:!1,limit:100,valueProperty:"",lazyLoad:!0,filter:"",searchEnabled:!0,searchDebounce:.3,searchField:"",minSearch:0,readOnlyValue:!1,selectFields:"",selectThreshold:.3,uniqueOptions:!1,tableView:!0,fuseOptions:{include:"score",threshold:.3},indexeddb:{filter:{}},customOptions:{},useExactSearch:!1},...e)}static get builderInfo(){return{title:"Select",group:"basic",icon:"th-list",weight:70,documentation:"/userguide/form-building/form-components#select",schema:d.schema()}}init(){super.init(),this.templateData={},this.validators=this.validators.concat(["select","onlyAvailableItems"]);let e=[];const t=r.default.debounce(((...t)=>(e=[],this.updateItems.apply(this,t))),100);this.triggerUpdate=(...n)=>("function"==typeof this.itemsLoadedResolve&&this.itemsLoadedResolve(),this.itemsLoaded=new l.default((e=>{this.itemsLoadedResolve=e})),n.length&&(e=n),t(...e)),this.selectOptions=[],this.itemsFromUrl&&(this.isFromSearch=!1,this.searchServerCount=null,this.defaultServerCount=null,this.isScrollLoading=!1,this.searchDownloadedResources=[],this.defaultDownloadedResources=[]),this.activated=!1,this.itemsLoaded=new l.default((e=>{this.itemsLoadedResolve=e})),this.isHtmlRenderMode()&&this.activate(),this.getTemplateKeys()}get dataReady(){return this.root&&this.root.submissionSet&&!this.attached?l.default.resolve():this.itemsLoaded}get defaultSchema(){return d.schema()}get emptyValue(){if(this.component.multiple)return[];if("json"===this.component.dataSrc&&this.component.data.json){const e=this.component.data.json[0];let t;return t=this.valueProperty?r.default.get(e,this.valueProperty):e,t&&"string"==typeof t?"":{}}return this.valueProperty?"":{}}get valueProperty(){return this.component.valueProperty?this.component.valueProperty:"values"===this.component.dataSrc?"value":""}get inputInfo(){const e=super.elementInfo();return e.type="select",e.changeEvent="change",e}get isSelectResource(){return"resource"===this.component.dataSrc}get itemsFromUrl(){return this.isSelectResource||this.isSelectURL}get isInfiniteScrollProvided(){return this.itemsFromUrl}get shouldDisabled(){return super.shouldDisabled||this.parentDisabled}isEntireObjectDisplay(){return"resource"===this.component.dataSrc&&"data"===this.valueProperty}selectValueAndLabel(e){const t=this.getOptionValue(this.isEntireObjectDisplay()&&!this.itemValue(e)?e:this.itemValue(e));return{value:t,label:this.itemTemplate(this.isEntireObjectDisplay()&&!r.default.isObject(e.data)?{data:e}:e,t)}}itemTemplate(e,t){if(!r.default.isNumber(e)&&r.default.isEmpty(e))return"";if(this.options.readOnly&&this.component.readOnlyValue)return this.itemValue(e);if(e&&!this.component.template){const t=e.label||e,n="string"==typeof t?this.t(t,{_userInput:!0}):t;return this.sanitize(n,this.shouldSanitizeValue)}if(this.component.multiple?this.dataValue.find((e=>t===e)):this.dataValue===t){const n=this.selectData;if(n){const i=this.component.reference&&(null==t?void 0:t._id)?t._id.toString():t;this.templateData&&this.templateData[i]||this.getOptionTemplate(e,t),this.component.multiple?n[i]&&(e=n[i]):e=n}}if("string"==typeof e||"number"==typeof e)return this.sanitize(this.t(e,{_userInput:!0}),this.shouldSanitizeValue);if(Array.isArray(e))return e.map((e=>"string"==typeof e||"number"==typeof e?this.sanitize(this.t(e,{_userInput:!0}),this.shouldSanitizeValue):e));if(e.data){const t=/item\.data\.\w*/g.test(this.component.template);e.data=this.isEntireObjectDisplay()&&r.default.isObject(e.data)&&!t?JSON.stringify(e.data):e.data}return super.itemTemplate(e,t)}addOption(e,t,n={},i=(0,u.getRandomComponentId)()){if(r.default.isNil(t))return;const o=this.component.idPath?this.component.idPath.split(".").reduceRight(((e,t)=>({[t]:e})),i):{},s=Object.assign({value:this.getOptionValue(e),label:t},o);if((!this.component.uniqueOptions||!this.selectOptions.find((e=>r.default.isEqual(e.value,s.value))))&&(e&&this.selectOptions.push(s),this.refs.selectContainer&&"html5"===this.component.widget)){s.value&&r.default.isObject(s.value)&&r.default.isEmpty(s.value)&&(s.value="");const t=document.createElement("div");t.innerHTML=this.sanitize(this.renderTemplate("selectOption",{selected:r.default.isEqual(this.getOptionValue(this.dataValue),s.value),option:s,attrs:n,id:i,useId:(""===this.valueProperty||this.isEntireObjectDisplay())&&r.default.isObject(e)&&i}),this.shouldSanitizeValue).trim(),s.element=t.firstChild,this.refs.selectContainer.appendChild(s.element)}}addValueOptions(e){e=e||[];let t=!1,n=this.dataValue;if(this.options.pdf&&!e.length&&"url"===this.component.dataSrc&&this.valueProperty&&(n=Array.isArray(n)?n.map((e=>r.default.set({},this.valueProperty,e))):r.default.set({},this.valueProperty,n)),!this.selectOptions.length){const i=Array.isArray(n)&&this.component.multiple?n:[n];t=this.addCurrentChoices(i,e),t||this.component.multiple||this.addPlaceholder()}return t}disableInfiniteScroll(){this.downloadedResources&&(this.downloadedResources.serverCount=this.downloadedResources.length,this.serverCount=this.downloadedResources.length)}setItems(e,t){var n,i;if("string"==typeof e)try{e=JSON.parse(e)}catch(t){console.warn(t.message),e=[]}if(this.component.onSetItems&&"function"==typeof this.component.onSetItems){const t=this.component.onSetItems(this,e);t&&(e=t)}let o;if(!this.choices&&this.refs.selectContainer&&this.empty(this.refs.selectContainer),this.component.selectValues&&(e=r.default.get(e,this.component.selectValues,e)||[]),this.itemsFromUrl){o=!!this.isSelectURL&&r.default.isEqual(e,this.downloadedResources);const t=this.component.limit>e.length,n=o&&this.downloadedResources&&this.downloadedResources.length===e.length;t?this.disableInfiniteScroll():n?this.selectOptions=[]:this.serverCount=e.serverCount}if(this.isScrollLoading&&e)o||(this.downloadedResources=this.downloadedResources?this.downloadedResources.concat(e):e),this.downloadedResources.serverCount=e.serverCount||this.downloadedResources.serverCount;else if(this.downloadedResources=e||[],this.selectOptions=[],!r.default.isEmpty(this.dataValue)&&this.component.idPath){const t=r.default.get(this.dataValue,this.component.idPath,null),n=!r.default.isNil(t)&&e.find((e=>r.default.get(e,this.component.idPath)===t));n&&this.setValue(n)}if(t||this.addValueOptions(e),"html5"!==this.component.widget||this.component.placeholder||this.addOption(null,""),r.default.each(e,((e,t)=>{if(this.root&&this.root.options.editForm&&this.root.options.editForm._id&&this.root.options.editForm._id===e._id)return;const n=this.selectValueAndLabel(e);this.addOption(n.value,n.label,{},r.default.get(e,this.component.idPath,String(t)))})),this.choices?this.choices.setChoices(this.selectOptions,"value","label",!0):this.loading,this.isScrollLoading=!1,this.loading=!1,!t||!(null===(i=null===(n=this.choices)||void 0===n?void 0:n.input)||void 0===i?void 0:i.isFocussed))if(this.isEmpty()){if(this.shouldAddDefaultValue&&!this.options.readOnly){const e=this.defaultValue;this.isEmpty(e)||this.setValue(e)}}else this.setValue(this.dataValue,{noUpdateEvent:!0});this.itemsLoadedResolve()}getSingleItemValueForHTMLMode(e){var t;const n=null===(t=this.selectOptions)||void 0===t?void 0:t.find((({value:t})=>r.default.isEqual(t,e)));return n&&n.label||e}itemValueForHTMLMode(e){return this.isHtmlRenderMode()?Array.isArray(e)?e.map((e=>Array.isArray(e)?this.itemValueForHTMLMode(e):this.getSingleItemValueForHTMLMode(e))).join(", "):this.getSingleItemValueForHTMLMode(e):super.itemValueForHTMLMode(e)}get defaultValue(){let e=super.defaultValue;return e||!1!==this.component.defaultValue&&0!==this.component.defaultValue||(e=this.component.defaultValue),e}getTemplateKeys(){if(this.templateKeys=[],this.options.readOnly&&this.component.template){const e=this.component.template.match(/({{\s*(.*?)\s*}})/g);e&&e.forEach((e=>{const t=e.match(/{{\s*item\.(.*?)\s*}}/);t&&t.length>1&&this.templateKeys.push(t[1])}))}}get loadingError(){return!this.component.refreshOn&&!this.component.refreshOnBlur&&this.networkError}get selectData(){const e=r.default.get(this.root,"submission.metadata.selectData",{});return r.default.get(e,this.path)}get shouldLoad(){if(this.loadingError)return!1;if(!this.options.readOnly)return!0;if(this.templateKeys&&this.templateKeys.length){const e=this.dataValue,t=this.selectData;return this.templateKeys.reduce(((n,i)=>{const o=r.default.has(e,i)||r.default.has(t,i);return n||!o}),!1)}return!0}loadItems(e,t,n,i,s,a){if(i=i||{},!this.shouldLoad||!this.itemsFromUrl&&this.options.readOnly)return this.isScrollLoading=!1,this.loading=!1,void this.itemsLoadedResolve();const l=parseInt(this.component.minSearch,10);if(this.component.searchField&&l>0&&(!t||t.length["apple", "banana", "orange"].
[{"name": "John", "email": "john.doe@test.com"}, {"name": "Jane", "email": "jane.doe@test.com"}].| Question | \nValue | \n
|---|---|
| ${i.label} | \n${o.label} | \n
",n="