Socket
Socket
Sign inDemoInstall

vee-validate

Package Overview
Dependencies
Maintainers
2
Versions
339
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vee-validate - npm Package Compare versions

Comparing version 2.0.0-rc.20 to 2.0.0-rc.21

dist/locale/ar.js

2

dist/vee-validate.minimal.min.js

@@ -1,1 +0,1 @@

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.VeeValidate=e()}(this,function(){"use strict";var t=function(t,e){return t.getAttribute("data-vv-"+e)},e=function(t){return null===t||void 0===t},i=function(t,e,i){return t.setAttribute("data-vv-"+e,i)},n=function(t,e){if(t instanceof RegExp&&e instanceof RegExp)return n(t.source,e.source)&&n(t.flags,e.flags);if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;for(var i=0;i<t.length;i++)if(!n(t[i],e[i]))return!1;return!0}return f(t)&&f(e)?Object.keys(t).every(function(i){return n(t[i],e[i])})&&Object.keys(e).every(function(i){return n(t[i],e[i])}):t===e},r=function(i){var n=t(i,"scope");return e(n)&&i.form&&(n=t(i.form,"scope")),e(n)?null:n},s=function(t,e,i){if(void 0===i&&(i=void 0),!t||!e)return i;var n=e;return t.split(".").every(function(t){return Object.prototype.hasOwnProperty.call(n,t)||void 0!==n[t]?(n=n[t],!0):(n=i,!1)}),n},a=function(t,e){var i=e;return t.split(".").every(function(t){return!!Object.prototype.hasOwnProperty.call(i,t)&&(i=i[t],!0)})},o=function(t){var e=[],i=t.split(":")[0];return~t.indexOf(":")&&(e=t.split(":").slice(1).join(":").split(",")),{name:i,params:e}},l=function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=!1),0===e)return t;var n;return function(){for(var r=[],s=arguments.length;s--;)r[s]=arguments[s];var a=i&&!n;clearTimeout(n),n=setTimeout(function(){n=null,i||t.apply(void 0,r)},e),a&&t.apply(void 0,r)}},u=function(t){return t?f(t)?Object.keys(t).reduce(function(e,i){var n=[];return n=!0===t[i]?[]:Array.isArray(t[i])?t[i]:[t[i]],!1!==t[i]&&(e[i]=n),e},{}):"string"!=typeof t?(c("rules must be either a string or an object."),{}):t.split("|").reduce(function(t,e){var i=o(e);return i.name?(t[i.name]=i.params,t):t},{}):{}},c=function(t){console.warn("[vee-validate] "+t)},d=function(t){return new Error("[vee-validate] "+t)},f=function(t){return null!==t&&t&&"object"==typeof t&&!Array.isArray(t)},h=function(t){return"function"==typeof t},v=function(t,e){return t.classList?t.classList.contains(e):!!t.className.match(new RegExp("(\\s|^)"+e+"(\\s|$)"))},p=function(t,e){t.classList?t.classList.add(e):v(t,e)||(t.className+=" "+e)},m=function(t,e){if(t.classList)t.classList.remove(e);else if(v(t,e)){var i=new RegExp("(\\s|^)"+e+"(\\s|$)");t.className=t.className.replace(i," ")}},g=function(t,e,i){if(t&&e)return i?p(t,e):void m(t,e)},y=function(t){if(h(Array.from))return Array.from(t);for(var e=[],i=t.length,n=0;n<i;n++)e.push(t[n]);return e},$=function(t){for(var e=[],i=arguments.length-1;i-- >0;)e[i]=arguments[i+1];if(h(Object.assign))return Object.assign.apply(Object,[t].concat(e));if(null==t)throw new TypeError("Cannot convert undefined or null to object");var n=Object(t);return e.forEach(function(t){null!=t&&Object.keys(t).forEach(function(e){n[e]=t[e]})}),n},b=function(){return"_"+Math.random().toString(36).substr(2,9)},_=function(t,e){var i=y(t);if(h(i.find))return i.find(e);var n;return i.some(function(t){return!!e(t)&&(n=t,!0)}),n},w=function(t){return t&&("SELECT"===t.tagName||~["radio","checkbox","file"].indexOf(t.type))?"change":"input"},x=function(t){if(!t)return!1;var e=t.componentOptions.tag;return/keep-alive|transition|transition-group/.test(e)},A=function(){this.items=[]};A.prototype.add=function(t){arguments.length>1&&(t={field:arguments[0],msg:arguments[1],rule:arguments[2],scope:e(arguments[3])?null:arguments[3]}),t.scope=e(t.scope)?null:t.scope,this.items.push(t)},A.prototype.update=function(t,e){var i=_(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)}},A.prototype.all=function(t){return e(t)?this.items.map(function(t){return t.msg}):this.items.filter(function(e){return e.scope===t}).map(function(t){return t.msg})},A.prototype.any=function(t){return e(t)?!!this.items.length:!!this.items.filter(function(e){return e.scope===t}).length},A.prototype.clear=function(t){var i=this;e(t)&&(t=null);for(var n=0;n<this.items.length;++n)i.items[n].scope===t&&(i.items.splice(n,1),--n)},A.prototype.collect=function(t,i,n){if(void 0===n&&(n=!0),!t){var r={};return this.items.forEach(function(t){r[t.field]||(r[t.field]=[]),r[t.field].push(n?t.msg:t)}),r}return t=e(t)?t:String(t),e(i)?this.items.filter(function(e){return e.field===t}).map(function(t){return n?t.msg:t}):this.items.filter(function(e){return e.field===t&&e.scope===i}).map(function(t){return n?t.msg:t})},A.prototype.count=function(){return this.items.length},A.prototype.firstById=function(t){var e=_(this.items,function(e){return e.id===t});return e?e.msg:null},A.prototype.first=function(t,i){var n=this;void 0===i&&(i=null),t=e(t)?t:String(t);var r=this._selector(t),s=this._scope(t);if(s){var a=this.first(s.name,s.scope);if(a)return a}if(r)return this.firstByRule(r.name,r.rule,i);for(var o=0;o<this.items.length;++o)if(n.items[o].field===t&&n.items[o].scope===i)return n.items[o].msg;return null},A.prototype.firstRule=function(t,e){var i=this.collect(t,e,!1);return i.length&&i[0].rule||null},A.prototype.has=function(t,e){return void 0===e&&(e=null),!!this.first(t,e)},A.prototype.firstByRule=function(t,e,i){void 0===i&&(i=null);var n=this.collect(t,i,!1).filter(function(t){return t.rule===e})[0];return n&&n.msg||null},A.prototype.firstNot=function(t,e,i){void 0===e&&(e="required"),void 0===i&&(i=null);var n=this.collect(t,i,!1).filter(function(t){return t.rule!==e})[0];return n&&n.msg||null},A.prototype.removeById=function(t){for(var e=this,i=0;i<this.items.length;++i)e.items[i].id===t&&(e.items.splice(i,1),--i)},A.prototype.remove=function(t,i,n){var r=this;t=e(t)?t:String(t);for(var s=0;s<this.items.length;++s)(function(r){return r.id&&n?r.id===n:e(i)?r.field===t&&null===r.scope:r.field===t&&r.scope===i})(r.items[s])&&(r.items.splice(s,1),--s)},A.prototype._selector=function(t){if(t.indexOf(":")>-1){var e=t.split(":");return{name:e[0],rule:e[1]}}return null},A.prototype._scope=function(t){if(t.indexOf(".")>-1){var e=t.split("."),i=e[0];return{name:e.slice(1).join("."),scope:i}}return null};var E=function(t){void 0===t&&(t={}),this.container={},this.merge(t)};E.prototype.hasLocale=function(t){return!!this.container[t]},E.prototype.setDateFormat=function(t,e){this.container[t]||(this.container[t]={}),this.container[t].dateFormat=e},E.prototype.getDateFormat=function(t){if(this.container[t])return this.container[t].dateFormat},E.prototype.getMessage=function(t,e,i){return this.hasMessage(t,e)?this.container[t].messages[e]:i||this._getDefaultMessage(t)},E.prototype.getFieldMessage=function(t,e,i){if(!this.hasLocale(t))return this.getMessage(t,i);var n=this.container[t].custom&&this.container[t].custom[e];return n&&n[i]?n[i]:this.getMessage(t,i)},E.prototype._getDefaultMessage=function(t){return this.hasMessage(t,"_default")?this.container[t].messages._default:this.container.en.messages._default},E.prototype.getAttribute=function(t,e,i){return void 0===i&&(i=""),this.hasAttribute(t,e)?this.container[t].attributes[e]:i},E.prototype.hasMessage=function(t,e){return!!(this.hasLocale(t)&&this.container[t].messages&&this.container[t].messages[e])},E.prototype.hasAttribute=function(t,e){return!!(this.hasLocale(t)&&this.container[t].attributes&&this.container[t].attributes[e])},E.prototype.merge=function(t){this._merge(this.container,t)},E.prototype.setMessage=function(t,e,i){this.hasLocale(t)||(this.container[t]={messages:{},attributes:{}}),this.container[t].messages[e]=i},E.prototype.setAttribute=function(t,e,i){this.hasLocale(t)||(this.container[t]={messages:{},attributes:{}}),this.container[t].attributes[e]=i},E.prototype._merge=function(t,e){var i=this;return f(t)&&f(e)?(Object.keys(e).forEach(function(n){if(f(e[n])){if(!t[n]){$(t,(r={},r[n]={},r));var r}i._merge(t[n],e[n])}else{$(t,(s={},s[n]=e[n],s));var s}}),t):t};var O={locale:"en",delay:0,errorBagName:"errors",dictionary:null,strict:!0,fieldsBagName:"fields",classes:!1,classNames:null,events:"input|blur",inject:!0,fastExit:!0,aria:!0,validity:!1},j=$({},O),N=function(){},F={default:{},current:{}};F.default.get=function(){return O},F.current.get=function(){return j},N.merge=function(t){j=$({},j,t)},N.resolve=function(t){var e=s("$options.$_veeValidate",t,{});return $({},N.current,e)},Object.defineProperties(N,F);var L=function(){};L.generate=function(t,e,i){var n=L.resolveModel(e,i),r=N.resolve(i.context);return{name:L.resolveName(t,i),el:t,listen:!e.modifiers.disable,scope:L.resolveScope(t,e,i),vm:L.makeVM(i.context),expression:e.value,component:i.child,classes:r.classes,classNames:r.classNames,getter:L.resolveGetter(t,i,n),events:L.resolveEvents(t,i)||r.events,model:n,delay:L.resolveDelay(t,i,r),rules:L.resolveRules(t,e),initial:!!e.modifiers.initial,alias:L.resolveAlias(t,i),validity:r.validity,aria:r.aria,initialValue:L.resolveInitialValue(i)}},L.getCtorConfig=function(t){return t.child?s("child.$options.$_veeValidate",t):null},L.resolveRules=function(e,i){return i&&i.expression?"string"==typeof i.value?i.value:~["string","object"].indexOf(typeof i.value.rules)?i.value.rules:i.value:t(e,"rules")},L.resolveInitialValue=function(t){var e=t.data.model||_(t.data.directives,function(t){return"model"===t.name});return e&&e.value},L.makeVM=function(t){return{get $el(){return t.$el},get $refs(){return t.$refs},$watch:t.$watch?t.$watch.bind(t):function(){},$validator:t.$validator?{errors:t.$validator.errors,validate:t.$validator.validate.bind(t.$validator),update:t.$validator.update.bind(t.$validator)}:null}},L.resolveDelay=function(e,i,n){return void 0===n&&(n={}),t(e,"delay")||i.child&&i.child.$attrs&&i.child.$attrs["data-vv-delay"]||n.delay},L.resolveAlias=function(e,i){return function(){return t(e,"as")||i.child&&i.child.$attrs&&i.child.$attrs["data-vv-as"]||e.title||null}},L.resolveEvents=function(e,i){var n=t(e,"validate-on");if(!n&&i.child&&i.child.$attrs&&(n=i.child.$attrs["data-vv-validate-on"]),!n&&i.child){var r=L.getCtorConfig(i);n=r&&r.events}return n},L.resolveScope=function(t,i,n){void 0===n&&(n={});var s=null;return f(i.value)&&(s=i.value.scope),n.child&&e(s)&&(s=n.child.$attrs&&n.child.$attrs["data-vv-scope"]),e(s)?r(t):s},L.resolveModel=function(t,e){if(t.arg)return t.arg;if(f(t.value)&&t.value.arg)return t.value.arg;var i=e.data.model||_(e.data.directives,function(t){return"model"===t.name});return i&&/^[a-z_]+[0-9]*(\w*\.[a-z_]\w*)*$/i.test(i.expression)&&a(i.expression,e.context)?i.expression:null},L.resolveName=function(e,i){var n=t(e,"name");if(!n&&!i.child)return e.name;if(!n&&i.child&&i.child.$attrs&&(n=i.child.$attrs["data-vv-name"]||i.child.$attrs.name),!n&&i.child){var r=L.getCtorConfig(i);return r&&h(r.name)?r.name.bind(i.child)():i.child.name}return n},L.resolveGetter=function(e,i,n){if(n)return function(){return s(n,i.context)};if(i.child){var r=t(e,"value-path")||i.child.$attrs&&i.child.$attrs["data-vv-value-path"];if(r)return function(){return s(r,i.child)};var a=L.getCtorConfig(i);if(a&&h(a.value)){var o=a.value.bind(i.child);return function(){return o()}}return function(){return i.child.value}}switch(e.type){case"checkbox":return function(){var t=document.querySelectorAll('input[name="'+e.name+'"]');if((t=y(t).filter(function(t){return t.checked})).length)return t.map(function(t){return t.value})};case"radio":return function(){var t=document.querySelectorAll('input[name="'+e.name+'"]'),i=_(t,function(t){return t.checked});return i&&i.value};case"file":return function(t){return y(e.files)};case"select-multiple":return function(){return y(e.options).filter(function(t){return t.selected}).map(function(t){return t.value})};default:return function(){return e&&e.value}}};var V={targetOf:null,initial:!1,scope:null,listen:!0,name:null,active:!0,required:!1,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"}},k=function(t,e){void 0===e&&(e={}),this.id=b(),this.el=t,this.updated=!1,this.dependencies=[],this.watchers=[],this.events=[],this.rules={},this.isHeadless||e.targetOf||i(this.el,"id",this.id),e=$({},V,e),this.validity=e.validity,this.aria=e.aria,this.flags={untouched:!0,touched:!1,dirty:!1,pristine:!0,valid:null,invalid:null,validated:!1,pending:!1,required:!1},this.vm=e.vm,this.component=e.component,this.ctorConfig=this.component?s("$options.$_veeValidate",this.component):void 0,this.update(e),this.updated=!1},D={isVue:{},validator:{},isRequired:{},isDisabled:{},isHeadless:{},displayName:{},value:{},rejectsFalse:{}};D.isVue.get=function(){return!!this.component},D.validator.get=function(){return this.vm&&this.vm.$validator?this.vm.$validator:(c("No validator instance detected."),{validate:function(){}})},D.isRequired.get=function(){return!!this.rules.required},D.isDisabled.get=function(){return!(!this.component||!this.component.disabled)||!(!this.el||!this.el.disabled)},D.isHeadless.get=function(){return!this.el},D.displayName.get=function(){return h(this.alias)?this.alias():this.alias},D.value.get=function(){if(h(this.getter))return this.getter()},D.rejectsFalse.get=function(){return this.isVue&&this.ctorConfig?!!this.ctorConfig.rejectsFalse:!this.isHeadless&&"checkbox"===this.el.type},k.prototype.matches=function(t){return t.id?this.id===t.id:void 0===t.name&&void 0===t.scope||(void 0===t.scope?this.name===t.name:void 0===t.name?this.scope===t.scope:t.name===this.name&&t.scope===this.scope)},k.prototype.update=function(t){this.targetOf=t.targetOf||null,this.initial=t.initial||this.initial||!1,this.updated&&!e(t.scope)&&t.scope!==this.scope&&h(this.validator.update)&&this.validator.update(this.id,{scope:t.scope}),this.scope=e(t.scope)?e(this.scope)?null:this.scope:t.scope,this.name=(e(t.name)?t.name:String(t.name))||this.name||null,this.rules=void 0!==t.rules?u(t.rules):this.rules,this.model=t.model||this.model,this.listen=void 0!==t.listen?t.listen:this.listen,this.classes=t.classes||this.classes||!1,this.classNames=t.classNames||this.classNames||V.classNames,this.alias=t.alias||this.alias,this.getter=h(t.getter)?t.getter:this.getter,this.delay=t.delay||this.delay||0,this.events="string"==typeof t.events&&t.events.length?t.events.split("|"):this.events,this.updateDependencies(),this.addActionListeners(),void 0!==t.rules&&(this.flags.required=this.isRequired),this.flags.validated&&void 0!==t.rules&&this.updated&&this.validator.validate("#"+this.id),this.updated=!0,this.isHeadless||(this.updateClasses(),this.addValueListeners(),this.updateAriaAttrs())},k.prototype.reset=function(){var t=this,e={untouched:!0,touched:!1,dirty:!1,pristine:!0,valid:null,invalid:null,validated:!1,pending:!1,required:!1};Object.keys(this.flags).forEach(function(i){t.flags[i]=e[i]}),this.addActionListeners(),this.updateClasses(),this.updateAriaAttrs(),this.updateCustomValidity()},k.prototype.setFlags=function(t){var e=this,i={pristine:"dirty",dirty:"pristine",valid:"invalid",invalid:"valid",touched:"untouched",untouched:"touched"};Object.keys(t).forEach(function(n){e.flags[n]=t[n],i[n]&&void 0===t[i[n]]&&(e.flags[i[n]]=!t[n])}),void 0===t.untouched&&void 0===t.touched&&void 0===t.dirty&&void 0===t.pristine||this.addActionListeners(),this.updateClasses(),this.updateAriaAttrs(),this.updateCustomValidity()},k.prototype.updateDependencies=function(){var t=this;this.dependencies.forEach(function(t){return t.field.destroy()}),this.dependencies=[];var e=Object.keys(this.rules).reduce(function(e,i){return"confirmed"===i?e.push({selector:t.rules[i][0]||t.name+"_confirmation",name:i}):/after|before/.test(i)&&e.push({selector:t.rules[i][0],name:i}),e},[]);e.length&&this.vm&&this.vm.$el&&e.forEach(function(e){var i=e.selector,n=e.name,r=null;if("$"===i[0])r=t.vm.$refs[i.slice(1)];else try{r=t.vm.$el.querySelector(i)}catch(t){r=null}if(!r)try{r=t.vm.$el.querySelector('input[name="'+i+'"]')}catch(t){r=null}if(r){var s={vm:t.vm,classes:t.classes,classNames:t.classNames,delay:t.delay,scope:t.scope,events:t.events.join("|"),initial:t.initial,targetOf:t.id};h(r.$watch)?(s.component=r,s.el=r.$el,s.alias=L.resolveAlias(r.$el,{child:r}),s.getter=L.resolveGetter(r.$el,{child:r})):(s.el=r,s.alias=L.resolveAlias(r,{}),s.getter=L.resolveGetter(r,{})),t.dependencies.push({name:n,field:new k(s.el,s)})}})},k.prototype.unwatch=function(t){if(void 0===t&&(t=null),!t)return this.watchers.forEach(function(t){return t.unwatch()}),void(this.watchers=[]);this.watchers.filter(function(e){return t.test(e.tag)}).forEach(function(t){return t.unwatch()}),this.watchers=this.watchers.filter(function(e){return!t.test(e.tag)})},k.prototype.updateClasses=function(){this.classes&&(g(this.el,this.classNames.dirty,this.flags.dirty),g(this.el,this.classNames.pristine,this.flags.pristine),g(this.el,this.classNames.valid,!!this.flags.valid),g(this.el,this.classNames.invalid,!!this.flags.invalid),g(this.el,this.classNames.touched,this.flags.touched),g(this.el,this.classNames.untouched,this.flags.untouched))},k.prototype.addActionListeners=function(){var t=this;this.unwatch(/class/);var e=function(){t.flags.touched=!0,t.flags.untouched=!1,t.classes&&(g(t.el,t.classNames.touched,!0),g(t.el,t.classNames.untouched,!1)),t.unwatch(/^class_blur$/)},i=w(this.el),n=function(){t.flags.dirty=!0,t.flags.pristine=!1,t.classes&&(g(t.el,t.classNames.pristine,!1),g(t.el,t.classNames.dirty,!0)),t.unwatch(/^class_input$/)};if(this.isVue&&h(this.component.$once))return this.component.$once("input",n),this.component.$once("blur",e),this.watchers.push({tag:"class_input",unwatch:function(){t.component.$off("input",n)}}),void this.watchers.push({tag:"class_blur",unwatch:function(){t.component.$off("blur",e)}});if(!this.isHeadless){this.el.addEventListener(i,n);var r=-1===["radio","checkbox"].indexOf(this.el.type)?"blur":"click";this.el.addEventListener(r,e),this.watchers.push({tag:"class_input",unwatch:function(){t.el.removeEventListener(i,n)}}),this.watchers.push({tag:"class_blur",unwatch:function(){t.el.removeEventListener(r,e)}})}},k.prototype.addValueListeners=function(){var t=this;if(this.unwatch(/^input_.+/),this.listen){var e=this.targetOf?function(){t.validator.validate("#"+t.targetOf)}:function(){for(var e=[],i=arguments.length;i--;)e[i]=arguments[i];(0===e.length||h(Event)&&e[0]instanceof Event||e[0]&&e[0].srcElement)&&(e[0]=t.value),t.validator.validate("#"+t.id,e[0])},i=l(e,this.delay),n=w(this.el),r=this.events.map(function(t){return"input"===t?n:t});if(this.model&&-1!==r.indexOf(n)){var s=this.vm.$watch(this.model,i);this.watchers.push({tag:"input_model",unwatch:s}),r=r.filter(function(t){return t!==n})}r.forEach(function(e){if(t.isVue)return t.component.$on(e,i),void t.watchers.push({tag:"input_vue",unwatch:function(){t.component.$off(e,i)}});if(~["radio","checkbox"].indexOf(t.el.type)){var n=document.querySelectorAll('input[name="'+t.el.name+'"]');y(n).forEach(function(n){n.addEventListener(e,i),t.watchers.push({tag:"input_native",unwatch:function(){n.removeEventListener(e,i)}})})}else t.el.addEventListener(e,i),t.watchers.push({tag:"input_native",unwatch:function(){t.el.removeEventListener(e,i)}})})}},k.prototype.updateAriaAttrs=function(){this.aria&&!this.isHeadless&&h(this.el.setAttribute)&&(this.el.setAttribute("aria-required",this.isRequired?"true":"false"),this.el.setAttribute("aria-invalid",this.flags.invalid?"true":"false"))},k.prototype.updateCustomValidity=function(){this.validity&&!this.isHeadless&&h(this.el.setCustomValidity)&&this.el.setCustomValidity(this.flags.valid?"":this.validator.errors.firstById(this.id)||"")},k.prototype.destroy=function(){this.watchers.forEach(function(t){return t.unwatch()}),this.watchers=[],this.dependencies.forEach(function(t){return t.field.destroy()}),this.dependencies=[]},Object.defineProperties(k.prototype,D);var M=function(){this.items=[]},P={length:{}};P.length.get=function(){return this.items.length},M.prototype.find=function(t){return _(this.items,function(e){return e.matches(t)})},M.prototype.filter=function(t){return Array.isArray(t)?this.items.filter(function(e){return t.some(function(t){return e.matches(t)})}):this.items.filter(function(e){return e.matches(t)})},M.prototype.map=function(t){return this.items.map(t)},M.prototype.remove=function(t){var e=null;if(!(e=t instanceof k?t:this.find(t)))return null;var i=this.items.indexOf(e);return this.items.splice(i,1),e},M.prototype.push=function(t){if(!(t instanceof k))throw d("FieldBag only accepts instances of Field that has an id defined.");if(!t.id)throw d("Field id must be defined.");if(this.find({id:t.id}))throw d("Field with id "+t.id+" is already added.");this.items.push(t)},Object.defineProperties(M.prototype,P);var C={},R="en",S=!0,q=new E({en:{messages:{},attributes:{},custom:{}}}),B=function(t,e){var i=this;void 0===e&&(e={vm:null,fastExit:!0}),this.strict=S,this.errors=new A,this.fields=new M,this.flags={},this._createFields(t),this.paused=!1,this.fastExit=e.fastExit||!1,this.ownerId=e.vm&&e.vm._uid,this.reset=e.vm&&h(e.vm.$nextTick)?function(){return new Promise(function(t,n){e.vm.$nextTick(function(){i.fields.items.forEach(function(t){return t.reset()}),i.errors.clear(),t()})})}:function(){return new Promise(function(t,e){i.fields.items.forEach(function(t){return t.reset()}),i.errors.clear(),t()})},this.clean=function(){c("validator.clean is marked for deprecation, please use validator.reset instead."),i.reset()}},T={dictionary:{},locale:{},rules:{}},H={dictionary:{},locale:{},rules:{}};T.dictionary.get=function(){return q},H.dictionary.get=function(){return q},T.locale.get=function(){return R},T.locale.set=function(t){B.locale=t},H.locale.get=function(){return R},H.locale.set=function(t){q.hasLocale(t)||c("You are setting the validator locale to a locale that is not defined in the dictionary. English messages may still be generated."),R=t},T.rules.get=function(){return C},H.rules.get=function(){return C},B.create=function(t,e){return new B(t,e)},B.extend=function(t,e){B._guardExtend(t,e),B._merge(t,e)},B.remove=function(t){delete C[t]},B.setLocale=function(t){void 0===t&&(t="en"),B.locale=t},B.installDateTimeValidators=function(){c("Date validations are now installed by default, you no longer need to install it.")},B.prototype.installDateTimeValidators=function(){c("Date validations are now installed by default, you no longer need to install it.")},B.setStrictMode=function(t){void 0===t&&(t=!0),S=t},B.updateDictionary=function(t){q.merge(t)},B.addLocale=function(t){if(t.name){this.updateDictionary((e={},e[t.name]=t,e));var e}else c("Your locale must have a name property")},B.prototype.addLocale=function(t){B.addLocale(t)},B.prototype.localize=function(t,e){B.localize(t,e)},B.localize=function(t,e){e&&(e=$({},e,{name:t}),B.addLocale(e)),B.locale=t},B.prototype.attach=function(t){arguments.length>1&&(t=$({},{name:arguments[0],rules:arguments[1]},arguments[2]||{vm:{$validator:this}}));var e=t.initialValue;return t instanceof k||(t=new k(t.el||null,t)),this.fields.push(t),t.initial?this.validate("#"+t.id,e||t.value):this._validate(t,e||t.value,!0).then(function(e){t.flags.valid=e,t.flags.invalid=!e}),this._addFlag(t,t.scope),t},B.prototype.flag=function(t,e){var i=this._resolveField(t);i&&e&&i.setFlags(e)},B.prototype.detach=function(t,i){var n=t instanceof k?t:this._resolveField(t,i);if(n){n.destroy(),this.errors.remove(n.name,n.scope,n.id),this.fields.remove(n);var r=this.flags;!e(n.scope)&&r["$"+n.scope]?delete r["$"+n.scope][n.name]:e(n.scope)&&delete r[n.name],this.flags=$({},r)}},B.prototype.extend=function(t,e){B.extend(t,e)},B.prototype.update=function(t,i){var n=i.scope,r=this._resolveField("#"+t);this.errors.update(t,{scope:n}),!e(r.scope)&&this.flags["$"+r.scope]?delete this.flags["$"+r.scope][r.name]:e(r.scope)&&delete this.flags[r.name],this._addFlag(r,n)},B.prototype.remove=function(t){B.remove(t)},B.prototype.setLocale=function(t){this.locale=t},B.prototype.updateDictionary=function(t){B.updateDictionary(t)},B.prototype.validate=function(t,e,i){if(void 0===i&&(i=null),this.paused)return Promise.resolve(!0);if(0===arguments.length)return this.validateScopes();if(1===arguments.length&&"*"===arguments[0])return this.validateAll();if(1===arguments.length&&"string"==typeof arguments[0]&&/^(.+)\.\*$/.test(arguments[0])){var n=arguments[0].match(/^(.+)\.\*$/)[1];return this.validateAll(n)}var r=this._resolveField(t,i);if(!r)return this._handleFieldNotFound(t,i);this.errors.remove(r.name,r.scope,r.id),r.flags.pending=!0,1===arguments.length&&(e=r.value);var s=r.isDisabled;return this._validate(r,e,s).then(function(t){return r.setFlags({pending:!1,valid:t,validated:!0}),s?Promise.resolve(!0):t})},B.prototype.pause=function(){return this.paused=!0,this},B.prototype.resume=function(){return this.paused=!1,this},B.prototype.validateAll=function(t){var e=arguments,i=this;if(this.paused)return Promise.resolve(!0);var n=null,r=!1;"string"==typeof t?n={scope:t}:f(t)?(n=Object.keys(t).map(function(t){return{name:t,scope:e[1]||null}}),r=!0):0===arguments.length?n={scope:null}:Array.isArray(t)&&(n=t.map(function(t){return{name:t,scope:e[1]||null}}));var s=this.fields.filter(n).map(function(e){return i.validate("#"+e.id,r?t[e.name]:e.value)});return Promise.all(s).then(function(t){return t.every(function(t){return t})})},B.prototype.validateScopes=function(){var t=this;if(this.paused)return Promise.resolve(!0);var e=this.fields.map(function(e){return t.validate("#"+e.id,e.value)});return Promise.all(e).then(function(t){return t.every(function(t){return t})})},B.prototype._createFields=function(t){var e=this;t&&Object.keys(t).forEach(function(i){var n=$({},{name:i,rules:t[i]});e.attach(n)})},B.prototype._getDateFormat=function(t){var e=null;return t.date_format&&Array.isArray(t.date_format)&&(e=t.date_format[0]),e||this.dictionary.getDateFormat(this.locale)},B.prototype._isADateRule=function(t){return!!~["after","before","date_between","date_format"].indexOf(t)},B.prototype._formatErrorMessage=function(t,e,i,n){void 0===i&&(i={}),void 0===n&&(n=null);var r=this._getFieldDisplayName(t),s=this._getLocalizedParams(e,n);if(!this.dictionary.hasLocale(R)){var a=this.dictionary.getFieldMessage("en",t.name,e.name);return h(a)?a(r,s,i):a}var o=this.dictionary.getFieldMessage(R,t.name,e.name);return h(o)?o(r,s,i):o},B.prototype._getLocalizedParams=function(t,e){return void 0===e&&(e=null),~["after","before","confirmed"].indexOf(t.name)&&t.params&&t.params[0]?[e||this.dictionary.getAttribute(R,t.params[0],t.params[0])].concat(t.params.slice(1)):t.params},B.prototype._getFieldDisplayName=function(t){return t.displayName||this.dictionary.getAttribute(R,t.name,t.name)},B.prototype._addFlag=function(t,i){if(void 0===i&&(i=null),e(i)){this.flags=$({},this.flags,(n={},n[""+t.name]=t.flags,n));var n}else{var r,s=$({},this.flags["$"+i]||{},(r={},r[""+t.name]=t.flags,r));this.flags=$({},this.flags,(a={},a["$"+i]=s,a));var a}},B.prototype._test=function(t,e,i,n){var r=this,s=C[i.name],a=Array.isArray(i.params)?y(i.params):[],o=null;if(!s||"function"!=typeof s)throw d("No such validator '"+i.name+"' exists.");if(/(confirmed|after|before)/.test(i.name)){var l=_(t.dependencies,function(t){return t.name===i.name});l&&(o=l.field.displayName,a=[l.field.value].concat(a.slice(1)))}else"required"===i.name&&t.rejectsFalse&&(a=a.length?a:[!0]);if(this._isADateRule(i.name)){var u=this._getDateFormat(t.rules);"date_format"!==i.name&&a.push(u)}var c=s(e,a);return h(c.then)?c.then(function(e){var s=!0,a={};return Array.isArray(e)?s=e.every(function(t){return f(t)?t.valid:t}):(s=f(e)?e.valid:e,a=e.data),s||n||r.errors.add({id:t.id,field:t.name,msg:r._formatErrorMessage(t,i,a,o),rule:i.name,scope:t.scope}),s}):(f(c)||(c={valid:c,data:{}}),c.valid||n||this.errors.add({id:t.id,field:t.name,msg:this._formatErrorMessage(t,i,c.data,o),rule:i.name,scope:t.scope}),c.valid)},B._merge=function(t,e){h(e)?C[t]=e:(C[t]=e.validate,h(e.getMessage)&&q.setMessage(R,t,e.getMessage),e.messages&&q.merge(Object.keys(e.messages).reduce(function(i,n){var r=i;r[n]={messages:(s={},s[t]=e.messages[n],s)};var s;return r},{})))},B._guardExtend=function(t,e){if(!h(e)){if(!h(e.validate))throw d("Extension Error: The validator '"+t+"' must be a function or have a 'validate' method.");if(!h(e.getMessage)&&!f(e.messages))throw d("Extension Error: The validator '"+t+"' must have a 'getMessage' method or have a 'messages' object.")}},B.prototype._resolveField=function(t,i){if(!e(i))return this.fields.find({name:t,scope:i});if("#"===t[0])return this.fields.find({id:t.slice(1)});if(t.indexOf(".")>-1){var n=t.split("."),r=n[0],s=n.slice(1),a=this.fields.find({name:s.join("."),scope:r});if(a)return a}return this.fields.find({name:t,scope:null})},B.prototype._handleFieldNotFound=function(t,i){if(!this.strict)return Promise.resolve(!0);var n=e(i)?t:(e(i)?"":i+".")+t;throw d('Validating a non-existent field: "'+n+'". Use "attach()" first.')},B.prototype._validate=function(t,i,n){var r=this;if(void 0===n&&(n=!1),!t.isRequired&&(e(i)||""===i))return Promise.resolve(!0);var s=[],a=!1;return Object.keys(t.rules).some(function(e){var o=r._test(t,i,{name:e,params:t.rules[e]},n);if(h(o.then))s.push(o);else if(r.fastExit&&!o)a=!0;else{var l=new Promise(function(t){t(o)});s.push(l)}return a}),a?Promise.resolve(!1):Promise.all(s).then(function(t){return t.every(function(t){return t})})},Object.defineProperties(B.prototype,T),Object.defineProperties(B,H);var z,I=function(t,e){return"undefined"==typeof Proxy?t:new Proxy(t,e)}({},{get:function(t,e){return 0===String(e).indexOf("$")?I:{untouched:!0,touched:!1,dirty:!1,pristine:!0,valid:null,invalid:null,validated:!1,pending:!1,required:!1}}}),G=function(t){return!!t&&(!(!Array.isArray(t)||!~t.indexOf("$validator"))||!(!f(t)||!t.$validator))},Y=function(t,e){return new B(null,{vm:t,fastExit:e.fastExit})},U={provide:function(){return this.$validator&&!x(this.$vnode)?{$validator:this.$validator}:{}},beforeCreate:function(){if(!x(this.$vnode)){this.$parent||N.merge(this.$options.$_veeValidate||{});var t=N.resolve(this),e=this.$options._base;this.$options.$validates&&(c('The ctor $validates option has been deprecated please set the $_veeValidate.validator option to "new" instead'),this.$validator=Y(this,t)),(!this.$parent||this.$options.$_veeValidate&&/new/.test(this.$options.$_veeValidate.validator))&&(this.$validator=Y(this,t));var i=G(this.$options.inject);this.$validator||!t.inject||i||(this.$validator=Y(this,t)),(i||this.$validator)&&(!i&&this.$validator&&(e.util.defineReactive(this.$validator,"errors",this.$validator.errors),e.util.defineReactive(this.$validator,"flags",this.$validator.flags)),this.$options.computed||(this.$options.computed={}),this.$options.computed[t.errorBagName||"errors"]=function(){return this.$validator.errors},this.$options.computed[t.fieldsBagName||"fields"]=function(){return Object.keys(this.$validator.flags).length?this.$validator.flags:I})}},beforeDestroy:function(){x(this.$vnode)||this.$validator&&this.$validator.ownerId===this._uid&&h(this.$validator.pause)&&this.$validator.pause()}},J=function(e,i){return i&&i.$validator?i.$validator.fields.find({id:t(e,"id")}):null},K={bind:function(t,e,i){var n=i.context.$validator;if(n){var r=L.generate(t,e,i);n.attach(r)}else c("No validator instance is present on vm, did you forget to inject '$validator'?")},inserted:function(t,e,i){var n=J(t,i.context),r=L.resolveScope(t,e,i);n&&r!==n.scope&&(n.update({scope:r}),n.updated=!1)},update:function(t,e,i){var r=J(t,i.context);if(!(!r||r.updated&&n(e.value,e.oldValue))){var s=L.resolveScope(t,e,i),a=L.resolveRules(t,e);r.update({scope:s,rules:a})}},unbind:function(t,e,i){var n=i.context,r=J(t,n);r&&n.$validator.detach(r)}},Q=function(t){return Array.isArray(t)?t.reduce(function(t,e){return~e.indexOf(".")?t[e.split(".")[1]]=e:t[e]=e,t},{}):t};return{install:function(t,e){void 0===e&&(e={}),z?c("already installed, Vue.use(VeeValidate) should only be called once."):(z=t,N.merge(e),N.current.dictionary&&B.updateDictionary(N.current.dictionary),e&&(e.locale&&(B.locale=e.locale),e.strict&&B.setStrictMode(N.current.strict)),z.mixin(U),z.directive("validate",K))},use:function(t,e){if(void 0===e&&(e={}),!h(t))return c("The plugin must be a callable function");t({Validator:B,ErrorBag:A,Rules:B.rules},e)},directive:K,mixin:U,mapFields:function(t){var e=Q(t);return Object.keys(e).reduce(function(t,i){var n=e[i];return t[i]=function(){if(this.$validator.flags[n])return this.$validator.flags[n];if(n.indexOf(".")<=0)return{};var t=n.split("."),e=t[0],i=t.slice(1);return e=this.$validator.flags["$"+e],i=i.join("."),e&&e[i]?e[i]:{}},t},{})},Validator:B,ErrorBag:A,version:"2.0.0-rc.20"}});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.VeeValidate=e()}(this,function(){"use strict";var t=function(t,e){return t.getAttribute("data-vv-"+e)},e=function(t){return null===t||void 0===t},i=function(t,e,i){return t.setAttribute("data-vv-"+e,i)},n=function(t,e){if(t instanceof RegExp&&e instanceof RegExp)return n(t.source,e.source)&&n(t.flags,e.flags);if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;for(var i=0;i<t.length;i++)if(!n(t[i],e[i]))return!1;return!0}return f(t)&&f(e)?Object.keys(t).every(function(i){return n(t[i],e[i])})&&Object.keys(e).every(function(i){return n(t[i],e[i])}):t===e},r=function(i){var n=t(i,"scope");return e(n)&&i.form&&(n=t(i.form,"scope")),e(n)?null:n},s=function(t,e,i){if(void 0===i&&(i=void 0),!t||!e)return i;var n=e;return t.split(".").every(function(t){return Object.prototype.hasOwnProperty.call(n,t)||void 0!==n[t]?(n=n[t],!0):(n=i,!1)}),n},a=function(t,e){var i=e;return t.split(".").every(function(t){return!!Object.prototype.hasOwnProperty.call(i,t)&&(i=i[t],!0)})},o=function(t){var e=[],i=t.split(":")[0];return~t.indexOf(":")&&(e=t.split(":").slice(1).join(":").split(",")),{name:i,params:e}},l=function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=!1),0===e)return t;var n;return function(){for(var r=[],s=arguments.length;s--;)r[s]=arguments[s];var a=i&&!n;clearTimeout(n),n=setTimeout(function(){n=null,i||t.apply(void 0,r)},e),a&&t.apply(void 0,r)}},u=function(t){return t?f(t)?Object.keys(t).reduce(function(e,i){var n=[];return n=!0===t[i]?[]:Array.isArray(t[i])?t[i]:[t[i]],!1!==t[i]&&(e[i]=n),e},{}):"string"!=typeof t?(c("rules must be either a string or an object."),{}):t.split("|").reduce(function(t,e){var i=o(e);return i.name?(t[i.name]=i.params,t):t},{}):{}},c=function(t){console.warn("[vee-validate] "+t)},d=function(t){return new Error("[vee-validate] "+t)},f=function(t){return null!==t&&t&&"object"==typeof t&&!Array.isArray(t)},h=function(t){return"function"==typeof t},v=function(t,e){return t.classList?t.classList.contains(e):!!t.className.match(new RegExp("(\\s|^)"+e+"(\\s|$)"))},p=function(t,e){t.classList?t.classList.add(e):v(t,e)||(t.className+=" "+e)},m=function(t,e){if(t.classList)t.classList.remove(e);else if(v(t,e)){var i=new RegExp("(\\s|^)"+e+"(\\s|$)");t.className=t.className.replace(i," ")}},g=function(t,e,i){if(t&&e)return i?p(t,e):void m(t,e)},y=function(t){if(h(Array.from))return Array.from(t);for(var e=[],i=t.length,n=0;n<i;n++)e.push(t[n]);return e},$=function(t){for(var e=[],i=arguments.length-1;i-- >0;)e[i]=arguments[i+1];if(h(Object.assign))return Object.assign.apply(Object,[t].concat(e));if(null==t)throw new TypeError("Cannot convert undefined or null to object");var n=Object(t);return e.forEach(function(t){null!=t&&Object.keys(t).forEach(function(e){n[e]=t[e]})}),n},b=function(){return"_"+Math.random().toString(36).substr(2,9)},_=function(t,e){var i=y(t);if(h(i.find))return i.find(e);var n;return i.some(function(t){return!!e(t)&&(n=t,!0)}),n},w=function(t){return t&&("SELECT"===t.tagName||~["radio","checkbox","file"].indexOf(t.type))?"change":"input"},x=function(t){if(!t)return!1;var e=t.componentOptions.tag;return/keep-alive|transition|transition-group/.test(e)},A=function(){this.items=[]};A.prototype.add=function(t){arguments.length>1&&(t={field:arguments[0],msg:arguments[1],rule:arguments[2],scope:e(arguments[3])?null:arguments[3]}),t.scope=e(t.scope)?null:t.scope,this.items.push(t)},A.prototype.update=function(t,e){var i=_(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)}},A.prototype.all=function(t){return e(t)?this.items.map(function(t){return t.msg}):this.items.filter(function(e){return e.scope===t}).map(function(t){return t.msg})},A.prototype.any=function(t){return e(t)?!!this.items.length:!!this.items.filter(function(e){return e.scope===t}).length},A.prototype.clear=function(t){var i=this;e(t)&&(t=null);for(var n=0;n<this.items.length;++n)i.items[n].scope===t&&(i.items.splice(n,1),--n)},A.prototype.collect=function(t,i,n){if(void 0===n&&(n=!0),!t){var r={};return this.items.forEach(function(t){r[t.field]||(r[t.field]=[]),r[t.field].push(n?t.msg:t)}),r}return t=e(t)?t:String(t),e(i)?this.items.filter(function(e){return e.field===t}).map(function(t){return n?t.msg:t}):this.items.filter(function(e){return e.field===t&&e.scope===i}).map(function(t){return n?t.msg:t})},A.prototype.count=function(){return this.items.length},A.prototype.firstById=function(t){var e=_(this.items,function(e){return e.id===t});return e?e.msg:null},A.prototype.first=function(t,i){var n=this;void 0===i&&(i=null),t=e(t)?t:String(t);var r=this._selector(t),s=this._scope(t);if(s){var a=this.first(s.name,s.scope);if(a)return a}if(r)return this.firstByRule(r.name,r.rule,i);for(var o=0;o<this.items.length;++o)if(n.items[o].field===t&&n.items[o].scope===i)return n.items[o].msg;return null},A.prototype.firstRule=function(t,e){var i=this.collect(t,e,!1);return i.length&&i[0].rule||null},A.prototype.has=function(t,e){return void 0===e&&(e=null),!!this.first(t,e)},A.prototype.firstByRule=function(t,e,i){void 0===i&&(i=null);var n=this.collect(t,i,!1).filter(function(t){return t.rule===e})[0];return n&&n.msg||null},A.prototype.firstNot=function(t,e,i){void 0===e&&(e="required"),void 0===i&&(i=null);var n=this.collect(t,i,!1).filter(function(t){return t.rule!==e})[0];return n&&n.msg||null},A.prototype.removeById=function(t){for(var e=this,i=0;i<this.items.length;++i)e.items[i].id===t&&(e.items.splice(i,1),--i)},A.prototype.remove=function(t,i,n){var r=this;t=e(t)?t:String(t);for(var s=0;s<this.items.length;++s)(function(r){return r.id&&n?r.id===n:e(i)?r.field===t&&null===r.scope:r.field===t&&r.scope===i})(r.items[s])&&(r.items.splice(s,1),--s)},A.prototype._selector=function(t){if(t.indexOf(":")>-1){var e=t.split(":");return{name:e[0],rule:e[1]}}return null},A.prototype._scope=function(t){if(t.indexOf(".")>-1){var e=t.split("."),i=e[0];return{name:e.slice(1).join("."),scope:i}}return null};var E=function(t){void 0===t&&(t={}),this.container={},this.merge(t)};E.prototype.hasLocale=function(t){return!!this.container[t]},E.prototype.setDateFormat=function(t,e){this.container[t]||(this.container[t]={}),this.container[t].dateFormat=e},E.prototype.getDateFormat=function(t){if(this.container[t])return this.container[t].dateFormat},E.prototype.getMessage=function(t,e,i){return this.hasMessage(t,e)?this.container[t].messages[e]:i||this._getDefaultMessage(t)},E.prototype.getFieldMessage=function(t,e,i){if(!this.hasLocale(t))return this.getMessage(t,i);var n=this.container[t].custom&&this.container[t].custom[e];return n&&n[i]?n[i]:this.getMessage(t,i)},E.prototype._getDefaultMessage=function(t){return this.hasMessage(t,"_default")?this.container[t].messages._default:this.container.en.messages._default},E.prototype.getAttribute=function(t,e,i){return void 0===i&&(i=""),this.hasAttribute(t,e)?this.container[t].attributes[e]:i},E.prototype.hasMessage=function(t,e){return!!(this.hasLocale(t)&&this.container[t].messages&&this.container[t].messages[e])},E.prototype.hasAttribute=function(t,e){return!!(this.hasLocale(t)&&this.container[t].attributes&&this.container[t].attributes[e])},E.prototype.merge=function(t){this._merge(this.container,t)},E.prototype.setMessage=function(t,e,i){this.hasLocale(t)||(this.container[t]={messages:{},attributes:{}}),this.container[t].messages[e]=i},E.prototype.setAttribute=function(t,e,i){this.hasLocale(t)||(this.container[t]={messages:{},attributes:{}}),this.container[t].attributes[e]=i},E.prototype._merge=function(t,e){var i=this;return f(t)&&f(e)?(Object.keys(e).forEach(function(n){if(f(e[n])){if(!t[n]){$(t,(r={},r[n]={},r));var r}i._merge(t[n],e[n])}else{$(t,(s={},s[n]=e[n],s));var s}}),t):t};var O={locale:"en",delay:0,errorBagName:"errors",dictionary:null,strict:!0,fieldsBagName:"fields",classes:!1,classNames:null,events:"input|blur",inject:!0,fastExit:!0,aria:!0,validity:!1},j=$({},O),N=function(){},F={default:{},current:{}};F.default.get=function(){return O},F.current.get=function(){return j},N.merge=function(t){j=$({},j,t)},N.resolve=function(t){var e=s("$options.$_veeValidate",t,{});return $({},N.current,e)},Object.defineProperties(N,F);var L=function(){};L.generate=function(t,e,i){var n=L.resolveModel(e,i),r=N.resolve(i.context);return{name:L.resolveName(t,i),el:t,listen:!e.modifiers.disable,scope:L.resolveScope(t,e,i),vm:L.makeVM(i.context),expression:e.value,component:i.child,classes:r.classes,classNames:r.classNames,getter:L.resolveGetter(t,i,n),events:L.resolveEvents(t,i)||r.events,model:n,delay:L.resolveDelay(t,i,r),rules:L.resolveRules(t,e),initial:!!e.modifiers.initial,alias:L.resolveAlias(t,i),validity:r.validity,aria:r.aria,initialValue:L.resolveInitialValue(i)}},L.getCtorConfig=function(t){return t.child?s("child.$options.$_veeValidate",t):null},L.resolveRules=function(e,i){return i&&i.expression?"string"==typeof i.value?i.value:~["string","object"].indexOf(typeof i.value.rules)?i.value.rules:i.value:t(e,"rules")},L.resolveInitialValue=function(t){var e=t.data.model||_(t.data.directives,function(t){return"model"===t.name});return e&&e.value},L.makeVM=function(t){return{get $el(){return t.$el},get $refs(){return t.$refs},$watch:t.$watch?t.$watch.bind(t):function(){},$validator:t.$validator?{errors:t.$validator.errors,validate:t.$validator.validate.bind(t.$validator),update:t.$validator.update.bind(t.$validator)}:null}},L.resolveDelay=function(e,i,n){return void 0===n&&(n={}),t(e,"delay")||i.child&&i.child.$attrs&&i.child.$attrs["data-vv-delay"]||n.delay},L.resolveAlias=function(e,i){return function(){return t(e,"as")||i.child&&i.child.$attrs&&i.child.$attrs["data-vv-as"]||e.title||null}},L.resolveEvents=function(e,i){var n=t(e,"validate-on");if(!n&&i.child&&i.child.$attrs&&(n=i.child.$attrs["data-vv-validate-on"]),!n&&i.child){var r=L.getCtorConfig(i);n=r&&r.events}return n},L.resolveScope=function(t,i,n){void 0===n&&(n={});var s=null;return f(i.value)&&(s=i.value.scope),n.child&&e(s)&&(s=n.child.$attrs&&n.child.$attrs["data-vv-scope"]),e(s)?r(t):s},L.resolveModel=function(t,e){if(t.arg)return t.arg;if(f(t.value)&&t.value.arg)return t.value.arg;var i=e.data.model||_(e.data.directives,function(t){return"model"===t.name});return i&&/^[a-z_]+[0-9]*(\w*\.[a-z_]\w*)*$/i.test(i.expression)&&a(i.expression,e.context)?i.expression:null},L.resolveName=function(e,i){var n=t(e,"name");if(!n&&!i.child)return e.name;if(!n&&i.child&&i.child.$attrs&&(n=i.child.$attrs["data-vv-name"]||i.child.$attrs.name),!n&&i.child){var r=L.getCtorConfig(i);return r&&h(r.name)?r.name.bind(i.child)():i.child.name}return n},L.resolveGetter=function(e,i,n){if(n)return function(){return s(n,i.context)};if(i.child){var r=t(e,"value-path")||i.child.$attrs&&i.child.$attrs["data-vv-value-path"];if(r)return function(){return s(r,i.child)};var a=L.getCtorConfig(i);if(a&&h(a.value)){var o=a.value.bind(i.child);return function(){return o()}}return function(){return i.child.value}}switch(e.type){case"checkbox":return function(){var t=document.querySelectorAll('input[name="'+e.name+'"]');if((t=y(t).filter(function(t){return t.checked})).length)return t.map(function(t){return t.value})};case"radio":return function(){var t=document.querySelectorAll('input[name="'+e.name+'"]'),i=_(t,function(t){return t.checked});return i&&i.value};case"file":return function(t){return y(e.files)};case"select-multiple":return function(){return y(e.options).filter(function(t){return t.selected}).map(function(t){return t.value})};default:return function(){return e&&e.value}}};var V={targetOf:null,initial:!1,scope:null,listen:!0,name:null,active:!0,required:!1,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"}},k=function(t,e){void 0===e&&(e={}),this.id=b(),this.el=t,this.updated=!1,this.dependencies=[],this.watchers=[],this.events=[],this.rules={},this.isHeadless||e.targetOf||i(this.el,"id",this.id),e=$({},V,e),this.validity=e.validity,this.aria=e.aria,this.flags={untouched:!0,touched:!1,dirty:!1,pristine:!0,valid:null,invalid:null,validated:!1,pending:!1,required:!1},this.vm=e.vm,this.component=e.component,this.ctorConfig=this.component?s("$options.$_veeValidate",this.component):void 0,this.update(e),this.updated=!1},D={isVue:{},validator:{},isRequired:{},isDisabled:{},isHeadless:{},displayName:{},value:{},rejectsFalse:{}};D.isVue.get=function(){return!!this.component},D.validator.get=function(){return this.vm&&this.vm.$validator?this.vm.$validator:(c("No validator instance detected."),{validate:function(){}})},D.isRequired.get=function(){return!!this.rules.required},D.isDisabled.get=function(){return!(!this.component||!this.component.disabled)||!(!this.el||!this.el.disabled)},D.isHeadless.get=function(){return!this.el},D.displayName.get=function(){return h(this.alias)?this.alias():this.alias},D.value.get=function(){if(h(this.getter))return this.getter()},D.rejectsFalse.get=function(){return this.isVue&&this.ctorConfig?!!this.ctorConfig.rejectsFalse:!this.isHeadless&&"checkbox"===this.el.type},k.prototype.matches=function(t){return t.id?this.id===t.id:void 0===t.name&&void 0===t.scope||(void 0===t.scope?this.name===t.name:void 0===t.name?this.scope===t.scope:t.name===this.name&&t.scope===this.scope)},k.prototype.update=function(t){this.targetOf=t.targetOf||null,this.initial=t.initial||this.initial||!1,this.updated&&!e(t.scope)&&t.scope!==this.scope&&h(this.validator.update)&&this.validator.update(this.id,{scope:t.scope}),this.scope=e(t.scope)?e(this.scope)?null:this.scope:t.scope,this.name=(e(t.name)?t.name:String(t.name))||this.name||null,this.rules=void 0!==t.rules?u(t.rules):this.rules,this.model=t.model||this.model,this.listen=void 0!==t.listen?t.listen:this.listen,this.classes=t.classes||this.classes||!1,this.classNames=t.classNames||this.classNames||V.classNames,this.alias=t.alias||this.alias,this.getter=h(t.getter)?t.getter:this.getter,this.delay=t.delay||this.delay||0,this.events="string"==typeof t.events&&t.events.length?t.events.split("|"):this.events,this.updateDependencies(),this.addActionListeners(),void 0!==t.rules&&(this.flags.required=this.isRequired),this.flags.validated&&void 0!==t.rules&&this.updated&&this.validator.validate("#"+this.id),this.updated=!0,this.isHeadless||(this.updateClasses(),this.addValueListeners(),this.updateAriaAttrs())},k.prototype.reset=function(){var t=this,e={untouched:!0,touched:!1,dirty:!1,pristine:!0,valid:null,invalid:null,validated:!1,pending:!1,required:!1};Object.keys(this.flags).forEach(function(i){t.flags[i]=e[i]}),this.addActionListeners(),this.updateClasses(),this.updateAriaAttrs(),this.updateCustomValidity()},k.prototype.setFlags=function(t){var e=this,i={pristine:"dirty",dirty:"pristine",valid:"invalid",invalid:"valid",touched:"untouched",untouched:"touched"};Object.keys(t).forEach(function(n){e.flags[n]=t[n],i[n]&&void 0===t[i[n]]&&(e.flags[i[n]]=!t[n])}),void 0===t.untouched&&void 0===t.touched&&void 0===t.dirty&&void 0===t.pristine||this.addActionListeners(),this.updateClasses(),this.updateAriaAttrs(),this.updateCustomValidity()},k.prototype.updateDependencies=function(){var t=this;this.dependencies.forEach(function(t){return t.field.destroy()}),this.dependencies=[];var e=Object.keys(this.rules).reduce(function(e,i){return"confirmed"===i?e.push({selector:t.rules[i][0]||t.name+"_confirmation",name:i}):/after|before/.test(i)&&e.push({selector:t.rules[i][0],name:i}),e},[]);e.length&&this.vm&&this.vm.$el&&e.forEach(function(e){var i=e.selector,n=e.name,r=null;if("$"===i[0])r=t.vm.$refs[i.slice(1)];else try{r=t.vm.$el.querySelector(i)}catch(t){r=null}if(!r)try{r=t.vm.$el.querySelector('input[name="'+i+'"]')}catch(t){r=null}if(r){var s={vm:t.vm,classes:t.classes,classNames:t.classNames,delay:t.delay,scope:t.scope,events:t.events.join("|"),initial:t.initial,targetOf:t.id};h(r.$watch)?(s.component=r,s.el=r.$el,s.alias=L.resolveAlias(r.$el,{child:r}),s.getter=L.resolveGetter(r.$el,{child:r})):(s.el=r,s.alias=L.resolveAlias(r,{}),s.getter=L.resolveGetter(r,{})),t.dependencies.push({name:n,field:new k(s.el,s)})}})},k.prototype.unwatch=function(t){if(void 0===t&&(t=null),!t)return this.watchers.forEach(function(t){return t.unwatch()}),void(this.watchers=[]);this.watchers.filter(function(e){return t.test(e.tag)}).forEach(function(t){return t.unwatch()}),this.watchers=this.watchers.filter(function(e){return!t.test(e.tag)})},k.prototype.updateClasses=function(){this.classes&&(g(this.el,this.classNames.dirty,this.flags.dirty),g(this.el,this.classNames.pristine,this.flags.pristine),g(this.el,this.classNames.valid,!!this.flags.valid),g(this.el,this.classNames.invalid,!!this.flags.invalid),g(this.el,this.classNames.touched,this.flags.touched),g(this.el,this.classNames.untouched,this.flags.untouched))},k.prototype.addActionListeners=function(){var t=this;this.unwatch(/class/);var e=function(){t.flags.touched=!0,t.flags.untouched=!1,t.classes&&(g(t.el,t.classNames.touched,!0),g(t.el,t.classNames.untouched,!1)),t.unwatch(/^class_blur$/)},i=w(this.el),n=function(){t.flags.dirty=!0,t.flags.pristine=!1,t.classes&&(g(t.el,t.classNames.pristine,!1),g(t.el,t.classNames.dirty,!0)),t.unwatch(/^class_input$/)};if(this.isVue&&h(this.component.$once))return this.component.$once("input",n),this.component.$once("blur",e),this.watchers.push({tag:"class_input",unwatch:function(){t.component.$off("input",n)}}),void this.watchers.push({tag:"class_blur",unwatch:function(){t.component.$off("blur",e)}});if(!this.isHeadless){this.el.addEventListener(i,n);var r=-1===["radio","checkbox"].indexOf(this.el.type)?"blur":"click";this.el.addEventListener(r,e),this.watchers.push({tag:"class_input",unwatch:function(){t.el.removeEventListener(i,n)}}),this.watchers.push({tag:"class_blur",unwatch:function(){t.el.removeEventListener(r,e)}})}},k.prototype.addValueListeners=function(){var t=this;if(this.unwatch(/^input_.+/),this.listen){var e=this.targetOf?function(){t.validator.validate("#"+t.targetOf)}:function(){for(var e=[],i=arguments.length;i--;)e[i]=arguments[i];(0===e.length||h(Event)&&e[0]instanceof Event||e[0]&&e[0].srcElement)&&(e[0]=t.value),t.validator.validate("#"+t.id,e[0])},i=l(e,this.delay),n=w(this.el),r=this.events.map(function(t){return"input"===t?n:t});if(this.model&&-1!==r.indexOf(n)){var s=this.vm.$watch(this.model,i);this.watchers.push({tag:"input_model",unwatch:s}),r=r.filter(function(t){return t!==n})}r.forEach(function(e){if(t.isVue)return t.component.$on(e,i),void t.watchers.push({tag:"input_vue",unwatch:function(){t.component.$off(e,i)}});if(~["radio","checkbox"].indexOf(t.el.type)){var n=document.querySelectorAll('input[name="'+t.el.name+'"]');y(n).forEach(function(n){n.addEventListener(e,i),t.watchers.push({tag:"input_native",unwatch:function(){n.removeEventListener(e,i)}})})}else t.el.addEventListener(e,i),t.watchers.push({tag:"input_native",unwatch:function(){t.el.removeEventListener(e,i)}})})}},k.prototype.updateAriaAttrs=function(){this.aria&&!this.isHeadless&&h(this.el.setAttribute)&&(this.el.setAttribute("aria-required",this.isRequired?"true":"false"),this.el.setAttribute("aria-invalid",this.flags.invalid?"true":"false"))},k.prototype.updateCustomValidity=function(){this.validity&&!this.isHeadless&&h(this.el.setCustomValidity)&&this.el.setCustomValidity(this.flags.valid?"":this.validator.errors.firstById(this.id)||"")},k.prototype.destroy=function(){this.watchers.forEach(function(t){return t.unwatch()}),this.watchers=[],this.dependencies.forEach(function(t){return t.field.destroy()}),this.dependencies=[]},Object.defineProperties(k.prototype,D);var M=function(){this.items=[]},P={length:{}};P.length.get=function(){return this.items.length},M.prototype.find=function(t){return _(this.items,function(e){return e.matches(t)})},M.prototype.filter=function(t){return Array.isArray(t)?this.items.filter(function(e){return t.some(function(t){return e.matches(t)})}):this.items.filter(function(e){return e.matches(t)})},M.prototype.map=function(t){return this.items.map(t)},M.prototype.remove=function(t){var e=null;if(!(e=t instanceof k?t:this.find(t)))return null;var i=this.items.indexOf(e);return this.items.splice(i,1),e},M.prototype.push=function(t){if(!(t instanceof k))throw d("FieldBag only accepts instances of Field that has an id defined.");if(!t.id)throw d("Field id must be defined.");if(this.find({id:t.id}))throw d("Field with id "+t.id+" is already added.");this.items.push(t)},Object.defineProperties(M.prototype,P);var C={},R="en",S=!0,q=new E({en:{messages:{},attributes:{},custom:{}}}),B=function(t,e){var i=this;void 0===e&&(e={vm:null,fastExit:!0}),this.strict=S,this.errors=new A,this.fields=new M,this.flags={},this._createFields(t),this.paused=!1,this.fastExit=e.fastExit||!1,this.ownerId=e.vm&&e.vm._uid,this.reset=e.vm&&h(e.vm.$nextTick)?function(){return new Promise(function(t,n){e.vm.$nextTick(function(){i.fields.items.forEach(function(t){return t.reset()}),i.errors.clear(),t()})})}:function(){return new Promise(function(t,e){i.fields.items.forEach(function(t){return t.reset()}),i.errors.clear(),t()})},this.clean=function(){c("validator.clean is marked for deprecation, please use validator.reset instead."),i.reset()}},T={dictionary:{},locale:{},rules:{}},H={dictionary:{},locale:{},rules:{}};T.dictionary.get=function(){return q},H.dictionary.get=function(){return q},T.locale.get=function(){return R},T.locale.set=function(t){B.locale=t},H.locale.get=function(){return R},H.locale.set=function(t){q.hasLocale(t)||c("You are setting the validator locale to a locale that is not defined in the dictionary. English messages may still be generated."),R=t},T.rules.get=function(){return C},H.rules.get=function(){return C},B.create=function(t,e){return new B(t,e)},B.extend=function(t,e){B._guardExtend(t,e),B._merge(t,e)},B.remove=function(t){delete C[t]},B.setLocale=function(t){void 0===t&&(t="en"),B.locale=t},B.installDateTimeValidators=function(){c("Date validations are now installed by default, you no longer need to install it.")},B.prototype.installDateTimeValidators=function(){c("Date validations are now installed by default, you no longer need to install it.")},B.setStrictMode=function(t){void 0===t&&(t=!0),S=t},B.updateDictionary=function(t){q.merge(t)},B.addLocale=function(t){if(t.name){this.updateDictionary((e={},e[t.name]=t,e));var e}else c("Your locale must have a name property")},B.prototype.addLocale=function(t){B.addLocale(t)},B.prototype.localize=function(t,e){B.localize(t,e)},B.localize=function(t,e){e&&(e=$({},e,{name:t}),B.addLocale(e)),B.locale=t},B.prototype.attach=function(t){arguments.length>1&&(t=$({},{name:arguments[0],rules:arguments[1]},arguments[2]||{vm:{$validator:this}}));var e=t.initialValue;return t instanceof k||(t=new k(t.el||null,t)),this.fields.push(t),t.initial?this.validate("#"+t.id,e||t.value):this._validate(t,e||t.value,!0).then(function(e){t.flags.valid=e,t.flags.invalid=!e}),this._addFlag(t,t.scope),t},B.prototype.flag=function(t,e){var i=this._resolveField(t);i&&e&&i.setFlags(e)},B.prototype.detach=function(t,i){var n=t instanceof k?t:this._resolveField(t,i);if(n){n.destroy(),this.errors.remove(n.name,n.scope,n.id),this.fields.remove(n);var r=this.flags;!e(n.scope)&&r["$"+n.scope]?delete r["$"+n.scope][n.name]:e(n.scope)&&delete r[n.name],this.flags=$({},r)}},B.prototype.extend=function(t,e){B.extend(t,e)},B.prototype.update=function(t,i){var n=i.scope,r=this._resolveField("#"+t);this.errors.update(t,{scope:n}),!e(r.scope)&&this.flags["$"+r.scope]?delete this.flags["$"+r.scope][r.name]:e(r.scope)&&delete this.flags[r.name],this._addFlag(r,n)},B.prototype.remove=function(t){B.remove(t)},B.prototype.setLocale=function(t){this.locale=t},B.prototype.updateDictionary=function(t){B.updateDictionary(t)},B.prototype.validate=function(t,e,i){if(void 0===i&&(i=null),this.paused)return Promise.resolve(!0);if(0===arguments.length)return this.validateScopes();if(1===arguments.length&&"*"===arguments[0])return this.validateAll();if(1===arguments.length&&"string"==typeof arguments[0]&&/^(.+)\.\*$/.test(arguments[0])){var n=arguments[0].match(/^(.+)\.\*$/)[1];return this.validateAll(n)}var r=this._resolveField(t,i);if(!r)return this._handleFieldNotFound(t,i);this.errors.remove(r.name,r.scope,r.id),r.flags.pending=!0,1===arguments.length&&(e=r.value);var s=r.isDisabled;return this._validate(r,e,s).then(function(t){return r.setFlags({pending:!1,valid:t,validated:!0}),s?Promise.resolve(!0):t})},B.prototype.pause=function(){return this.paused=!0,this},B.prototype.resume=function(){return this.paused=!1,this},B.prototype.validateAll=function(t){var e=arguments,i=this;if(this.paused)return Promise.resolve(!0);var n=null,r=!1;"string"==typeof t?n={scope:t}:f(t)?(n=Object.keys(t).map(function(t){return{name:t,scope:e[1]||null}}),r=!0):0===arguments.length?n={scope:null}:Array.isArray(t)&&(n=t.map(function(t){return{name:t,scope:e[1]||null}}));var s=this.fields.filter(n).map(function(e){return i.validate("#"+e.id,r?t[e.name]:e.value)});return Promise.all(s).then(function(t){return t.every(function(t){return t})})},B.prototype.validateScopes=function(){var t=this;if(this.paused)return Promise.resolve(!0);var e=this.fields.map(function(e){return t.validate("#"+e.id,e.value)});return Promise.all(e).then(function(t){return t.every(function(t){return t})})},B.prototype._createFields=function(t){var e=this;t&&Object.keys(t).forEach(function(i){var n=$({},{name:i,rules:t[i]});e.attach(n)})},B.prototype._getDateFormat=function(t){var e=null;return t.date_format&&Array.isArray(t.date_format)&&(e=t.date_format[0]),e||this.dictionary.getDateFormat(this.locale)},B.prototype._isADateRule=function(t){return!!~["after","before","date_between","date_format"].indexOf(t)},B.prototype._formatErrorMessage=function(t,e,i,n){void 0===i&&(i={}),void 0===n&&(n=null);var r=this._getFieldDisplayName(t),s=this._getLocalizedParams(e,n);if(!this.dictionary.hasLocale(R)){var a=this.dictionary.getFieldMessage("en",t.name,e.name);return h(a)?a(r,s,i):a}var o=this.dictionary.getFieldMessage(R,t.name,e.name);return h(o)?o(r,s,i):o},B.prototype._getLocalizedParams=function(t,e){return void 0===e&&(e=null),~["after","before","confirmed"].indexOf(t.name)&&t.params&&t.params[0]?[e||this.dictionary.getAttribute(R,t.params[0],t.params[0])].concat(t.params.slice(1)):t.params},B.prototype._getFieldDisplayName=function(t){return t.displayName||this.dictionary.getAttribute(R,t.name,t.name)},B.prototype._addFlag=function(t,i){if(void 0===i&&(i=null),e(i)){this.flags=$({},this.flags,(n={},n[""+t.name]=t.flags,n));var n}else{var r,s=$({},this.flags["$"+i]||{},(r={},r[""+t.name]=t.flags,r));this.flags=$({},this.flags,(a={},a["$"+i]=s,a));var a}},B.prototype._test=function(t,e,i,n){var r=this,s=C[i.name],a=Array.isArray(i.params)?y(i.params):[],o=null;if(!s||"function"!=typeof s)throw d("No such validator '"+i.name+"' exists.");if(/(confirmed|after|before)/.test(i.name)){var l=_(t.dependencies,function(t){return t.name===i.name});l&&(o=l.field.displayName,a=[l.field.value].concat(a.slice(1)))}else"required"===i.name&&t.rejectsFalse&&(a=a.length?a:[!0]);if(this._isADateRule(i.name)){var u=this._getDateFormat(t.rules);"date_format"!==i.name&&a.push(u)}var c=s(e,a);return h(c.then)?c.then(function(e){var s=!0,a={};return Array.isArray(e)?s=e.every(function(t){return f(t)?t.valid:t}):(s=f(e)?e.valid:e,a=e.data),s||n||r.errors.add({id:t.id,field:t.name,msg:r._formatErrorMessage(t,i,a,o),rule:i.name,scope:t.scope}),s}):(f(c)||(c={valid:c,data:{}}),c.valid||n||this.errors.add({id:t.id,field:t.name,msg:this._formatErrorMessage(t,i,c.data,o),rule:i.name,scope:t.scope}),c.valid)},B._merge=function(t,e){h(e)?C[t]=e:(C[t]=e.validate,h(e.getMessage)&&q.setMessage(R,t,e.getMessage),e.messages&&q.merge(Object.keys(e.messages).reduce(function(i,n){var r=i;r[n]={messages:(s={},s[t]=e.messages[n],s)};var s;return r},{})))},B._guardExtend=function(t,e){if(!h(e)){if(!h(e.validate))throw d("Extension Error: The validator '"+t+"' must be a function or have a 'validate' method.");if(!h(e.getMessage)&&!f(e.messages))throw d("Extension Error: The validator '"+t+"' must have a 'getMessage' method or have a 'messages' object.")}},B.prototype._resolveField=function(t,i){if(!e(i))return this.fields.find({name:t,scope:i});if("#"===t[0])return this.fields.find({id:t.slice(1)});if(t.indexOf(".")>-1){var n=t.split("."),r=n[0],s=n.slice(1),a=this.fields.find({name:s.join("."),scope:r});if(a)return a}return this.fields.find({name:t,scope:null})},B.prototype._handleFieldNotFound=function(t,i){if(!this.strict)return Promise.resolve(!0);var n=e(i)?t:(e(i)?"":i+".")+t;throw d('Validating a non-existent field: "'+n+'". Use "attach()" first.')},B.prototype._validate=function(t,i,n){var r=this;if(void 0===n&&(n=!1),!t.isRequired&&(e(i)||""===i))return Promise.resolve(!0);var s=[],a=!1;return Object.keys(t.rules).some(function(e){var o=r._test(t,i,{name:e,params:t.rules[e]},n);if(h(o.then))s.push(o);else if(r.fastExit&&!o)a=!0;else{var l=new Promise(function(t){t(o)});s.push(l)}return a}),a?Promise.resolve(!1):Promise.all(s).then(function(t){return t.every(function(t){return t})})},Object.defineProperties(B.prototype,T),Object.defineProperties(B,H);var z,I=function(t,e){return"undefined"==typeof Proxy?t:new Proxy(t,e)}({},{get:function(t,e){return 0===String(e).indexOf("$")?I:{untouched:!0,touched:!1,dirty:!1,pristine:!0,valid:null,invalid:null,validated:!1,pending:!1,required:!1}}}),G=function(t){return!!t&&(!(!Array.isArray(t)||!~t.indexOf("$validator"))||!(!f(t)||!t.$validator))},Y=function(t,e){return new B(null,{vm:t,fastExit:e.fastExit})},U={provide:function(){return this.$validator&&!x(this.$vnode)?{$validator:this.$validator}:{}},beforeCreate:function(){if(!x(this.$vnode)){this.$parent||N.merge(this.$options.$_veeValidate||{});var t=N.resolve(this),e=this.$options._base;this.$options.$validates&&(c('The ctor $validates option has been deprecated please set the $_veeValidate.validator option to "new" instead'),this.$validator=Y(this,t)),(!this.$parent||this.$options.$_veeValidate&&/new/.test(this.$options.$_veeValidate.validator))&&(this.$validator=Y(this,t));var i=G(this.$options.inject);this.$validator||!t.inject||i||(this.$validator=Y(this,t)),(i||this.$validator)&&(!i&&this.$validator&&(e.util.defineReactive(this.$validator,"errors",this.$validator.errors),e.util.defineReactive(this.$validator,"flags",this.$validator.flags)),this.$options.computed||(this.$options.computed={}),this.$options.computed[t.errorBagName||"errors"]=function(){return this.$validator.errors},this.$options.computed[t.fieldsBagName||"fields"]=function(){return Object.keys(this.$validator.flags).length?this.$validator.flags:I})}},beforeDestroy:function(){x(this.$vnode)||this.$validator&&this.$validator.ownerId===this._uid&&h(this.$validator.pause)&&this.$validator.pause()}},J=function(e,i){return i&&i.$validator?i.$validator.fields.find({id:t(e,"id")}):null},K={bind:function(t,e,i){var n=i.context.$validator;if(n){var r=L.generate(t,e,i);n.attach(r)}else c("No validator instance is present on vm, did you forget to inject '$validator'?")},inserted:function(t,e,i){var n=J(t,i.context),r=L.resolveScope(t,e,i);n&&r!==n.scope&&(n.update({scope:r}),n.updated=!1)},update:function(t,e,i){var r=J(t,i.context);if(!(!r||r.updated&&n(e.value,e.oldValue))){var s=L.resolveScope(t,e,i),a=L.resolveRules(t,e);r.update({scope:s,rules:a})}},unbind:function(t,e,i){var n=i.context,r=J(t,n);r&&n.$validator.detach(r)}},Q=function(t){return Array.isArray(t)?t.reduce(function(t,e){return~e.indexOf(".")?t[e.split(".")[1]]=e:t[e]=e,t},{}):t};return{install:function(t,e){void 0===e&&(e={}),z?c("already installed, Vue.use(VeeValidate) should only be called once."):(z=t,N.merge(e),N.current.dictionary&&B.updateDictionary(N.current.dictionary),e&&(e.locale&&(B.locale=e.locale),e.strict&&B.setStrictMode(N.current.strict)),z.mixin(U),z.directive("validate",K))},use:function(t,e){if(void 0===e&&(e={}),!h(t))return c("The plugin must be a callable function");t({Validator:B,ErrorBag:A,Rules:B.rules},e)},directive:K,mixin:U,mapFields:function(t){var e=Q(t);return Object.keys(e).reduce(function(t,i){var n=e[i];return t[i]=function(){if(this.$validator.flags[n])return this.$validator.flags[n];if(n.indexOf(".")<=0)return{};var t=n.split("."),e=t[0],i=t.slice(1);return e=this.$validator.flags["$"+e],i=i.join("."),e&&e[i]?e[i]:{}},t},{})},Validator:B,ErrorBag:A,version:"2.0.0-rc.21"}});
{
"name": "vee-validate",
"version": "2.0.0-rc.20",
"version": "2.0.0-rc.21",
"description": "Simple Vue.js input validation plugin",

@@ -33,2 +33,3 @@ "author": "Abdelrahman Awad <logaretm1@gmail.com>",

"dist/*.js",
"dist/locale/*.js",
"types/*.d.ts"

@@ -35,0 +36,0 @@ ],

@@ -12,3 +12,3 @@ <p align="center">

[![Codacy Badge](https://api.codacy.com/project/badge/Grade/087bd788687c4ccab6650756ce56fa05)](https://www.codacy.com/app/baianat/vee-validate?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=baianat/vee-validate&amp;utm_campaign=Badge_Grade)
[![CDNJS](https://img.shields.io/cdnjs/v/vee-validate.svg)](https://cdnjs.com/libraries/vee-validate/2.0.0-rc.20)
[![CDNJS](https://img.shields.io/cdnjs/v/vee-validate.svg)](https://cdnjs.com/libraries/vee-validate/2.0.0-rc.21)
[![npm](https://img.shields.io/npm/dm/vee-validate.svg)](https://npm-stat.com/charts.html?package=vee-validate)

@@ -15,0 +15,0 @@ [![npm](https://img.shields.io/npm/v/vee-validate.svg)](https://www.npmjs.com/package/vee-validate)

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc