vee-validate 2.2.5 → 2.2.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/dist/locale/ar.js +1 -1
  2. package/dist/locale/az.js +1 -1
  3. package/dist/locale/bg.js +1 -1
  4. package/dist/locale/ca.js +1 -1
  5. package/dist/locale/cs.js +1 -1
  6. package/dist/locale/da.js +1 -1
  7. package/dist/locale/de.js +1 -1
  8. package/dist/locale/el.js +1 -1
  9. package/dist/locale/en.js +1 -1
  10. package/dist/locale/es.js +1 -1
  11. package/dist/locale/et.js +1 -1
  12. package/dist/locale/eu.js +1 -1
  13. package/dist/locale/fa.js +1 -1
  14. package/dist/locale/fi.js +1 -1
  15. package/dist/locale/fr.js +1 -1
  16. package/dist/locale/he.js +1 -1
  17. package/dist/locale/hi.js +1 -1
  18. package/dist/locale/hr.js +1 -1
  19. package/dist/locale/id.js +1 -1
  20. package/dist/locale/it.js +1 -1
  21. package/dist/locale/ja.js +1 -1
  22. package/dist/locale/ka.js +1 -1
  23. package/dist/locale/ko.js +1 -1
  24. package/dist/locale/lt.js +1 -1
  25. package/dist/locale/lv.js +1 -1
  26. package/dist/locale/mn.js +1 -1
  27. package/dist/locale/ms_MY.js +1 -1
  28. package/dist/locale/nb_NO.js +1 -1
  29. package/dist/locale/ne.js +1 -1
  30. package/dist/locale/nl.js +1 -1
  31. package/dist/locale/nn_NO.js +1 -1
  32. package/dist/locale/pl.js +1 -1
  33. package/dist/locale/pt_BR.js +1 -1
  34. package/dist/locale/pt_PT.js +1 -1
  35. package/dist/locale/ro.js +1 -1
  36. package/dist/locale/ru.js +1 -1
  37. package/dist/locale/sk.js +1 -1
  38. package/dist/locale/sl.js +1 -1
  39. package/dist/locale/sq.js +1 -1
  40. package/dist/locale/sr.js +1 -1
  41. package/dist/locale/sr_Latin.js +1 -1
  42. package/dist/locale/sv.js +1 -1
  43. package/dist/locale/th.js +1 -1
  44. package/dist/locale/tr.js +1 -1
  45. package/dist/locale/uk.js +1 -1
  46. package/dist/locale/vi.js +1 -1
  47. package/dist/locale/zh_CN.js +1 -1
  48. package/dist/locale/zh_TW.js +1 -1
  49. package/dist/rules.esm.js +4 -4
  50. package/dist/vee-validate.esm.js +246 -223
  51. package/dist/vee-validate.js +245 -222
  52. package/dist/vee-validate.min.js +1 -1
  53. package/dist/vee-validate.minimal.esm.js +243 -220
  54. package/dist/vee-validate.minimal.js +242 -219
  55. package/dist/vee-validate.minimal.min.js +1 -1
  56. package/package.json +27 -27
  57. package/types/vee-validate.d.ts +14 -3
  58. package/types/vue.d.ts +0 -12
