diff --git a/.gitignore b/.gitignore index 36e0d14..8574d76 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,8 @@ node_modules coverage +dist .cache .DS_Store .vscode +*.sublime-project +*.sublime-workspace diff --git a/dist/formulate.esm.js b/dist/formulate.esm.js deleted file mode 100644 index 53400a6..0000000 --- a/dist/formulate.esm.js +++ /dev/null @@ -1 +0,0 @@ -import t from"is-url";import e from"nanoid/non-secure";import r from"is-plain-object";import{en as i}from"@braid/vue-formulate-i18n";var o=function(t,e){return{classification:t,component:"FormulateInput"+(e||t[0].toUpperCase()+t.substr(1))}},n=Object.assign({},["text","email","number","color","date","hidden","month","password","search","tel","time","url","week","datetime-local"].reduce((function(t,e){var r;return Object.assign({},t,((r={})[e]=o("text"),r))}),{}),{range:o("slider"),textarea:o("textarea","TextArea"),checkbox:o("box"),radio:o("box"),submit:o("button"),button:o("button"),select:o("select"),file:o("file"),image:o("file"),group:o("group")}),s=function(t,e,r){void 0===r&&(r={}),this.input=t,this.fileList=t.files,this.files=[],this.options=Object.assign({},{mimes:{}},r),this.results=!1,this.context=e,Array.isArray(this.fileList)?this.rehydrateFileList(this.fileList):this.addFileList(this.fileList)};function a(t,e){var r={};for(var i in t)r[i]=e(i,t[i]);return r}function l(t,e){if(t===e)return!0;if(!t||!e)return!1;var r=Object.keys(t),i=Object.keys(e),o=r.length;if(i.length!==o)return!1;for(var n=0;n=100&&(e.complete||(e.justFinished=!0,setTimeout((function(){e.justFinished=!1}),t.options.uploadJustCompleteDuration)),e.complete=!0)}),(function(t){e.progress=0,e.error=t,e.complete=!0}),t.options)}))).then((function(r){t.results=r,e(r)})).catch((function(t){throw new Error(t)}))}))},s.prototype.removeFile=function(t){if(this.files=this.files.filter((function(e){return e.uuid!==t})),this.context.performValidation(),window&&this.fileList instanceof FileList){var e=new DataTransfer;this.files.map((function(t){return e.items.add(t.file)})),this.fileList=e.files,this.input.files=this.fileList}},s.prototype.loadPreviews=function(){this.files.map((function(t){if(!t.previewData&&window&&window.FileReader&&/^image\//.test(t.file.type)){var e=new FileReader;e.onload=function(e){return Object.assign(t,{previewData:e.target.result})},e.readAsDataURL(t.file)}}))},s.prototype.getFileList=function(){return this.fileList},s.prototype.getFiles=function(){return this.files},s.prototype.toString=function(){var t=this.files.length?this.files.length+" files":"empty";return this.results?JSON.stringify(this.results,null," "):"FileUpload("+t+")"};var v={accepted:function(t){var e=t.value;return Promise.resolve(["yes","on","1",1,!0,"true"].includes(e))},after:function(t,e){var r=t.value;void 0===e&&(e=!1);var i=Date.parse(e||new Date),o=Date.parse(r);return Promise.resolve(!isNaN(o)&&o>i)},alpha:function(t,e){var r=t.value;void 0===e&&(e="default");var i={default:/^[a-zA-ZÀ-ÖØ-öø-ÿ]+$/,latin:/^[a-zA-Z]+$/},o=i.hasOwnProperty(e)?e:"default";return Promise.resolve(i[o].test(r))},alphanumeric:function(t,e){var r=t.value;void 0===e&&(e="default");var i={default:/^[a-zA-Z0-9À-ÖØ-öø-ÿ]+$/,latin:/^[a-zA-Z0-9]+$/},o=i.hasOwnProperty(e)?e:"default";return Promise.resolve(i[o].test(r))},before:function(t,e){var r=t.value;void 0===e&&(e=!1);var i=Date.parse(e||new Date),o=Date.parse(r);return Promise.resolve(!isNaN(o)&&oe&&oe&&o.length()\[\]\.,;:\s@\"]+(\.[^<>()\[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i.test(e))},endsWith:function(t){for(var e=t.value,r=[],i=arguments.length-1;i-- >0;)r[i]=arguments[i+1];return Promise.resolve("string"==typeof e&&r.length?void 0!==r.find((function(t){return e.endsWith(t)})):"string"==typeof e&&0===r.length)},in:function(t){for(var e=t.value,r=[],i=arguments.length-1;i-- >0;)r[i]=arguments[i+1];return Promise.resolve(void 0!==r.find((function(t){return"object"==typeof t?l(t,e):t===e})))},matches:function(t){for(var e=t.value,r=[],i=arguments.length-1;i-- >0;)r[i]=arguments[i+1];return Promise.resolve(!!r.find((function(t){return"string"==typeof t&&"/"===t.substr(0,1)&&"/"===t.substr(-1)&&(t=new RegExp(t.substr(1,t.length-2))),t instanceof RegExp?t.test(e):t===e})))},mime:function(t){for(var e=t.value,r=[],i=arguments.length-1;i-- >0;)r[i]=arguments[i+1];return Promise.resolve(function(){if(e instanceof s)for(var t=e.getFiles(),i=0;i=e):!isNaN(i)&&"length"!==r||"value"===r?(i=isNaN(i)?i:Number(i))>=e:("string"==typeof i||"length"===r)&&(i=isNaN(i)?i:i.toString()).length>=e)},max:function(t,e,r){var i=t.value;return void 0===e&&(e=10),Promise.resolve(Array.isArray(i)?(e=isNaN(e)?e:Number(e),i.length<=e):!isNaN(i)&&"length"!==r||"value"===r?(i=isNaN(i)?i:Number(i))<=e:("string"==typeof i||"length"===r)&&(i=isNaN(i)?i:i.toString()).length<=e)},not:function(t){for(var e=t.value,r=[],i=arguments.length-1;i-- >0;)r[i]=arguments[i+1];return Promise.resolve(void 0===r.find((function(t){return"object"==typeof t?l(t,e):t===e})))},number:function(t){var e=t.value;return Promise.resolve(!isNaN(e))},required:function(t,e){var r=t.value;return void 0===e&&(e=!0),Promise.resolve(!(e&&!["no","false"].includes(e))||(Array.isArray(r)?!!r.length:r instanceof s?r.getFiles().length>0:"string"==typeof r?!!r:"object"!=typeof r||!!r&&!!Object.keys(r).length))},startsWith:function(t){for(var e=t.value,r=[],i=arguments.length-1;i-- >0;)r[i]=arguments[i+1];return Promise.resolve("string"==typeof e&&r.length?void 0!==r.find((function(t){return e.startsWith(t)})):"string"==typeof e&&0===r.length)},url:function(e){var r=e.value;return Promise.resolve(t(r))},bail:function(){return Promise.resolve(!0)}},y="image/",g={csv:"text/csv",gif:y+"gif",jpg:y+"jpeg",jpeg:y+"jpeg",png:y+"png",pdf:"application/pdf",svg:y+"svg+xml"};function b(t,e,r,i){return new Promise((function(r,o){var n=(i.fauxUploaderDuration||2e3)*(.5+Math.random()),s=performance.now(),a=function(){return setTimeout((function(){var i=performance.now()-s,o=Math.min(100,Math.round(i/n*100));if(e(o),o>=100)return r({url:"http://via.placeholder.com/350x150.png",name:t.name});a()}),20)};a()}))}function x(t,e){var r={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&-1===e.indexOf(i)&&(r[i]=t[i]);return r}var E={inheritAttrs:!1,functional:!0,render:function(t,e){for(var r=e.props,i=e.data,o=e.parent,n=e.children,s=o,a=(r.name,r.forceWrap),l=r.context,u=x(r,["name","forceWrap","context"]);s&&"FormulateInput"!==s.$options.name;)s=s.$parent;if(!s)return null;if(s.$scopedSlots&&s.$scopedSlots[r.name])return s.$scopedSlots[r.name](Object.assign({},l,u));if(Array.isArray(n)&&(n.length>1||a&&n.length>0)){var c=i.attrs,h=(c.name,c.context,x(c,["name","context"]));return t("div",Object.assign({},i,{attrs:h}),n)}return Array.isArray(n)&&1===n.length?n[0]:null}};function F(t,e){var r={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&-1===e.indexOf(i)&&(r[i]=t[i]);return r}var V=function(t){this.registry=new Map,this.ctx=t};function w(t){return new V(t).dataProps()}function O(){return{hasInitialValue:function(){return this.formulateValue&&"object"==typeof this.formulateValue||this.values&&"object"==typeof this.values||this.isGrouping&&"object"==typeof this.context.model[this.index]},isVmodeled:function(){return!!(this.$options.propsData.hasOwnProperty("formulateValue")&&this._events&&Array.isArray(this._events.input)&&this._events.input.length)},initialValues:function(){return p(this.$options.propsData,"formulateValue")&&"object"==typeof this.formulateValue?Object.assign({},this.formulateValue):p(this.$options.propsData,"values")&&"object"==typeof this.values?Object.assign({},this.values):this.isGrouping&&"object"==typeof this.context.model[this.index]?this.context.model[this.index]:{}}}}function j(t){void 0===t&&(t=[]);var e={applyInitialValues:function(){this.hasInitialValue&&(this.proxy=this.initialValues)},setFieldValue:function(t,e){var r;if(void 0===e){var i=this.proxy,o=(i[t],F(i,[String(t)]));this.proxy=o}else Object.assign(this.proxy,((r={})[t]=e,r));this.$emit("input",Object.assign({},this.proxy))},getFormValues:function(){return this.proxy},hasValidationErrors:function(){return Promise.all(this.registry.reduce((function(t,e,r){return t.push(e.performValidation()&&e.getValidationErrors()),t}),[])).then((function(t){return t.some((function(t){return t.hasErrors}))}))},showErrors:function(){this.childrenShouldShowErrors=!0,this.registry.map((function(t){t.formShouldShowErrors=!0}))},hideErrors:function(){this.childrenShouldShowErrors=!1,this.registry.map((function(t){t.formShouldShowErrors=!1,t.behavioralErrorVisibility=!1}))},setValues:function(t){var e=this;Array.from(new Set(Object.keys(t).concat(Object.keys(this.proxy)))).forEach((function(r){!e.registry.has(r)||l(t[r],e.proxy[r])||l(t[r],e.registry.get(r).proxy)||(e.setFieldValue(r,t[r]),e.registry.get(r).context.model=t[r])}))}};return Object.keys(e).reduce((function(r,i){var o;return t.includes(i)?r:Object.assign({},r,((o={})[i]=e[i],o))}),{})}function S(t){return{formulateSetter:t.setFieldValue,formulateRegister:t.register,formulateDeregister:t.deregister,getFormValues:t.getFormValues}}V.prototype.add=function(t,e){return this.registry.set(t,e),this},V.prototype.remove=function(t){this.registry.delete(t);var e=this.ctx.proxy,r=(e[t],F(e,[String(t)]));return this.ctx.proxy=r,this},V.prototype.has=function(t){return this.registry.has(t)},V.prototype.get=function(t){return this.registry.get(t)},V.prototype.map=function(t){var e={};return this.registry.forEach((function(r,i){var o;return Object.assign(e,((o={})[i]=t(r,i),o))})),e},V.prototype.keys=function(){return Array.from(this.registry.keys())},V.prototype.register=function(t,e){if(this.registry.has(t))return!1;this.registry.set(t,e);var r=p(e.$options.propsData,"formulateValue"),i=p(e.$options.propsData,"value");!r&&this.ctx.hasInitialValue&&this.ctx.initialValues[t]?e.context.model=this.ctx.initialValues[t]:!r&&!i||l(e.proxy,this.ctx.initialValues[t])||this.ctx.setFieldValue(t,e.proxy),this.childrenShouldShowErrors&&(e.formShouldShowErrors=!0)},V.prototype.reduce=function(t,e){return this.registry.forEach((function(r,i){e=t(e,r,i)})),e},V.prototype.dataProps=function(){var t=this;return{proxy:{},registry:this,register:this.register.bind(this),deregister:function(e){return t.remove(e)},childrenShouldShowErrors:!1}};var P=function(t){this.form=t};function _(t,e,r,i,o,n,s,a,l,u){"boolean"!=typeof s&&(l=a,a=s,s=!1);var c,h="function"==typeof r?r.options:r;if(t&&t.render&&(h.render=t.render,h.staticRenderFns=t.staticRenderFns,h._compiled=!0,o&&(h.functional=!0)),i&&(h._scopeId=i),n?(c=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),e&&e.call(this,l(t)),t&&t._registeredComponents&&t._registeredComponents.add(n)},h._ssrRegister=c):e&&(c=s?function(t){e.call(this,u(t,this.$root.$options.shadowRoot))}:function(t){e.call(this,a(t))}),c)if(h.functional){var d=h.render;h.render=function(t,e){return c.call(e),d(t,e)}}else{var f=h.beforeCreate;h.beforeCreate=f?[].concat(f,c):[c]}return r}P.prototype.hasValidationErrors=function(){return this.form.hasValidationErrors()},P.prototype.values=function(){var t=this;return new Promise((function(e,r){var i=[],o=function t(e){if("object"!=typeof e)return e;var r=Array.isArray(e)?[]:{};for(var i in e)e[i]instanceof s||f(e[i])?r[i]=e[i]:r[i]=t(e[i]);return r}(t.form.proxy),n=function(e){"object"==typeof t.form.proxy[e]&&t.form.proxy[e]instanceof s&&i.push(t.form.proxy[e].upload().then((function(t){var r;return Object.assign(o,((r={})[e]=t,r))})))};for(var a in o)n(a);Promise.all(i).then((function(){return e(o)})).catch((function(t){return r(t)}))}))};var A={provide:function(){return Object.assign({},S(this),{observeErrors:this.addErrorObserver,removeErrorObserver:this.removeErrorObserver,formulateFieldValidation:this.formulateFieldValidation})},name:"FormulateForm",model:{prop:"formulateValue",event:"input"},props:{name:{type:[String,Boolean],default:!1},formulateValue:{type:Object,default:function(){return{}}},values:{type:[Object,Boolean],default:!1},errors:{type:[Object,Boolean],default:!1},formErrors:{type:Array,default:function(){return[]}}},data:function(){return Object.assign({},w(this),{formShouldShowErrors:!1,errorObservers:[],namedErrors:[],namedFieldErrors:{}})},computed:Object.assign({},O(),{formContext:function(){return{errors:this.mergedFormErrors}},classes:function(){var t={"formulate-form":!0};return this.name&&(t["formulate-form--"+this.name]=!0),t},mergedFormErrors:function(){return this.formErrors.concat(this.namedErrors)},mergedFieldErrors:function(){var t={};if(this.errors)for(var e in this.errors)t[e]=c(this.errors[e]);for(var r in this.namedFieldErrors)t[r]=c(this.namedFieldErrors[r]);return t},hasFormErrorObservers:function(){return!!this.errorObservers.filter((function(t){return"form"===t.type})).length}}),watch:{formulateValue:{handler:function(t){this.isVmodeled&&t&&"object"==typeof t&&this.setValues(t)},deep:!0},mergedFormErrors:function(t){this.errorObservers.filter((function(t){return"form"===t.type})).forEach((function(e){return e.callback(t)}))},mergedFieldErrors:{handler:function(t){this.errorObservers.filter((function(t){return"input"===t.type})).forEach((function(e){return e.callback(t[e.field]||[])}))},immediate:!0}},created:function(){this.$formulate.register(this),this.applyInitialValues()},destroyed:function(){this.$formulate.deregister(this)},methods:Object.assign({},j(),{applyErrors:function(t){var e=t.formErrors,r=t.inputErrors;this.namedErrors=e,this.namedFieldErrors=r},addErrorObserver:function(t){this.errorObservers.find((function(e){return t.callback===e.callback}))||(this.errorObservers.push(t),"form"===t.type?t.callback(this.mergedFormErrors):p(this.mergedFieldErrors,t.field)&&t.callback(this.mergedFieldErrors[t.field]))},removeErrorObserver:function(t){this.errorObservers=this.errorObservers.filter((function(e){return e.callback!==t}))},registerErrorComponent:function(t){this.errorComponents.includes(t)||this.errorComponents.push(t)},formSubmitted:function(){var t=this;this.showErrors();var e=new P(this);return this.$emit("submit-raw",e),e.hasValidationErrors().then((function(t){return t?void 0:e.values()})).then((function(e){if(void 0!==e)return t.$emit("submit",e),e}))},formulateFieldValidation:function(t){this.$emit("validation",t)}})},$=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("form",{class:t.classes,on:{submit:function(e){return e.preventDefault(),t.formSubmitted(e)}}},[t.hasFormErrorObservers?t._e():r("FormulateErrors",{attrs:{context:t.formContext}}),t._v(" "),t._t("default")],2)};$._withStripped=!0;var R=_({render:$,staticRenderFns:[]},void 0,A,void 0,!1,void 0,!1,void 0,void 0,void 0),N={context:function(){return k.call(this,Object.assign({},{addLabel:this.logicalAddLabel,attributes:this.elementAttributes,blurHandler:I.bind(this),classification:this.classification,component:this.component,disableErrors:this.disableErrors,errors:this.explicitErrors,allErrors:this.allErrors,formShouldShowErrors:this.formShouldShowErrors,getValidationErrors:this.getValidationErrors.bind(this),hasGivenName:this.hasGivenName,hasLabel:this.label&&"button"!==this.classification,hasValidationErrors:this.hasValidationErrors.bind(this),help:this.help,helpPosition:this.logicalHelpPosition,id:this.id||this.defaultId,imageBehavior:this.imageBehavior,label:this.label,labelPosition:this.logicalLabelPosition,limit:this.limit,name:this.nameOrFallback,performValidation:this.performValidation.bind(this),preventWindowDrops:this.preventWindowDrops,repeatable:this.repeatable,setErrors:this.setErrors.bind(this),showValidationErrors:this.showValidationErrors,slotComponents:this.slotComponents,type:this.type,uploadBehavior:this.uploadBehavior,uploadUrl:this.mergedUploadUrl,uploader:this.uploader||this.$formulate.getUploader(),validationErrors:this.validationErrors,value:this.value,visibleValidationErrors:this.visibleValidationErrors,isSubField:this.isSubField},this.typeContext))},nameOrFallback:function(){if(!0===this.name&&"button"!==this.classification)return this.type+"_"+this.elementAttributes.id;if(!1===this.name||"button"===this.classification&&!0===this.name)return!1;return this.name},hasGivenName:function(){return"boolean"!=typeof this.name},typeContext:function(){var t=this;switch(this.classification){case"select":return{options:C.call(this,this.options),optionGroups:!!this.optionGroups&&a(this.optionGroups,(function(e,r){return C.call(t,r)})),placeholder:this.$attrs.placeholder||!1};case"slider":return{showValue:!!this.showValue};default:return this.options?{options:C.call(this,this.options)}:{}}},elementAttributes:function(){var t=Object.assign({},this.localAttributes);this.id?t.id=this.id:t.id=this.defaultId;this.hasGivenName&&(t.name=this.name);this.help&&(t["aria-describedby"]=t.id+"-help");return t},logicalLabelPosition:function(){if(this.labelPosition)return this.labelPosition;switch(this.classification){case"box":return"after";default:return"before"}},logicalHelpPosition:function(){if(this.helpPosition)return this.helpPosition;switch(this.classification){case"group":return"before";default:return"after"}},mergedUploadUrl:function(){return this.uploadUrl||this.$formulate.getUploadUrl()},isVmodeled:function(){return!!(this.$options.propsData.hasOwnProperty("formulateValue")&&this._events&&Array.isArray(this._events.input)&&this._events.input.length)},mergedValidationName:function(){if(this.validationName)return this.validationName;if("string"==typeof this.name)return this.name;if(this.label)return this.label;return this.type},explicitErrors:function(){return c(this.errors).concat(this.localErrors).concat(c(this.error))},allErrors:function(){return this.explicitErrors.concat(c(this.validationErrors))},hasErrors:function(){return!!this.allErrors.length},hasVisibleErrors:function(){return this.validationErrors&&this.showValidationErrors||!!this.explicitErrors.length},showValidationErrors:function(){if(this.showErrors||this.formShouldShowErrors)return!0;if("file"===this.classification&&"live"===this.uploadBehavior&&D.call(this))return!0;return this.behavioralErrorVisibility},visibleValidationErrors:function(){return this.showValidationErrors&&this.validationErrors.length?this.validationErrors:[]},slotComponents:function(){return{label:this.$formulate.slotComponent(this.type,"label"),help:this.$formulate.slotComponent(this.type,"help"),errors:this.$formulate.slotComponent(this.type,"errors"),repeatable:this.$formulate.slotComponent(this.type,"repeatable"),addMore:this.$formulate.slotComponent(this.type,"addMore"),remove:this.$formulate.slotComponent(this.type,"remove")}},logicalAddLabel:function(){if("boolean"==typeof this.addLabel)return"+ "+(this.label||this.name||"Add");return this.addLabel}};function C(t){if(!Array.isArray(t)&&t&&"object"==typeof t){var e=[];for(var r in t)e.push({value:r,label:t[r],id:this.elementAttributes.id+"_"+r});return e}return t}function I(){this.$emit("blur"),"blur"===this.errorBehavior&&(this.behavioralErrorVisibility=!0)}function k(t){return Object.defineProperty(t,"model",{get:D.bind(this),set:L.bind(this)})}function D(){var t=this.isVmodeled?"formulateValue":"proxy";return"checkbox"===this.type&&!Array.isArray(this[t])&&this.options?[]:this[t]?this[t]:""}function L(t){l(t,this.proxy)||(this.proxy=t),this.$emit("input",t),this.context.name&&"function"==typeof this.formulateSetter&&this.formulateSetter(this.context.name,t)}var U={name:"FormulateInput",inheritAttrs:!1,provide:function(){return{formulateRegisterRule:this.registerRule,formulateRemoveRule:this.removeRule}},inject:{formulateSetter:{default:void 0},formulateFieldValidation:{default:function(){return function(){return{}}}},formulateRegister:{default:void 0},formulateDeregister:{default:void 0},getFormValues:{default:function(){return function(){return{}}}},observeErrors:{default:void 0},removeErrorObserver:{default:void 0},isSubField:{default:function(){return function(){return!1}}}},model:{prop:"formulateValue",event:"input"},props:{type:{type:String,default:"text"},name:{type:[String,Boolean],default:!0},formulateValue:{default:""},value:{default:!1},options:{type:[Object,Array,Boolean],default:!1},optionGroups:{type:[Object,Boolean],default:!1},id:{type:[String,Boolean,Number],default:!1},label:{type:[String,Boolean],default:!1},labelPosition:{type:[String,Boolean],default:!1},limit:{type:Number,default:1/0},help:{type:[String,Boolean],default:!1},helpPosition:{type:[String,Boolean],default:!1},errors:{type:[String,Array,Boolean],default:!1},repeatable:{type:Boolean,default:!1},validation:{type:[String,Boolean,Array],default:!1},validationName:{type:[String,Boolean],default:!1},error:{type:[String,Boolean],default:!1},errorBehavior:{type:String,default:"blur",validator:function(t){return["blur","live","submit"].includes(t)}},showErrors:{type:Boolean,default:!1},imageBehavior:{type:String,default:"preview"},uploadUrl:{type:[String,Boolean],default:!1},uploader:{type:[Function,Object,Boolean],default:!1},uploadBehavior:{type:String,default:"live"},preventWindowDrops:{type:Boolean,default:!0},showValue:{type:[String,Boolean],default:!1},validationMessages:{type:Object,default:function(){return{}}},validationRules:{type:Object,default:function(){return{}}},checked:{type:[String,Boolean],default:!1},disableErrors:{type:Boolean,default:!1},addLabel:{type:[Boolean,String],default:!1}},data:function(){return{defaultId:this.$formulate.nextId(this),localAttributes:{},localErrors:[],proxy:this.getInitialValue(),behavioralErrorVisibility:"live"===this.errorBehavior,formShouldShowErrors:!1,validationErrors:[],pendingValidation:Promise.resolve(),ruleRegistry:[],messageRegistry:{}}},computed:Object.assign({},N,{classification:function(){var t=this.$formulate.classify(this.type);return"box"===t&&this.options?"group":t},component:function(){return"group"===this.classification?"FormulateInputGroup":this.$formulate.component(this.type)},parsedValidationRules:function(){var t=this,e={};return Object.keys(this.validationRules).forEach((function(r){e[u(r)]=t.validationRules[r]})),e},messages:function(){var t=this,e={};return Object.keys(this.validationMessages).forEach((function(r){e[u(r)]=t.validationMessages[r]})),Object.keys(this.messageRegistry).forEach((function(r){e[u(r)]=t.messageRegistry[r]})),e}}),watch:{$attrs:{handler:function(t){this.updateLocalAttributes(t)},deep:!0},proxy:function(t,e){this.performValidation(),this.isVmodeled||l(t,e)||(this.context.model=t)},formulateValue:function(t,e){this.isVmodeled&&!l(t,e)&&(this.context.model=t)},showValidationErrors:{handler:function(t){this.$emit("error-visibility",t)},immediate:!0}},created:function(){this.applyInitialValue(),this.formulateRegister&&"function"==typeof this.formulateRegister&&this.formulateRegister(this.nameOrFallback,this),this.disableErrors||"function"!=typeof this.observeErrors||this.observeErrors({callback:this.setErrors,type:"input",field:this.nameOrFallback}),this.updateLocalAttributes(this.$attrs),this.performValidation()},beforeDestroy:function(){this.disableErrors||"function"!=typeof this.removeErrorObserver||this.removeErrorObserver(this.setErrors),"function"==typeof this.formulateDeregister&&this.formulateDeregister(this.nameOrFallback)},methods:{getInitialValue:function(){var t=this.$formulate.classify(this.type);return"box"===(t="box"===t&&this.options?"group":t)&&this.checked?this.value||!0:p(this.$options.propsData,"value")&&"box"!==t?this.value:p(this.$options.propsData,"formulateValue")?this.formulateValue:""},applyInitialValue:function(){!l(this.context.model,this.proxy)&&Object.prototype.hasOwnProperty(this.$options.propsData,"options")&&"box"===this.classification&&(this.context.model=this.proxy)},updateLocalAttributes:function(t){l(t,this.localAttributes)||(this.localAttributes=t)},performValidation:function(){var t=this,e=h(this.validation,this.$formulate.rules(this.parsedValidationRules));return e=this.ruleRegistry.length?this.ruleRegistry.concat(e):e,this.pendingValidation=this.runRules(e).then((function(e){return t.didValidate(e)})),this.pendingValidation},runRules:function(t){var e=this,r=function(t){var r=t[0],i=t[1],o=t[2],n=(t[3],r.apply(void 0,[{value:e.context.model,getFormValues:e.getFormValues.bind(e),name:e.context.name}].concat(i)));return(n=n instanceof Promise?n:Promise.resolve(n)).then((function(t){return!t&&e.getMessage(o,i)}))};return new Promise((function(e){var i=function(t,o){void 0===o&&(o=[]);var n=t.shift();Array.isArray(n)&&n.length?Promise.all(n.map(r)).then((function(t){return t.filter((function(t){return!!t}))})).then((function(r){return(r=Array.isArray(r)?r:[]).length&&n.bail||!t.length?e(o.concat(r)):i(t,o.concat(r))})):e([])};i(function(t){var e=[],r=t.findIndex((function(t){return"bail"===t[2].toLowerCase()}));if(r>=0){var i=t.splice(0,r+1).slice(0,-1);i.length&&e.push(i),t.map((function(t){return e.push(Object.defineProperty([t],"bail",{value:!0}))}))}else e.push(t);return e.reduce((function(t,e){var r=function(t,e){if(void 0===e&&(e=!1),t.length<2)return Object.defineProperty([t],"bail",{value:e});var i=[],o=t.findIndex((function(t){return"^"===t[3]}));if(o>=0){var n=t.splice(0,o);n.length&&i.push.apply(i,r(n,e)),i.push(Object.defineProperty([t.shift()],"bail",{value:!0})),t.length&&i.push.apply(i,r(t,e))}else i.push(t);return i};return t.concat(r(e))}),[])}(t))}))},didValidate:function(t){var e=!l(t,this.validationErrors);if(this.validationErrors=t,e){var r=this.getErrorObject();this.$emit("validation",r),this.formulateFieldValidation&&"function"==typeof this.formulateFieldValidation&&this.formulateFieldValidation(r)}},getMessage:function(t,e){return this.getMessageFunc(t)({args:e,name:this.mergedValidationName,value:this.context.model,vm:this,formValues:this.getFormValues()})},getMessageFunc:function(t){var e=this;if(t=u(t),this.messages&&void 0!==this.messages[t])switch(typeof this.messages[t]){case"function":return this.messages[t];case"string":case"boolean":return function(){return e.messages[t]}}return function(r){return e.$formulate.validationMessage(t,r,e)}},hasValidationErrors:function(){var t=this;return new Promise((function(e){t.$nextTick((function(){t.pendingValidation.then((function(){return e(!!t.validationErrors.length)}))}))}))},getValidationErrors:function(){var t=this;return new Promise((function(e){t.$nextTick((function(){return t.pendingValidation.then((function(){return e(t.getErrorObject())}))}))}))},getErrorObject:function(){return{name:this.context.nameOrFallback||this.context.name,errors:this.validationErrors.filter((function(t){return"string"==typeof t})),hasErrors:!!this.validationErrors.length}},setErrors:function(t){this.localErrors=c(t)},registerRule:function(t,e,r,i){void 0===i&&(i=null),this.ruleRegistry.some((function(t){return t[2]===r}))||(this.ruleRegistry.push([t,e,r]),null!==i&&(this.messageRegistry[r]=i))},removeRule:function(t){var e=this.ruleRegistry.findIndex((function(e){return e[2]===t}));e>=0&&(this.ruleRegistry.splice(e,1),delete this.messageRegistry[t])}}},B=function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{staticClass:"formulate-input",attrs:{"data-classification":t.classification,"data-has-errors":t.hasErrors,"data-is-showing-errors":t.hasVisibleErrors,"data-type":t.type}},[t._t("default",null,{id:t.id,context:t.context,errors:t.errors,validationErrors:t.validationErrors})],2)};B._withStripped=!0;var M=_({render:B,staticRenderFns:[]},void 0,U,void 0,!1,void 0,!1,void 0,void 0,void 0),G={inject:{observeErrors:{default:!1},removeErrorObserver:{default:!1}},props:{context:{type:Object,default:function(){return{}}},type:{type:String,default:"form"}},data:function(){return{boundSetErrors:this.setErrors.bind(this),localErrors:[]}},computed:{visibleValidationErrors:function(){return Array.isArray(this.context.visibleValidationErrors)?this.context.visibleValidationErrors:[]},errors:function(){return Array.isArray(this.context.errors)?this.context.errors:[]},mergedErrors:function(){return this.errors.concat(this.localErrors)},visibleErrors:function(){return Array.from(new Set(this.mergedErrors.concat(this.visibleValidationErrors))).filter((function(t){return"string"==typeof t}))}},created:function(){"form"!==this.type||"function"!=typeof this.observeErrors||Array.isArray(this.context.errors)||this.observeErrors({callback:this.boundSetErrors,type:this.type})},destroyed:function(){"form"!==this.type||"function"!=typeof this.removeErrorObserver||Array.isArray(this.context.errors)||this.removeErrorObserver(this.boundSetErrors)},methods:{setErrors:function(t){this.localErrors=c(t)}}},q=function(){var t=this,e=t.$createElement,r=t._self._c||e;return t.visibleErrors.length?r("ul",{class:"formulate-"+t.type+"-errors"},t._l(t.visibleErrors,(function(e){return r("li",{key:e,class:"formulate-"+t.type+"-error",domProps:{textContent:t._s(e)}})})),0):t._e()};q._withStripped=!0;var T=_({render:q,staticRenderFns:[]},void 0,G,void 0,!1,void 0,!1,void 0,void 0,void 0),W={props:{context:{type:Object,required:!0}}},H=function(){var t=this.$createElement,e=this._self._c||t;return this.context.help?e("div",{class:"formulate-input-help formulate-input-help--"+this.context.helpPosition,attrs:{id:this.context.id+"-help"},domProps:{textContent:this._s(this.context.help)}}):this._e()};H._withStripped=!0;var Y=_({render:H,staticRenderFns:[]},void 0,W,void 0,!1,void 0,!1,void 0,void 0,void 0),z={name:"FormulateGrouping",props:{context:{type:Object,required:!0}},provide:function(){return{isSubField:function(){return!0},registerProvider:this.registerProvider,deregisterProvider:this.deregisterProvider}},data:function(){return{providers:[]}},inject:["formulateRegisterRule","formulateRemoveRule"],computed:{items:function(){return Array.isArray(this.context.model)&&(this.context.repeatable||0!==this.context.model.length)?this.context.model.map((function(t){return m(t,t.__id)})):[m({})]},formShouldShowErrors:function(){return this.context.formShouldShowErrors}},watch:{providers:function(){this.formShouldShowErrors&&this.showErrors()},formShouldShowErrors:function(t){t&&this.showErrors()}},created:function(){this.formulateRegisterRule(this.validateGroup.bind(this),[],"formulateGrouping",!0)},destroyed:function(){this.formulateRemoveRule("formulateGrouping")},methods:{getAtIndex:function(t){return void 0!==this.context.model[t]&&this.context.model[t].__id?this.context.model[t]:void 0!==this.context.model[t]?m(this.context.model[t]):void 0===this.context.model[t]&&void 0!==this.items[t]?m({},this.items[t].__id):m({})},setFieldValue:function(t,e,r){var i,o=Array.isArray(this.context.model)?this.context.model:[],n=this.getAtIndex(t),s=m(Object.assign({},n,((i={})[e]=r,i)),n.__id);o.splice(t,1,s),this.context.model=o},validateGroup:function(){return Promise.all(this.providers.reduce((function(t,e){return e&&"function"==typeof e.hasValidationErrors&&t.push(e.hasValidationErrors()),t}),[])).then((function(t){return!t.some((function(t){return!!t}))}))},showErrors:function(){this.providers.forEach((function(t){return t&&"function"==typeof t.showErrors&&t.showErrors()}))},removeItem:function(t){Array.isArray(this.context.model)&&this.context.model.splice(t,1)},registerProvider:function(t){this.providers.some((function(e){return e===t}))||this.providers.push(t)},deregisterProvider:function(t){this.providers=this.providers.filter((function(e){return e!==t}))}}},K=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("FormulateSlot",{staticClass:"formulate-input-grouping",attrs:{name:"grouping",context:t.context,"force-wrap":t.context.repeatable}},t._l(t.items,(function(e,i){return r("FormulateRepeatableProvider",{key:e.__id,attrs:{index:i,"set-field-value":function(e,r){return t.setFieldValue(i,e,r)},context:t.context},on:{remove:t.removeItem}},[t._t("default")],2)})),1)};K._withStripped=!0;var Z=_({render:K,staticRenderFns:[]},void 0,z,void 0,!1,void 0,!1,void 0,void 0,void 0),J={props:{context:{type:Object,required:!0}}},X=function(){var t=this.$createElement;return(this._self._c||t)("label",{class:"formulate-input-label formulate-input-label--"+this.context.labelPosition,attrs:{for:this.context.id},domProps:{textContent:this._s(this.context.label)}})};X._withStripped=!0;var Q=_({render:X,staticRenderFns:[]},void 0,J,void 0,!1,void 0,!1,void 0,void 0,void 0),tt={props:{context:{type:Object,required:!0},addMore:{type:Function,required:!0}}},et=function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"formulate-input-group-add-more"},[e("FormulateInput",{attrs:{type:"button",label:this.context.addLabel,"data-minor":"","data-ghost":""},on:{click:this.addMore}})],1)};et._withStripped=!0;var rt=_({render:et,staticRenderFns:[]},void 0,tt,void 0,!1,void 0,!1,void 0,void 0,void 0),it={props:{context:{type:Object,required:!0},removeItem:{type:Function,required:!0},index:{type:Number,required:!0}}},ot=function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"formulate-input-group-repeatable"},[e("FormulateSlot",{attrs:{name:"remove",context:this.context,"remove-item":this.removeItem}},[e(this.context.slotComponents.remove,{tag:"component",attrs:{context:this.context,"remove-item":this.removeItem}})],1),this._v(" "),this._t("default")],2)};ot._withStripped=!0;var nt=_({render:ot,staticRenderFns:[]},void 0,it,void 0,!1,void 0,!1,void 0,void 0,void 0);function st(t,e){var r={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&-1===e.indexOf(i)&&(r[i]=t[i]);return r}var at={name:"FormulateInputGroup",props:{context:{type:Object,required:!0}},computed:{options:function(){return this.context.options||[]},subType:function(){return"group"===this.context.type?"grouping":"inputs"},optionsWithContext:function(){var t=this,e=this.context,r=e.attributes,i=(r.id,st(r,["id"])),o=(e.blurHandler,e.classification,e.component,e.getValidationErrors,e.hasLabel,e.hasValidationErrors,e.isSubField,e.labelPosition,e.options,e.performValidation,e.setErrors,e.slotComponents,e.validationErrors,e.visibleValidationErrors,e.help,st(e,["attributes","blurHandler","classification","component","getValidationErrors","hasLabel","hasValidationErrors","isSubField","labelPosition","options","performValidation","setErrors","slotComponents","validationErrors","visibleValidationErrors","help"]));return this.options.map((function(e){return t.groupItemContext(o,e,i)}))},canAddMore:function(){return this.context.repeatable&&this.items.length=100&&(e.complete||(e.justFinished=!0,setTimeout((function(){e.justFinished=!1}),t.options.uploadJustCompleteDuration)),e.complete=!0)}),(function(t){e.progress=0,e.error=t,e.complete=!0}),t.options)}))).then((function(r){t.results=r,e(r)})).catch((function(t){throw new Error(t)}))}))},l.prototype.removeFile=function(t){if(this.files=this.files.filter((function(e){return e.uuid!==t})),this.context.performValidation(),window&&this.fileList instanceof FileList){var e=new DataTransfer;this.files.map((function(t){return e.items.add(t.file)})),this.fileList=e.files,this.input.files=this.fileList}},l.prototype.loadPreviews=function(){this.files.map((function(t){if(!t.previewData&&window&&window.FileReader&&/^image\//.test(t.file.type)){var e=new FileReader;e.onload=function(e){return Object.assign(t,{previewData:e.target.result})},e.readAsDataURL(t.file)}}))},l.prototype.getFileList=function(){return this.fileList},l.prototype.getFiles=function(){return this.files},l.prototype.toString=function(){var t=this.files.length?this.files.length+" files":"empty";return this.results?JSON.stringify(this.results,null," "):"FileUpload("+t+")"};var b={accepted:function(t){var e=t.value;return Promise.resolve(["yes","on","1",1,!0,"true"].includes(e))},after:function(t,e){var r=t.value;void 0===e&&(e=!1);var i=Date.parse(e||new Date),o=Date.parse(r);return Promise.resolve(!isNaN(o)&&o>i)},alpha:function(t,e){var r=t.value;void 0===e&&(e="default");var i={default:/^[a-zA-ZÀ-ÖØ-öø-ÿ]+$/,latin:/^[a-zA-Z]+$/},o=i.hasOwnProperty(e)?e:"default";return Promise.resolve(i[o].test(r))},alphanumeric:function(t,e){var r=t.value;void 0===e&&(e="default");var i={default:/^[a-zA-Z0-9À-ÖØ-öø-ÿ]+$/,latin:/^[a-zA-Z0-9]+$/},o=i.hasOwnProperty(e)?e:"default";return Promise.resolve(i[o].test(r))},before:function(t,e){var r=t.value;void 0===e&&(e=!1);var i=Date.parse(e||new Date),o=Date.parse(r);return Promise.resolve(!isNaN(o)&&oe&&oe&&o.length()\[\]\.,;:\s@\"]+(\.[^<>()\[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i.test(e))},endsWith:function(t){for(var e=t.value,r=[],i=arguments.length-1;i-- >0;)r[i]=arguments[i+1];return Promise.resolve("string"==typeof e&&r.length?void 0!==r.find((function(t){return e.endsWith(t)})):"string"==typeof e&&0===r.length)},in:function(t){for(var e=t.value,r=[],i=arguments.length-1;i-- >0;)r[i]=arguments[i+1];return Promise.resolve(void 0!==r.find((function(t){return"object"==typeof t?h(t,e):t===e})))},matches:function(t){for(var e=t.value,r=[],i=arguments.length-1;i-- >0;)r[i]=arguments[i+1];return Promise.resolve(!!r.find((function(t){return"string"==typeof t&&"/"===t.substr(0,1)&&"/"===t.substr(-1)&&(t=new RegExp(t.substr(1,t.length-2))),t instanceof RegExp?t.test(e):t===e})))},mime:function(t){for(var e=t.value,r=[],i=arguments.length-1;i-- >0;)r[i]=arguments[i+1];return Promise.resolve(function(){if(e instanceof l)for(var t=e.getFiles(),i=0;i=e):!isNaN(i)&&"length"!==r||"value"===r?(i=isNaN(i)?i:Number(i))>=e:("string"==typeof i||"length"===r)&&(i=isNaN(i)?i:i.toString()).length>=e)},max:function(t,e,r){var i=t.value;return void 0===e&&(e=10),Promise.resolve(Array.isArray(i)?(e=isNaN(e)?e:Number(e),i.length<=e):!isNaN(i)&&"length"!==r||"value"===r?(i=isNaN(i)?i:Number(i))<=e:("string"==typeof i||"length"===r)&&(i=isNaN(i)?i:i.toString()).length<=e)},not:function(t){for(var e=t.value,r=[],i=arguments.length-1;i-- >0;)r[i]=arguments[i+1];return Promise.resolve(void 0===r.find((function(t){return"object"==typeof t?h(t,e):t===e})))},number:function(t){var e=t.value;return Promise.resolve(!isNaN(e))},required:function(t,e){var r=t.value;return void 0===e&&(e=!0),Promise.resolve(!(e&&!["no","false"].includes(e))||(Array.isArray(r)?!!r.length:r instanceof l?r.getFiles().length>0:"string"==typeof r?!!r:"object"!=typeof r||!!r&&!!Object.keys(r).length))},startsWith:function(t){for(var e=t.value,r=[],i=arguments.length-1;i-- >0;)r[i]=arguments[i+1];return Promise.resolve("string"==typeof e&&r.length?void 0!==r.find((function(t){return e.startsWith(t)})):"string"==typeof e&&0===r.length)},url:function(t){var e=t.value;return Promise.resolve(r(e))},bail:function(){return Promise.resolve(!0)}},x="image/",E={csv:"text/csv",gif:x+"gif",jpg:x+"jpeg",jpeg:x+"jpeg",png:x+"png",pdf:"application/pdf",svg:x+"svg+xml"}; -/*! - * is-plain-object - * - * Copyright (c) 2014-2017, Jon Schlinkert. - * Released under the MIT License. - */ -function w(t){return!0==(null!=(e=t)&&"object"==typeof e&&!1===Array.isArray(e))&&"[object Object]"===Object.prototype.toString.call(t); -/*! - * isobject - * - * Copyright (c) 2014-2017, Jon Schlinkert. - * Released under the MIT License. - */ -var e}function F(t){var e,r;return!1!==w(t)&&("function"==typeof(e=t.constructor)&&(!1!==w(r=e.prototype)&&!1!==r.hasOwnProperty("isPrototypeOf")))}function O(t){return"string"==typeof t?t[0].toUpperCase()+t.substr(1):t}var V={accepted:function(t){return"Please accept the "+t.name+"."},after:function(t){var e=t.name,r=t.args;return Array.isArray(r)&&r.length?O(e)+" must be after "+r[0]+".":O(e)+" must be a later date."},alpha:function(t){return O(t.name)+" can only contain alphabetical characters."},alphanumeric:function(t){return O(t.name)+" can only contain letters and numbers."},before:function(t){var e=t.name,r=t.args;return Array.isArray(r)&&r.length?O(e)+" must be before "+r[0]+".":O(e)+" must be an earlier date."},between:function(t){var e=t.name,r=t.value,i=t.args,o=!(!Array.isArray(i)||!i[2])&&i[2];return!isNaN(r)&&"length"!==o||"value"===o?O(e)+" must be between "+i[0]+" and "+i[1]+".":O(e)+" must be between "+i[0]+" and "+i[1]+" characters long."},confirm:function(t){var e=t.name;return t.args,O(e)+" does not match."},date:function(t){var e=t.name,r=t.args;return Array.isArray(r)&&r.length?O(e)+" is not a valid, please use the format "+r[0]:O(e)+" is not a valid date."},default:function(t){return t.name,"This field isn’t valid."},email:function(t){t.name;var e=t.value;return e?"“"+e+"” is not a valid email address.":"Please enter a valid email address."},endsWith:function(t){t.name;var e=t.value;return e?"“"+e+"” doesn’t end with a valid value.":"This field doesn’t end with a valid value."},in:function(t){var e=t.name,r=t.value;return"string"==typeof r&&r?"“"+O(r)+"” is not an allowed "+e+".":"This is not an allowed "+e+"."},matches:function(t){return O(t.name)+" is not an allowed value."},max:function(t){var e=t.name,r=t.value,i=t.args;if(Array.isArray(r))return"You may only select "+i[0]+" "+e+".";var o=!(!Array.isArray(i)||!i[1])&&i[1];return!isNaN(r)&&"length"!==o||"value"===o?O(e)+" must be less than or equal to "+i[0]+".":O(e)+" must be less than or equal to "+i[0]+" characters long."},mime:function(t){var e=t.name,r=t.args;return O(e)+" must be of the the type: "+(r[0]||"No file formats allowed.")},min:function(t){var e=t.name,r=t.value,i=t.args;if(Array.isArray(r))return"You must select at least "+i[0]+" "+e+".";var o=!(!Array.isArray(i)||!i[1])&&i[1];return!isNaN(r)&&"length"!==o||"value"===o?O(e)+" must be more than "+i[0]+".":O(e)+" must be more than "+i[0]+" characters long."},not:function(t){var e=t.name;return"“"+t.value+"” is not an allowed "+e+"."},number:function(t){return O(t.name)+" must be a number."},required:function(t){return O(t.name)+" is required."},startsWith:function(t){t.name;var e=t.value;return e?"“"+e+"” doesn’t start with a valid value.":"This field doesn’t start with a valid value."},url:function(t){return t.name,"Please include a valid url."}};function A(t){var e;t.extend({locales:(e={},e.en=V,e)})}function S(t,e,r,i){return new Promise((function(r,o){var n=(i.fauxUploaderDuration||2e3)*(.5+Math.random()),s=performance.now(),a=function(){return setTimeout((function(){var i=performance.now()-s,o=Math.min(100,Math.round(i/n*100));if(e(o),o>=100)return r({url:"http://via.placeholder.com/350x150.png",name:t.name});a()}),20)};a()}))}function j(t,e){var r={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&-1===e.indexOf(i)&&(r[i]=t[i]);return r}var P={inheritAttrs:!1,functional:!0,render:function(t,e){for(var r=e.props,i=e.data,o=e.parent,n=e.children,s=o,a=(r.name,r.forceWrap),u=r.context,l=j(r,["name","forceWrap","context"]);s&&"FormulateInput"!==s.$options.name;)s=s.$parent;if(!s)return null;if(s.$scopedSlots&&s.$scopedSlots[r.name])return s.$scopedSlots[r.name](Object.assign({},u,l));if(Array.isArray(n)&&(n.length>1||a&&n.length>0)){var c=i.attrs,h=(c.name,c.context,j(c,["name","context"]));return t("div",Object.assign({},i,{attrs:h}),n)}return Array.isArray(n)&&1===n.length?n[0]:null}};function _(t,e){var r={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&-1===e.indexOf(i)&&(r[i]=t[i]);return r}var $=function(t){this.registry=new Map,this.ctx=t};function R(t){return new $(t).dataProps()}function N(){return{hasInitialValue:function(){return this.formulateValue&&"object"==typeof this.formulateValue||this.values&&"object"==typeof this.values||this.isGrouping&&"object"==typeof this.context.model[this.index]},isVmodeled:function(){return!!(this.$options.propsData.hasOwnProperty("formulateValue")&&this._events&&Array.isArray(this._events.input)&&this._events.input.length)},initialValues:function(){return y(this.$options.propsData,"formulateValue")&&"object"==typeof this.formulateValue?Object.assign({},this.formulateValue):y(this.$options.propsData,"values")&&"object"==typeof this.values?Object.assign({},this.values):this.isGrouping&&"object"==typeof this.context.model[this.index]?this.context.model[this.index]:{}}}}function C(t){void 0===t&&(t=[]);var e={applyInitialValues:function(){this.hasInitialValue&&(this.proxy=this.initialValues)},setFieldValue:function(t,e){var r;if(void 0===e){var i=this.proxy,o=(i[t],_(i,[String(t)]));this.proxy=o}else Object.assign(this.proxy,((r={})[t]=e,r));this.$emit("input",Object.assign({},this.proxy))},getFormValues:function(){return this.proxy},hasValidationErrors:function(){return Promise.all(this.registry.reduce((function(t,e,r){return t.push(e.performValidation()&&e.getValidationErrors()),t}),[])).then((function(t){return t.some((function(t){return t.hasErrors}))}))},showErrors:function(){this.childrenShouldShowErrors=!0,this.registry.map((function(t){t.formShouldShowErrors=!0}))},hideErrors:function(){this.childrenShouldShowErrors=!1,this.registry.map((function(t){t.formShouldShowErrors=!1,t.behavioralErrorVisibility=!1}))},setValues:function(t){var e=this;Array.from(new Set(Object.keys(t).concat(Object.keys(this.proxy)))).forEach((function(r){!e.registry.has(r)||h(t[r],e.proxy[r])||h(t[r],e.registry.get(r).proxy)||(e.setFieldValue(r,t[r]),e.registry.get(r).context.model=t[r])}))}};return Object.keys(e).reduce((function(r,i){var o;return t.includes(i)?r:Object.assign({},r,((o={})[i]=e[i],o))}),{})}function I(t){return{formulateSetter:t.setFieldValue,formulateRegister:t.register,formulateDeregister:t.deregister,getFormValues:t.getFormValues}}$.prototype.add=function(t,e){return this.registry.set(t,e),this},$.prototype.remove=function(t){this.registry.delete(t);var e=this.ctx.proxy,r=(e[t],_(e,[String(t)]));return this.ctx.proxy=r,this},$.prototype.has=function(t){return this.registry.has(t)},$.prototype.get=function(t){return this.registry.get(t)},$.prototype.map=function(t){var e={};return this.registry.forEach((function(r,i){var o;return Object.assign(e,((o={})[i]=t(r,i),o))})),e},$.prototype.keys=function(){return Array.from(this.registry.keys())},$.prototype.register=function(t,e){if(this.registry.has(t))return!1;this.registry.set(t,e);var r=y(e.$options.propsData,"formulateValue"),i=y(e.$options.propsData,"value");!r&&this.ctx.hasInitialValue&&this.ctx.initialValues[t]?e.context.model=this.ctx.initialValues[t]:!r&&!i||h(e.proxy,this.ctx.initialValues[t])||this.ctx.setFieldValue(t,e.proxy),this.childrenShouldShowErrors&&(e.formShouldShowErrors=!0)},$.prototype.reduce=function(t,e){return this.registry.forEach((function(r,i){e=t(e,r,i)})),e},$.prototype.dataProps=function(){var t=this;return{proxy:{},registry:this,register:this.register.bind(this),deregister:function(e){return t.remove(e)},childrenShouldShowErrors:!1}};var k=function(t){this.form=t};function D(t,e,r,i,o,n,s,a,u,l){"boolean"!=typeof s&&(u=a,a=s,s=!1);var c,h="function"==typeof r?r.options:r;if(t&&t.render&&(h.render=t.render,h.staticRenderFns=t.staticRenderFns,h._compiled=!0,o&&(h.functional=!0)),i&&(h._scopeId=i),n?(c=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),e&&e.call(this,u(t)),t&&t._registeredComponents&&t._registeredComponents.add(n)},h._ssrRegister=c):e&&(c=s?function(t){e.call(this,l(t,this.$root.$options.shadowRoot))}:function(t){e.call(this,a(t))}),c)if(h.functional){var d=h.render;h.render=function(t,e){return c.call(e),d(t,e)}}else{var f=h.beforeCreate;h.beforeCreate=f?[].concat(f,c):[c]}return r}k.prototype.hasValidationErrors=function(){return this.form.hasValidationErrors()},k.prototype.values=function(){var t=this;return new Promise((function(e,r){var i=[],o=function t(e){if("object"!=typeof e)return e;var r=Array.isArray(e)?[]:{};for(var i in e)e[i]instanceof l||v(e[i])?r[i]=e[i]:r[i]=t(e[i]);return r}(t.form.proxy),n=function(e){"object"==typeof t.form.proxy[e]&&t.form.proxy[e]instanceof l&&i.push(t.form.proxy[e].upload().then((function(t){var r;return Object.assign(o,((r={})[e]=t,r))})))};for(var s in o)n(s);Promise.all(i).then((function(){return e(o)})).catch((function(t){return r(t)}))}))};var L={provide:function(){return Object.assign({},I(this),{observeErrors:this.addErrorObserver,removeErrorObserver:this.removeErrorObserver,formulateFieldValidation:this.formulateFieldValidation})},name:"FormulateForm",model:{prop:"formulateValue",event:"input"},props:{name:{type:[String,Boolean],default:!1},formulateValue:{type:Object,default:function(){return{}}},values:{type:[Object,Boolean],default:!1},errors:{type:[Object,Boolean],default:!1},formErrors:{type:Array,default:function(){return[]}}},data:function(){return Object.assign({},R(this),{formShouldShowErrors:!1,errorObservers:[],namedErrors:[],namedFieldErrors:{}})},computed:Object.assign({},N(),{formContext:function(){return{errors:this.mergedFormErrors}},classes:function(){var t={"formulate-form":!0};return this.name&&(t["formulate-form--"+this.name]=!0),t},mergedFormErrors:function(){return this.formErrors.concat(this.namedErrors)},mergedFieldErrors:function(){var t={};if(this.errors)for(var e in this.errors)t[e]=f(this.errors[e]);for(var r in this.namedFieldErrors)t[r]=f(this.namedFieldErrors[r]);return t},hasFormErrorObservers:function(){return!!this.errorObservers.filter((function(t){return"form"===t.type})).length}}),watch:{formulateValue:{handler:function(t){this.isVmodeled&&t&&"object"==typeof t&&this.setValues(t)},deep:!0},mergedFormErrors:function(t){this.errorObservers.filter((function(t){return"form"===t.type})).forEach((function(e){return e.callback(t)}))},mergedFieldErrors:{handler:function(t){this.errorObservers.filter((function(t){return"input"===t.type})).forEach((function(e){return e.callback(t[e.field]||[])}))},immediate:!0}},created:function(){this.$formulate.register(this),this.applyInitialValues()},destroyed:function(){this.$formulate.deregister(this)},methods:Object.assign({},C(),{applyErrors:function(t){var e=t.formErrors,r=t.inputErrors;this.namedErrors=e,this.namedFieldErrors=r},addErrorObserver:function(t){this.errorObservers.find((function(e){return t.callback===e.callback}))||(this.errorObservers.push(t),"form"===t.type?t.callback(this.mergedFormErrors):y(this.mergedFieldErrors,t.field)&&t.callback(this.mergedFieldErrors[t.field]))},removeErrorObserver:function(t){this.errorObservers=this.errorObservers.filter((function(e){return e.callback!==t}))},registerErrorComponent:function(t){this.errorComponents.includes(t)||this.errorComponents.push(t)},formSubmitted:function(){var t=this;this.showErrors();var e=new k(this);return this.$emit("submit-raw",e),e.hasValidationErrors().then((function(t){return t?void 0:e.values()})).then((function(e){if(void 0!==e)return t.$emit("submit",e),e}))},formulateFieldValidation:function(t){this.$emit("validation",t)}})},U=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("form",{class:t.classes,on:{submit:function(e){return e.preventDefault(),t.formSubmitted(e)}}},[t.hasFormErrorObservers?t._e():r("FormulateErrors",{attrs:{context:t.formContext}}),t._v(" "),t._t("default")],2)};U._withStripped=!0;var B=D({render:U,staticRenderFns:[]},void 0,L,void 0,!1,void 0,!1,void 0,void 0,void 0),M={context:function(){return T.call(this,Object.assign({},{addLabel:this.logicalAddLabel,attributes:this.elementAttributes,blurHandler:q.bind(this),classification:this.classification,component:this.component,disableErrors:this.disableErrors,errors:this.explicitErrors,allErrors:this.allErrors,formShouldShowErrors:this.formShouldShowErrors,getValidationErrors:this.getValidationErrors.bind(this),hasGivenName:this.hasGivenName,hasLabel:this.label&&"button"!==this.classification,hasValidationErrors:this.hasValidationErrors.bind(this),help:this.help,helpPosition:this.logicalHelpPosition,id:this.id||this.defaultId,imageBehavior:this.imageBehavior,label:this.label,labelPosition:this.logicalLabelPosition,limit:this.limit,name:this.nameOrFallback,performValidation:this.performValidation.bind(this),preventWindowDrops:this.preventWindowDrops,repeatable:this.repeatable,setErrors:this.setErrors.bind(this),showValidationErrors:this.showValidationErrors,slotComponents:this.slotComponents,type:this.type,uploadBehavior:this.uploadBehavior,uploadUrl:this.mergedUploadUrl,uploader:this.uploader||this.$formulate.getUploader(),validationErrors:this.validationErrors,value:this.value,visibleValidationErrors:this.visibleValidationErrors,isSubField:this.isSubField},this.typeContext))},nameOrFallback:function(){if(!0===this.name&&"button"!==this.classification)return this.type+"_"+this.elementAttributes.id;if(!1===this.name||"button"===this.classification&&!0===this.name)return!1;return this.name},hasGivenName:function(){return"boolean"!=typeof this.name},typeContext:function(){var t=this;switch(this.classification){case"select":return{options:G.call(this,this.options),optionGroups:!!this.optionGroups&&c(this.optionGroups,(function(e,r){return G.call(t,r)})),placeholder:this.$attrs.placeholder||!1};case"slider":return{showValue:!!this.showValue};default:return this.options?{options:G.call(this,this.options)}:{}}},elementAttributes:function(){var t=Object.assign({},this.localAttributes);this.id?t.id=this.id:t.id=this.defaultId;this.hasGivenName&&(t.name=this.name);this.help&&(t["aria-describedby"]=t.id+"-help");return t},logicalLabelPosition:function(){if(this.labelPosition)return this.labelPosition;switch(this.classification){case"box":return"after";default:return"before"}},logicalHelpPosition:function(){if(this.helpPosition)return this.helpPosition;switch(this.classification){case"group":return"before";default:return"after"}},mergedUploadUrl:function(){return this.uploadUrl||this.$formulate.getUploadUrl()},isVmodeled:function(){return!!(this.$options.propsData.hasOwnProperty("formulateValue")&&this._events&&Array.isArray(this._events.input)&&this._events.input.length)},mergedValidationName:function(){if(this.validationName)return this.validationName;if("string"==typeof this.name)return this.name;if(this.label)return this.label;return this.type},explicitErrors:function(){return f(this.errors).concat(this.localErrors).concat(f(this.error))},allErrors:function(){return this.explicitErrors.concat(f(this.validationErrors))},hasErrors:function(){return!!this.allErrors.length},hasVisibleErrors:function(){return this.validationErrors&&this.showValidationErrors||!!this.explicitErrors.length},showValidationErrors:function(){if(this.showErrors||this.formShouldShowErrors)return!0;if("file"===this.classification&&"live"===this.uploadBehavior&&W.call(this))return!0;return this.behavioralErrorVisibility},visibleValidationErrors:function(){return this.showValidationErrors&&this.validationErrors.length?this.validationErrors:[]},slotComponents:function(){return{label:this.$formulate.slotComponent(this.type,"label"),help:this.$formulate.slotComponent(this.type,"help"),errors:this.$formulate.slotComponent(this.type,"errors"),repeatable:this.$formulate.slotComponent(this.type,"repeatable"),addMore:this.$formulate.slotComponent(this.type,"addMore"),remove:this.$formulate.slotComponent(this.type,"remove")}},logicalAddLabel:function(){if("boolean"==typeof this.addLabel)return"+ "+(this.label||this.name||"Add");return this.addLabel}};function G(t){if(!Array.isArray(t)&&t&&"object"==typeof t){var e=[];for(var r in t)e.push({value:r,label:t[r],id:this.elementAttributes.id+"_"+r});return e}return t}function q(){this.$emit("blur"),"blur"===this.errorBehavior&&(this.behavioralErrorVisibility=!0)}function T(t){return Object.defineProperty(t,"model",{get:W.bind(this),set:H.bind(this)})}function W(){var t=this.isVmodeled?"formulateValue":"proxy";return"checkbox"===this.type&&!Array.isArray(this[t])&&this.options?[]:this[t]?this[t]:""}function H(t){h(t,this.proxy)||(this.proxy=t),this.$emit("input",t),this.context.name&&"function"==typeof this.formulateSetter&&this.formulateSetter(this.context.name,t)}var Y={name:"FormulateInput",inheritAttrs:!1,provide:function(){return{formulateRegisterRule:this.registerRule,formulateRemoveRule:this.removeRule}},inject:{formulateSetter:{default:void 0},formulateFieldValidation:{default:function(){return function(){return{}}}},formulateRegister:{default:void 0},formulateDeregister:{default:void 0},getFormValues:{default:function(){return function(){return{}}}},observeErrors:{default:void 0},removeErrorObserver:{default:void 0},isSubField:{default:function(){return function(){return!1}}}},model:{prop:"formulateValue",event:"input"},props:{type:{type:String,default:"text"},name:{type:[String,Boolean],default:!0},formulateValue:{default:""},value:{default:!1},options:{type:[Object,Array,Boolean],default:!1},optionGroups:{type:[Object,Boolean],default:!1},id:{type:[String,Boolean,Number],default:!1},label:{type:[String,Boolean],default:!1},labelPosition:{type:[String,Boolean],default:!1},limit:{type:Number,default:1/0},help:{type:[String,Boolean],default:!1},helpPosition:{type:[String,Boolean],default:!1},errors:{type:[String,Array,Boolean],default:!1},repeatable:{type:Boolean,default:!1},validation:{type:[String,Boolean,Array],default:!1},validationName:{type:[String,Boolean],default:!1},error:{type:[String,Boolean],default:!1},errorBehavior:{type:String,default:"blur",validator:function(t){return["blur","live","submit"].includes(t)}},showErrors:{type:Boolean,default:!1},imageBehavior:{type:String,default:"preview"},uploadUrl:{type:[String,Boolean],default:!1},uploader:{type:[Function,Object,Boolean],default:!1},uploadBehavior:{type:String,default:"live"},preventWindowDrops:{type:Boolean,default:!0},showValue:{type:[String,Boolean],default:!1},validationMessages:{type:Object,default:function(){return{}}},validationRules:{type:Object,default:function(){return{}}},checked:{type:[String,Boolean],default:!1},disableErrors:{type:Boolean,default:!1},addLabel:{type:[Boolean,String],default:!1}},data:function(){return{defaultId:this.$formulate.nextId(this),localAttributes:{},localErrors:[],proxy:this.getInitialValue(),behavioralErrorVisibility:"live"===this.errorBehavior,formShouldShowErrors:!1,validationErrors:[],pendingValidation:Promise.resolve(),ruleRegistry:[],messageRegistry:{}}},computed:Object.assign({},M,{classification:function(){var t=this.$formulate.classify(this.type);return"box"===t&&this.options?"group":t},component:function(){return"group"===this.classification?"FormulateInputGroup":this.$formulate.component(this.type)},parsedValidationRules:function(){var t=this,e={};return Object.keys(this.validationRules).forEach((function(r){e[d(r)]=t.validationRules[r]})),e},messages:function(){var t=this,e={};return Object.keys(this.validationMessages).forEach((function(r){e[d(r)]=t.validationMessages[r]})),Object.keys(this.messageRegistry).forEach((function(r){e[d(r)]=t.messageRegistry[r]})),e}}),watch:{$attrs:{handler:function(t){this.updateLocalAttributes(t)},deep:!0},proxy:function(t,e){this.performValidation(),this.isVmodeled||h(t,e)||(this.context.model=t)},formulateValue:function(t,e){this.isVmodeled&&!h(t,e)&&(this.context.model=t)},showValidationErrors:{handler:function(t){this.$emit("error-visibility",t)},immediate:!0}},created:function(){this.applyInitialValue(),this.formulateRegister&&"function"==typeof this.formulateRegister&&this.formulateRegister(this.nameOrFallback,this),this.disableErrors||"function"!=typeof this.observeErrors||this.observeErrors({callback:this.setErrors,type:"input",field:this.nameOrFallback}),this.updateLocalAttributes(this.$attrs),this.performValidation()},beforeDestroy:function(){this.disableErrors||"function"!=typeof this.removeErrorObserver||this.removeErrorObserver(this.setErrors),"function"==typeof this.formulateDeregister&&this.formulateDeregister(this.nameOrFallback)},methods:{getInitialValue:function(){var t=this.$formulate.classify(this.type);return"box"===(t="box"===t&&this.options?"group":t)&&this.checked?this.value||!0:y(this.$options.propsData,"value")&&"box"!==t?this.value:y(this.$options.propsData,"formulateValue")?this.formulateValue:""},applyInitialValue:function(){!h(this.context.model,this.proxy)&&Object.prototype.hasOwnProperty(this.$options.propsData,"options")&&"box"===this.classification&&(this.context.model=this.proxy)},updateLocalAttributes:function(t){h(t,this.localAttributes)||(this.localAttributes=t)},performValidation:function(){var t=this,e=p(this.validation,this.$formulate.rules(this.parsedValidationRules));return e=this.ruleRegistry.length?this.ruleRegistry.concat(e):e,this.pendingValidation=this.runRules(e).then((function(e){return t.didValidate(e)})),this.pendingValidation},runRules:function(t){var e=this,r=function(t){var r=t[0],i=t[1],o=t[2],n=(t[3],r.apply(void 0,[{value:e.context.model,getFormValues:e.getFormValues.bind(e),name:e.context.name}].concat(i)));return(n=n instanceof Promise?n:Promise.resolve(n)).then((function(t){return!t&&e.getMessage(o,i)}))};return new Promise((function(e){var i=function(t,o){void 0===o&&(o=[]);var n=t.shift();Array.isArray(n)&&n.length?Promise.all(n.map(r)).then((function(t){return t.filter((function(t){return!!t}))})).then((function(r){return(r=Array.isArray(r)?r:[]).length&&n.bail||!t.length?e(o.concat(r)):i(t,o.concat(r))})):e([])};i(function(t){var e=[],r=t.findIndex((function(t){return"bail"===t[2].toLowerCase()}));if(r>=0){var i=t.splice(0,r+1).slice(0,-1);i.length&&e.push(i),t.map((function(t){return e.push(Object.defineProperty([t],"bail",{value:!0}))}))}else e.push(t);return e.reduce((function(t,e){var r=function(t,e){if(void 0===e&&(e=!1),t.length<2)return Object.defineProperty([t],"bail",{value:e});var i=[],o=t.findIndex((function(t){return"^"===t[3]}));if(o>=0){var n=t.splice(0,o);n.length&&i.push.apply(i,r(n,e)),i.push(Object.defineProperty([t.shift()],"bail",{value:!0})),t.length&&i.push.apply(i,r(t,e))}else i.push(t);return i};return t.concat(r(e))}),[])}(t))}))},didValidate:function(t){var e=!h(t,this.validationErrors);if(this.validationErrors=t,e){var r=this.getErrorObject();this.$emit("validation",r),this.formulateFieldValidation&&"function"==typeof this.formulateFieldValidation&&this.formulateFieldValidation(r)}},getMessage:function(t,e){return this.getMessageFunc(t)({args:e,name:this.mergedValidationName,value:this.context.model,vm:this,formValues:this.getFormValues()})},getMessageFunc:function(t){var e=this;if(t=d(t),this.messages&&void 0!==this.messages[t])switch(typeof this.messages[t]){case"function":return this.messages[t];case"string":case"boolean":return function(){return e.messages[t]}}return function(r){return e.$formulate.validationMessage(t,r,e)}},hasValidationErrors:function(){var t=this;return new Promise((function(e){t.$nextTick((function(){t.pendingValidation.then((function(){return e(!!t.validationErrors.length)}))}))}))},getValidationErrors:function(){var t=this;return new Promise((function(e){t.$nextTick((function(){return t.pendingValidation.then((function(){return e(t.getErrorObject())}))}))}))},getErrorObject:function(){return{name:this.context.nameOrFallback||this.context.name,errors:this.validationErrors.filter((function(t){return"string"==typeof t})),hasErrors:!!this.validationErrors.length}},setErrors:function(t){this.localErrors=f(t)},registerRule:function(t,e,r,i){void 0===i&&(i=null),this.ruleRegistry.some((function(t){return t[2]===r}))||(this.ruleRegistry.push([t,e,r]),null!==i&&(this.messageRegistry[r]=i))},removeRule:function(t){var e=this.ruleRegistry.findIndex((function(e){return e[2]===t}));e>=0&&(this.ruleRegistry.splice(e,1),delete this.messageRegistry[t])}}},z=function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{staticClass:"formulate-input",attrs:{"data-classification":t.classification,"data-has-errors":t.hasErrors,"data-is-showing-errors":t.hasVisibleErrors,"data-type":t.type}},[t._t("default",null,{id:t.id,context:t.context,errors:t.errors,validationErrors:t.validationErrors})],2)};z._withStripped=!0;var K=D({render:z,staticRenderFns:[]},void 0,Y,void 0,!1,void 0,!1,void 0,void 0,void 0),Z={inject:{observeErrors:{default:!1},removeErrorObserver:{default:!1}},props:{context:{type:Object,default:function(){return{}}},type:{type:String,default:"form"}},data:function(){return{boundSetErrors:this.setErrors.bind(this),localErrors:[]}},computed:{visibleValidationErrors:function(){return Array.isArray(this.context.visibleValidationErrors)?this.context.visibleValidationErrors:[]},errors:function(){return Array.isArray(this.context.errors)?this.context.errors:[]},mergedErrors:function(){return this.errors.concat(this.localErrors)},visibleErrors:function(){return Array.from(new Set(this.mergedErrors.concat(this.visibleValidationErrors))).filter((function(t){return"string"==typeof t}))}},created:function(){"form"!==this.type||"function"!=typeof this.observeErrors||Array.isArray(this.context.errors)||this.observeErrors({callback:this.boundSetErrors,type:this.type})},destroyed:function(){"form"!==this.type||"function"!=typeof this.removeErrorObserver||Array.isArray(this.context.errors)||this.removeErrorObserver(this.boundSetErrors)},methods:{setErrors:function(t){this.localErrors=f(t)}}},J=function(){var t=this,e=t.$createElement,r=t._self._c||e;return t.visibleErrors.length?r("ul",{class:"formulate-"+t.type+"-errors"},t._l(t.visibleErrors,(function(e){return r("li",{key:e,class:"formulate-"+t.type+"-error",domProps:{textContent:t._s(e)}})})),0):t._e()};J._withStripped=!0;var X=D({render:J,staticRenderFns:[]},void 0,Z,void 0,!1,void 0,!1,void 0,void 0,void 0),Q={props:{context:{type:Object,required:!0}}},tt=function(){var t=this.$createElement,e=this._self._c||t;return this.context.help?e("div",{class:"formulate-input-help formulate-input-help--"+this.context.helpPosition,attrs:{id:this.context.id+"-help"},domProps:{textContent:this._s(this.context.help)}}):this._e()};tt._withStripped=!0;var et=D({render:tt,staticRenderFns:[]},void 0,Q,void 0,!1,void 0,!1,void 0,void 0,void 0),rt={name:"FormulateGrouping",props:{context:{type:Object,required:!0}},provide:function(){return{isSubField:function(){return!0},registerProvider:this.registerProvider,deregisterProvider:this.deregisterProvider}},data:function(){return{providers:[]}},inject:["formulateRegisterRule","formulateRemoveRule"],computed:{items:function(){return Array.isArray(this.context.model)&&(this.context.repeatable||0!==this.context.model.length)?this.context.model.map((function(t){return g(t,t.__id)})):[g({})]},formShouldShowErrors:function(){return this.context.formShouldShowErrors}},watch:{providers:function(){this.formShouldShowErrors&&this.showErrors()},formShouldShowErrors:function(t){t&&this.showErrors()}},created:function(){this.formulateRegisterRule(this.validateGroup.bind(this),[],"formulateGrouping",!0)},destroyed:function(){this.formulateRemoveRule("formulateGrouping")},methods:{getAtIndex:function(t){return void 0!==this.context.model[t]&&this.context.model[t].__id?this.context.model[t]:void 0!==this.context.model[t]?g(this.context.model[t]):void 0===this.context.model[t]&&void 0!==this.items[t]?g({},this.items[t].__id):g({})},setFieldValue:function(t,e,r){var i,o=Array.isArray(this.context.model)?this.context.model:[],n=this.getAtIndex(t),s=g(Object.assign({},n,((i={})[e]=r,i)),n.__id);o.splice(t,1,s),this.context.model=o},validateGroup:function(){return Promise.all(this.providers.reduce((function(t,e){return e&&"function"==typeof e.hasValidationErrors&&t.push(e.hasValidationErrors()),t}),[])).then((function(t){return!t.some((function(t){return!!t}))}))},showErrors:function(){this.providers.forEach((function(t){return t&&"function"==typeof t.showErrors&&t.showErrors()}))},removeItem:function(t){Array.isArray(this.context.model)&&this.context.model.splice(t,1)},registerProvider:function(t){this.providers.some((function(e){return e===t}))||this.providers.push(t)},deregisterProvider:function(t){this.providers=this.providers.filter((function(e){return e!==t}))}}},it=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("FormulateSlot",{staticClass:"formulate-input-grouping",attrs:{name:"grouping",context:t.context,"force-wrap":t.context.repeatable}},t._l(t.items,(function(e,i){return r("FormulateRepeatableProvider",{key:e.__id,attrs:{index:i,"set-field-value":function(e,r){return t.setFieldValue(i,e,r)},context:t.context},on:{remove:t.removeItem}},[t._t("default")],2)})),1)};it._withStripped=!0;var ot=D({render:it,staticRenderFns:[]},void 0,rt,void 0,!1,void 0,!1,void 0,void 0,void 0),nt={props:{context:{type:Object,required:!0}}},st=function(){var t=this.$createElement;return(this._self._c||t)("label",{class:"formulate-input-label formulate-input-label--"+this.context.labelPosition,attrs:{for:this.context.id},domProps:{textContent:this._s(this.context.label)}})};st._withStripped=!0;var at=D({render:st,staticRenderFns:[]},void 0,nt,void 0,!1,void 0,!1,void 0,void 0,void 0),ut={props:{context:{type:Object,required:!0},addMore:{type:Function,required:!0}}},lt=function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"formulate-input-group-add-more"},[e("FormulateInput",{attrs:{type:"button",label:this.context.addLabel,"data-minor":"","data-ghost":""},on:{click:this.addMore}})],1)};lt._withStripped=!0;var ct=D({render:lt,staticRenderFns:[]},void 0,ut,void 0,!1,void 0,!1,void 0,void 0,void 0),ht={props:{context:{type:Object,required:!0},removeItem:{type:Function,required:!0},index:{type:Number,required:!0}}},dt=function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"formulate-input-group-repeatable"},[e("FormulateSlot",{attrs:{name:"remove",context:this.context,"remove-item":this.removeItem}},[e(this.context.slotComponents.remove,{tag:"component",attrs:{context:this.context,"remove-item":this.removeItem}})],1),this._v(" "),this._t("default")],2)};dt._withStripped=!0;var ft=D({render:dt,staticRenderFns:[]},void 0,ht,void 0,!1,void 0,!1,void 0,void 0,void 0);function pt(t,e){var r={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&-1===e.indexOf(i)&&(r[i]=t[i]);return r}var mt={name:"FormulateInputGroup",props:{context:{type:Object,required:!0}},computed:{options:function(){return this.context.options||[]},subType:function(){return"group"===this.context.type?"grouping":"inputs"},optionsWithContext:function(){var t=this,e=this.context,r=e.attributes,i=(r.id,pt(r,["id"])),o=(e.blurHandler,e.classification,e.component,e.getValidationErrors,e.hasLabel,e.hasValidationErrors,e.isSubField,e.labelPosition,e.options,e.performValidation,e.setErrors,e.slotComponents,e.validationErrors,e.visibleValidationErrors,e.help,pt(e,["attributes","blurHandler","classification","component","getValidationErrors","hasLabel","hasValidationErrors","isSubField","labelPosition","options","performValidation","setErrors","slotComponents","validationErrors","visibleValidationErrors","help"]));return this.options.map((function(e){return t.groupItemContext(o,e,i)}))},canAddMore:function(){return this.context.repeatable&&this.items.length=100&&(e.complete||(e.justFinished=!0,setTimeout((function(){e.justFinished=!1}),t.options.uploadJustCompleteDuration)),e.complete=!0)}),(function(t){e.progress=0,e.error=t,e.complete=!0}),t.options)}))).then((function(r){t.results=r,e(r)})).catch((function(t){throw new Error(t)}))}))},s.prototype.removeFile=function(t){if(this.files=this.files.filter((function(e){return e.uuid!==t})),this.context.performValidation(),window&&this.fileList instanceof FileList){var e=new DataTransfer;this.files.map((function(t){return e.items.add(t.file)})),this.fileList=e.files,this.input.files=this.fileList}},s.prototype.loadPreviews=function(){this.files.map((function(t){if(!t.previewData&&window&&window.FileReader&&/^image\//.test(t.file.type)){var e=new FileReader;e.onload=function(e){return Object.assign(t,{previewData:e.target.result})},e.readAsDataURL(t.file)}}))},s.prototype.getFileList=function(){return this.fileList},s.prototype.getFiles=function(){return this.files},s.prototype.toString=function(){var t=this.files.length?this.files.length+" files":"empty";return this.results?JSON.stringify(this.results,null," "):"FileUpload("+t+")"};var v={accepted:function(t){var e=t.value;return Promise.resolve(["yes","on","1",1,!0,"true"].includes(e))},after:function(t,e){var r=t.value;void 0===e&&(e=!1);var i=Date.parse(e||new Date),o=Date.parse(r);return Promise.resolve(!isNaN(o)&&o>i)},alpha:function(t,e){var r=t.value;void 0===e&&(e="default");var i={default:/^[a-zA-ZÀ-ÖØ-öø-ÿ]+$/,latin:/^[a-zA-Z]+$/},o=i.hasOwnProperty(e)?e:"default";return Promise.resolve(i[o].test(r))},alphanumeric:function(t,e){var r=t.value;void 0===e&&(e="default");var i={default:/^[a-zA-Z0-9À-ÖØ-öø-ÿ]+$/,latin:/^[a-zA-Z0-9]+$/},o=i.hasOwnProperty(e)?e:"default";return Promise.resolve(i[o].test(r))},before:function(t,e){var r=t.value;void 0===e&&(e=!1);var i=Date.parse(e||new Date),o=Date.parse(r);return Promise.resolve(!isNaN(o)&&oe&&oe&&o.length()\[\]\.,;:\s@\"]+(\.[^<>()\[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i.test(e))},endsWith:function(t){for(var e=t.value,r=[],i=arguments.length-1;i-- >0;)r[i]=arguments[i+1];return Promise.resolve("string"==typeof e&&r.length?void 0!==r.find((function(t){return e.endsWith(t)})):"string"==typeof e&&0===r.length)},in:function(t){for(var e=t.value,r=[],i=arguments.length-1;i-- >0;)r[i]=arguments[i+1];return Promise.resolve(void 0!==r.find((function(t){return"object"==typeof t?l(t,e):t===e})))},matches:function(t){for(var e=t.value,r=[],i=arguments.length-1;i-- >0;)r[i]=arguments[i+1];return Promise.resolve(!!r.find((function(t){return"string"==typeof t&&"/"===t.substr(0,1)&&"/"===t.substr(-1)&&(t=new RegExp(t.substr(1,t.length-2))),t instanceof RegExp?t.test(e):t===e})))},mime:function(t){for(var e=t.value,r=[],i=arguments.length-1;i-- >0;)r[i]=arguments[i+1];return Promise.resolve(function(){if(e instanceof s)for(var t=e.getFiles(),i=0;i=e):!isNaN(i)&&"length"!==r||"value"===r?(i=isNaN(i)?i:Number(i))>=e:("string"==typeof i||"length"===r)&&(i=isNaN(i)?i:i.toString()).length>=e)},max:function(t,e,r){var i=t.value;return void 0===e&&(e=10),Promise.resolve(Array.isArray(i)?(e=isNaN(e)?e:Number(e),i.length<=e):!isNaN(i)&&"length"!==r||"value"===r?(i=isNaN(i)?i:Number(i))<=e:("string"==typeof i||"length"===r)&&(i=isNaN(i)?i:i.toString()).length<=e)},not:function(t){for(var e=t.value,r=[],i=arguments.length-1;i-- >0;)r[i]=arguments[i+1];return Promise.resolve(void 0===r.find((function(t){return"object"==typeof t?l(t,e):t===e})))},number:function(t){var e=t.value;return Promise.resolve(!isNaN(e))},required:function(t,e){var r=t.value;return void 0===e&&(e=!0),Promise.resolve(!(e&&!["no","false"].includes(e))||(Array.isArray(r)?!!r.length:r instanceof s?r.getFiles().length>0:"string"==typeof r?!!r:"object"!=typeof r||!!r&&!!Object.keys(r).length))},startsWith:function(t){for(var e=t.value,r=[],i=arguments.length-1;i-- >0;)r[i]=arguments[i+1];return Promise.resolve("string"==typeof e&&r.length?void 0!==r.find((function(t){return e.startsWith(t)})):"string"==typeof e&&0===r.length)},url:function(e){var r=e.value;return Promise.resolve(t(r))},bail:function(){return Promise.resolve(!0)}},y="image/",g={csv:"text/csv",gif:y+"gif",jpg:y+"jpeg",jpeg:y+"jpeg",png:y+"png",pdf:"application/pdf",svg:y+"svg+xml"};function b(t,e,r,i){return new Promise((function(r,o){var n=(i.fauxUploaderDuration||2e3)*(.5+Math.random()),s=performance.now(),a=function(){return setTimeout((function(){var i=performance.now()-s,o=Math.min(100,Math.round(i/n*100));if(e(o),o>=100)return r({url:"http://via.placeholder.com/350x150.png",name:t.name});a()}),20)};a()}))}function x(t,e){var r={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&-1===e.indexOf(i)&&(r[i]=t[i]);return r}var E={inheritAttrs:!1,functional:!0,render:function(t,e){for(var r=e.props,i=e.data,o=e.parent,n=e.children,s=o,a=(r.name,r.forceWrap),l=r.context,u=x(r,["name","forceWrap","context"]);s&&"FormulateInput"!==s.$options.name;)s=s.$parent;if(!s)return null;if(s.$scopedSlots&&s.$scopedSlots[r.name])return s.$scopedSlots[r.name](Object.assign({},l,u));if(Array.isArray(n)&&(n.length>1||a&&n.length>0)){var c=i.attrs,h=(c.name,c.context,x(c,["name","context"]));return t("div",Object.assign({},i,{attrs:h}),n)}return Array.isArray(n)&&1===n.length?n[0]:null}};function O(t,e){var r={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&-1===e.indexOf(i)&&(r[i]=t[i]);return r}var F=function(t){this.registry=new Map,this.ctx=t};function w(t){return new F(t).dataProps()}function V(){return{hasInitialValue:function(){return this.formulateValue&&"object"==typeof this.formulateValue||this.values&&"object"==typeof this.values||this.isGrouping&&"object"==typeof this.context.model[this.index]},isVmodeled:function(){return!!(this.$options.propsData.hasOwnProperty("formulateValue")&&this._events&&Array.isArray(this._events.input)&&this._events.input.length)},initialValues:function(){return p(this.$options.propsData,"formulateValue")&&"object"==typeof this.formulateValue?Object.assign({},this.formulateValue):p(this.$options.propsData,"values")&&"object"==typeof this.values?Object.assign({},this.values):this.isGrouping&&"object"==typeof this.context.model[this.index]?this.context.model[this.index]:{}}}}function j(t){void 0===t&&(t=[]);var e={applyInitialValues:function(){this.hasInitialValue&&(this.proxy=this.initialValues)},setFieldValue:function(t,e){var r;if(void 0===e){var i=this.proxy,o=(i[t],O(i,[String(t)]));this.proxy=o}else Object.assign(this.proxy,((r={})[t]=e,r));this.$emit("input",Object.assign({},this.proxy))},getFormValues:function(){return this.proxy},hasValidationErrors:function(){return Promise.all(this.registry.reduce((function(t,e,r){return t.push(e.performValidation()&&e.getValidationErrors()),t}),[])).then((function(t){return t.some((function(t){return t.hasErrors}))}))},showErrors:function(){this.childrenShouldShowErrors=!0,this.registry.map((function(t){t.formShouldShowErrors=!0}))},hideErrors:function(){this.childrenShouldShowErrors=!1,this.registry.map((function(t){t.formShouldShowErrors=!1,t.behavioralErrorVisibility=!1}))},setValues:function(t){var e=this;Array.from(new Set(Object.keys(t).concat(Object.keys(this.proxy)))).forEach((function(r){!e.registry.has(r)||l(t[r],e.proxy[r])||l(t[r],e.registry.get(r).proxy)||(e.setFieldValue(r,t[r]),e.registry.get(r).context.model=t[r])}))}};return Object.keys(e).reduce((function(r,i){var o;return t.includes(i)?r:Object.assign({},r,((o={})[i]=e[i],o))}),{})}function P(t){return{formulateSetter:t.setFieldValue,formulateRegister:t.register,formulateDeregister:t.deregister,getFormValues:t.getFormValues}}F.prototype.add=function(t,e){return this.registry.set(t,e),this},F.prototype.remove=function(t){this.registry.delete(t);var e=this.ctx.proxy,r=(e[t],O(e,[String(t)]));return this.ctx.proxy=r,this},F.prototype.has=function(t){return this.registry.has(t)},F.prototype.get=function(t){return this.registry.get(t)},F.prototype.map=function(t){var e={};return this.registry.forEach((function(r,i){var o;return Object.assign(e,((o={})[i]=t(r,i),o))})),e},F.prototype.keys=function(){return Array.from(this.registry.keys())},F.prototype.register=function(t,e){if(this.registry.has(t))return!1;this.registry.set(t,e);var r=p(e.$options.propsData,"formulateValue"),i=p(e.$options.propsData,"value");!r&&this.ctx.hasInitialValue&&this.ctx.initialValues[t]?e.context.model=this.ctx.initialValues[t]:!r&&!i||l(e.proxy,this.ctx.initialValues[t])||this.ctx.setFieldValue(t,e.proxy),this.childrenShouldShowErrors&&(e.formShouldShowErrors=!0)},F.prototype.reduce=function(t,e){return this.registry.forEach((function(r,i){e=t(e,r,i)})),e},F.prototype.dataProps=function(){var t=this;return{proxy:{},registry:this,register:this.register.bind(this),deregister:function(e){return t.remove(e)},childrenShouldShowErrors:!1}};var S=function(t){this.form=t};function _(t,e,r,i,o,n,s,a,l,u){"boolean"!=typeof s&&(l=a,a=s,s=!1);var c,h="function"==typeof r?r.options:r;if(t&&t.render&&(h.render=t.render,h.staticRenderFns=t.staticRenderFns,h._compiled=!0,o&&(h.functional=!0)),i&&(h._scopeId=i),n?(c=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),e&&e.call(this,l(t)),t&&t._registeredComponents&&t._registeredComponents.add(n)},h._ssrRegister=c):e&&(c=s?function(t){e.call(this,u(t,this.$root.$options.shadowRoot))}:function(t){e.call(this,a(t))}),c)if(h.functional){var d=h.render;h.render=function(t,e){return c.call(e),d(t,e)}}else{var f=h.beforeCreate;h.beforeCreate=f?[].concat(f,c):[c]}return r}S.prototype.hasValidationErrors=function(){return this.form.hasValidationErrors()},S.prototype.values=function(){var t=this;return new Promise((function(e,r){var i=[],o=function t(e){if("object"!=typeof e)return e;var r=Array.isArray(e)?[]:{};for(var i in e)e[i]instanceof s||f(e[i])?r[i]=e[i]:r[i]=t(e[i]);return r}(t.form.proxy),n=function(e){"object"==typeof t.form.proxy[e]&&t.form.proxy[e]instanceof s&&i.push(t.form.proxy[e].upload().then((function(t){var r;return Object.assign(o,((r={})[e]=t,r))})))};for(var a in o)n(a);Promise.all(i).then((function(){return e(o)})).catch((function(t){return r(t)}))}))};var A={provide:function(){return Object.assign({},P(this),{observeErrors:this.addErrorObserver,removeErrorObserver:this.removeErrorObserver,formulateFieldValidation:this.formulateFieldValidation})},name:"FormulateForm",model:{prop:"formulateValue",event:"input"},props:{name:{type:[String,Boolean],default:!1},formulateValue:{type:Object,default:function(){return{}}},values:{type:[Object,Boolean],default:!1},errors:{type:[Object,Boolean],default:!1},formErrors:{type:Array,default:function(){return[]}}},data:function(){return Object.assign({},w(this),{formShouldShowErrors:!1,errorObservers:[],namedErrors:[],namedFieldErrors:{}})},computed:Object.assign({},V(),{formContext:function(){return{errors:this.mergedFormErrors}},classes:function(){var t={"formulate-form":!0};return this.name&&(t["formulate-form--"+this.name]=!0),t},mergedFormErrors:function(){return this.formErrors.concat(this.namedErrors)},mergedFieldErrors:function(){var t={};if(this.errors)for(var e in this.errors)t[e]=c(this.errors[e]);for(var r in this.namedFieldErrors)t[r]=c(this.namedFieldErrors[r]);return t},hasFormErrorObservers:function(){return!!this.errorObservers.filter((function(t){return"form"===t.type})).length}}),watch:{formulateValue:{handler:function(t){this.isVmodeled&&t&&"object"==typeof t&&this.setValues(t)},deep:!0},mergedFormErrors:function(t){this.errorObservers.filter((function(t){return"form"===t.type})).forEach((function(e){return e.callback(t)}))},mergedFieldErrors:{handler:function(t){this.errorObservers.filter((function(t){return"input"===t.type})).forEach((function(e){return e.callback(t[e.field]||[])}))},immediate:!0}},created:function(){this.$formulate.register(this),this.applyInitialValues()},destroyed:function(){this.$formulate.deregister(this)},methods:Object.assign({},j(),{applyErrors:function(t){var e=t.formErrors,r=t.inputErrors;this.namedErrors=e,this.namedFieldErrors=r},addErrorObserver:function(t){this.errorObservers.find((function(e){return t.callback===e.callback}))||(this.errorObservers.push(t),"form"===t.type?t.callback(this.mergedFormErrors):p(this.mergedFieldErrors,t.field)&&t.callback(this.mergedFieldErrors[t.field]))},removeErrorObserver:function(t){this.errorObservers=this.errorObservers.filter((function(e){return e.callback!==t}))},registerErrorComponent:function(t){this.errorComponents.includes(t)||this.errorComponents.push(t)},formSubmitted:function(){var t=this;this.showErrors();var e=new S(this);return this.$emit("submit-raw",e),e.hasValidationErrors().then((function(t){return t?void 0:e.values()})).then((function(e){if(void 0!==e)return t.$emit("submit",e),e}))},formulateFieldValidation:function(t){this.$emit("validation",t)}})},$=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("form",{class:t.classes,on:{submit:function(e){return e.preventDefault(),t.formSubmitted(e)}}},[t.hasFormErrorObservers?t._e():r("FormulateErrors",{attrs:{context:t.formContext}}),t._v(" "),t._t("default")],2)};$._withStripped=!0;var R=_({render:$,staticRenderFns:[]},void 0,A,void 0,!1,void 0,!1,void 0,void 0,void 0),N={context:function(){return k.call(this,Object.assign({},{addLabel:this.logicalAddLabel,attributes:this.elementAttributes,blurHandler:I.bind(this),classification:this.classification,component:this.component,disableErrors:this.disableErrors,errors:this.explicitErrors,allErrors:this.allErrors,formShouldShowErrors:this.formShouldShowErrors,getValidationErrors:this.getValidationErrors.bind(this),hasGivenName:this.hasGivenName,hasLabel:this.label&&"button"!==this.classification,hasValidationErrors:this.hasValidationErrors.bind(this),help:this.help,helpPosition:this.logicalHelpPosition,id:this.id||this.defaultId,imageBehavior:this.imageBehavior,label:this.label,labelPosition:this.logicalLabelPosition,limit:this.limit,name:this.nameOrFallback,performValidation:this.performValidation.bind(this),preventWindowDrops:this.preventWindowDrops,repeatable:this.repeatable,setErrors:this.setErrors.bind(this),showValidationErrors:this.showValidationErrors,slotComponents:this.slotComponents,type:this.type,uploadBehavior:this.uploadBehavior,uploadUrl:this.mergedUploadUrl,uploader:this.uploader||this.$formulate.getUploader(),validationErrors:this.validationErrors,value:this.value,visibleValidationErrors:this.visibleValidationErrors,isSubField:this.isSubField},this.typeContext))},nameOrFallback:function(){if(!0===this.name&&"button"!==this.classification)return this.type+"_"+this.elementAttributes.id;if(!1===this.name||"button"===this.classification&&!0===this.name)return!1;return this.name},hasGivenName:function(){return"boolean"!=typeof this.name},typeContext:function(){var t=this;switch(this.classification){case"select":return{options:C.call(this,this.options),optionGroups:!!this.optionGroups&&a(this.optionGroups,(function(e,r){return C.call(t,r)})),placeholder:this.$attrs.placeholder||!1};case"slider":return{showValue:!!this.showValue};default:return this.options?{options:C.call(this,this.options)}:{}}},elementAttributes:function(){var t=Object.assign({},this.localAttributes);this.id?t.id=this.id:t.id=this.defaultId;this.hasGivenName&&(t.name=this.name);this.help&&(t["aria-describedby"]=t.id+"-help");return t},logicalLabelPosition:function(){if(this.labelPosition)return this.labelPosition;switch(this.classification){case"box":return"after";default:return"before"}},logicalHelpPosition:function(){if(this.helpPosition)return this.helpPosition;switch(this.classification){case"group":return"before";default:return"after"}},mergedUploadUrl:function(){return this.uploadUrl||this.$formulate.getUploadUrl()},isVmodeled:function(){return!!(this.$options.propsData.hasOwnProperty("formulateValue")&&this._events&&Array.isArray(this._events.input)&&this._events.input.length)},mergedValidationName:function(){if(this.validationName)return this.validationName;if("string"==typeof this.name)return this.name;if(this.label)return this.label;return this.type},explicitErrors:function(){return c(this.errors).concat(this.localErrors).concat(c(this.error))},allErrors:function(){return this.explicitErrors.concat(c(this.validationErrors))},hasErrors:function(){return!!this.allErrors.length},hasVisibleErrors:function(){return this.validationErrors&&this.showValidationErrors||!!this.explicitErrors.length},showValidationErrors:function(){if(this.showErrors||this.formShouldShowErrors)return!0;if("file"===this.classification&&"live"===this.uploadBehavior&&D.call(this))return!0;return this.behavioralErrorVisibility},visibleValidationErrors:function(){return this.showValidationErrors&&this.validationErrors.length?this.validationErrors:[]},slotComponents:function(){return{label:this.$formulate.slotComponent(this.type,"label"),help:this.$formulate.slotComponent(this.type,"help"),errors:this.$formulate.slotComponent(this.type,"errors"),repeatable:this.$formulate.slotComponent(this.type,"repeatable"),addMore:this.$formulate.slotComponent(this.type,"addMore"),remove:this.$formulate.slotComponent(this.type,"remove")}},logicalAddLabel:function(){if("boolean"==typeof this.addLabel)return"+ "+(this.label||this.name||"Add");return this.addLabel}};function C(t){if(!Array.isArray(t)&&t&&"object"==typeof t){var e=[];for(var r in t)e.push({value:r,label:t[r],id:this.elementAttributes.id+"_"+r});return e}return t}function I(){this.$emit("blur"),"blur"===this.errorBehavior&&(this.behavioralErrorVisibility=!0)}function k(t){return Object.defineProperty(t,"model",{get:D.bind(this),set:L.bind(this)})}function D(){var t=this.isVmodeled?"formulateValue":"proxy";return"checkbox"===this.type&&!Array.isArray(this[t])&&this.options?[]:this[t]?this[t]:""}function L(t){l(t,this.proxy)||(this.proxy=t),this.$emit("input",t),this.context.name&&"function"==typeof this.formulateSetter&&this.formulateSetter(this.context.name,t)}var U={name:"FormulateInput",inheritAttrs:!1,provide:function(){return{formulateRegisterRule:this.registerRule,formulateRemoveRule:this.removeRule}},inject:{formulateSetter:{default:void 0},formulateFieldValidation:{default:function(){return function(){return{}}}},formulateRegister:{default:void 0},formulateDeregister:{default:void 0},getFormValues:{default:function(){return function(){return{}}}},observeErrors:{default:void 0},removeErrorObserver:{default:void 0},isSubField:{default:function(){return function(){return!1}}}},model:{prop:"formulateValue",event:"input"},props:{type:{type:String,default:"text"},name:{type:[String,Boolean],default:!0},formulateValue:{default:""},value:{default:!1},options:{type:[Object,Array,Boolean],default:!1},optionGroups:{type:[Object,Boolean],default:!1},id:{type:[String,Boolean,Number],default:!1},label:{type:[String,Boolean],default:!1},labelPosition:{type:[String,Boolean],default:!1},limit:{type:Number,default:1/0},help:{type:[String,Boolean],default:!1},helpPosition:{type:[String,Boolean],default:!1},errors:{type:[String,Array,Boolean],default:!1},repeatable:{type:Boolean,default:!1},validation:{type:[String,Boolean,Array],default:!1},validationName:{type:[String,Boolean],default:!1},error:{type:[String,Boolean],default:!1},errorBehavior:{type:String,default:"blur",validator:function(t){return["blur","live","submit"].includes(t)}},showErrors:{type:Boolean,default:!1},imageBehavior:{type:String,default:"preview"},uploadUrl:{type:[String,Boolean],default:!1},uploader:{type:[Function,Object,Boolean],default:!1},uploadBehavior:{type:String,default:"live"},preventWindowDrops:{type:Boolean,default:!0},showValue:{type:[String,Boolean],default:!1},validationMessages:{type:Object,default:function(){return{}}},validationRules:{type:Object,default:function(){return{}}},checked:{type:[String,Boolean],default:!1},disableErrors:{type:Boolean,default:!1},addLabel:{type:[Boolean,String],default:!1}},data:function(){return{defaultId:this.$formulate.nextId(this),localAttributes:{},localErrors:[],proxy:this.getInitialValue(),behavioralErrorVisibility:"live"===this.errorBehavior,formShouldShowErrors:!1,validationErrors:[],pendingValidation:Promise.resolve(),ruleRegistry:[],messageRegistry:{}}},computed:Object.assign({},N,{classification:function(){var t=this.$formulate.classify(this.type);return"box"===t&&this.options?"group":t},component:function(){return"group"===this.classification?"FormulateInputGroup":this.$formulate.component(this.type)},parsedValidationRules:function(){var t=this,e={};return Object.keys(this.validationRules).forEach((function(r){e[u(r)]=t.validationRules[r]})),e},messages:function(){var t=this,e={};return Object.keys(this.validationMessages).forEach((function(r){e[u(r)]=t.validationMessages[r]})),Object.keys(this.messageRegistry).forEach((function(r){e[u(r)]=t.messageRegistry[r]})),e}}),watch:{$attrs:{handler:function(t){this.updateLocalAttributes(t)},deep:!0},proxy:function(t,e){this.performValidation(),this.isVmodeled||l(t,e)||(this.context.model=t)},formulateValue:function(t,e){this.isVmodeled&&!l(t,e)&&(this.context.model=t)},showValidationErrors:{handler:function(t){this.$emit("error-visibility",t)},immediate:!0}},created:function(){this.applyInitialValue(),this.formulateRegister&&"function"==typeof this.formulateRegister&&this.formulateRegister(this.nameOrFallback,this),this.disableErrors||"function"!=typeof this.observeErrors||this.observeErrors({callback:this.setErrors,type:"input",field:this.nameOrFallback}),this.updateLocalAttributes(this.$attrs),this.performValidation()},beforeDestroy:function(){this.disableErrors||"function"!=typeof this.removeErrorObserver||this.removeErrorObserver(this.setErrors),"function"==typeof this.formulateDeregister&&this.formulateDeregister(this.nameOrFallback)},methods:{getInitialValue:function(){var t=this.$formulate.classify(this.type);return"box"===(t="box"===t&&this.options?"group":t)&&this.checked?this.value||!0:p(this.$options.propsData,"value")&&"box"!==t?this.value:p(this.$options.propsData,"formulateValue")?this.formulateValue:""},applyInitialValue:function(){!l(this.context.model,this.proxy)&&Object.prototype.hasOwnProperty(this.$options.propsData,"options")&&"box"===this.classification&&(this.context.model=this.proxy)},updateLocalAttributes:function(t){l(t,this.localAttributes)||(this.localAttributes=t)},performValidation:function(){var t=this,e=h(this.validation,this.$formulate.rules(this.parsedValidationRules));return e=this.ruleRegistry.length?this.ruleRegistry.concat(e):e,this.pendingValidation=this.runRules(e).then((function(e){return t.didValidate(e)})),this.pendingValidation},runRules:function(t){var e=this,r=function(t){var r=t[0],i=t[1],o=t[2],n=(t[3],r.apply(void 0,[{value:e.context.model,getFormValues:e.getFormValues.bind(e),name:e.context.name}].concat(i)));return(n=n instanceof Promise?n:Promise.resolve(n)).then((function(t){return!t&&e.getMessage(o,i)}))};return new Promise((function(e){var i=function(t,o){void 0===o&&(o=[]);var n=t.shift();Array.isArray(n)&&n.length?Promise.all(n.map(r)).then((function(t){return t.filter((function(t){return!!t}))})).then((function(r){return(r=Array.isArray(r)?r:[]).length&&n.bail||!t.length?e(o.concat(r)):i(t,o.concat(r))})):e([])};i(function(t){var e=[],r=t.findIndex((function(t){return"bail"===t[2].toLowerCase()}));if(r>=0){var i=t.splice(0,r+1).slice(0,-1);i.length&&e.push(i),t.map((function(t){return e.push(Object.defineProperty([t],"bail",{value:!0}))}))}else e.push(t);return e.reduce((function(t,e){var r=function(t,e){if(void 0===e&&(e=!1),t.length<2)return Object.defineProperty([t],"bail",{value:e});var i=[],o=t.findIndex((function(t){return"^"===t[3]}));if(o>=0){var n=t.splice(0,o);n.length&&i.push.apply(i,r(n,e)),i.push(Object.defineProperty([t.shift()],"bail",{value:!0})),t.length&&i.push.apply(i,r(t,e))}else i.push(t);return i};return t.concat(r(e))}),[])}(t))}))},didValidate:function(t){var e=!l(t,this.validationErrors);if(this.validationErrors=t,e){var r=this.getErrorObject();this.$emit("validation",r),this.formulateFieldValidation&&"function"==typeof this.formulateFieldValidation&&this.formulateFieldValidation(r)}},getMessage:function(t,e){return this.getMessageFunc(t)({args:e,name:this.mergedValidationName,value:this.context.model,vm:this,formValues:this.getFormValues()})},getMessageFunc:function(t){var e=this;if(t=u(t),this.messages&&void 0!==this.messages[t])switch(typeof this.messages[t]){case"function":return this.messages[t];case"string":case"boolean":return function(){return e.messages[t]}}return function(r){return e.$formulate.validationMessage(t,r,e)}},hasValidationErrors:function(){var t=this;return new Promise((function(e){t.$nextTick((function(){t.pendingValidation.then((function(){return e(!!t.validationErrors.length)}))}))}))},getValidationErrors:function(){var t=this;return new Promise((function(e){t.$nextTick((function(){return t.pendingValidation.then((function(){return e(t.getErrorObject())}))}))}))},getErrorObject:function(){return{name:this.context.nameOrFallback||this.context.name,errors:this.validationErrors.filter((function(t){return"string"==typeof t})),hasErrors:!!this.validationErrors.length}},setErrors:function(t){this.localErrors=c(t)},registerRule:function(t,e,r,i){void 0===i&&(i=null),this.ruleRegistry.some((function(t){return t[2]===r}))||(this.ruleRegistry.push([t,e,r]),null!==i&&(this.messageRegistry[r]=i))},removeRule:function(t){var e=this.ruleRegistry.findIndex((function(e){return e[2]===t}));e>=0&&(this.ruleRegistry.splice(e,1),delete this.messageRegistry[t])}}},B=function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{staticClass:"formulate-input",attrs:{"data-classification":t.classification,"data-has-errors":t.hasErrors,"data-is-showing-errors":t.hasVisibleErrors,"data-type":t.type}},[t._t("default",null,{id:t.id,context:t.context,errors:t.errors,validationErrors:t.validationErrors})],2)};B._withStripped=!0;var M=_({render:B,staticRenderFns:[]},void 0,U,void 0,!1,void 0,!1,void 0,void 0,void 0),G={inject:{observeErrors:{default:!1},removeErrorObserver:{default:!1}},props:{context:{type:Object,default:function(){return{}}},type:{type:String,default:"form"}},data:function(){return{boundSetErrors:this.setErrors.bind(this),localErrors:[]}},computed:{visibleValidationErrors:function(){return Array.isArray(this.context.visibleValidationErrors)?this.context.visibleValidationErrors:[]},errors:function(){return Array.isArray(this.context.errors)?this.context.errors:[]},mergedErrors:function(){return this.errors.concat(this.localErrors)},visibleErrors:function(){return Array.from(new Set(this.mergedErrors.concat(this.visibleValidationErrors))).filter((function(t){return"string"==typeof t}))}},created:function(){"form"!==this.type||"function"!=typeof this.observeErrors||Array.isArray(this.context.errors)||this.observeErrors({callback:this.boundSetErrors,type:this.type})},destroyed:function(){"form"!==this.type||"function"!=typeof this.removeErrorObserver||Array.isArray(this.context.errors)||this.removeErrorObserver(this.boundSetErrors)},methods:{setErrors:function(t){this.localErrors=c(t)}}},q=function(){var t=this,e=t.$createElement,r=t._self._c||e;return t.visibleErrors.length?r("ul",{class:"formulate-"+t.type+"-errors"},t._l(t.visibleErrors,(function(e){return r("li",{key:e,class:"formulate-"+t.type+"-error",domProps:{textContent:t._s(e)}})})),0):t._e()};q._withStripped=!0;var T=_({render:q,staticRenderFns:[]},void 0,G,void 0,!1,void 0,!1,void 0,void 0,void 0),W={props:{context:{type:Object,required:!0}}},H=function(){var t=this.$createElement,e=this._self._c||t;return this.context.help?e("div",{class:"formulate-input-help formulate-input-help--"+this.context.helpPosition,attrs:{id:this.context.id+"-help"},domProps:{textContent:this._s(this.context.help)}}):this._e()};H._withStripped=!0;var Y=_({render:H,staticRenderFns:[]},void 0,W,void 0,!1,void 0,!1,void 0,void 0,void 0),z={name:"FormulateGrouping",props:{context:{type:Object,required:!0}},provide:function(){return{isSubField:function(){return!0},registerProvider:this.registerProvider,deregisterProvider:this.deregisterProvider}},data:function(){return{providers:[]}},inject:["formulateRegisterRule","formulateRemoveRule"],computed:{items:function(){return Array.isArray(this.context.model)&&(this.context.repeatable||0!==this.context.model.length)?this.context.model.map((function(t){return m(t,t.__id)})):[m({})]},formShouldShowErrors:function(){return this.context.formShouldShowErrors}},watch:{providers:function(){this.formShouldShowErrors&&this.showErrors()},formShouldShowErrors:function(t){t&&this.showErrors()}},created:function(){this.formulateRegisterRule(this.validateGroup.bind(this),[],"formulateGrouping",!0)},destroyed:function(){this.formulateRemoveRule("formulateGrouping")},methods:{getAtIndex:function(t){return void 0!==this.context.model[t]&&this.context.model[t].__id?this.context.model[t]:void 0!==this.context.model[t]?m(this.context.model[t]):void 0===this.context.model[t]&&void 0!==this.items[t]?m({},this.items[t].__id):m({})},setFieldValue:function(t,e,r){var i,o=Array.isArray(this.context.model)?this.context.model:[],n=this.getAtIndex(t),s=m(Object.assign({},n,((i={})[e]=r,i)),n.__id);o.splice(t,1,s),this.context.model=o},validateGroup:function(){return Promise.all(this.providers.reduce((function(t,e){return e&&"function"==typeof e.hasValidationErrors&&t.push(e.hasValidationErrors()),t}),[])).then((function(t){return!t.some((function(t){return!!t}))}))},showErrors:function(){this.providers.forEach((function(t){return t&&"function"==typeof t.showErrors&&t.showErrors()}))},removeItem:function(t){Array.isArray(this.context.model)&&this.context.model.splice(t,1)},registerProvider:function(t){this.providers.some((function(e){return e===t}))||this.providers.push(t)},deregisterProvider:function(t){this.providers=this.providers.filter((function(e){return e!==t}))}}},K=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("FormulateSlot",{staticClass:"formulate-input-grouping",attrs:{name:"grouping",context:t.context,"force-wrap":t.context.repeatable}},t._l(t.items,(function(e,i){return r("FormulateRepeatableProvider",{key:e.__id,attrs:{index:i,"set-field-value":function(e,r){return t.setFieldValue(i,e,r)},context:t.context},on:{remove:t.removeItem}},[t._t("default")],2)})),1)};K._withStripped=!0;var Z=_({render:K,staticRenderFns:[]},void 0,z,void 0,!1,void 0,!1,void 0,void 0,void 0),J={props:{context:{type:Object,required:!0}}},X=function(){var t=this.$createElement;return(this._self._c||t)("label",{class:"formulate-input-label formulate-input-label--"+this.context.labelPosition,attrs:{for:this.context.id},domProps:{textContent:this._s(this.context.label)}})};X._withStripped=!0;var Q=_({render:X,staticRenderFns:[]},void 0,J,void 0,!1,void 0,!1,void 0,void 0,void 0),tt={props:{context:{type:Object,required:!0},addMore:{type:Function,required:!0}}},et=function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"formulate-input-group-add-more"},[e("FormulateInput",{attrs:{type:"button",label:this.context.addLabel,"data-minor":"","data-ghost":""},on:{click:this.addMore}})],1)};et._withStripped=!0;var rt=_({render:et,staticRenderFns:[]},void 0,tt,void 0,!1,void 0,!1,void 0,void 0,void 0),it={props:{context:{type:Object,required:!0},removeItem:{type:Function,required:!0},index:{type:Number,required:!0}}},ot=function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"formulate-input-group-repeatable"},[e("FormulateSlot",{attrs:{name:"remove",context:this.context,"remove-item":this.removeItem}},[e(this.context.slotComponents.remove,{tag:"component",attrs:{context:this.context,"remove-item":this.removeItem}})],1),this._v(" "),this._t("default")],2)};ot._withStripped=!0;var nt=_({render:ot,staticRenderFns:[]},void 0,it,void 0,!1,void 0,!1,void 0,void 0,void 0);function st(t,e){var r={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&-1===e.indexOf(i)&&(r[i]=t[i]);return r}var at={name:"FormulateInputGroup",props:{context:{type:Object,required:!0}},computed:{options:function(){return this.context.options||[]},subType:function(){return"group"===this.context.type?"grouping":"inputs"},optionsWithContext:function(){var t=this,e=this.context,r=e.attributes,i=(r.id,st(r,["id"])),o=(e.blurHandler,e.classification,e.component,e.getValidationErrors,e.hasLabel,e.hasValidationErrors,e.isSubField,e.labelPosition,e.options,e.performValidation,e.setErrors,e.slotComponents,e.validationErrors,e.visibleValidationErrors,e.help,st(e,["attributes","blurHandler","classification","component","getValidationErrors","hasLabel","hasValidationErrors","isSubField","labelPosition","options","performValidation","setErrors","slotComponents","validationErrors","visibleValidationErrors","help"]));return this.options.map((function(e){return t.groupItemContext(o,e,i)}))},canAddMore:function(){return this.context.repeatable&&this.items.length'); - background-size: 1em 1em; - background-repeat: no-repeat; - background-position: center; - pointer-events: none; } - .formulate-input[data-classification='text'] .formulate-input-element--search input { - padding-left: 2em; } - .formulate-input[data-classification='text'] input[type="color"] { - height: 1.1em; - box-sizing: content-box; - width: auto; } - .formulate-input[data-classification='text'] input[type="color"]::-webkit-color-swatch-wrapper { - padding: 0 0 0 1.5em; - display: flex; - align-items: center; - background-image: url('data:image/svg+xml;utf8,'); - background-repeat: no-repeat; - background-size: .9em .9em; - background-position: left .1em; } - .formulate-input[data-classification='text'] input[type="color"]::-webkit-color-swatch { - display: block; - height: 1em; - border-radius: .2em; - border: 0; - flex: auto; } - .formulate-input[data-classification='text'] input[type="color"]::-moz-color-swatch { - display: block; - height: 1em; - border-radius: .2em; - border: 0; - flex: auto; } - .formulate-input[data-classification='slider'] .formulate-input-element--range { - display: flex; - align-items: center; } - .formulate-input[data-classification='slider'] .formulate-input-element-range-value { - font-size: .9em; - line-height: 1; - margin-left: .5em; - background-color: #efefef; - padding: .25em .3em; - border-radius: .25em; - color: #6d6d6d; - font-variant-numeric: tabular-nums; } - .formulate-input[data-classification='slider'] input { - appearance: none; - width: 100%; - font-size: 1em; - padding: .5em 0; } - .formulate-input[data-classification='slider'] input:focus { - outline: 0; } - .formulate-input[data-classification='slider'] input::-webkit-slider-thumb { - cursor: pointer; - appearance: none; - width: 1em; - height: 1em; - border-radius: 1em; - border: 0; - background-color: #41b883; - margin-top: calc(-.5em + 2px); } - .formulate-input[data-classification='slider'] input::-moz-range-thumb { - cursor: pointer; - appearance: none; - width: 1em; - height: 1em; - border-radius: 1em; - border: 0; - background-color: #41b883; - margin-top: calc(-.5em + 2px); } - .formulate-input[data-classification='slider'] input::-ms-thumb { - cursor: pointer; - appearance: none; - width: 1em; - height: 1em; - border-radius: 1em; - border: 0; - background-color: #41b883; - margin-top: calc(-.5em + 2px); } - .formulate-input[data-classification='slider'] input::-webkit-slider-runnable-track { - appearance: none; - width: 100%; - height: 4px; - background-color: #efefef; - border-radius: 3px; - margin: 0; - padding: 0; } - .formulate-input[data-classification='slider'] input::-moz-range-track { - appearance: none; - width: 100%; - height: 4px; - background-color: #efefef; - border-radius: 3px; - margin: 0; - padding: 0; } - .formulate-input[data-classification='textarea'] textarea { - appearance: none; - border-radius: .3em; - border: 1px solid #cecece; - box-sizing: border-box; - background-color: transparent; - font-size: .9em; - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; - padding: .75em; - display: block; - width: 100%; - font-weight: 400; - line-height: 1.2em; - margin: 0; } - .formulate-input[data-classification='textarea'] textarea::placeholder { - color: #a8a8a8; - line-height: normal; } - .formulate-input[data-classification='textarea'] textarea:focus { - outline: 0; - border: 1px solid #41b883; } - .formulate-input[data-classification='button'] button { - appearance: none; - border-radius: .3em; - border: 1px solid #cecece; - box-sizing: border-box; - background-color: transparent; - font-size: .9em; - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; - padding: .75em; - display: block; - width: 100%; - font-weight: 400; - line-height: 1.2em; - margin: 0; - border-color: #41b883; - background-color: #41b883; - color: white; - min-width: 0; - width: auto; - font-weight: bold; - cursor: pointer; - display: inline-flex; - align-items: center; } - .formulate-input[data-classification='button'] button::placeholder { - color: #a8a8a8; - line-height: normal; } - .formulate-input[data-classification='button'] button:focus { - outline: 0; - border: 1px solid #41b883; } - .formulate-input[data-classification='button'] button[disabled] { - background-color: #cecece; - border-color: #cecece; } - .formulate-input[data-classification='button'] button[data-ghost] { - color: #41b883; - background-color: transparent; - border-color: currentColor; } - .formulate-input[data-classification='button'] button[data-minor] { - font-size: .75em; - display: inline-block; } - .formulate-input[data-classification='button'] button[data-danger] { - background-color: #960505; - border-color: #960505; } - .formulate-input[data-classification='button'] button[data-danger][data-ghost] { - color: #960505; - background-color: transparent; } - .formulate-input[data-classification='button'] button:active { - background-color: #64c89b; - border-color: #64c89b; } - .formulate-input[data-classification='select'] .formulate-input-element { - position: relative; } - .formulate-input[data-classification='select'] .formulate-input-element::before { - content: ''; - width: 0; - height: 0; - border: .3em solid transparent; - border-top-color: #cecece; - border-bottom-width: 0; - top: 50%; - margin-top: -.1em; - right: 1em; - position: absolute; } - .formulate-input[data-classification='select'] select { - appearance: none; - border-radius: .3em; - border: 1px solid #cecece; - box-sizing: border-box; - background-color: transparent; - font-size: .9em; - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; - padding: .75em; - display: block; - width: 100%; - font-weight: 400; - line-height: 1.2em; - margin: 0; - padding-right: 2em; } - .formulate-input[data-classification='select'] select::placeholder { - color: #a8a8a8; - line-height: normal; } - .formulate-input[data-classification='select'] select:focus { - outline: 0; - border: 1px solid #41b883; } - .formulate-input[data-classification='select'] select[data-placeholder-selected] { - color: #a8a8a8; } - .formulate-input[data-classification='box'] .formulate-input-wrapper { - display: flex; - align-items: center; } - .formulate-input[data-classification='box'] .formulate-input-element { - overflow: hidden; - display: flex; - align-items: center; } - .formulate-input[data-classification='box'] .formulate-input-element input { - position: absolute; - left: -999px; } - .formulate-input[data-classification='box'] .formulate-input-element-decorator { - display: block; - width: 1em; - height: 1em; - border-radius: .25em; - border: 1px solid #cecece; - position: relative; } - .formulate-input[data-classification='box'] .formulate-input-element-decorator::before { - content: ''; - display: block; - background-size: contain; - background-position: right; - width: calc(100% - .125em); - height: calc(100% - .125em); - box-sizing: border-box; - position: absolute; - top: .0625em; - left: .0625em; } - .formulate-input[data-classification='box'] .formulate-input-element[data-type="radio"] .formulate-input-element-decorator { - border-radius: 1em; } - .formulate-input[data-classification='box'] .formulate-input-element[data-type="radio"] .formulate-input-element-decorator::before { - border-radius: 1em; - width: calc(100% - .5em); - height: calc(100% - .5em); - top: .25em; - left: .25em; } - .formulate-input[data-classification='box'] .formulate-input-element input[type="checkbox"]:checked ~ .formulate-input-element-decorator { - border-color: #41b883; } - .formulate-input[data-classification='box'] .formulate-input-element input[type="checkbox"]:checked ~ .formulate-input-element-decorator::before { - background-color: #41b883; - mask-image: url('data:image/svg+xml;utf8,'); } - .formulate-input[data-classification='box'] .formulate-input-element input[type="radio"]:checked ~ .formulate-input-element-decorator { - border-color: #41b883; } - .formulate-input[data-classification='box'] .formulate-input-element input[type="radio"]:checked ~ .formulate-input-element-decorator::before { - background-color: #41b883; } - .formulate-input[data-classification='box'] .formulate-input-element input:focus ~ .formulate-input-element-decorator { - border-color: #41b883; } - .formulate-input[data-classification='box'] .formulate-input-label--after { - margin-left: .5em; } - .formulate-input[data-classification='box'] .formulate-input-label--before { - margin-right: .5em; } - .formulate-input[data-classification='group'] .formulate-input-group-item { - margin-bottom: .5em; } - .formulate-input[data-classification='group'] > .formulate-input-wrapper > .formulate-input-label { - margin-bottom: .5em; } - .formulate-input[data-classification='group'] [data-is-repeatable] { - padding: 1em; - border: 1px solid #efefef; - border-radius: .3em; } - .formulate-input[data-classification='group'] [data-is-repeatable] .formulate-input-grouping { - margin: -1em -1em 0 -1em; } - .formulate-input[data-classification='group'] [data-is-repeatable] .formulate-input-group-repeatable { - padding: 1em 3em 1em 1em; - border-bottom: 1px solid #efefef; - position: relative; } - .formulate-input[data-classification='group'] [data-is-repeatable] .formulate-input-group-repeatable-remove { - position: absolute; - display: block; - top: calc(50% - .65em + .5em); - width: 1.3em; - height: 1.3em; - background-color: #cecece; - right: .85em; - border-radius: 1.3em; - cursor: pointer; - transition: background-color .2s; - overflow: hidden; - text-indent: -1000px; } - .formulate-input[data-classification='group'] [data-is-repeatable] .formulate-input-group-repeatable-remove::before, .formulate-input[data-classification='group'] [data-is-repeatable] .formulate-input-group-repeatable-remove::after { - content: ''; - position: absolute; - top: calc(50% - .1em); - left: .325em; - display: block; - width: .65em; - height: .2em; - background-color: white; - transform-origin: center center; - transition: transform .25s; } - @media (pointer: fine) { - .formulate-input[data-classification='group'] [data-is-repeatable] .formulate-input-group-repeatable-remove:hover { - background-color: #dc2c2c; } - .formulate-input[data-classification='group'] [data-is-repeatable] .formulate-input-group-repeatable-remove:hover::after, .formulate-input[data-classification='group'] [data-is-repeatable] .formulate-input-group-repeatable-remove:hover::before { - height: .2em; - width: .75em; - left: .25em; - top: calc(50% - .075em); } - .formulate-input[data-classification='group'] [data-is-repeatable] .formulate-input-group-repeatable-remove:hover::after { - transform: rotate(45deg); } - .formulate-input[data-classification='group'] [data-is-repeatable] .formulate-input-group-repeatable-remove:hover::before { - transform: rotate(-45deg); } } - .formulate-input[data-classification='group'] [data-is-repeatable] .formulate-input-group-repeatable:last-child { - margin-bottom: 1em; } - .formulate-input[data-classification="file"] .formulate-input-upload-area { - width: 100%; - position: relative; - padding: 2em 0; } - .formulate-input[data-classification="file"] .formulate-input-upload-area input { - cursor: pointer; - appearance: none; - opacity: 0; - position: absolute; - left: 0; - right: 0; - bottom: 0; - top: 0; - width: 100%; - height: 100%; - z-index: 5; } - .formulate-input[data-classification="file"] .formulate-input-upload-area[data-has-files] { - padding: 0; } - .formulate-input[data-classification="file"] .formulate-input-upload-area[data-has-files] input { - display: none; } - .formulate-input[data-classification="file"] .formulate-input-upload-area-mask { - border-radius: .4em; - position: absolute; - pointer-events: none; - position: absolute; - display: flex; - justify-content: center; - align-items: center; - left: 0; - right: 0; - top: 0; - bottom: 0; - border: 2px dashed #a8a8a8; - z-index: 2; } - .formulate-input[data-classification="file"] .formulate-input-upload-area-mask::before { - content: ''; - background-color: #a8a8a8; - mask-image: url('data:image/svg+xml;utf8,'); - mask-repeat: no-repeat; - mask-position: center; - width: 2em; - height: 2em; - position: absolute; - pointer-events: none; } - .formulate-input[data-classification="file"] .formulate-input-upload-area input:focus ~ .formulate-input-upload-area-mask, - .formulate-input[data-classification="file"] .formulate-input-upload-area input:hover ~ .formulate-input-upload-area-mask, - .formulate-input[data-classification="file"] .formulate-input-upload-area input[data-is-drag-hover] ~ .formulate-input-upload-area-mask { - border-color: #41b883; } - .formulate-input[data-classification="file"] .formulate-input-upload-area input:focus ~ .formulate-input-upload-area-mask::before, - .formulate-input[data-classification="file"] .formulate-input-upload-area input:hover ~ .formulate-input-upload-area-mask::before, - .formulate-input[data-classification="file"] .formulate-input-upload-area input[data-is-drag-hover] ~ .formulate-input-upload-area-mask::before { - background-color: #41b883; } - .formulate-input[data-classification="file"] .formulate-files { - list-style-type: none; - margin: 0; - padding: 0; } - .formulate-input[data-classification="file"] .formulate-files .formulate-file-progress { - background-color: #cecece; - height: .3em; - border-radius: 1.25em; - width: 5em; - overflow: hidden; - position: relative; - flex: 0 0 5em; - right: .75em; - transition: height .25s, width .25s, flex-basis .25s; - z-index: 2; } - .formulate-input[data-classification="file"] .formulate-files .formulate-file-progress::before { - content: ''; - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; - display: block; - opacity: 0; - transform: scale(0.08); - background-color: #ffffff; - mask-image: url('data:image/svg+xml;utf8,'); - mask-size: 77%; - mask-repeat: no-repeat; - mask-position: center; - z-index: 3; } - .formulate-input[data-classification="file"] .formulate-files .formulate-file-progress[data-just-finished] { - width: 1.25em; - height: 1.25em; - flex: 0 0 1.25em; } - .formulate-input[data-classification="file"] .formulate-files .formulate-file-progress[data-just-finished]::before { - transition: transform .25s .2s, opacity .25s .2s; - transform: scale(1); - opacity: 1; } - .formulate-input[data-classification="file"] .formulate-files .formulate-file-progress[data-is-finished] { - transition: height .25s, width .25s, left .25s, top, .25s, border-radius .25s; - width: .3em; - flex: 0 0 .3em; - height: 100%; - right: 0; - border-radius: 0 .23em .23em 0; } - .formulate-input[data-classification="file"] .formulate-files .formulate-file-progress[data-is-finished]::before { - transition: opacity .1s; - opacity: 0; } - .formulate-input[data-classification="file"] .formulate-files .formulate-file-progress .formulate-file-progress-inner { - background-color: #41b883; - width: 1%; - position: absolute; - left: 0; - bottom: 0; - top: 0; - z-index: 2; } - .formulate-input[data-classification="file"] .formulate-files .formulate-file-name { - padding-left: 1.5em; - padding-right: 2em; - max-width: 100%; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; } - .formulate-input[data-classification="file"] .formulate-files .formulate-file-name::before { - position: absolute; - left: .7em; - top: 50%; - margin-top: -.7em; - background-color: #a8a8a8; - content: ''; - mask-image: url('data:image/svg+xml;utf8,'); - mask-repeat: no-repeat; - mask-size: contain; - width: 1.25em; - height: 1.25em; - display: inline-block; - margin-right: .5em; } - .formulate-input[data-classification="file"] .formulate-files .formulate-file-remove { - width: 1.25em; - height: 1.25em; - border-radius: 1em; - border: 1px solid #a8a8a8; - background-color: #a8a8a8; - mask-image: url('data:image/svg+xml;utf8,'); - mask-size: .6em; - mask-repeat: no-repeat; - mask-position: center; - cursor: pointer; - position: absolute; - right: .75em; - z-index: 1; - transition: transform .25s; } - @media (pointer: fine) { - .formulate-input[data-classification="file"] .formulate-files .formulate-file-remove:hover { - transform: scale(1.5); } } - .formulate-input[data-classification="file"] .formulate-files li { - display: block; } - .formulate-input[data-classification="file"] .formulate-files li[data-has-error] .formulate-file-progress { - background-color: #dc2c2c; } - .formulate-input[data-classification="file"] .formulate-files li[data-has-preview] .formulate-file-name:before { - display: none; } - .formulate-input[data-classification="file"] .formulate-files li + li { - margin-top: .5em; } - .formulate-input[data-classification="file"] .formulate-files .formulate-file { - appearance: none; - border-radius: .3em; - border: 1px solid #cecece; - box-sizing: border-box; - background-color: transparent; - font-size: .9em; - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; - padding: .75em; - display: block; - width: 100%; - font-weight: 400; - line-height: 1.2em; - margin: 0; - display: block; - width: 100%; - display: flex; - justify-content: flex-start; - align-items: center; - position: relative; } - .formulate-input[data-classification="file"] .formulate-files .formulate-file::placeholder { - color: #a8a8a8; - line-height: normal; } - .formulate-input[data-classification="file"] .formulate-files .formulate-file:focus { - outline: 0; - border: 1px solid #41b883; } - .formulate-input[data-classification="file"] .formulate-files .formulate-file ::-webkit-progress-bar { - appearance: none; - height: .5em; - border-radius: .5em; - overflow: hidden; } - .formulate-input[data-classification="file"] .formulate-files .formulate-file-image-preview { - width: 3em; - height: 3em; - flex: 0 0 3em; - position: relative; - z-index: 2; - left: -1px; - box-shadow: 0 0 0 1px #efefef; - transition: transform .25s, box-shadow .25s, background-color .25s; } - @media (pointer: fine) { - .formulate-input[data-classification="file"] .formulate-files .formulate-file-image-preview:hover { - transition-delay: .2s; - transform: scale(3); - background-color: #ffffff; - box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.1); } } - .formulate-input[data-classification="file"] .formulate-files .formulate-file-image-preview img { - display: block; - position: absolute; - width: 100%; - height: 100%; - left: 0; - right: 0; - bottom: 0; - top: 0; - object-fit: contain; - transition: all .25s; } - .formulate-input[data-classification="file"] [data-type="image"] .formulate-input-upload-area .formulate-input-upload-area-mask::before { - mask-image: url('data:image/svg+xml;utf8,'); } - -.formulate-form-errors { - margin: .75em 0; - padding: 0; - list-style-type: none; } - .formulate-form-errors:first-child { - margin-top: 0; } - .formulate-form-errors:last-child { - margin-bottom: 0; } - .formulate-form-errors .formulate-form-error { - color: #960505; - font-size: .9em; - font-weight: 300; - line-height: 1.5; - margin-bottom: .25em; } diff --git a/dist/snow.min.css b/dist/snow.min.css deleted file mode 100644 index 98a3846..0000000 --- a/dist/snow.min.css +++ /dev/null @@ -1 +0,0 @@ -.formulate-input{margin-bottom:1.5em;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol}.formulate-input .formulate-input-label{display:block;line-height:1.5;font-size:.9em;font-weight:600;margin-bottom:.1em}.formulate-input .formulate-input-label--before+.formulate-input-help--before{margin-top:-.25em;margin-bottom:.75em}.formulate-input .formulate-input-element{max-width:20em;margin-bottom:.1em}.formulate-input .formulate-input-help{color:#6d6d6d;font-size:.7em;font-weight:400;line-height:1.5;margin-bottom:.25em}.formulate-input .formulate-input-errors{list-style-type:none;padding:0;margin:0}.formulate-input .formulate-file-upload-error,.formulate-input .formulate-input-error{color:#960505;font-size:.8em;font-weight:300;line-height:1.5;margin-bottom:.25em}.formulate-input:last-child{margin-bottom:0}.formulate-input[data-classification=text] input{-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:.3em;border:1px solid #cecece;box-sizing:border-box;background-color:transparent;font-size:.9em;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;padding:.75em;display:block;width:100%;font-weight:400;line-height:1.2em;margin:0}.formulate-input[data-classification=text] input::-webkit-input-placeholder{color:#a8a8a8;line-height:normal}.formulate-input[data-classification=text] input::-moz-placeholder{color:#a8a8a8;line-height:normal}.formulate-input[data-classification=text] input:-ms-input-placeholder{color:#a8a8a8;line-height:normal}.formulate-input[data-classification=text] input::-ms-input-placeholder{color:#a8a8a8;line-height:normal}.formulate-input[data-classification=text] input::placeholder{color:#a8a8a8;line-height:normal}.formulate-input[data-classification=text] input:focus{outline:0;border:1px solid #41b883}.formulate-input[data-classification=text] .formulate-input-element--date input,.formulate-input[data-classification=text] .formulate-input-element--datetime-local input,.formulate-input[data-classification=text] .formulate-input-element--month input,.formulate-input[data-classification=text] .formulate-input-element--week input{min-height:2.2em}.formulate-input[data-classification=text] .formulate-input-element--search{position:relative}.formulate-input[data-classification=text] .formulate-input-element--search:before{content:"";width:2em;height:100%;position:absolute;left:0;top:0;background-image:url('data:image/svg+xml;utf8,');background-size:1em 1em;background-repeat:no-repeat;background-position:50%;pointer-events:none}.formulate-input[data-classification=text] .formulate-input-element--search input{padding-left:2em}.formulate-input[data-classification=text] input[type=color]{height:1.1em;box-sizing:content-box;width:auto}.formulate-input[data-classification=text] input[type=color]::-webkit-color-swatch-wrapper{padding:0 0 0 1.5em;display:flex;align-items:center;background-image:url('data:image/svg+xml;utf8,');background-repeat:no-repeat;background-size:.9em .9em;background-position:left .1em}.formulate-input[data-classification=text] input[type=color]::-webkit-color-swatch{display:block;height:1em;border-radius:.2em;border:0;flex:auto}.formulate-input[data-classification=text] input[type=color]::-moz-color-swatch{display:block;height:1em;border-radius:.2em;border:0;flex:auto}.formulate-input[data-classification=slider] .formulate-input-element--range{display:flex;align-items:center}.formulate-input[data-classification=slider] .formulate-input-element-range-value{font-size:.9em;line-height:1;margin-left:.5em;background-color:#efefef;padding:.25em .3em;border-radius:.25em;color:#6d6d6d;font-variant-numeric:tabular-nums}.formulate-input[data-classification=slider] input{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:100%;font-size:1em;padding:.5em 0}.formulate-input[data-classification=slider] input:focus{outline:0}.formulate-input[data-classification=slider] input::-webkit-slider-thumb{cursor:pointer;-webkit-appearance:none;appearance:none;width:1em;height:1em;border-radius:1em;border:0;background-color:#41b883;margin-top:calc(-.5em + 2px)}.formulate-input[data-classification=slider] input::-moz-range-thumb{cursor:pointer;-moz-appearance:none;appearance:none;width:1em;height:1em;border-radius:1em;border:0;background-color:#41b883;margin-top:calc(-.5em + 2px)}.formulate-input[data-classification=slider] input::-ms-thumb{cursor:pointer;appearance:none;width:1em;height:1em;border-radius:1em;border:0;background-color:#41b883;margin-top:calc(-.5em + 2px)}.formulate-input[data-classification=slider] input::-webkit-slider-runnable-track{-webkit-appearance:none;appearance:none;width:100%;height:4px;background-color:#efefef;border-radius:3px;margin:0;padding:0}.formulate-input[data-classification=slider] input::-moz-range-track{-moz-appearance:none;appearance:none;width:100%;height:4px;background-color:#efefef;border-radius:3px;margin:0;padding:0}.formulate-input[data-classification=textarea] textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:.3em;border:1px solid #cecece;box-sizing:border-box;background-color:transparent;font-size:.9em;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;padding:.75em;display:block;width:100%;font-weight:400;line-height:1.2em;margin:0}.formulate-input[data-classification=textarea] textarea::-webkit-input-placeholder{color:#a8a8a8;line-height:normal}.formulate-input[data-classification=textarea] textarea::-moz-placeholder{color:#a8a8a8;line-height:normal}.formulate-input[data-classification=textarea] textarea:-ms-input-placeholder{color:#a8a8a8;line-height:normal}.formulate-input[data-classification=textarea] textarea::-ms-input-placeholder{color:#a8a8a8;line-height:normal}.formulate-input[data-classification=textarea] textarea::placeholder{color:#a8a8a8;line-height:normal}.formulate-input[data-classification=textarea] textarea:focus{outline:0;border:1px solid #41b883}.formulate-input[data-classification=button] button{-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:.3em;box-sizing:border-box;background-color:transparent;font-size:.9em;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;padding:.75em;display:block;width:100%;font-weight:400;line-height:1.2em;margin:0;border:1px solid #41b883;background-color:#41b883;color:#fff;min-width:0;width:auto;font-weight:700;cursor:pointer;display:inline-flex;align-items:center}.formulate-input[data-classification=button] button::-webkit-input-placeholder{color:#a8a8a8;line-height:normal}.formulate-input[data-classification=button] button::-moz-placeholder{color:#a8a8a8;line-height:normal}.formulate-input[data-classification=button] button:-ms-input-placeholder{color:#a8a8a8;line-height:normal}.formulate-input[data-classification=button] button::-ms-input-placeholder{color:#a8a8a8;line-height:normal}.formulate-input[data-classification=button] button::placeholder{color:#a8a8a8;line-height:normal}.formulate-input[data-classification=button] button:focus{outline:0;border:1px solid #41b883}.formulate-input[data-classification=button] button[disabled]{background-color:#cecece;border-color:#cecece}.formulate-input[data-classification=button] button[data-ghost]{color:#41b883;background-color:transparent;border-color:currentColor}.formulate-input[data-classification=button] button[data-minor]{font-size:.75em;display:inline-block}.formulate-input[data-classification=button] button[data-danger]{background-color:#960505;border-color:#960505}.formulate-input[data-classification=button] button[data-danger][data-ghost]{color:#960505;background-color:transparent}.formulate-input[data-classification=button] button:active{background-color:#64c89b;border-color:#64c89b}.formulate-input[data-classification=select] .formulate-input-element{position:relative}.formulate-input[data-classification=select] .formulate-input-element:before{content:"";width:0;height:0;border-color:#cecece transparent transparent;border-style:solid;border-width:.3em .3em 0;top:50%;margin-top:-.1em;right:1em;position:absolute}.formulate-input[data-classification=select] select{-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:.3em;border:1px solid #cecece;box-sizing:border-box;background-color:transparent;font-size:.9em;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;display:block;width:100%;font-weight:400;line-height:1.2em;margin:0;padding:.75em 2em .75em .75em}.formulate-input[data-classification=select] select::-webkit-input-placeholder{color:#a8a8a8;line-height:normal}.formulate-input[data-classification=select] select::-moz-placeholder{color:#a8a8a8;line-height:normal}.formulate-input[data-classification=select] select:-ms-input-placeholder{color:#a8a8a8;line-height:normal}.formulate-input[data-classification=select] select::-ms-input-placeholder{color:#a8a8a8;line-height:normal}.formulate-input[data-classification=select] select::placeholder{color:#a8a8a8;line-height:normal}.formulate-input[data-classification=select] select:focus{outline:0;border:1px solid #41b883}.formulate-input[data-classification=select] select[data-placeholder-selected]{color:#a8a8a8}.formulate-input[data-classification=box] .formulate-input-wrapper{display:flex;align-items:center}.formulate-input[data-classification=box] .formulate-input-element{overflow:hidden;display:flex;align-items:center}.formulate-input[data-classification=box] .formulate-input-element input{position:absolute;left:-999px}.formulate-input[data-classification=box] .formulate-input-element-decorator{display:block;width:1em;height:1em;border-radius:.25em;border:1px solid #cecece;position:relative}.formulate-input[data-classification=box] .formulate-input-element-decorator:before{content:"";display:block;background-size:contain;background-position:100%;width:calc(100% - .125em);height:calc(100% - .125em);box-sizing:border-box;position:absolute;top:.0625em;left:.0625em}.formulate-input[data-classification=box] .formulate-input-element[data-type=radio] .formulate-input-element-decorator{border-radius:1em}.formulate-input[data-classification=box] .formulate-input-element[data-type=radio] .formulate-input-element-decorator:before{border-radius:1em;width:calc(100% - .5em);height:calc(100% - .5em);top:.25em;left:.25em}.formulate-input[data-classification=box] .formulate-input-element input[type=checkbox]:checked~.formulate-input-element-decorator{border-color:#41b883}.formulate-input[data-classification=box] .formulate-input-element input[type=checkbox]:checked~.formulate-input-element-decorator:before{background-color:#41b883;-webkit-mask-image:url('data:image/svg+xml;utf8,');mask-image:url('data:image/svg+xml;utf8,')}.formulate-input[data-classification=box] .formulate-input-element input[type=radio]:checked~.formulate-input-element-decorator{border-color:#41b883}.formulate-input[data-classification=box] .formulate-input-element input[type=radio]:checked~.formulate-input-element-decorator:before{background-color:#41b883}.formulate-input[data-classification=box] .formulate-input-element input:focus~.formulate-input-element-decorator{border-color:#41b883}.formulate-input[data-classification=box] .formulate-input-label--after{margin-left:.5em}.formulate-input[data-classification=box] .formulate-input-label--before{margin-right:.5em}.formulate-input[data-classification=group] .formulate-input-group-item,.formulate-input[data-classification=group]>.formulate-input-wrapper>.formulate-input-label{margin-bottom:.5em}.formulate-input[data-classification=group] [data-is-repeatable]{padding:1em;border:1px solid #efefef;border-radius:.3em}.formulate-input[data-classification=group] [data-is-repeatable] .formulate-input-grouping{margin:-1em -1em 0}.formulate-input[data-classification=group] [data-is-repeatable] .formulate-input-group-repeatable{padding:1em 3em 1em 1em;border-bottom:1px solid #efefef;position:relative}.formulate-input[data-classification=group] [data-is-repeatable] .formulate-input-group-repeatable-remove{position:absolute;display:block;top:calc(50% - .15em);width:1.3em;height:1.3em;background-color:#cecece;right:.85em;border-radius:1.3em;cursor:pointer;transition:background-color .2s;overflow:hidden;text-indent:-1000px}.formulate-input[data-classification=group] [data-is-repeatable] .formulate-input-group-repeatable-remove:after,.formulate-input[data-classification=group] [data-is-repeatable] .formulate-input-group-repeatable-remove:before{content:"";position:absolute;top:calc(50% - .1em);left:.325em;display:block;width:.65em;height:.2em;background-color:#fff;transform-origin:center center;transition:transform .25s}@media (pointer:fine){.formulate-input[data-classification=group] [data-is-repeatable] .formulate-input-group-repeatable-remove:hover{background-color:#dc2c2c}.formulate-input[data-classification=group] [data-is-repeatable] .formulate-input-group-repeatable-remove:hover:after,.formulate-input[data-classification=group] [data-is-repeatable] .formulate-input-group-repeatable-remove:hover:before{height:.2em;width:.75em;left:.25em;top:calc(50% - .075em)}.formulate-input[data-classification=group] [data-is-repeatable] .formulate-input-group-repeatable-remove:hover:after{transform:rotate(45deg)}.formulate-input[data-classification=group] [data-is-repeatable] .formulate-input-group-repeatable-remove:hover:before{transform:rotate(-45deg)}}.formulate-input[data-classification=group] [data-is-repeatable] .formulate-input-group-repeatable:last-child{margin-bottom:1em}.formulate-input[data-classification=file] .formulate-input-upload-area{width:100%;position:relative;padding:2em 0}.formulate-input[data-classification=file] .formulate-input-upload-area input{cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;opacity:0;position:absolute;left:0;right:0;bottom:0;top:0;width:100%;height:100%;z-index:5}.formulate-input[data-classification=file] .formulate-input-upload-area[data-has-files]{padding:0}.formulate-input[data-classification=file] .formulate-input-upload-area[data-has-files] input{display:none}.formulate-input[data-classification=file] .formulate-input-upload-area-mask{border-radius:.4em;pointer-events:none;position:absolute;display:flex;justify-content:center;align-items:center;left:0;right:0;top:0;bottom:0;border:2px dashed #a8a8a8;z-index:2}.formulate-input[data-classification=file] .formulate-input-upload-area-mask:before{content:"";background-color:#a8a8a8;-webkit-mask-image:url('data:image/svg+xml;utf8,');mask-image:url('data:image/svg+xml;utf8,');-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center;width:2em;height:2em;position:absolute;pointer-events:none}.formulate-input[data-classification=file] .formulate-input-upload-area input:focus~.formulate-input-upload-area-mask,.formulate-input[data-classification=file] .formulate-input-upload-area input:hover~.formulate-input-upload-area-mask,.formulate-input[data-classification=file] .formulate-input-upload-area input[data-is-drag-hover]~.formulate-input-upload-area-mask{border-color:#41b883}.formulate-input[data-classification=file] .formulate-input-upload-area input:focus~.formulate-input-upload-area-mask:before,.formulate-input[data-classification=file] .formulate-input-upload-area input:hover~.formulate-input-upload-area-mask:before,.formulate-input[data-classification=file] .formulate-input-upload-area input[data-is-drag-hover]~.formulate-input-upload-area-mask:before{background-color:#41b883}.formulate-input[data-classification=file] .formulate-files{list-style-type:none;margin:0;padding:0}.formulate-input[data-classification=file] .formulate-files .formulate-file-progress{background-color:#cecece;height:.3em;border-radius:1.25em;width:5em;overflow:hidden;position:relative;flex:0 0 5em;right:.75em;transition:height .25s,width .25s,flex-basis .25s;z-index:2}.formulate-input[data-classification=file] .formulate-files .formulate-file-progress:before{content:"";position:absolute;top:0;left:0;right:0;bottom:0;display:block;opacity:0;transform:scale(.08);background-color:#fff;-webkit-mask-image:url('data:image/svg+xml;utf8,');mask-image:url('data:image/svg+xml;utf8,');-webkit-mask-size:77%;mask-size:77%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center;z-index:3}.formulate-input[data-classification=file] .formulate-files .formulate-file-progress[data-just-finished]{width:1.25em;height:1.25em;flex:0 0 1.25em}.formulate-input[data-classification=file] .formulate-files .formulate-file-progress[data-just-finished]:before{transition:transform .25s .2s,opacity .25s .2s;transform:scale(1);opacity:1}.formulate-input[data-classification=file] .formulate-files .formulate-file-progress[data-is-finished]{transition:height .25s,width .25s,left .25s,top,.25s,border-radius .25s;width:.3em;flex:0 0 .3em;height:100%;right:0;border-radius:0 .23em .23em 0}.formulate-input[data-classification=file] .formulate-files .formulate-file-progress[data-is-finished]:before{transition:opacity .1s;opacity:0}.formulate-input[data-classification=file] .formulate-files .formulate-file-progress .formulate-file-progress-inner{background-color:#41b883;width:1%;position:absolute;left:0;bottom:0;top:0;z-index:2}.formulate-input[data-classification=file] .formulate-files .formulate-file-name{padding-left:1.5em;padding-right:2em;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.formulate-input[data-classification=file] .formulate-files .formulate-file-name:before{position:absolute;left:.7em;top:50%;margin-top:-.7em;background-color:#a8a8a8;content:"";-webkit-mask-image:url('data:image/svg+xml;utf8,');mask-image:url('data:image/svg+xml;utf8,');-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain;width:1.25em;height:1.25em;display:inline-block;margin-right:.5em}.formulate-input[data-classification=file] .formulate-files .formulate-file-remove{width:1.25em;height:1.25em;border-radius:1em;border:1px solid #a8a8a8;background-color:#a8a8a8;-webkit-mask-image:url('data:image/svg+xml;utf8,');mask-image:url('data:image/svg+xml;utf8,');-webkit-mask-size:.6em;mask-size:.6em;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center;cursor:pointer;position:absolute;right:.75em;z-index:1;transition:transform .25s}@media (pointer:fine){.formulate-input[data-classification=file] .formulate-files .formulate-file-remove:hover{transform:scale(1.5)}}.formulate-input[data-classification=file] .formulate-files li{display:block}.formulate-input[data-classification=file] .formulate-files li[data-has-error] .formulate-file-progress{background-color:#dc2c2c}.formulate-input[data-classification=file] .formulate-files li[data-has-preview] .formulate-file-name:before{display:none}.formulate-input[data-classification=file] .formulate-files li+li{margin-top:.5em}.formulate-input[data-classification=file] .formulate-files .formulate-file{-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:.3em;border:1px solid #cecece;box-sizing:border-box;background-color:transparent;font-size:.9em;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol;padding:.75em;font-weight:400;line-height:1.2em;margin:0;display:block;width:100%;display:flex;justify-content:flex-start;align-items:center;position:relative}.formulate-input[data-classification=file] .formulate-files .formulate-file::-webkit-input-placeholder{color:#a8a8a8;line-height:normal}.formulate-input[data-classification=file] .formulate-files .formulate-file::-moz-placeholder{color:#a8a8a8;line-height:normal}.formulate-input[data-classification=file] .formulate-files .formulate-file:-ms-input-placeholder{color:#a8a8a8;line-height:normal}.formulate-input[data-classification=file] .formulate-files .formulate-file::-ms-input-placeholder{color:#a8a8a8;line-height:normal}.formulate-input[data-classification=file] .formulate-files .formulate-file::placeholder{color:#a8a8a8;line-height:normal}.formulate-input[data-classification=file] .formulate-files .formulate-file:focus{outline:0;border:1px solid #41b883}.formulate-input[data-classification=file] .formulate-files .formulate-file ::-webkit-progress-bar{-webkit-appearance:none;appearance:none;height:.5em;border-radius:.5em;overflow:hidden}.formulate-input[data-classification=file] .formulate-files .formulate-file-image-preview{width:3em;height:3em;flex:0 0 3em;position:relative;z-index:2;left:-1px;box-shadow:0 0 0 1px #efefef;transition:transform .25s,box-shadow .25s,background-color .25s}@media (pointer:fine){.formulate-input[data-classification=file] .formulate-files .formulate-file-image-preview:hover{transition-delay:.2s;transform:scale(3);background-color:#fff;box-shadow:0 0 2px 0 rgba(0,0,0,.1)}}.formulate-input[data-classification=file] .formulate-files .formulate-file-image-preview img{display:block;position:absolute;width:100%;height:100%;left:0;right:0;bottom:0;top:0;-o-object-fit:contain;object-fit:contain;transition:all .25s}.formulate-input[data-classification=file] [data-type=image] .formulate-input-upload-area .formulate-input-upload-area-mask:before{-webkit-mask-image:url('data:image/svg+xml;utf8,');mask-image:url('data:image/svg+xml;utf8,')}.formulate-form-errors{margin:.75em 0;padding:0;list-style-type:none}.formulate-form-errors:first-child{margin-top:0}.formulate-form-errors:last-child{margin-bottom:0}.formulate-form-errors .formulate-form-error{color:#960505;font-size:.9em;font-weight:300;line-height:1.5;margin-bottom:.25em} \ No newline at end of file