text: !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).VeeValidate=t()}(this,function(){"use strict";function s(e){return N(["radio","checkbox"],e.type)}function o(e,t){return e.getAttribute("data-vv-"+t)}function n(e){return"isNaN"in Number?Number.isNaN(e):e==e}function u(e,t,i){if(void 0===i&&(i=void 0),!e||!t)return i;var n=t;return e.split(".").every(function(e){return e in n?(n=n[e],!0):(n=i,!1)}),n}function r(e,t){return t?e?("string"==typeof t&&(t=_(t)),E({},t,_(e))):_(t):_(e)}function c(e){return new Error("[vee-validate] "+e)}function a(e,t){return e.classList?e.classList.contains(t):!!e.className.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))}function d(e){if(O(Array.from))return Array.from(e);for(var t=[],i=e.length,n=0;n<i;n++)t.push(e[n]);return t}function l(e,t){for(var i=Array.isArray(e)?e:d(e),n=0;n<i.length;n++)if(t(i[n]))return n;return-1}function i(e){if(!e)return!1;var t=e.componentOptions.tag;return/^(keep-alive|transition|transition-group)$/.test(t)}function f(e){if("number"==typeof e)return e;if("string"==typeof e)return parseInt(e);var t={};for(var i in e)t[i]=parseInt(e[i]);return t}function v(e,t){if(e.required&&(t=r("required",t)),p(e))return"email"===e.type&&(t=r("email"+(e.multiple?":multiple":""),t)),e.pattern&&(t=r({regex:e.pattern},t)),0<=e.maxLength&&e.maxLength<524288&&(t=r("max:"+e.maxLength,t)),0<e.minLength&&(t=r("min:"+e.minLength,t)),"number"===e.type&&(t=r("decimal",t),""!==e.min&&(t=r("min_value:"+e.min,t)),""!==e.max&&(t=r("max_value:"+e.max,t))),t;if(function(e){return N(["date","week","month","datetime-local","time"],e.type)}(e)){var i=e.step&&Number(e.step)<60?"HH:mm:ss":"HH:mm";if("date"===e.type)return r("date_format:yyyy-MM-dd",t);if("datetime-local"===e.type)return r("date_format:yyyy-MM-ddT"+i,t);if("month"===e.type)return r("date_format:yyyy-MM",t);if("week"===e.type)return r("date_format:yyyy-[W]WW",t);if("time"===e.type)return r("date_format:"+i,t)}return t}function h(t){return O(Object.values)?Object.values(t):Object.keys(t).map(function(e){return t[e]})}function t(e,t,i){Object.defineProperty(e,t,{configurable:!1,writable:!0,value:i})}function e(e){void 0===e&&(e={}),this.container={},this.merge(e)}var p=function(e){return N(["text","password","search","email","tel","url","textarea","number"],e.type)},m=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return e.every(function(e){return null==e})},g=function(t,i){if(t instanceof RegExp&&i instanceof RegExp)return g(t.source,i.source)&&g(t.flags,i.flags);if(Array.isArray(t)&&Array.isArray(i)){if(t.length!==i.length)return!1;for(var e=0;e<t.length;e++)if(!g(t[e],i[e]))return!1;return!0}return I(t)&&I(i)?Object.keys(t).every(function(e){return g(t[e],i[e])})&&Object.keys(i).every(function(e){return g(t[e],i[e])}):!(!n(t)||!n(i))||t===i},y=function(e){return m(e)?null:"FORM"===e.tagName?e:m(e.form)?m(e.parentNode)?null:y(e.parentNode):e.form},b=function(i,n,r){return void 0===n&&(n=0),void 0===r&&(r={cancelled:!1}),0===n?i:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];clearTimeout(s),(s=setTimeout(function(){s=null,r.cancelled||i.apply(void 0,e)},n))||i.apply(void 0,e)};var s},_=function(n){return n?I(n)?Object.keys(n).reduce(function(e,t){var i=[];return i=!0===n[t]?[]:Array.isArray(n[t])?n[t]:I(n[t])?n[t]:[n[t]],!1!==n[t]&&(e[t]=i),e},{}):"string"!=typeof n?($("rules must be either a string or an object."),{}):n.split("|").reduce(function(e,t){var i=function(e){var t=[],i=e.split(":")[0];return N(e,":")&&(t=e.split(":").slice(1).join(":").split(",")),{name:i,params:t}}(t);return i.name&&(e[i.name]=i.params),e},{}):{}},$=function(e){console.warn("[vee-validate] "+e)},I=function(e){return null!==e&&e&&"object"==typeof e&&!Array.isArray(e)},O=function(e){return"function"==typeof e},A=function(t,e,i){if(t&&e){if(!Array.isArray(e))return i?function(e,t){e.classList?e.classList.add(t):a(e,t)||(e.className+=" "+t)}(t,e):void function(e,t){if(e.classList)e.classList.remove(t);else if(a(e,t)){var i=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(i," ")}}(t,e);e.forEach(function(e){return A(t,e,i)})}},E=function(e){for(var t=[],i=arguments.length-1;0<i--;)t[i]=arguments[i+1];if(O(Object.assign))return Object.assign.apply(Object,[e].concat(t));if(null==e)throw new TypeError("Cannot convert undefined or null to object");var n=Object(e);return t.forEach(function(t){null!=t&&Object.keys(t).forEach(function(e){n[e]=t[e]})}),n},x=0,w="{id}",j=function(e,t){var i=Array.isArray(e)?e:d(e),n=l(i,t);return-1===n?void 0:i[n]},F=function(n,r){return I(n)&&I(r)&&Object.keys(r).forEach(function(e){var t,i;if(I(r[e]))return n[e]||E(n,((t={})[e]={},t)),void F(n[e],r[e]);E(n,((i={})[e]=r[e],i))}),n},N=function(e,t){return-1!==e.indexOf(t)},V="en",D={locale:{configurable:!0}};D.locale.get=function(){return V},D.locale.set=function(e){V=e||"en"},e.prototype.hasLocale=function(e){return!!this.container[e]},e.prototype.setDateFormat=function(e,t){this.container[e]||(this.container[e]={}),this.container[e].dateFormat=t},e.prototype.getDateFormat=function(e){return this.container[e]&&this.container[e].dateFormat?this.container[e].dateFormat:null},e.prototype.getMessage=function(e,t,i){var n=null;return n=this.hasMessage(e,t)?this.container[e].messages[t]:this._getDefaultMessage(e),O(n)?n.apply(void 0,i):n},e.prototype.getFieldMessage=function(e,t,i,n){if(!this.hasLocale(e))return this.getMessage(e,i,n);var r=this.container[e].custom&&this.container[e].custom[t];if(!r||!r[i])return this.getMessage(e,i,n);var s=r[i];return O(s)?s.apply(void 0,n):s},e.prototype._getDefaultMessage=function(e){return this.hasMessage(e,"_default")?this.container[e].messages._default:this.container.en.messages._default},e.prototype.getAttribute=function(e,t,i){return void 0===i&&(i=""),this.hasAttribute(e,t)?this.container[e].attributes[t]:i},e.prototype.hasMessage=function(e,t){return!!(this.hasLocale(e)&&this.container[e].messages&&this.container[e].messages[t])},e.prototype.hasAttribute=function(e,t){return!!(this.hasLocale(e)&&this.container[e].attributes&&this.container[e].attributes[t])},e.prototype.merge=function(e){F(this.container,e)},e.prototype.setMessage=function(e,t,i){this.hasLocale(e)||(this.container[e]={messages:{},attributes:{}}),this.container[e].messages[t]=i},e.prototype.setAttribute=function(e,t,i){this.hasLocale(e)||(this.container[e]={messages:{},attributes:{}}),this.container[e].attributes[t]=i},Object.defineProperties(e.prototype,D);function k(){}var R={default:new e({en:{messages:{},attributes:{},custom:{}}})},P="default";k._checkDriverName=function(e){if(!e)throw c("you must provide a name to the dictionary driver")},k.setDriver=function(e,t){void 0===t&&(t=null),this._checkDriverName(e),t&&(R[e]=t),P=e},k.getDriver=function(){return R[P]};function q(e,t){void 0===e&&(e=null),void 0===t&&(t=null),this.vmId=t||null,this.items=e&&e instanceof q?e.items:[]}q.prototype["function"==typeof Symbol?Symbol.iterator:"@@iterator"]=function(){var e=this,t=0;return{next:function(){return{value:e.items[t++],done:t>e.items.length}}}},q.prototype.add=function(e){var t;(t=this.items).push.apply(t,this._normalizeError(e))},q.prototype._normalizeError=function(e){var t=this;return Array.isArray(e)?e.map(function(e){return e.scope=m(e.scope)?null:e.scope,e.vmId=m(e.vmId)?t.vmId||null:e.vmId,e}):(e.scope=m(e.scope)?null:e.scope,e.vmId=m(e.vmId)?this.vmId||null:e.vmId,[e])},q.prototype.regenerate=function(){this.items.forEach(function(e){e.msg=O(e.regenerate)?e.regenerate():e.msg})},q.prototype.update=function(t,e){var i=j(this.items,function(e){return e.id===t});if(i){var n=this.items.indexOf(i);this.items.splice(n,1),i.scope=e.scope,this.items.push(i)}},q.prototype.all=function(n){var r=this;return this.items.filter(function(e){var t=!0,i=!0;return m(n)||(t=e.scope===n),m(r.vmId)||(i=e.vmId===r.vmId),i&&t}).map(function(e){return e.msg})},q.prototype.any=function(n){var r=this;return!!this.items.filter(function(e){var t=!0,i=!0;return m(n)||(t=e.scope===n),m(r.vmId)||(i=e.vmId===r.vmId),i&&t}).length},q.prototype.clear=function(e){var t=this,i=m(this.vmId)?function(){return!0}:function(e){return e.vmId===t.vmId};m(e)&&(e=null);for(var n=0;n<this.items.length;++n)i(this.items[n])&&this.items[n].scope===e&&(this.items.splice(n,1),--n)},q.prototype.collect=function(e,t,i){var n=this;void 0===i&&(i=!0);function r(e){var t=e.reduce(function(e,t){return(m(n.vmId)||t.vmId===n.vmId)&&(e[t.field]||(e[t.field]=[]),e[t.field].push(i?t.msg:t)),e},{});return s?h(t)[0]||[]:t}var s=!m(e)&&!e.includes("*");if(m(e))return r(this.items);var a=m(t)?String(e):t+"."+e,o=this._makeCandidateFilters(a),u=o.isPrimary,l=o.isAlt,c=this.items.reduce(function(e,t){return u(t)&&e.primary.push(t),l(t)&&e.alt.push(t),e},{primary:[],alt:[]});return r(c=c.primary.length?c.primary:c.alt)},q.prototype.count=function(){var t=this;return this.vmId?this.items.filter(function(e){return e.vmId===t.vmId}).length:this.items.length},q.prototype.firstById=function(t){var e=j(this.items,function(e){return e.id===t});return e?e.msg:void 0},q.prototype.first=function(e,t){void 0===t&&(t=null);var i=m(t)?e:t+"."+e,n=this._match(i);return n&&n.msg},q.prototype.firstRule=function(e,t){var i=this.collect(e,t,!1);return i.length&&i[0].rule||void 0},q.prototype.has=function(e,t){return void 0===t&&(t=null),!!this.first(e,t)},q.prototype.firstByRule=function(e,t,i){void 0===i&&(i=null);var n=this.collect(e,i,!1).filter(function(e){return e.rule===t})[0];return n&&n.msg||void 0},q.prototype.firstNot=function(e,t,i){void 0===t&&(t="required"),void 0===i&&(i=null);var n=this.collect(e,i,!1).filter(function(e){return e.rule!==t})[0];return n&&n.msg||void 0},q.prototype.removeById=function(t){var e=function(e){return e.id===t};Array.isArray(t)&&(e=function(e){return-1!==t.indexOf(e.id)});for(var i=0;i<this.items.length;++i)e(this.items[i])&&(this.items.splice(i,1),--i)},q.prototype.remove=function(e,t,i){if(!m(e))for(var n,r=m(t)?String(e):t+"."+e,s=this._makeCandidateFilters(r),a=s.isPrimary,o=s.isAlt,u=function(e){return a(e)||o(e)},l=0;l<this.items.length;++l)n=this.items[l],(m(i)?u(n):u(n)&&n.vmId===i)&&(this.items.splice(l,1),--l)},q.prototype._makeCandidateFilters=function(e){var t=this,i=function(){return!0},n=function(){return!0},r=function(){return!0},s=function(){return!0},a=function(e){var t=null;if(N(e,":")&&(t=e.split(":").pop(),e=e.replace(":"+t,"")),"#"===e[0])return{id:e.slice(1),rule:t,name:null,scope:null};var i=null,n=e;if(N(e,".")){var r=e.split(".");i=r[0],n=r.slice(1).join(".")}return{id:null,scope:i,name:n,rule:t}}(e),o=a.id,u=a.rule,l=a.scope,c=a.name;if(u&&(i=function(e){return e.rule===u}),o)return{isPrimary:function(e){return i(e)&&function(e){return o===e.id}},isAlt:function(){return!1}};n=m(l)?function(e){return m(e.scope)}:function(e){return e.scope===l},m(c)||"*"===c||(r=function(e){return e.field===c}),m(this.vmId)||(s=function(e){return e.vmId===t.vmId});return{isPrimary:function(e){return s(e)&&r(e)&&i(e)&&n(e)},isAlt:function(e){return s(e)&&i(e)&&e.field===l+"."+c}}};q.prototype._match=function(e){if(!m(e)){var t=this._makeCandidateFilters(e),s=t.isPrimary,a=t.isAlt;return this.items.reduce(function(e,t,i,n){var r=i===n.length-1;return e.primary?r?e.primary:e:(s(t)&&(e.primary=t),a(t)&&(e.alt=t),r?e.primary||e.alt:e)},{})}};function C(e){var t=u("$options.$_veeValidate",e,{});return E({},M,t)}function S(){return M}function L(e){M=E({},M,e)}var M=E({},{locale:"en",delay:0,errorBagName:"errors",dictionary:null,fieldsBagName:"fields",classes:!(q.prototype._match=function(e){if(!m(e)){var t=this._makeCandidateFilters(e),s=t.isPrimary,a=t.isAlt;return this.items.reduce(function(e,t,i,n){var r=i===n.length-1;return e.primary?r?e.primary:e:(s(t)&&(e.primary=t),a(t)&&(e.alt=t),r?e.primary||e.alt:e)},{})}}),classNames:null,events:"input",inject:!0,fastExit:!0,aria:!0,validity:!1,mode:"aggressive",useConstraintAttrs:!0,i18n:null,i18nRootKey:"validation"});function T(e){return e.data?e.data.model?e.data.model:!!e.data.directives&&j(e.data.directives,function(e){return"model"===e.name}):null}function B(e){return T(e)?[e]:function(e){return Array.isArray(e)?e:Array.isArray(e.children)?e.children:e.componentOptions&&Array.isArray(e.componentOptions.children)?e.componentOptions.children:[]}(e).reduce(function(e,t){var i=B(t);return i.length&&e.push.apply(e,i),e},[])}function z(e){return e.componentOptions?e.componentOptions.Ctor.options.model:null}function W(e,t,i){if(O(e[t])){var n=e[t];e[t]=[n]}Array.isArray(e[t])?e[t].push(i):m(e[t])&&(e[t]=[i])}function H(e,t,i){e.componentOptions?function(e,t,i){e.componentOptions.listeners||(e.componentOptions.listeners={}),W(e.componentOptions.listeners,t,i)}(e,t,i):function(e,t,i){m(e.data.on)&&(e.data.on={}),W(e.data.on,t,i)}(e,t,i)}function K(e,t){return e.componentOptions?(z(e)||{event:"input"}).event:t&&t.modifiers&&t.modifiers.lazy||"select"===e.tag?"change":e.data.attrs&&p({type:e.data.attrs.type||"text"})?"input":"change"}function G(){}G.generate=function(e,t,i){var n=G.resolveModel(t,i),r=C(i.context);return{name:G.resolveName(e,i),el:e,listen:!t.modifiers.disable,bails:!!t.modifiers.bails||!0!==t.modifiers.continues&&void 0,scope:G.resolveScope(e,t,i),vm:i.context,expression:t.value,component:i.componentInstance,classes:r.classes,classNames:r.classNames,getter:G.resolveGetter(e,i,n),events:G.resolveEvents(e,i)||r.events,model:n,delay:G.resolveDelay(e,i,r),rules:G.resolveRules(e,t,i),immediate:!!t.modifiers.initial||!!t.modifiers.immediate,persist:!!t.modifiers.persist,validity:r.validity&&!i.componentInstance,aria:r.aria&&!i.componentInstance,initialValue:G.resolveInitialValue(i)}},G.getCtorConfig=function(e){return e.componentInstance?u("componentInstance.$options.$_veeValidate",e):null},G.resolveRules=function(e,t,i){var n="";if(t.value||t&&t.expression||(n=o(e,"rules")),t.value&&N(["string","object"],typeof t.value.rules)?n=t.value.rules:t.value&&(n=t.value),i.componentInstance)return n;var r=_(n);return S().useConstraintAttrs?E({},v(e,{}),r):r},G.resolveInitialValue=function(e){var t=e.data.model||j(e.data.directives,function(e){return"model"===e.name});return t&&t.value},G.resolveDelay=function(e,t,i){var n=o(e,"delay"),r=i&&"delay"in i?i.delay:0;return!n&&t.componentInstance&&t.componentInstance.$attrs&&(n=t.componentInstance.$attrs["data-vv-delay"]),I(r)?(m(n)||(r.input=n),f(r)):f(n||r)},G.resolveEvents=function(e,t){var i=o(e,"validate-on");if(!i&&t.componentInstance&&t.componentInstance.$attrs&&(i=t.componentInstance.$attrs["data-vv-validate-on"]),!i&&t.componentInstance){var n=G.getCtorConfig(t);i=n&&n.events}if(!i&&S().events&&(i=S().events),i&&t.componentInstance&&N(i,"input")){var r=(t.componentInstance.$options.model||{event:"input"}).event;if(!r)return i;i=i.replace("input",r)}return i},G.resolveScope=function(e,t,i){void 0===i&&(i={});var n=null;return i.componentInstance&&m(n)&&(n=i.componentInstance.$attrs&&i.componentInstance.$attrs["data-vv-scope"]),m(n)?function(e){var t=o(e,"scope");if(m(t)){var i=y(e);i&&(t=o(i,"scope"))}return m(t)?null:t}(e):n},G.resolveModel=function(e,t){if(e.arg)return{expression:e.arg};var i=T(t);if(!i)return null;var n=!/[^\w.$]/.test(i.expression)&&function(e,t){var i=t;return e.split(".").reduce(function(e,t){return null==i||"object"!=typeof i?e&&!1:t in i?(i=i[t],e&&!0):e&&!1},!0)}(i.expression,t.context),r=!(!i.modifiers||!i.modifiers.lazy);return n?{expression:i.expression,lazy:r}:{expression:null,lazy:r}},G.resolveName=function(e,t){var i=o(e,"name");if(!i&&!t.componentInstance)return e.name;if(!i&&t.componentInstance&&t.componentInstance.$attrs&&(i=t.componentInstance.$attrs["data-vv-name"]||t.componentInstance.$attrs.name),i||!t.componentInstance)return i;var n=G.getCtorConfig(t);return n&&O(n.name)?n.name.bind(t.componentInstance)():t.componentInstance.name},G.resolveGetter=function(i,e,t){if(t&&t.expression)return function(){return u(t.expression,e.context)};if(e.componentInstance){var n=o(i,"value-path")||e.componentInstance.$attrs&&e.componentInstance.$attrs["data-vv-value-path"];if(n)return function(){return u(n,e.componentInstance)};var r=G.getCtorConfig(e);if(r&&O(r.value)){var s=r.value.bind(e.componentInstance);return function(){return s()}}var a=(e.componentInstance.$options.model||{prop:"value"}).prop;return function(){return e.componentInstance[a]}}switch(i.type){case"checkbox":return function(){var e=document.querySelectorAll('input[name="'+i.name+'"]');if((e=d(e).filter(function(e){return e.checked})).length)return e.map(function(e){return e.value})};case"radio":return function(){var e=document.querySelectorAll('input[name="'+i.name+'"]'),t=j(e,function(e){return e.checked});return t&&t.value};case"file":return function(e){return d(i.files)};case"select-multiple":return function(){return d(i.options).filter(function(e){return e.selected}).map(function(e){return e.value})};default:return function(){return i&&i.value}}};function U(){}var J={},Q={rules:{configurable:!0}};U.add=function(e,t){var i=t.validate,n=t.options,r=t.paramNames;J[e]={validate:i,options:n,paramNames:r}},Q.rules.get=function(){return J},U.has=function(e){return!!J[e]},U.isImmediate=function(e){return!(!J[e]||!J[e].options.immediate)},U.isRequireRule=function(e){return!(!J[e]||!J[e].options.computesRequired)},U.isTargetRule=function(e){return!(!J[e]||!J[e].options.hasTarget)},U.remove=function(e){delete J[e]},U.getParamNames=function(e){return J[e]&&J[e].paramNames},U.getOptions=function(e){return J[e]&&J[e].options},U.getValidatorMethod=function(e){return J[e]?J[e].validate:null},Object.defineProperties(U,Q);function X(e){return"undefined"!=typeof Event&&O(Event)&&e instanceof Event||e&&e.srcElement}function Y(e){return e?"string"==typeof e?e.split("|"):e:[]}function Z(e,t,i){e.addEventListener(t,i,!!te&&{passive:!0})}function ee(e){void 0===e&&(e={}),this.id=(9999<=x&&(x=0,w=w.replace("{id}","_{id}")),x++,w.replace("{id}",String(x))),this.el=e.el,this.updated=!1,this.vmId=e.vmId,t(this,"dependencies",[]),t(this,"watchers",[]),t(this,"events",[]),this.delay=0,this.rules={},this.forceRequired=!1,this._cacheId(e),this.classNames=E({},ie.classNames),e=E({},ie,e),this._delay=m(e.delay)?0:e.delay,this.validity=e.validity,this.aria=e.aria,this.flags=e.flags||{untouched:!0,touched:!1,dirty:!1,pristine:!0,valid:null,invalid:null,validated:!1,pending:!1,required:!1,changed:!1},t(this,"vm",e.vm),t(this,"componentInstance",e.component),this.ctorConfig=this.componentInstance?u("$options.$_veeValidate",this.componentInstance):void 0,this.update(e),this.initialValue=this.value,this.updated=!1}var te=!0,ie={targetOf:null,immediate:!1,persist:!1,scope:null,listen:!0,name:null,rules:{},vm:null,classes:!1,validity:!0,aria:!0,events:"input|blur",delay:0,classNames:{touched:"touched",untouched:"untouched",valid:"valid",invalid:"invalid",pristine:"pristine",dirty:"dirty"}},ne={validator:{configurable:!0},isRequired:{configurable:!0},isDisabled:{configurable:!0},alias:{configurable:!0},value:{configurable:!0},bails:{configurable:!0},rejectsFalse:{configurable:!0}};ne.validator.get=function(){return this.vm&&this.vm.$validator?this.vm.$validator:{validate:function(){}}},ne.isRequired.get=function(){return!!this.rules.required||this.forceRequired},ne.isDisabled.get=function(){return!(!this.el||!this.el.disabled)},ne.alias.get=function(){if(this._alias)return this._alias;var e=null;return this.ctorConfig&&this.ctorConfig.alias&&(e=O(this.ctorConfig.alias)?this.ctorConfig.alias.call(this.componentInstance):this.ctorConfig.alias),!e&&this.el&&(e=o(this.el,"as")),!e&&this.componentInstance?this.componentInstance.$attrs&&this.componentInstance.$attrs["data-vv-as"]:e},ne.value.get=function(){if(O(this.getter))return this.getter()},ne.bails.get=function(){return this._bails},ne.rejectsFalse.get=function(){return this.componentInstance&&this.ctorConfig?!!this.ctorConfig.rejectsFalse:!!this.el&&"checkbox"===this.el.type},ee.prototype.matches=function(e){var t=this;return!e||(e.id?this.id===e.id:!!(m(e.vmId)?function(){return!0}:function(e){return e===t.vmId})(e.vmId)&&(void 0===e.name&&void 0===e.scope||(void 0===e.scope?this.name===e.name:void 0===e.name?this.scope===e.scope:e.name===this.name&&e.scope===this.scope)))},ee.prototype._cacheId=function(e){this.el&&!e.targetOf&&(this.el._veeValidateId=this.id)},ee.prototype.waitFor=function(e){this._waitingFor=e},ee.prototype.isWaitingFor=function(e){return this._waitingFor===e},ee.prototype.update=function(e){this.targetOf=e.targetOf||null,this.immediate=e.immediate||this.immediate||!1,this.persist=e.persist||this.persist||!1,!m(e.scope)&&e.scope!==this.scope&&O(this.validator.update)&&this.validator.update(this.id,{scope:e.scope}),this.scope=m(e.scope)?m(this.scope)?null:this.scope:e.scope,this.name=(m(e.name)?e.name:String(e.name))||this.name||null,this.rules=void 0!==e.rules?_(e.rules):this.rules,this._bails=void 0!==e.bails?e.bails:this._bails,this.model=e.model||this.model,this.listen=void 0!==e.listen?e.listen:this.listen,this.classes=!(!e.classes&&!this.classes)&&!this.componentInstance,this.classNames=I(e.classNames)?F(this.classNames,e.classNames):this.classNames,this.getter=O(e.getter)?e.getter:this.getter,this._alias=e.alias||this._alias,this.events=e.events?Y(e.events):this.events,this.delay=function(e,i,n){return"number"==typeof i?e.reduce(function(e,t){return e[t]=i,e},{}):e.reduce(function(e,t){return e[t]="object"==typeof i&&t in i?i[t]:"number"==typeof n?n:n&&n[t]||0,e},{})}(this.events,e.delay||this.delay,this._delay),this.updateDependencies(),this.addActionListeners(),void 0!==e.rules&&(this.flags.required=this.isRequired),this.flags.validated&&void 0!==e.rules&&this.updated&&this.validator.validate("#"+this.id),this.updated=!0,this.addValueListeners(),this.el&&(this.updateClasses(),this.updateAriaAttrs())},ee.prototype.reset=function(){var t=this;this._cancellationToken&&(this._cancellationToken.cancelled=!0,delete this._cancellationToken);var i={untouched:!0,touched:!1,dirty:!1,pristine:!0,valid:null,invalid:null,validated:!1,pending:!1,required:!1,changed:!1};Object.keys(this.flags).filter(function(e){return"required"!==e}).forEach(function(e){t.flags[e]=i[e]}),this.initialValue=this.value,this.flags.changed=!1,this.addValueListeners(),this.addActionListeners(),this.updateClasses(!0),this.updateAriaAttrs(),this.updateCustomValidity()},ee.prototype.setFlags=function(t){var i=this,n={pristine:"dirty",dirty:"pristine",valid:"invalid",invalid:"valid",touched:"untouched",untouched:"touched"};Object.keys(t).forEach(function(e){i.flags[e]=t[e],n[e]&&void 0===t[n[e]]&&(i.flags[n[e]]=!t[e])}),void 0===t.untouched&&void 0===t.touched&&void 0===t.dirty&&void 0===t.pristine||this.addActionListeners(),this.updateClasses(),this.updateAriaAttrs(),this.updateCustomValidity()},ee.prototype.updateDependencies=function(){var a=this;this.dependencies.forEach(function(e){return e.field.destroy()}),this.dependencies=[];var e=Object.keys(this.rules).reduce(function(e,t){return U.isTargetRule(t)&&e.push({selector:a.rules[t][0],name:t}),e},[]);e.length&&this.vm&&this.vm.$el&&e.forEach(function(e){var t=e.selector,i=e.name,n=a.vm.$refs[t],r=Array.isArray(n)?n[0]:n;if(r){var s={vm:a.vm,classes:a.classes,classNames:a.classNames,delay:a.delay,scope:a.scope,events:a.events.join("|"),immediate:a.immediate,targetOf:a.id};O(r.$watch)?(s.component=r,s.el=r.$el,s.getter=G.resolveGetter(r.$el,r.$vnode)):(s.el=r,s.getter=G.resolveGetter(r,{})),a.dependencies.push({name:i,field:new ee(s)})}})},ee.prototype.unwatch=function(t){if(void 0===t&&(t=null),!t)return this.watchers.forEach(function(e){return e.unwatch()}),void(this.watchers=[]);this.watchers.filter(function(e){return t.test(e.tag)}).forEach(function(e){return e.unwatch()}),this.watchers=this.watchers.filter(function(e){return!t.test(e.tag)})},ee.prototype.updateClasses=function(t){var i=this;if(void 0===t&&(t=!1),this.classes&&!this.isDisabled){var e=function(e){A(e,i.classNames.dirty,i.flags.dirty),A(e,i.classNames.pristine,i.flags.pristine),A(e,i.classNames.touched,i.flags.touched),A(e,i.classNames.untouched,i.flags.untouched),t&&(A(e,i.classNames.valid,!1),A(e,i.classNames.invalid,!1)),!m(i.flags.valid)&&i.flags.validated&&A(e,i.classNames.valid,i.flags.valid),!m(i.flags.invalid)&&i.flags.validated&&A(e,i.classNames.invalid,i.flags.invalid)};if(s(this.el)){var n=document.querySelectorAll('input[name="'+this.el.name+'"]');d(n).forEach(e)}else e(this.el)}},ee.prototype.addActionListeners=function(){var e=this;if(this.unwatch(/class/),this.el){var t=function(){e.flags.touched=!0,e.flags.untouched=!1,e.classes&&(A(e.el,e.classNames.touched,!0),A(e.el,e.classNames.untouched,!1)),e.unwatch(/^class_blur$/)},i=p(this.el)?"input":"change",n=function(){e.flags.dirty=!0,e.flags.pristine=!1,e.classes&&(A(e.el,e.classNames.pristine,!1),A(e.el,e.classNames.dirty,!0)),e.unwatch(/^class_input$/)};if(this.componentInstance&&O(this.componentInstance.$once))return this.componentInstance.$once("input",n),this.componentInstance.$once("blur",t),this.watchers.push({tag:"class_input",unwatch:function(){e.componentInstance.$off("input",n)}}),void this.watchers.push({tag:"class_blur",unwatch:function(){e.componentInstance.$off("blur",t)}});if(this.el){Z(this.el,i,n);var r=s(this.el)?"change":"blur";Z(this.el,r,t),this.watchers.push({tag:"class_input",unwatch:function(){e.el.removeEventListener(i,n)}}),this.watchers.push({tag:"class_blur",unwatch:function(){e.el.removeEventListener(r,t)}})}}},ee.prototype.checkValueChanged=function(){return(null!==this.initialValue||""!==this.value||!p(this.el))&&this.value!==this.initialValue},ee.prototype._determineInputEvent=function(){return this.componentInstance?this.componentInstance.$options.model&&this.componentInstance.$options.model.event||"input":this.model&&this.model.lazy?"change":p(this.el)?"input":"change"},ee.prototype._determineEventList=function(t){var i=this;return!this.events.length||this.componentInstance||p(this.el)?[].concat(this.events).map(function(e){return"input"===e&&i.model&&i.model.lazy?"change":e}):this.events.map(function(e){return"input"===e?t:e})},ee.prototype.addValueListeners=function(){var i=this;if(this.unwatch(/^input_.+/),this.listen&&this.el){var n={cancelled:!1},r=this.targetOf?function(){var e=i.validator._resolveField("#"+i.targetOf);e&&e.flags.validated&&i.validator.validate("#"+i.targetOf)}:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];0!==e.length&&!X(e[0])||(e[0]=i.value),i.flags.pending=!0,i._cancellationToken=n,i.validator.validate("#"+i.id,e[0])},t=this._determineInputEvent(),e=this._determineEventList(t);if(N(e,t)){var s=null,a=null,o=!1;if(this.model&&this.model.expression&&(s=this.vm,a=this.model.expression,o=!0),!a&&this.componentInstance&&this.componentInstance.$options.model&&(s=this.componentInstance,a=this.componentInstance.$options.model.prop||"value"),s&&a){var u=b(r,this.delay[t],n),l=s.$watch(a,u);this.watchers.push({tag:"input_model",unwatch:function(){i.vm.$nextTick(function(){l()})}}),o&&(e=e.filter(function(e){return e!==t}))}}e.forEach(function(e){var t=b(r,i.delay[e],n);i._addComponentEventListener(e,t),i._addHTMLEventListener(e,t)})}},ee.prototype._addComponentEventListener=function(e,t){var i=this;this.componentInstance&&(this.componentInstance.$on(e,t),this.watchers.push({tag:"input_vue",unwatch:function(){i.componentInstance.$off(e,t)}}))},ee.prototype._addHTMLEventListener=function(t,i){var n=this;if(this.el&&!this.componentInstance){var r=function(e){Z(e,t,i),n.watchers.push({tag:"input_native",unwatch:function(){e.removeEventListener(t,i)}})};if(r(this.el),s(this.el)){var e=document.querySelectorAll('input[name="'+this.el.name+'"]');d(e).forEach(function(e){e._veeValidateId&&e!==n.el||r(e)})}}},ee.prototype.updateAriaAttrs=function(){var t=this;if(this.aria&&this.el&&O(this.el.setAttribute)){var e=function(e){e.setAttribute("aria-required",t.isRequired?"true":"false"),e.setAttribute("aria-invalid",t.flags.invalid?"true":"false")};if(s(this.el)){var i=document.querySelectorAll('input[name="'+this.el.name+'"]');d(i).forEach(e)}else e(this.el)}},ee.prototype.updateCustomValidity=function(){this.validity&&this.el&&O(this.el.setCustomValidity)&&this.validator.errors&&this.el.setCustomValidity(this.flags.valid?"":this.validator.errors.firstById(this.id)||"")},ee.prototype.destroy=function(){this._cancellationToken&&(this._cancellationToken.cancelled=!0),this.unwatch(),this.dependencies.forEach(function(e){return e.field.destroy()}),this.dependencies=[]},Object.defineProperties(ee.prototype,ne);function re(e){void 0===e&&(e=[]),this.items=e||[],this.itemsById=this.items.reduce(function(e,t){return e[t.id]=t,e},{})}var se={length:{configurable:!0}};re.prototype["function"==typeof Symbol?Symbol.iterator:"@@iterator"]=function(){var e=this,t=0;return{next:function(){return{value:e.items[t++],done:t>e.items.length}}}},se.length.get=function(){return this.items.length},re.prototype.find=function(t){return j(this.items,function(e){return e.matches(t)})},re.prototype.findById=function(e){return this.itemsById[e]||null},re.prototype.filter=function(i){return Array.isArray(i)?this.items.filter(function(t){return i.some(function(e){return t.matches(e)})}):this.items.filter(function(e){return e.matches(i)})},re.prototype.map=function(e){return this.items.map(e)},re.prototype.remove=function(e){var t=null;if(!(t=e instanceof ee?e:this.find(e)))return null;var i=this.items.indexOf(t);return this.items.splice(i,1),delete this.itemsById[t.id],t},re.prototype.push=function(e){if(!(e instanceof ee))throw c("FieldBag only accepts instances of Field that has an id defined.");if(!e.id)throw c("Field id must be defined.");if(this.findById(e.id))throw c("Field with id "+e.id+" is already added.");this.items.push(e),this.itemsById[e.id]=e},Object.defineProperties(re.prototype,se);function ae(e,t){this.id=t._uid,this._base=e,this._paused=!1,this.errors=new q(e.errors,this.id)}var oe={flags:{configurable:!0},rules:{configurable:!0},fields:{configurable:!0},dictionary:{configurable:!0},locale:{configurable:!0}};oe.flags.get=function(){var t=this;return this._base.fields.items.filter(function(e){return e.vmId===t.id}).reduce(function(e,t){return t.scope&&(e["$"+t.scope]||(e["$"+t.scope]={}),e["$"+t.scope][t.name]=t.flags),e[t.name]=t.flags,e},{})},oe.rules.get=function(){return this._base.rules},oe.fields.get=function(){return new re(this._base.fields.filter({vmId:this.id}))},oe.dictionary.get=function(){return this._base.dictionary},oe.locale.get=function(){return this._base.locale},oe.locale.set=function(e){this._base.locale=e},ae.prototype.localize=function(){for(var e,t=[],i=arguments.length;i--;)t[i]=arguments[i];return(e=this._base).localize.apply(e,t)},ae.prototype.update=function(){for(var e,t=[],i=arguments.length;i--;)t[i]=arguments[i];return(e=this._base).update.apply(e,t)},ae.prototype.attach=function(e){var t=E({},e,{vmId:this.id});return this._base.attach(t)},ae.prototype.pause=function(){this._paused=!0},ae.prototype.resume=function(){this._paused=!1},ae.prototype.remove=function(e){return this._base.remove(e)},ae.prototype.detach=function(e,t){return this._base.detach(e,t,this.id)},ae.prototype.extend=function(){for(var e,t=[],i=arguments.length;i--;)t[i]=arguments[i];return(e=this._base).extend.apply(e,t)},ae.prototype.validate=function(e,t,i){return void 0===i&&(i={}),this._paused?Promise.resolve(!0):this._base.validate(e,t,E({},{vmId:this.id},i||{}))},ae.prototype.verify=function(){for(var e,t=[],i=arguments.length;i--;)t[i]=arguments[i];return(e=this._base).verify.apply(e,t)},ae.prototype.validateAll=function(e,t){return void 0===t&&(t={}),this._paused?Promise.resolve(!0):this._base.validateAll(e,E({},{vmId:this.id},t||{}))},ae.prototype.validateScopes=function(e){return void 0===e&&(e={}),this._paused?Promise.resolve(!0):this._base.validateScopes(E({},{vmId:this.id},e||{}))},ae.prototype.destroy=function(){delete this.id,delete this._base},ae.prototype.reset=function(e){return this._base.reset(Object.assign({},e||{},{vmId:this.id}))},ae.prototype.flag=function(){for(var e,t=[],i=arguments.length;i--;)t[i]=arguments[i];return(e=this._base).flag.apply(e,t.concat([this.id]))},ae.prototype._resolveField=function(){for(var e,t=[],i=arguments.length;i--;)t[i]=arguments[i];return(e=this._base)._resolveField.apply(e,t)},Object.defineProperties(ae.prototype,oe);function ue(){return le}var le=null,ce={provide:function(){return this.$validator&&!i(this.$vnode)?{$validator:this.$validator}:{}},beforeCreate:function(){if(!i(this.$vnode)&&!1!==this.$options.$__veeInject){this.$parent||L(this.$options.$_veeValidate||{});var e=C(this);(!this.$parent||this.$options.$_veeValidate&&/new/.test(this.$options.$_veeValidate.validator))&&(this.$validator=new ae(ue(),this));var t=function(e){return!(!I(e)||!e.$validator)}(this.$options.inject);if(this.$validator||!e.inject||t||(this.$validator=new ae(ue(),this)),t||this.$validator){if(!t&&this.$validator)this.$options._base.util.defineReactive(this.$validator,"errors",this.$validator.errors);this.$options.computed||(this.$options.computed={}),this.$options.computed[e.errorBagName||"errors"]=function(){return this.$validator.errors},this.$options.computed[e.fieldsBagName||"fields"]=function(){return this.$validator.fields.items.reduce(function(e,t){return t.scope?(e["$"+t.scope]||(e["$"+t.scope]={}),e["$"+t.scope][t.name]=t.flags):e[t.name]=t.flags,e},{})}}}},beforeDestroy:function(){this.$validator&&this._uid===this.$validator.id&&this.$validator.errors.clear()}};function de(e,t){return t&&t.$validator?t.$validator.fields.findById(e._veeValidateId):null}function fe(e,t,i){void 0===t&&(t={fastExit:!0}),void 0===i&&(i=null),this.errors=new q,this.fields=new re,this._createFields(e),this.paused=!1,this.fastExit=!!m(t&&t.fastExit)||t.fastExit,this.$vee=i||{_vm:{$nextTick:function(e){return O(e)?e():Promise.resolve()},$emit:function(){},$off:function(){}}}}var ve={bind:function(e,t,i){var n=i.context.$validator;if(n){var r=G.generate(e,t,i);n.attach(r)}},inserted:function(e,t,i){var n=de(e,i.context),r=G.resolveScope(e,t,i);n&&r!==n.scope&&(n.update({scope:r}),n.updated=!1)},update:function(e,t,i){var n=de(e,i.context);if(!(!n||n.updated&&g(t.value,t.oldValue))){var r=G.resolveScope(e,t,i),s=G.resolveRules(e,t,i);n.update({scope:r,rules:s})}},unbind:function(e,t,i){var n=i.context,r=de(e,n);r&&n.$validator.detach(r)}},he={rules:{configurable:!0},dictionary:{configurable:!0},flags:{configurable:!0},locale:{configurable:!0}},pe={rules:{configurable:!0},dictionary:{configurable:!0},locale:{configurable:!0}};pe.rules.get=function(){return U.rules},he.rules.get=function(){return U.rules},he.dictionary.get=function(){return k.getDriver()},pe.dictionary.get=function(){return k.getDriver()},he.flags.get=function(){return this.fields.items.reduce(function(e,t){var i;return t.scope?e["$"+t.scope]=((i={})[t.name]=t.flags,i):e[t.name]=t.flags,e},{})},he.locale.get=function(){return fe.locale},he.locale.set=function(e){fe.locale=e},pe.locale.get=function(){return k.getDriver().locale},pe.locale.set=function(e){var t=e!==k.getDriver().locale;k.getDriver().locale=e,t&&fe.$vee&&fe.$vee._vm&&fe.$vee._vm.$emit("localeChanged")},fe.create=function(e,t){return new fe(e,t)},fe.extend=function(e,t,i){void 0===i&&(i={}),fe._guardExtend(e,t);var n=t.options||{};fe._merge(e,{validator:t,paramNames:i&&i.paramNames||t.paramNames,options:E({hasTarget:!1,immediate:!0},n,i||{})})},fe.remove=function(e){U.remove(e)},fe.prototype.localize=function(e,t){fe.localize(e,t)},fe.localize=function(e,t){var i;if(I(e))k.getDriver().merge(e);else{if(t){var n=e||t.name;t=E({},t),k.getDriver().merge(((i={})[n]=t,i))}e&&(fe.locale=e)}},fe.prototype.attach=function(e){var t=this,i={name:e.name,scope:e.scope,persist:!0},n=e.persist?this.fields.find(i):null;n&&(e.flags=n.flags,n.destroy(),this.fields.remove(n));var r=e.initialValue,s=new ee(e);return this.fields.push(s),s.immediate?this.$vee._vm.$nextTick(function(){return t.validate("#"+s.id,r||s.value,{vmId:e.vmId})}):this._validate(s,r||s.value,{initial:!0}).then(function(e){s.flags.valid=e.valid,s.flags.invalid=!e.valid}),s},fe.prototype.flag=function(e,t,i){void 0===i&&(i=null);var n=this._resolveField(e,void 0,i);n&&t&&n.setFlags(t)},fe.prototype.detach=function(e,t,i){var n=O(e.destroy)?e:this._resolveField(e,t,i);n&&(n.persist||(n.destroy(),this.errors.remove(n.name,n.scope,n.vmId),this.fields.remove(n)))},fe.prototype.extend=function(e,t,i){void 0===i&&(i={}),fe.extend(e,t,i)},fe.prototype.reset=function(t){var i=this;return this.$vee._vm.$nextTick().then(function(){return i.$vee._vm.$nextTick()}).then(function(){i.fields.filter(t).forEach(function(e){e.waitFor(null),e.reset(),i.errors.remove(e.name,e.scope,t&&t.vmId)})})},fe.prototype.update=function(e,t){var i=t.scope;this._resolveField("#"+e)&&this.errors.update(e,{scope:i})},fe.prototype.remove=function(e){fe.remove(e)},fe.prototype.validate=function(e,t,i){var n=this;void 0===i&&(i={});var r=i.silent,s=i.vmId;if(this.paused)return Promise.resolve(!0);if(m(e))return this.validateScopes({silent:r,vmId:s});if("*"===e)return this.validateAll(void 0,{silent:r,vmId:s});if(/^(.+)\.\*$/.test(e)){var a=e.match(/^(.+)\.\*$/)[1];return this.validateAll(a)}var o=this._resolveField(e);if(!o)return this._handleFieldNotFound(e);r||(o.flags.pending=!0),void 0===t&&(t=o.value);var u=this._validate(o,t);return o.waitFor(u),u.then(function(e){return!r&&o.isWaitingFor(u)&&(o.waitFor(null),n._handleValidationResults([e],s)),e.valid})},fe.prototype.pause=function(){return this.paused=!0,this},fe.prototype.resume=function(){return this.paused=!1,this},fe.prototype.validateAll=function(t,e){var i=this;void 0===e&&(e={});var n=e.silent,r=e.vmId;if(this.paused)return Promise.resolve(!0);var s=null,a=!1;return"string"==typeof t?s={scope:t,vmId:r}:I(t)?(s=Object.keys(t).map(function(e){return{name:e,vmId:r,scope:null}}),a=!0):s=Array.isArray(t)?t.map(function(e){return"object"==typeof e?Object.assign({vmId:r},e):{name:e,vmId:r}}):{scope:null,vmId:r},Promise.all(this.fields.filter(s).map(function(e){return i._validate(e,a?t[e.name]:e.value)})).then(function(e){return n||i._handleValidationResults(e,r),e.every(function(e){return e.valid})})},fe.prototype.validateScopes=function(e){var t=this;void 0===e&&(e={});var i=e.silent,n=e.vmId;return this.paused?Promise.resolve(!0):Promise.all(this.fields.filter({vmId:n}).map(function(e){return t._validate(e,e.value)})).then(function(e){return i||t._handleValidationResults(e,n),e.every(function(e){return e.valid})})},fe.prototype.verify=function(e,t,i){void 0===i&&(i={});var n={name:i&&i.name||"{field}",rules:_(t),bails:u("bails",i,!0),forceRequired:!1,get isRequired(){return!!this.rules.required||this.forceRequired}},r=Object.keys(n.rules).filter(U.isTargetRule);return r.length&&i&&I(i.values)&&(n.dependencies=r.map(function(e){var t=n.rules[e][0];return{name:e,field:{value:i.values[t]}}})),this._validate(n,e).then(function(e){var t=[],i={};return e.errors.forEach(function(e){t.push(e.msg),i[e.rule]=e.msg}),{valid:e.valid,errors:t,failedRules:i}})},fe.prototype.destroy=function(){this.$vee._vm.$off("localeChanged")},fe.prototype._createFields=function(i){var n=this;i&&Object.keys(i).forEach(function(e){var t=E({},{name:e,rules:i[e]});n.attach(t)})},fe.prototype._getDateFormat=function(e){var t=null;return e.date_format&&Array.isArray(e.date_format)&&(t=e.date_format[0]),t||k.getDriver().getDateFormat(this.locale)},fe.prototype._formatErrorMessage=function(e,t,i,n){void 0===i&&(i={}),void 0===n&&(n=null);var r=this._getFieldDisplayName(e),s=this._getLocalizedParams(t,n);return k.getDriver().getFieldMessage(this.locale,e.name,t.name,[r,s,i])},fe.prototype._convertParamObjectToArray=function(i,e){if(Array.isArray(i))return i;var t=U.getParamNames(e);return t&&I(i)?t.reduce(function(e,t){return t in i&&e.push(i[t]),e},[]):i},fe.prototype._getLocalizedParams=function(e,t){void 0===t&&(t=null);var i=this._convertParamObjectToArray(e.params,e.name);return e.options.hasTarget&&i&&i[0]?[t||k.getDriver().getAttribute(this.locale,i[0],i[0])].concat(i.slice(1)):i},fe.prototype._getFieldDisplayName=function(e){return e.alias||k.getDriver().getAttribute(this.locale,e.name,e.name)},fe.prototype._convertParamArrayToObj=function(t,e){var n=U.getParamNames(e);if(!n)return t;if(I(t)){if(n.some(function(e){return-1!==Object.keys(t).indexOf(e)}))return t;t=[t]}return t.reduce(function(e,t,i){return e[n[i]]=t,e},{})},fe.prototype._test=function(n,e,r){var s=this,t=U.getValidatorMethod(r.name),i=Array.isArray(r.params)?d(r.params):r.params;i||(i=[]);var a=null;if(!t||"function"!=typeof t)return Promise.reject(c("No such validator '"+r.name+"' exists."));if(r.options.hasTarget&&n.dependencies){var o=j(n.dependencies,function(e){return e.name===r.name});o&&(a=o.field.alias,i=[o.field.value].concat(i.slice(1)))}else"required"===r.name&&n.rejectsFalse&&(i=i.length?i:[!0]);if(r.options.isDate){var u=this._getDateFormat(n.rules);"date_format"!==r.name&&i.push(u)}var l=t(e,this._convertParamArrayToObj(i,r.name));return O(l.then)?l.then(function(e){var t=!0,i={};return Array.isArray(e)?t=e.every(function(e){return I(e)?e.valid:e}):(t=I(e)?e.valid:e,i=e.data),{valid:t,data:l.data,errors:t?[]:[s._createFieldError(n,r,i,a)]}}):(I(l)||(l={valid:l,data:{}}),{valid:l.valid,data:l.data,errors:l.valid?[]:[this._createFieldError(n,r,l.data,a)]})},fe._merge=function(e,t){var i=t.validator,n=t.options,r=t.paramNames,s=O(i)?i:i.validate;i.getMessage&&k.getDriver().setMessage(fe.locale,e,i.getMessage),U.add(e,{validate:s,options:n,paramNames:r})},fe._guardExtend=function(e,t){if(!O(t)&&!O(t.validate))throw c("Extension Error: The validator '"+e+"' must be a function or have a 'validate' method.")},fe.prototype._createFieldError=function(e,t,i,n){var r=this;return{id:e.id,vmId:e.vmId,field:e.name,msg:this._formatErrorMessage(e,t,i,n),rule:t.name,scope:e.scope,regenerate:function(){return r._formatErrorMessage(e,t,i,n)}}},fe.prototype._resolveField=function(e,t,i){if("#"===e[0])return this.fields.findById(e.slice(1));if(!m(t))return this.fields.find({name:e,scope:t,vmId:i});if(N(e,".")){var n=e.split("."),r=n[0],s=n.slice(1),a=this.fields.find({name:s.join("."),scope:r,vmId:i});if(a)return a}return this.fields.find({name:e,scope:null,vmId:i})},fe.prototype._handleFieldNotFound=function(e,t){var i=m(t)?e:(m(t)?"":t+".")+e;return Promise.reject(c('Validating a non-existent field: "'+i+'". Use "attach()" first.'))},fe.prototype._handleValidationResults=function(i,t){var n=this,e=i.map(function(e){return{id:e.id}});this.errors.removeById(e.map(function(e){return e.id})),i.forEach(function(e){n.errors.remove(e.field,e.scope,t)});var r=i.reduce(function(e,t){return e.push.apply(e,t.errors),e},[]);this.errors.add(r),this.fields.filter(e).forEach(function(t){var e=j(i,function(e){return e.id===t.id});t.setFlags({pending:!1,valid:e.valid,validated:!0})})},fe.prototype._shouldSkip=function(e,t){return!1!==e.bails&&(!(!e.isDisabled||!S().useConstraintAttrs)||!e.isRequired&&(m(t)||""===t||function(e){return Array.isArray(e)&&0===e.length}(t)))},fe.prototype._shouldBail=function(e){return void 0!==e.bails?e.bails:this.fastExit},fe.prototype._validate=function(n,r,e){var s=this;void 0===e&&(e={});var t=e.initial,i=Object.keys(n.rules).filter(U.isRequireRule);if(n.forceRequired=!1,i.forEach(function(e){var t=U.getOptions(e),i=s._test(n,r,{name:e,params:n.rules[e],options:t});if(O(i.then))throw c("Require rules cannot be async");if(!I(i))throw c("Require rules has to return an object (see docs)");!0===i.data.required&&(n.forceRequired=!0)}),this._shouldSkip(n,r))return Promise.resolve({valid:!0,id:n.id,field:n.name,scope:n.scope,errors:[]});var a=[],o=[],u=!1;return O(n.checkValueChanged)&&(n.flags.changed=n.checkValueChanged()),Object.keys(n.rules).filter(function(e){return!t||!U.has(e)||U.isImmediate(e)}).some(function(e){var t=U.getOptions(e),i=s._test(n,r,{name:e,params:n.rules[e],options:t});return O(i.then)?a.push(i):!i.valid&&s._shouldBail(n)?(o.push.apply(o,i.errors),u=!0):a.push(new Promise(function(e){return e(i)})),u}),u?Promise.resolve({valid:!1,errors:o,id:n.id,field:n.name,scope:n.scope}):Promise.all(a).then(function(e){return e.reduce(function(e,t){var i;return t.valid||(i=e.errors).push.apply(i,t.errors),e.valid=e.valid&&t.valid,e},{valid:!0,errors:o,id:n.id,field:n.name,scope:n.scope})})},Object.defineProperties(fe.prototype,he),Object.defineProperties(fe,pe);function me(e,t){this.i18n=e,this.rootKey=t}var ge=function(i){return I(i)?Object.keys(i).reduce(function(e,t){return e[t]=ge(i[t]),e},{}):O(i)?i("{0}",["{1}","{2}","{3}"]):i},ye={locale:{configurable:!0}};ye.locale.get=function(){return this.i18n.locale},ye.locale.set=function(e){$("Cannot set locale from the validator when using vue-i18n, use i18n.locale setter instead")},me.prototype.getDateFormat=function(e){return this.i18n.getDateTimeFormat(e||this.locale)},me.prototype.setDateFormat=function(e,t){this.i18n.setDateTimeFormat(e||this.locale,t)},me.prototype.getMessage=function(e,t,i){var n=this.rootKey+".messages."+t,r=i;return Array.isArray(i)&&(r=[].concat.apply([],i)),this.i18n.te(n)?this.i18n.t(n,r):this.i18n.te(n,this.i18n.fallbackLocale)?this.i18n.t(n,this.i18n.fallbackLocale,r):this.i18n.t(this.rootKey+".messages._default",r)},me.prototype.getAttribute=function(e,t,i){void 0===i&&(i="");var n=this.rootKey+".attributes."+t;return this.i18n.te(n)?this.i18n.t(n):i},me.prototype.getFieldMessage=function(e,t,i,n){var r=this.rootKey+".custom."+t+"."+i;return this.i18n.te(r)?this.i18n.t(r,n):this.getMessage(e,i,n)},me.prototype.merge=function(r){var s=this;Object.keys(r).forEach(function(e){var t,i=F({},u(e+"."+s.rootKey,s.i18n.messages,{})),n=F(i,function(e){var t={};return e.messages&&(t.messages=ge(e.messages)),e.custom&&(t.custom=ge(e.custom)),e.attributes&&(t.attributes=e.attributes),m(e.dateFormat)||(t.dateFormat=e.dateFormat),t}(r[e]));s.i18n.mergeLocaleMessage(e,((t={})[s.rootKey]=n,t)),n.dateFormat&&s.i18n.setDateTimeFormat(e,n.dateFormat)})},me.prototype.setMessage=function(e,t,i){var n,r;this.merge(((r={})[e]={messages:(n={},n[t]=i,n)},r))},me.prototype.setAttribute=function(e,t,i){var n,r;this.merge(((r={})[e]={attributes:(n={},n[t]=i,n)},r))},Object.defineProperties(me.prototype,ye);function be(e,t){this.configure(e),t&&(_e=t),(Ie=this)._validator=function(e){return le=e}(new fe(null,{fastExit:e&&e.fastExit},this)),this._initVM(this.config),this._initI18n(this.config)}var _e,$e,Ie,Oe={aggressive:function(){return{on:["input"]}},eager:function(e){return e.errors.length?{on:["input"]}:{on:["change","blur"]}},passive:function(){return{on:[]}},lazy:function(){return{on:["change"]}}},Ae={i18nDriver:{configurable:!0},config:{configurable:!0}},Ee={i18nDriver:{configurable:!0},config:{configurable:!0}};be.setI18nDriver=function(e,t){k.setDriver(e,t)},be.configure=function(e){L(e)},be.setMode=function(e,t){if(L({mode:e}),t){if(!O(t))throw new Error("A mode implementation must be a function");Oe[e]=t}},be.use=function(e,t){return void 0===t&&(t={}),O(e)?Ie?void e({Validator:fe,ErrorBag:q,Rules:fe.rules},t):($e||($e=[]),void $e.push({plugin:e,options:t})):$("The plugin must be a callable function")},be.install=function(e,t){_e&&e===_e||(_e=e,Ie=new be(t),fe.$vee=Ie,function(){try{var e=Object.defineProperty({},"passive",{get:function(){te=!0}});window.addEventListener("testPassive",null,e),window.removeEventListener("testPassive",null,e)}catch(e){te=!1}}(),_e.mixin(ce),_e.directive("validate",ve),$e&&($e.forEach(function(e){var t=e.plugin,i=e.options;be.use(t,i)}),$e=null))},Ae.i18nDriver.get=function(){return k.getDriver()},Ee.i18nDriver.get=function(){return k.getDriver()},Ae.config.get=function(){return S()},Ee.config.get=function(){return S()},be.prototype._initVM=function(e){var t=this;this._vm=new _e({data:function(){return{errors:t._validator.errors,fields:t._validator.fields}}})},be.prototype._initI18n=function(e){function t(){n&&i.i18nDriver.merge(n),i._validator.errors.regenerate()}var i=this,n=e.dictionary,r=e.i18n,s=e.i18nRootKey,a=e.locale;r?(be.setI18nDriver("i18n",new me(r,s)),r._vm.$watch("locale",t)):"undefined"!=typeof window&&this._vm.$on("localeChanged",t),n&&this.i18nDriver.merge(n),a&&!r&&this._validator.localize(a)},be.prototype.configure=function(e){L(e)},Object.defineProperties(be.prototype,Ae),Object.defineProperties(be,Ee),be.mixin=ce,be.directive=ve,be.Validator=fe,be.ErrorBag=q;function xe(i,n){var r={pristine:function(e,t){return e&&t},dirty:function(e,t){return e||t},touched:function(e,t){return e||t},untouched:function(e,t){return e&&t},valid:function(e,t){return e&&t},invalid:function(e,t){return e||t},pending:function(e,t){return e||t},required:function(e,t){return e||t},validated:function(e,t){return e&&t}};return Object.keys(r).reduce(function(e,t){return e[t]=r[t](i[t],n[t]),e},{})}var we=function(n,r){return void 0===r&&(r=!0),Object.keys(n).reduce(function(e,t){if(!e)return e=E({},n[t]);var i=0===t.indexOf("$");return r&&i?xe(we(n[t]),e):!r&&i?e:e=xe(e,n[t])},null)},je=null,Fe=0,Ne={$__veeInject:!1,inject:{$_veeObserver:{from:"$_veeObserver",default:function(){return this.$vnode.context.$_veeObserver||(this.$vnode.context.$_veeObserver={refs:{},subscribe:function(e){this.refs[e.vid]=e},unsubscribe:function(e){delete this.refs[e.vid]}}),this.$vnode.context.$_veeObserver}}},props:{vid:{type:[String,Number],default:function(){return"_vee_"+ ++Fe}},name:{type:String,default:null},mode:{type:[String,Function],default:function(){return S().mode}},events:{type:Array,validate:function(){return!0},default:function(){var e=S().events;return"string"==typeof e?e.split("|"):e}},rules:{type:[Object,String],default:null},immediate:{type:Boolean,default:!1},persist:{type:Boolean,default:!1},bails:{type:Boolean,default:function(){return S().fastExit}},debounce:{type:Number,default:function(){return S().delay||0}},tag:{type:String,default:"span"}},watch:{rules:{deep:!0,handler:function(e,t){this._needsValidation=!g(e,t)}}},data:function(){return{messages:[],value:void 0,initialized:!1,initialValue:void 0,flags:{untouched:!0,touched:!1,dirty:!1,pristine:!0,valid:null,invalid:null,validated:!1,pending:!1,required:!1,changed:!1},failedRules:{},forceRequired:!1,isDeactivated:!1,id:null}},computed:{isValid:function(){return this.flags.valid},fieldDeps:function(){var i=this,n=_(this.rules);return Object.keys(n).filter(U.isTargetRule).map(function(e){var t=n[e][0];return function e(t,i,n){void 0===n&&(n=!0);var r=t.$_veeObserver.refs;t._veeWatchers||(t._veeWatchers={});if(!r[i]&&n)return t.$once("hook:mounted",function(){e(t,i,!1)});!O(t._veeWatchers[i])&&r[i]&&(t._veeWatchers[i]=r[i].$watch("value",function(){t.flags.validated&&(t._needsValidation=!0,t.validate())}))}(i,t),t})},normalizedEvents:function(){var t=this,e=De(this).on;return Y(e||this.events||[]).map(function(e){return"input"===e?t._inputEventName:e})},isRequired:function(){var e=_(this.rules),t=this.forceRequired,i=e.required||t;return this.flags.required=i},classes:function(){var n=this,r=S().classNames;return Object.keys(this.flags).reduce(function(e,t){var i=r&&r[t]||t;return m(n.flags[t])||i&&(e[i]=n.flags[t]),e},{})}},render:function(e){var t=this;this.registerField();var i=Ve(this),n=this.$scopedSlots.default;if(!O(n))return e(this.tag,this.$slots.default);var r=n(i);return B(r).forEach(function(e){(function(t){var e=T(t);this._inputEventName=this._inputEventName||K(t,e),ke.call(this,e);var i=Re(this),n=i.onInput,r=i.onBlur,s=i.onValidate;H(t,this._inputEventName,n),H(t,"blur",r),this.normalizedEvents.forEach(function(e){H(t,e,s)}),this.initialized=!0}).call(t,e)}),e(this.tag,r)},beforeDestroy:function(){this.$_veeObserver.unsubscribe(this)},activated:function(){this.$_veeObserver.subscribe(this),this.isDeactivated=!1},deactivated:function(){this.$_veeObserver.unsubscribe(this),this.isDeactivated=!0},methods:{setFlags:function(t){var i=this;Object.keys(t).forEach(function(e){i.flags[e]=t[e]})},syncValue:function(e){var t=function(e){if(X(e))return"file"===e.target.type?d(e.target.files):e.target.value;return e}(e);this.value=t,this.flags.changed=this.initialValue!==t},reset:function(){this.messages=[],this._pendingValidation=null,this.initialValue=this.value;var e={untouched:!0,touched:!1,dirty:!1,pristine:!0,valid:null,invalid:null,validated:!1,pending:!1,required:!1,changed:!1};this.setFlags(e)},validate:function(){for(var t=this,e=[],i=arguments.length;i--;)e[i]=arguments[i];return 0<e.length&&this.syncValue(e[0]),this.validateSilent().then(function(e){return t.applyResult(e),e})},validateSilent:function(){var t=this;return this.setFlags({pending:!0}),je.verify(this.value,this.rules,{name:this.name,values:function(e){var i=e.$_veeObserver.refs;return e.fieldDeps.reduce(function(e,t){return i[t]&&(e[t]=i[t].value),e},{})}(this),bails:this.bails}).then(function(e){return t.setFlags({pending:!1}),t.isRequired||t.setFlags({valid:e.valid,invalid:!e.valid}),e})},applyResult:function(e){var t=e.errors,i=e.failedRules;this.messages=t,this.failedRules=E({},i),this.setFlags({valid:!t.length,changed:this.value!==this.initialValue,invalid:!!t.length,validated:!0})},registerField:function(){je||(je=ue()||new fe(null,{fastExit:S().fastExit})),function(e){m(e.id)&&e.id===e.vid&&(e.id=Fe,Fe++);var t=e.id,i=e.vid;if(e.isDeactivated||t===i&&e.$_veeObserver.refs[t])return;t!==i&&e.$_veeObserver.refs[t]===e&&e.$_veeObserver.unsubscribe(e);e.$_veeObserver.subscribe(e),e.id=i}(this)}}};function Ve(i){return{errors:i.messages,flags:i.flags,classes:i.classes,valid:i.isValid,failedRules:i.failedRules,reset:function(){return i.reset()},validate:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return i.validate.apply(i,e)},aria:{"aria-invalid":i.flags.invalid?"true":"false","aria-required":i.isRequired?"true":"false"}}}function De(e){return(O(e.mode)?e.mode:Oe[e.mode])({errors:e.messages,value:e.value,flags:e.flags})}function ke(e){this.initialized||(this.initialValue=e.value);var t=function(e,t){return!(e._ignoreImmediate||!e.immediate)||(e.value!==t.value||(!!e._needsValidation||!e.initialized&&void 0===t.value))}(this,e);this._needsValidation=!1,this.value=e.value,this._ignoreImmediate=!0,t&&this.validateSilent().then(this.immediate||this.flags.validated?this.applyResult:function(e){return e})}function Re(i){var e=i.$veeHandler,t=De(i);return e&&i.$veeDebounce===i.debounce||(e=b(function(){i.$nextTick(function(){var t=i.validateSilent();(i._pendingValidation=t).then(function(e){t===i._pendingValidation&&(i.applyResult(e),i._pendingValidation=null)})})},t.debounce||i.debounce),i.$veeHandler=e,i.$veeDebounce=i.debounce),{onInput:function(e){i.syncValue(e),i.setFlags({dirty:!0,pristine:!1})},onBlur:function(){i.setFlags({touched:!0,untouched:!1})},onValidate:e}}var Pe={pristine:"every",dirty:"some",touched:"some",untouched:"every",valid:"every",invalid:"some",pending:"some",validated:"every"};var qe=0,Ce={name:"ValidationObserver",provide:function(){return{$_veeObserver:this}},inject:{$_veeObserver:{from:"$_veeObserver",default:function(){return this.$vnode.context.$_veeObserver?this.$vnode.context.$_veeObserver:null}}},props:{tag:{type:String,default:"span"}},data:function(){return{vid:"obs_"+qe++,refs:{},observers:[]}},computed:{ctx:function(){var t=this,e={errors:{},validate:function(e){var i=t.validate(e);return{then:function(t){i.then(function(e){return e&&O(t)?Promise.resolve(t()):Promise.resolve(e)})}}},reset:function(){return t.reset()}};return h(this.refs).concat(this.observers).reduce(function(i,n){return Object.keys(Pe).forEach(function(e){var t=n.flags||n.ctx;i[e]=e in i?function(e,t,i){return[e,t][Pe[i]](function(e){return e})}(i[e],t[e],e):t[e]}),i.errors[n.vid]=n.messages||h(n.ctx.errors).reduce(function(e,t){return e.concat(t)},[]),i},e)}},created:function(){this.$_veeObserver&&this.$_veeObserver.subscribe(this,"observer")},activated:function(){this.$_veeObserver&&this.$_veeObserver.subscribe(this,"observer")},deactivated:function(){this.$_veeObserver&&this.$_veeObserver.unsubscribe(this,"observer")},beforeDestroy:function(){this.$_veeObserver&&this.$_veeObserver.unsubscribe(this,"observer")},render:function(e){var t=this.$scopedSlots.default;return this._persistedStore=this._persistedStore||{},O(t)?e(this.tag,{on:this.$listeners,attrs:this.$attrs},t(this.ctx)):e(this.tag,this.$slots.default)},methods:{subscribe:function(e,t){var i;void 0===t&&(t="provider"),"observer"!==t?(this.refs=Object.assign({},this.refs,((i={})[e.vid]=e,i)),e.persist&&this._persistedStore[e.vid]&&this.restoreProviderState(e)):this.observers.push(e)},unsubscribe:function(e,t){var i=e.vid;void 0===t&&(t="provider"),"provider"===t&&this.removeProvider(i);var n=l(this.observers,function(e){return e.vid===i});-1!==n&&this.observers.splice(n,1)},validate:function(e){void 0===e&&(e={silent:!1});var t=e.silent;return Promise.all(h(this.refs).map(function(e){return e[t?"validateSilent":"validate"]().then(function(e){return e.valid})}).concat(this.observers.map(function(e){return e.validate({silent:t})}))).then(function(e){return e.every(function(e){return e})})},reset:function(){return h(this.refs).concat(this.observers).forEach(function(e){return e.reset()})},restoreProviderState:function(e){var t=this._persistedStore[e.vid];e.setFlags(t.flags),e.applyResult(t),delete this._persistedStore[e.vid]},removeProvider:function(e){var t=this.refs[e];t&&t.persist&&(this._persistedStore[e]={flags:t.flags,errors:t.messages,failedRules:t.failedRules}),this.$delete(this.refs,e)}}};return be.version="2.2.9",be.mapFields=function(e){if(!e)return function(){return we(this.$validator.flags)};var s=function(e){return Array.isArray(e)?e.reduce(function(e,t){return N(t,".")?e[t.split(".")[1]]=t:e[t]=t,e},{}):e}(e);return Object.keys(s).reduce(function(e,n){var r=s[n];return e[n]=function(){if(this.$validator.flags[r])return this.$validator.flags[r];if("*"===s[n])return we(this.$validator.flags,!1);if(r.indexOf(".")<=0)return{};var e=r.split("."),t=e[0],i=e.slice(1);return t=this.$validator.flags["$"+t],"*"===(i=i.join("."))&&t?we(t):t&&t[i]?t[i]:{}},e},{})},be.ValidationProvider=Ne,be.ValidationObserver=Ce,be.withValidation=function(e,d){void 0===d&&(d=null);var f=O(e)?e.options:e;f.$__veeInject=!1;var t={name:(f.name||"AnonymousHoc")+"WithValidation",props:E({},Ne.props),data:Ne.data,computed:E({},Ne.computed),methods:E({},Ne.methods),$__veeInject:!1,beforeDestroy:Ne.beforeDestroy,inject:Ne.inject};d||(d=function(e){return e});var v=f.model&&f.model.event||"input";return t.render=function(e){var t;this.registerField();var i=Ve(this),n=E({},this.$listeners),r=T(this.$vnode);this._inputEventName=this._inputEventName||K(this.$vnode,r),ke.call(this,r);var s=Re(this),a=s.onInput,o=s.onBlur,u=s.onValidate;W(n,v,a),W(n,"blur",o),this.normalizedEvents.forEach(function(e,t){W(n,e,u)});var l=(z(this.$vnode)||{prop:"value"}).prop,c=E({},this.$attrs,((t={})[l]=r.value,t),d(i));return e(f,{attrs:this.$attrs,props:c,on:n},function(i,n){return Object.keys(i).reduce(function(e,t){return i[t].forEach(function(e){e.context||(i[t].context=n,e.data||(e.data={}),e.data.slot=t)}),e.concat(i[t])},[])}(this.$slots,this.$vnode.context))},t},be});