@@ -1 +1 @@
1
- !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";var s=function(e){return F(["text","password","search","email","tel","url","textarea","number"],e.type)},a=function(e){return F(["radio","checkbox"],e.type)},o=function(e,t){return e.getAttribute("data-vv-"+t)},n=function(e){return"isNaN"in Number?Number.isNaN(e):e==e},d=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return e.every(function(e){return null==e})},u=function(t,i){if(t instanceof RegExp&&i instanceof RegExp)return u(t.source,i.source)&&u(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(!u(t[e],i[e]))return!1;return!0}return p(t)&&p(i)?Object.keys(t).every(function(e){return u(t[e],i[e])})&&Object.keys(i).every(function(e){return u(t[e],i[e])}):!(!n(t)||!n(i))||t===i},r=function(e){return d(e)?null:"FORM"===e.tagName?e:d(e.form)?d(e.parentNode)?null:r(e.parentNode):e.form},l=function(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},c=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},f=function(e,t){return t?e?("string"==typeof t&&(t=v(t)),_({},t,v(e))):v(t):v(e)},v=function(n){return n?p(n)?Object.keys(n).reduce(function(e,t){var i=[];return i=!0===n[t]?[]:Array.isArray(n[t])?n[t]:p(n[t])?n[t]:[n[t]],!1!==n[t]&&(e[t]=i),e},{}):"string"!=typeof n?(i("rules must be either a string or an object."),{}):n.split("|").reduce(function(e,t){var i,n,r,s=(n=[],r=(i=t).split(":")[0],F(i,":")&&(n=i.split(":").slice(1).join(":").split(",")),{name:r,params:n});return s.name&&(e[s.name]=s.params),e},{}):{}},i=function(e){console.warn("[vee-validate] "+e)},h=function(e){return new Error("[vee-validate] "+e)},p=function(e){return null!==e&&e&&"object"==typeof e&&!Array.isArray(e)},m=function(e){return"function"==typeof e},g=function(e,t){return e.classList?e.classList.contains(t):!!e.className.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))},y=function(t,e,i){var n,r;if(t&&e){if(!Array.isArray(e))return i?(r=e,void((n=t).classList?n.classList.add(r):g(n,r)||(n.className+=" "+r))):void function(e,t){if(e.classList)e.classList.remove(t);else if(g(e,t)){var i=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(i," ")}}(t,e);e.forEach(function(e){return y(t,e,i)})}},b=function(e){if(m(Array.from))return Array.from(e);for(var t=[],i=e.length,n=0;n<i;n++)t.push(e[n]);return t},_=function(e){for(var t=[],i=arguments.length-1;0<i--;)t[i]=arguments[i+1];if(m(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},t=0,$="{id}",I=function(e,t){for(var i=Array.isArray(e)?e:b(e),n=0;n<i.length;n++)if(t(i[n]))return n;return-1},O=function(e,t){var i=Array.isArray(e)?e:b(e),n=I(i,t);return-1===n?void 0:i[n]},A=function(e){if(!e)return!1;var t=e.componentOptions.tag;return/^(keep-alive|transition|transition-group)$/.test(t)},E=function(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},x=function(n,r){return p(n)&&p(r)&&Object.keys(r).forEach(function(e){var t,i;if(p(r[e]))return n[e]||_(n,((t={})[e]={},t)),void x(n[e],r[e]);_(n,((i={})[e]=r[e],i))}),n},w=function(e,t){if(e.required&&(t=f("required",t)),s(e))return"email"===e.type&&(t=f("email"+(e.multiple?":multiple":""),t)),e.pattern&&(t=f({regex:e.pattern},t)),0<=e.maxLength&&e.maxLength<524288&&(t=f("max:"+e.maxLength,t)),0<e.minLength&&(t=f("min:"+e.minLength,t)),"number"===e.type&&(t=f("decimal",t),""!==e.min&&(t=f("min_value:"+e.min,t)),""!==e.max&&(t=f("max_value:"+e.max,t))),t;if(F(["date","week","month","datetime-local","time"],e.type)){var i=e.step&&Number(e.step)<60?"HH:mm:ss":"HH:mm";if("date"===e.type)return f("date_format:yyyy-MM-dd",t);if("datetime-local"===e.type)return f("date_format:yyyy-MM-ddT"+i,t);if("month"===e.type)return f("date_format:yyyy-MM",t);if("week"===e.type)return f("date_format:yyyy-[W]WW",t);if("time"===e.type)return f("date_format:"+i,t)}return t},j=function(t){return m(Object.values)?Object.values(t):Object.keys(t).map(function(e){return t[e]})},F=function(e,t){return-1!==e.indexOf(t)},N=function(e,t,i){Object.defineProperty(e,t,{configurable:!1,writable:!0,value:i})},V="en",e=function(e){void 0===e&&(e={}),this.container={},this.merge(e)},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),m(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 m(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){x(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);var R={default:new e({en:{messages:{},attributes:{},custom:{}}})},k="default",P=function(){};P._checkDriverName=function(e){if(!e)throw h("you must provide a name to the dictionary driver")},P.setDriver=function(e,t){void 0===t&&(t=null),this._checkDriverName(e),t&&(R[e]=t),k=e},P.getDriver=function(){return R[k]};var q=function e(t,i){void 0===t&&(t=null),void 0===i&&(i=null),this.vmId=i||null,this.items=t&&t instanceof e?t.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=d(e.scope)?null:e.scope,e.vmId=d(e.vmId)?t.vmId||null:e.vmId,e}):(e.scope=d(e.scope)?null:e.scope,e.vmId=d(e.vmId)?this.vmId||null:e.vmId,[e])},q.prototype.regenerate=function(){this.items.forEach(function(e){e.msg=m(e.regenerate)?e.regenerate():e.msg})},q.prototype.update=function(t,e){var i=O(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 d(n)||(t=e.scope===n),d(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 d(n)||(t=e.scope===n),d(r.vmId)||(i=e.vmId===r.vmId),i&&t}).length},q.prototype.clear=function(e){var t=this,i=d(this.vmId)?function(){return!0}:function(e){return e.vmId===t.vmId};d(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);var r=!d(e)&&!e.includes("*"),s=function(e){var t=e.reduce(function(e,t){return(d(n.vmId)||t.vmId===n.vmId)&&(e[t.field]||(e[t.field]=[]),e[t.field].push(i?t.msg:t)),e},{});return r?j(t)[0]||[]:t};if(d(e))return s(this.items);var a=d(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 s(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=O(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=d(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(!d(e))for(var n,r=d(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],(d(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(F(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(F(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=d(l)?function(e){return d(e.scope)}:function(e){return e.scope===l},d(c)||"*"===c||(r=function(e){return e.field===c}),d(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(!d(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)},{})}};var S=_({},{locale:"en",delay:0,errorBagName:"errors",dictionary:null,fieldsBagName:"fields",classes:!1,classNames:null,events:"input",inject:!0,fastExit:!0,aria:!0,validity:!1,mode:"aggressive",useConstraintAttrs:!0,i18n:null,i18nRootKey:"validation"}),C=function(e){var t=l("$options.$_veeValidate",e,{});return _({},S,t)},L=function(){return S},M=function(e){S=_({},S,e)};function T(e){return e.data?e.data.model?e.data.model:!!e.data.directives&&O(e.data.directives,function(e){return"model"===e.name}):null}function B(e){return T(e)?[e]:(t=e,Array.isArray(t)?t:Array.isArray(t.children)?t.children:t.componentOptions&&Array.isArray(t.componentOptions.children)?t.componentOptions.children:[]).reduce(function(e,t){var i=B(t);return i.length&&e.push.apply(e,i),e},[]);var t}function z(e){return e.componentOptions?e.componentOptions.Ctor.options.model:null}function H(e,t,i){if(m(e[t])){var n=e[t];e[t]=[n]}Array.isArray(e[t])?e[t].push(i):d(e[t])&&(e[t]=[i])}function K(e,t,i){if(e.componentOptions)return r=t,s=i,(n=e).componentOptions.listeners||(n.componentOptions.listeners={}),void H(n.componentOptions.listeners,r,s);var n,r,s,a,o,u;o=t,u=i,d((a=e).data.on)&&(a.data.on={}),H(a.data.on,o,u)}function W(e,t){return e.componentOptions?(z(e)||{event:"input"}).event:t&&t.modifiers&&t.modifiers.lazy||"select"===e.tag?"change":e.data.attrs&&s({type:e.data.attrs.type||"text"})?"input":"change"}var G=function(){};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?l("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&&F(["string","object"],typeof t.value.rules)?n=t.value.rules:t.value&&(n=t.value),i.componentInstance)return n;var r=v(n);return L().useConstraintAttrs?_({},w(e,{}),r):r},G.resolveInitialValue=function(e){var t=e.data.model||O(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"]),p(r)?(d(n)||(r.input=n),E(r)):E(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&&L().events&&(i=L().events),i&&t.componentInstance&&F(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&&d(n)&&(n=i.componentInstance.$attrs&&i.componentInstance.$attrs["data-vv-scope"]),d(n)?function(e){var t=o(e,"scope");if(d(t)){var i=r(e);i&&(t=o(i,"scope"))}return d(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,r,s,a=!/[^\w.$]/.test(i.expression)&&(n=i.expression,r=t.context,s=r,n.split(".").reduce(function(e,t){return null==s||"object"!=typeof s?e&&!1:t in s?(s=s[t],e&&!0):e&&!1},!0)),o=!(!i.modifiers||!i.modifiers.lazy);return a?{expression:i.expression,lazy:o}:{expression:null,lazy:o}},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&&m(n.name)?n.name.bind(t.componentInstance)():t.componentInstance.name},G.resolveGetter=function(i,e,t){if(t&&t.expression)return function(){return l(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 l(n,e.componentInstance)};var r=G.getCtorConfig(e);if(r&&m(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=b(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=O(e,function(e){return e.checked});return t&&t.value};case"file":return function(e){return b(i.files)};case"select-multiple":return function(){return b(i.options).filter(function(e){return e.selected}).map(function(e){return e.value})};default:return function(){return i&&i.value}}};var U={},J=function(){},Q={rules:{configurable:!0}};J.add=function(e,t){var i=t.validate,n=t.options,r=t.paramNames;U[e]={validate:i,options:n,paramNames:r}},Q.rules.get=function(){return U},J.has=function(e){return!!U[e]},J.isImmediate=function(e){return!(!U[e]||!U[e].options.immediate)},J.isRequireRule=function(e){return!(!U[e]||!U[e].options.computesRequired)},J.isTargetRule=function(e){return!(!U[e]||!U[e].options.hasTarget)},J.remove=function(e){delete U[e]},J.getParamNames=function(e){return U[e]&&U[e].paramNames},J.getOptions=function(e){return U[e]&&U[e].options},J.getValidatorMethod=function(e){return U[e]?U[e].validate:null},Object.defineProperties(J,Q);var X=function(e){return"undefined"!=typeof Event&&m(Event)&&e instanceof Event||e&&e.srcElement},Y=function(e){return e?"string"==typeof e?e.split("|"):e:[]},Z=!0,ee=function(e,t,i){e.addEventListener(t,i,!!Z&&{passive:!0})},te={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"}},ie=function(e){void 0===e&&(e={}),this.id=(9999<=t&&(t=0,$=$.replace("{id}","_{id}")),t++,$.replace("{id}",String(t))),this.el=e.el,this.updated=!1,this.vmId=e.vmId,N(this,"dependencies",[]),N(this,"watchers",[]),N(this,"events",[]),this.delay=0,this.rules={},this.forceRequired=!1,this._cacheId(e),this.classNames=_({},te.classNames),e=_({},te,e),this._delay=d(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},N(this,"vm",e.vm),N(this,"componentInstance",e.component),this.ctorConfig=this.componentInstance?l("$options.$_veeValidate",this.componentInstance):void 0,this.update(e),this.initialValue=this.value,this.updated=!1},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.componentInstance||!this.componentInstance.disabled)||!(!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=m(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(m(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},ie.prototype.matches=function(e){var t=this;return!e||(e.id?this.id===e.id:!!(d(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)))},ie.prototype._cacheId=function(e){this.el&&!e.targetOf&&(this.el._veeValidateId=this.id)},ie.prototype.waitFor=function(e){this._waitingFor=e},ie.prototype.isWaitingFor=function(e){return this._waitingFor===e},ie.prototype.update=function(e){var t,i,n;this.targetOf=e.targetOf||null,this.immediate=e.immediate||this.immediate||!1,this.persist=e.persist||this.persist||!1,!d(e.scope)&&e.scope!==this.scope&&m(this.validator.update)&&this.validator.update(this.id,{scope:e.scope}),this.scope=d(e.scope)?d(this.scope)?null:this.scope:e.scope,this.name=(d(e.name)?e.name:String(e.name))||this.name||null,this.rules=void 0!==e.rules?v(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=p(e.classNames)?x(this.classNames,e.classNames):this.classNames,this.getter=m(e.getter)?e.getter:this.getter,this._alias=e.alias||this._alias,this.events=e.events?Y(e.events):this.events,this.delay=(t=this.events,i=e.delay||this.delay,n=this._delay,"number"==typeof i?t.reduce(function(e,t){return e[t]=i,e},{}):t.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.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())},ie.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()},ie.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()},ie.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 J.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};m(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 ie(s)})}})},ie.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)})},ie.prototype.updateClasses=function(t){var i=this;if(void 0===t&&(t=!1),this.classes&&!this.isDisabled){var e=function(e){y(e,i.classNames.dirty,i.flags.dirty),y(e,i.classNames.pristine,i.flags.pristine),y(e,i.classNames.touched,i.flags.touched),y(e,i.classNames.untouched,i.flags.untouched),t&&(y(e,i.classNames.valid,!1),y(e,i.classNames.invalid,!1)),!d(i.flags.valid)&&i.flags.validated&&y(e,i.classNames.valid,i.flags.valid),!d(i.flags.invalid)&&i.flags.validated&&y(e,i.classNames.invalid,i.flags.invalid)};if(a(this.el)){var n=document.querySelectorAll('input[name="'+this.el.name+'"]');b(n).forEach(e)}else e(this.el)}},ie.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&&(y(e.el,e.classNames.touched,!0),y(e.el,e.classNames.untouched,!1)),e.unwatch(/^class_blur$/)},i=s(this.el)?"input":"change",n=function(){e.flags.dirty=!0,e.flags.pristine=!1,e.classes&&(y(e.el,e.classNames.pristine,!1),y(e.el,e.classNames.dirty,!0)),e.unwatch(/^class_input$/)};if(this.componentInstance&&m(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){ee(this.el,i,n);var r=a(this.el)?"change":"blur";ee(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)}})}}},ie.prototype.checkValueChanged=function(){return(null!==this.initialValue||""!==this.value||!s(this.el))&&this.value!==this.initialValue},ie.prototype._determineInputEvent=function(){return this.componentInstance?this.componentInstance.$options.model&&this.componentInstance.$options.model.event||"input":this.model&&this.model.lazy?"change":s(this.el)?"input":"change"},ie.prototype._determineEventList=function(t){var i=this;return!this.events.length||this.componentInstance||s(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})},ie.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(this.model&&F(e,t)){var s=null,a=this.model.expression;if(this.model.expression&&(s=this.vm,a=this.model.expression),!a&&this.componentInstance&&this.componentInstance.$options.model&&(s=this.componentInstance,a=this.componentInstance.$options.model.prop||"value"),s&&a){var o=c(r,this.delay[t],n),u=s.$watch(a,o);this.watchers.push({tag:"input_model",unwatch:function(){i.vm.$nextTick(function(){u()})}}),e=e.filter(function(e){return e!==t})}}e.forEach(function(e){var t=c(r,i.delay[e],n);i._addComponentEventListener(e,t),i._addHTMLEventListener(e,t)})}},ie.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)}}))},ie.prototype._addHTMLEventListener=function(t,i){var n=this;if(this.el&&!this.componentInstance){var r=function(e){ee(e,t,i),n.watchers.push({tag:"input_native",unwatch:function(){e.removeEventListener(t,i)}})};if(r(this.el),a(this.el)){var e=document.querySelectorAll('input[name="'+this.el.name+'"]');b(e).forEach(function(e){e._veeValidateId&&e!==n.el||r(e)})}}},ie.prototype.updateAriaAttrs=function(){var t=this;if(this.aria&&this.el&&m(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(a(this.el)){var i=document.querySelectorAll('input[name="'+this.el.name+'"]');b(i).forEach(e)}else e(this.el)}},ie.prototype.updateCustomValidity=function(){this.validity&&this.el&&m(this.el.setCustomValidity)&&this.validator.errors&&this.el.setCustomValidity(this.flags.valid?"":this.validator.errors.firstById(this.id)||"")},ie.prototype.destroy=function(){this._cancellationToken&&(this._cancellationToken.cancelled=!0),this.unwatch(),this.dependencies.forEach(function(e){return e.field.destroy()}),this.dependencies=[]},Object.defineProperties(ie.prototype,ne);var re=function(e){void 0===e&&(e=[]),this.items=e||[],this.itemsById=this.items.reduce(function(e,t){return e[t.id]=t,e},{})},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 O(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 ie?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 ie))throw h("FieldBag only accepts instances of Field that has an id defined.");if(!e.id)throw h("Field id must be defined.");if(this.findById(e.id))throw h("Field with id "+e.id+" is already added.");this.items.push(e),this.itemsById[e.id]=e},Object.defineProperties(re.prototype,se);var ae=function(e,t){this.id=t._uid,this._base=e,this._paused=!1,this.errors=new q(e.errors,this.id)},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,{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,_({},{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,_({},{vmId:this.id},t||{}))},ae.prototype.validateScopes=function(e){return void 0===e&&(e={}),this._paused?Promise.resolve(!0):this._base.validateScopes(_({},{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);var ue=null,le=function(){return ue},ce={provide:function(){return this.$validator&&!A(this.$vnode)?{$validator:this.$validator}:{}},beforeCreate:function(){if(!A(this.$vnode)&&!1!==this.$options.$__veeInject){this.$parent||M(this.$options.$_veeValidate||{});var e=C(this);(!this.$parent||this.$options.$_veeValidate&&/new/.test(this.$options.$_veeValidate.validator))&&(this.$validator=new ae(le(),this));var t,i=(t=this.$options.inject,!(!p(t)||!t.$validator));if(this.$validator||!e.inject||i||(this.$validator=new ae(le(),this)),i||this.$validator){if(!i&&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}var fe={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&&u(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)}},ve=function(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=!!d(t&&t.fastExit)||t.fastExit,this.$vee=i||{_vm:{$nextTick:function(e){return m(e)?e():Promise.resolve()},$emit:function(){},$off:function(){}}}},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 J.rules},he.rules.get=function(){return J.rules},he.dictionary.get=function(){return P.getDriver()},pe.dictionary.get=function(){return P.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 ve.locale},he.locale.set=function(e){ve.locale=e},pe.locale.get=function(){return P.getDriver().locale},pe.locale.set=function(e){var t=e!==P.getDriver().locale;P.getDriver().locale=e,t&&ve.$vee&&ve.$vee._vm&&ve.$vee._vm.$emit("localeChanged")},ve.create=function(e,t){return new ve(e,t)},ve.extend=function(e,t,i){void 0===i&&(i={}),ve._guardExtend(e,t);var n=t.options||{};ve._merge(e,{validator:t,paramNames:i&&i.paramNames||t.paramNames,options:_({hasTarget:!1,immediate:!0},n,i||{})})},ve.remove=function(e){J.remove(e)},ve.prototype.localize=function(e,t){ve.localize(e,t)},ve.localize=function(e,t){var i;if(p(e))P.getDriver().merge(e);else{if(t){var n=e||t.name;t=_({},t),P.getDriver().merge(((i={})[n]=t,i))}e&&(ve.locale=e)}},ve.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 ie(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},ve.prototype.flag=function(e,t,i){void 0===i&&(i=null);var n=this._resolveField(e,void 0,i);n&&t&&n.setFlags(t)},ve.prototype.detach=function(e,t,i){var n=m(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)))},ve.prototype.extend=function(e,t,i){void 0===i&&(i={}),ve.extend(e,t,i)},ve.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)})})},ve.prototype.update=function(e,t){var i=t.scope;this._resolveField("#"+e)&&this.errors.update(e,{scope:i})},ve.prototype.remove=function(e){ve.remove(e)},ve.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(d(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})},ve.prototype.pause=function(){return this.paused=!0,this},ve.prototype.resume=function(){return this.paused=!1,this},ve.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}:p(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})})},ve.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})})},ve.prototype.verify=function(e,t,i){void 0===i&&(i={});var n={name:i&&i.name||"{field}",rules:v(t),bails:l("bails",i,!0),forceRequired:!1,get isRequired(){return!!this.rules.required||this.forceRequired}},r=Object.keys(n.rules).filter(J.isTargetRule);return r.length&&i&&p(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}})},ve.prototype.destroy=function(){this.$vee._vm.$off("localeChanged")},ve.prototype._createFields=function(i){var n=this;i&&Object.keys(i).forEach(function(e){var t=_({},{name:e,rules:i[e]});n.attach(t)})},ve.prototype._getDateFormat=function(e){var t=null;return e.date_format&&Array.isArray(e.date_format)&&(t=e.date_format[0]),t||P.getDriver().getDateFormat(this.locale)},ve.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 P.getDriver().getFieldMessage(this.locale,e.name,t.name,[r,s,i])},ve.prototype._convertParamObjectToArray=function(i,e){if(Array.isArray(i))return i;var t=J.getParamNames(e);return t&&p(i)?t.reduce(function(e,t){return t in i&&e.push(i[t]),e},[]):i},ve.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||P.getDriver().getAttribute(this.locale,i[0],i[0])].concat(i.slice(1)):i},ve.prototype._getFieldDisplayName=function(e){return e.alias||P.getDriver().getAttribute(this.locale,e.name,e.name)},ve.prototype._convertParamArrayToObj=function(t,e){var n=J.getParamNames(e);if(!n)return t;if(p(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},{})},ve.prototype._test=function(n,e,r){var s=this,t=J.getValidatorMethod(r.name),i=Array.isArray(r.params)?b(r.params):r.params;i||(i=[]);var a=null;if(!t||"function"!=typeof t)return Promise.reject(h("No such validator '"+r.name+"' exists."));if(r.options.hasTarget&&n.dependencies){var o=O(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 m(l.then)?l.then(function(e){var t=!0,i={};return Array.isArray(e)?t=e.every(function(e){return p(e)?e.valid:e}):(t=p(e)?e.valid:e,i=e.data),{valid:t,data:l.data,errors:t?[]:[s._createFieldError(n,r,i,a)]}}):(p(l)||(l={valid:l,data:{}}),{valid:l.valid,data:l.data,errors:l.valid?[]:[this._createFieldError(n,r,l.data,a)]})},ve._merge=function(e,t){var i=t.validator,n=t.options,r=t.paramNames,s=m(i)?i:i.validate;i.getMessage&&P.getDriver().setMessage(ve.locale,e,i.getMessage),J.add(e,{validate:s,options:n,paramNames:r})},ve._guardExtend=function(e,t){if(!m(t)&&!m(t.validate))throw h("Extension Error: The validator '"+e+"' must be a function or have a 'validate' method.")},ve.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)}}},ve.prototype._resolveField=function(e,t,i){if("#"===e[0])return this.fields.findById(e.slice(1));if(!d(t))return this.fields.find({name:e,scope:t,vmId:i});if(F(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})},ve.prototype._handleFieldNotFound=function(e,t){var i=d(t)?e:(d(t)?"":t+".")+e;return Promise.reject(h('Validating a non-existent field: "'+i+'". Use "attach()" first.'))},ve.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=O(i,function(e){return e.id===t.id});t.setFlags({pending:!1,valid:e.valid,validated:!0})})},ve.prototype._shouldSkip=function(e,t){return!1!==e.bails&&(!!e.isDisabled||!e.isRequired&&(d(t)||""===t||(i=t,Array.isArray(i)&&0===i.length)));var i},ve.prototype._shouldBail=function(e){return void 0!==e.bails?e.bails:this.fastExit},ve.prototype._validate=function(n,r,e){var s=this;void 0===e&&(e={});var t=e.initial,i=Object.keys(n.rules).filter(J.isRequireRule);if(n.forceRequired=!1,i.forEach(function(e){var t=J.getOptions(e),i=s._test(n,r,{name:e,params:n.rules[e],options:t});if(m(i.then))throw h("Require rules cannot be async");if(!p(i))throw h("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 m(n.checkValueChanged)&&(n.flags.changed=n.checkValueChanged()),Object.keys(n.rules).filter(function(e){return!t||!J.has(e)||J.isImmediate(e)}).some(function(e){var t=J.getOptions(e),i=s._test(n,r,{name:e,params:n.rules[e],options:t});return m(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(ve.prototype,he),Object.defineProperties(ve,pe);var me=function(i){return p(i)?Object.keys(i).reduce(function(e,t){return e[t]=me(i[t]),e},{}):m(i)?i("{0}",["{1}","{2}","{3}"]):i},ge=function(e,t){this.i18n=e,this.rootKey=t},ye={locale:{configurable:!0}};ye.locale.get=function(){return this.i18n.locale},ye.locale.set=function(e){i("Cannot set locale from the validator when using vue-i18n, use i18n.locale setter instead")},ge.prototype.getDateFormat=function(e){return this.i18n.getDateTimeFormat(e||this.locale)},ge.prototype.setDateFormat=function(e,t){this.i18n.setDateTimeFormat(e||this.locale,t)},ge.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)},ge.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},ge.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)},ge.prototype.merge=function(a){var o=this;Object.keys(a).forEach(function(e){var t,i,n,r=x({},l(e+"."+o.rootKey,o.i18n.messages,{})),s=x(r,(i=a[e],n={},i.messages&&(n.messages=me(i.messages)),i.custom&&(n.custom=me(i.custom)),i.attributes&&(n.attributes=i.attributes),d(i.dateFormat)||(n.dateFormat=i.dateFormat),n));o.i18n.mergeLocaleMessage(e,((t={})[o.rootKey]=s,t)),s.dateFormat&&o.i18n.setDateTimeFormat(e,s.dateFormat)})},ge.prototype.setMessage=function(e,t,i){var n,r;this.merge(((r={})[e]={messages:(n={},n[t]=i,n)},r))},ge.prototype.setAttribute=function(e,t,i){var n,r;this.merge(((r={})[e]={attributes:(n={},n[t]=i,n)},r))},Object.defineProperties(ge.prototype,ye);var be,_e,$e,Ie={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"]}}},Oe=function(e,t){var i;this.configure(e),t&&(be=t),($e=this)._validator=(i=new ve(null,{fastExit:e&&e.fastExit},this),ue=i),this._initVM(this.config),this._initI18n(this.config)},Ae={i18nDriver:{configurable:!0},config:{configurable:!0}},Ee={i18nDriver:{configurable:!0},config:{configurable:!0}};Oe.setI18nDriver=function(e,t){P.setDriver(e,t)},Oe.configure=function(e){M(e)},Oe.setMode=function(e,t){if(M({mode:e}),t){if(!m(t))throw new Error("A mode implementation must be a function");Ie[e]=t}},Oe.use=function(e,t){return void 0===t&&(t={}),m(e)?$e?void e({Validator:ve,ErrorBag:q,Rules:ve.rules},t):(_e||(_e=[]),void _e.push({plugin:e,options:t})):i("The plugin must be a callable function")},Oe.install=function(e,t){be&&e===be||(be=e,$e=new Oe(t),ve.$vee=$e,function(){try{var e=Object.defineProperty({},"passive",{get:function(){Z=!0}});window.addEventListener("testPassive",null,e),window.removeEventListener("testPassive",null,e)}catch(e){Z=!1}}(),be.mixin(ce),be.directive("validate",fe),_e&&(_e.forEach(function(e){var t=e.plugin,i=e.options;Oe.use(t,i)}),_e=null))},Ae.i18nDriver.get=function(){return P.getDriver()},Ee.i18nDriver.get=function(){return P.getDriver()},Ae.config.get=function(){return L()},Ee.config.get=function(){return L()},Oe.prototype._initVM=function(e){var t=this;this._vm=new be({data:function(){return{errors:t._validator.errors,fields:t._validator.fields}}})},Oe.prototype._initI18n=function(e){var t=this,i=e.dictionary,n=e.i18n,r=e.i18nRootKey,s=e.locale,a=function(){t._validator.errors.regenerate()};n?(Oe.setI18nDriver("i18n",new ge(n,r)),n._vm.$watch("locale",a)):"undefined"!=typeof window&&this._vm.$on("localeChanged",a),i&&this.i18nDriver.merge(i),s&&!n&&this._validator.localize(s)},Oe.prototype.configure=function(e){M(e)},Object.defineProperties(Oe.prototype,Ae),Object.defineProperties(Oe,Ee),Oe.mixin=ce,Oe.directive=fe,Oe.Validator=ve,Oe.ErrorBag=q;var xe=function(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},{})},we=function(n,r){return void 0===r&&(r=!0),Object.keys(n).reduce(function(e,t){if(!e)return 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;function Ne(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 Ve(e){return(m(e.mode)?e.mode:Ie[e.mode])({errors:e.messages,value:e.value,flags:e.flags})}function De(e){this.initialized||(this.initialValue=e.value);var t,i,n=(i=e,!((t=this)._ignoreImmediate||!t.immediate)||t.value!==i.value||!!t._needsValidation||!t.initialized&&void 0===i.value);this._needsValidation=!1,this.value=e.value,this._ignoreImmediate=!0,n&&this.validateSilent().then(this.immediate||this.flags.validated?this.applyResult:function(e){return e})}function Re(i){var e=i.$veeHandler,t=Ve(i);return e&&i.$veeDebounce===i.debounce||(e=c(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 ke={$__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 L().mode}},events:{type:Array,validate:function(){return!0},default:function(){var e=L().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 L().fastExit}},debounce:{type:Number,default:function(){return L().delay||0}},tag:{type:String,default:"span"}},watch:{rules:{deep:!0,handler:function(e,t){this._needsValidation=!u(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 n=this,r=v(this.rules),s=this.$_veeObserver.refs;return Object.keys(r).filter(J.isTargetRule).map(function(e){var t=r[e][0],i="$__"+t;return!m(n[i])&&s[t]&&(n[i]=s[t].$watch("value",function(){n.flags.validated&&(n._needsValidation=!0,n.validate())})),t})},normalizedEvents:function(){var t=this,e=Ve(this).on;return Y(e||this.events||[]).map(function(e){return"input"===e?t._inputEventName:e})},isRequired:function(){var e=v(this.rules),t=this.forceRequired,i=e.required||t;return this.flags.required=i},classes:function(){var n=this,r=L().classNames;return Object.keys(this.flags).reduce(function(e,t){var i=r&&r[t]||t;return d(n.flags[t])||i&&(e[i]=n.flags[t]),e},{})}},render:function(e){var t=this;this.registerField();var i=Ne(this),n=this.$scopedSlots.default;if(!m(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||W(t,e),De.call(this,e);var i=Re(this),n=i.onInput,r=i.onBlur,s=i.onValidate;K(t,this._inputEventName,n),K(t,"blur",r),this.normalizedEvents.forEach(function(e){K(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,i=X(t=e)?"file"===t.target.type?b(t.target.files):t.target.value:t;this.value=i,this.flags.changed=this.initialValue!==i},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 e,i,t=this;return this.setFlags({pending:!0}),je.verify(this.value,this.rules,{name:this.name,values:(e=this,i=e.$_veeObserver.refs,e.fieldDeps.reduce(function(e,t){return i[t]&&(e[t]=i[t].value),e},{})),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=_({},i),this.setFlags({valid:!t.length,changed:this.value!==this.initialValue,invalid:!!t.length,validated:!0})},registerField:function(){je||(je=le()||new ve(null,{fastExit:L().fastExit})),function(e){d(e.id)&&e.id===e.vid&&(e.id=Fe,Fe++);var t=e.id,i=e.vid;e.isDeactivated||t===i&&e.$_veeObserver.refs[t]||(t!==i&&e.$_veeObserver.refs[t]===e&&e.$_veeObserver.unsubscribe(e),e.$_veeObserver.subscribe(e),e.id=i)}(this)}}},Pe={pristine:"every",dirty:"some",touched:"some",untouched:"every",valid:"every",invalid:"some",pending:"some",validated:"every"};var qe=0,Se={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&&m(t)?Promise.resolve(t()):Promise.resolve(e)})}}},reset:function(){return t.reset()}};return j(this.refs).concat(this.observers).reduce(function(r,s){return Object.keys(Pe).forEach(function(e){var t,i,n=s.flags||s.ctx;e in r?r[e]=(t=r[e],i=n[e],[t,i][Pe[e]](function(e){return e})):r[e]=n[e]}),r.errors[s.vid]=s.messages||j(s.ctx.errors).reduce(function(e,t){return e.concat(t)},[]),r},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||{},m(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=I(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(j(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 j(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 Oe.version="2.2.5",Oe.mapFields=function(e){if(!e)return function(){return we(this.$validator.flags)};var t,s=(t=e,Array.isArray(t)?t.reduce(function(e,t){return F(t,".")?e[t.split(".")[1]]=t:e[t]=t,e},{}):t);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},{})},Oe.ValidationProvider=ke,Oe.ValidationObserver=Se,Oe.withValidation=function(e,v){void 0===v&&(v=null);var h=m(e)?e.options:e;h.$__veeInject=!1;var t={name:(h.name||"AnonymousHoc")+"WithValidation",props:_({},ke.props),data:ke.data,computed:_({},ke.computed),methods:_({},ke.methods),$__veeInject:!1,beforeDestroy:ke.beforeDestroy,inject:ke.inject};v||(v=function(e){return e});var p=h.model&&h.model.event||"input";return t.render=function(e){var t;this.registerField();var i=Ne(this),n=_({},this.$listeners),r=T(this.$vnode);this._inputEventName=this._inputEventName||W(this.$vnode,r),De.call(this,r);var s=Re(this),a=s.onInput,o=s.onBlur,u=s.onValidate;H(n,p,a),H(n,"blur",o),this.normalizedEvents.forEach(function(e,t){H(n,e,u)});var l,c,d=(z(this.$vnode)||{prop:"value"}).prop,f=_({},this.$attrs,((t={})[d]=r.value,t),v(i));return e(h,{attrs:this.$attrs,props:f,on:n},(l=this.$slots,c=this.$vnode.context,Object.keys(l).reduce(function(e,t){return l[t].forEach(function(e){e.context||(l[t].context=c,e.data||(e.data={}),e.data.slot=t)}),e.concat(l[t])},[])))},t},Oe});
1
+ !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});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vee-validate",
3
- "version": "2.2.5",
3
+ "version": "2.2.9",
4
4
  "description": "Template Based Validation Framework for Vue.js",
5
5
  "author": "Abdelrahman Awad <logaretm1@gmail.com>",
6
6
  "license": "MIT",
@@ -37,49 +37,49 @@
37
37
  "types/*.d.ts"
38
38
  ],
39
39
  "devDependencies": {
40
- "@babel/core": "^7.3.4",
41
- "@babel/plugin-transform-flow-strip-types": "^7.3.4",
42
- "@babel/plugin-transform-runtime": "^7.3.4",
43
- "@babel/preset-env": "^7.3.4",
44
- "@commitlint/cli": "^7.5.2",
40
+ "@babel/core": "^7.4.5",
41
+ "@babel/plugin-transform-flow-strip-types": "^7.4.4",
42
+ "@babel/plugin-transform-runtime": "^7.4.4",
43
+ "@babel/preset-env": "^7.4.5",
44
+ "@commitlint/cli": "^7.6.1",
45
45
  "@vue/test-utils": "1.0.0-beta.12",
46
46
  "babel-core": "^7.0.0-bridge.0",
47
47
  "babel-eslint": "^10.0.1",
48
- "babel-jest": "^24.5.0",
48
+ "babel-jest": "^24.8.0",
49
49
  "chalk": "^2.4.2",
50
50
  "cross-env": "^5.2.0",
51
51
  "date-fns": "2.0.0-alpha.25",
52
- "eslint": "^5.15.1",
52
+ "eslint": "^5.16.0",
53
53
  "eslint-config-standard": "^12.0.0",
54
- "eslint-plugin-flowtype": "^3.4.2",
55
- "eslint-plugin-import": "^2.16.0",
56
- "eslint-plugin-jest": "^22.3.2",
57
- "eslint-plugin-node": "^8.0.1",
58
- "eslint-plugin-promise": "^4.0.1",
54
+ "eslint-plugin-flowtype": "^3.9.1",
55
+ "eslint-plugin-import": "^2.17.2",
56
+ "eslint-plugin-jest": "^22.6.4",
57
+ "eslint-plugin-node": "^9.0.1",
58
+ "eslint-plugin-promise": "^4.1.1",
59
59
  "eslint-plugin-standard": "^4.0.0",
60
60
  "filesize": "^4.1.2",
61
- "flow-bin": "^0.94.0",
61
+ "flow-bin": "^0.98.1",
62
62
  "flush-promises": "^1.0.2",
63
- "gzip-size": "^5.0.0",
64
- "husky": "^1.3.1",
65
- "jest": "^24.5.0",
66
- "lint-staged": "^8.1.5",
63
+ "gzip-size": "^5.1.1",
64
+ "husky": "^2.3.0",
65
+ "jest": "^24.8.0",
66
+ "lint-staged": "^8.1.7",
67
67
  "mkdirp": "^0.5.1",
68
68
  "polish-plurals": "^1.1.0",
69
- "rollup": "^1.6.0",
69
+ "rollup": "^1.12.3",
70
70
  "rollup-plugin-buble": "^0.19.6",
71
- "rollup-plugin-commonjs": "^9.2.1",
71
+ "rollup-plugin-commonjs": "^10.0.0",
72
72
  "rollup-plugin-flow": "^1.1.1",
73
- "rollup-plugin-node-resolve": "^4.0.1",
74
- "rollup-plugin-replace": "^2.1.0",
75
- "uglify-js": "^3.4.9",
73
+ "rollup-plugin-node-resolve": "^5.0.0",
74
+ "rollup-plugin-replace": "^2.2.0",
75
+ "uglify-js": "^3.5.15",
76
76
  "validator": "^10.8.0",
77
- "vue": "^2.6.9",
77
+ "vue": "^2.6.10",
78
78
  "vue-i18n": "^8.9.0",
79
79
  "vue-jest": "^3.0.4",
80
- "vue-server-renderer": "^2.6.9",
81
- "vue-template-compiler": "^2.6.9",
82
- "vuepress": "^0.14.10"
80
+ "vue-server-renderer": "^2.6.10",
81
+ "vue-template-compiler": "^2.6.10",
82
+ "vuepress": "^0.14.11"
83
83
  },
84
84
  "eslintIgnore": [
85
85
  "locale",
@@ -68,8 +68,15 @@ export interface IDictionary {
68
68
  setDateFormat(locale: string, format: string): void;
69
69
  }
70
70
 
71
+ export type ResultObject = {
72
+ valid: boolean;
73
+ data?: object;
74
+ }
75
+
76
+ export type RuleResult = boolean | ResultObject | boolean[] | ResultObject[] | Promise<boolean | ResultObject | boolean[] | ResultObject[]>
77
+
71
78
  export interface RuleValidate {
72
- (value: any, args: object | any[], data?: any): boolean | Promise<boolean>
79
+ (value: any, args?: object | any[], data?: any): RuleResult
73
80
  }
74
81
 
75
82
  export interface Rule {
@@ -83,6 +90,10 @@ export interface Rules {
83
90
  [rule: string]: Rule;
84
91
  }
85
92
 
93
+ export const Rules: {
94
+ [rule: string]: Rule;
95
+ }
96
+
86
97
  export interface Watcher {
87
98
  tag: string;
88
99
  unwatch: () => void;
@@ -183,7 +194,7 @@ export class Field {
183
194
  /**
184
195
  * Sets the flags and their negated counterparts, and updates the classes and re-adds action listeners.
185
196
  */
186
- setFlags (flags: FieldFlags): void;
197
+ setFlags (flags: Partial<FieldFlags>): void;
187
198
  /**
188
199
  * Determines if the field requires references to target fields.
189
200
  */
@@ -394,7 +405,7 @@ export class Validator {
394
405
  /**
395
406
  * Sets the flags on a field.
396
407
  */
397
- flag(name: string, flags: FieldFlags, uid?: string): void;
408
+ flag(name: string, flags: Partial<FieldFlags>, uid?: string): void;
398
409
  /**
399
410
  * Pauses the validator.
400
411
  */
package/types/vue.d.ts CHANGED
@@ -19,17 +19,5 @@ declare module 'vue/types/vue' {
19
19
  * Note that this property is not available in the component if you are using `inject: false`.
20
20
  */
21
21
  $validator: Validator;
22
- /**
23
- * An `ErrorBag` instance, injected via a mixin by VeeValidate.
24
- *
25
- * Note that this property is not available in the component if you are using `inject: false`.
26
- */
27
- errors: ErrorBag;
28
- /**
29
- * An object containing state flags for the validated fields, injected via a mixin by VeeValidate.
30
- *
31
- * Note that this property is not available in the component if you are using `inject: false`.
32
- */
33
- fields: FieldFlagsBag;
34
22
  }
35
23
  }