Socket
Socket
Sign inDemoInstall

vee-validate

Package Overview
Dependencies
Maintainers
1
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.4 to 2.0.0-rc.5

4

dist/vee-validate.min.js

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

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.VeeValidate=t()}(this,function(){"use strict";function e(e){return e&&e.__esModule?e.default:e}function t(e,t){return t={exports:{}},e(t,t.exports),t.exports}var i={en:/^[A-Z]*$/i,cs:/^[A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]*$/i,da:/^[A-ZÆØÅ]*$/i,de:/^[A-ZÄÖÜß]*$/i,es:/^[A-ZÁÉÍÑÓÚÜ]*$/i,fr:/^[A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]*$/i,nl:/^[A-ZÉËÏÓÖÜ]*$/i,hu:/^[A-ZÁÉÍÓÖŐÚÜŰ]*$/i,pl:/^[A-ZĄĆĘŚŁŃÓŻŹ]*$/i,pt:/^[A-ZÃÁÀÂÇÉÊÍÕÓÔÚÜ]*$/i,ru:/^[А-ЯЁ]*$/i,sr:/^[A-ZČĆŽŠĐ]*$/i,tr:/^[A-ZÇĞİıÖŞÜ]*$/i,uk:/^[А-ЩЬЮЯЄIЇҐ]*$/i,ar:/^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]*$/},n={en:/^[A-Z\s]*$/i,cs:/^[A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ\s]*$/i,da:/^[A-ZÆØÅ\s]*$/i,de:/^[A-ZÄÖÜß\s]*$/i,es:/^[A-ZÁÉÍÑÓÚÜ\s]*$/i,fr:/^[A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ\s]*$/i,nl:/^[A-ZÉËÏÓÖÜ\s]*$/i,hu:/^[A-ZÁÉÍÓÖŐÚÜŰ\s]*$/i,pl:/^[A-ZĄĆĘŚŁŃÓŻŹ\s]*$/i,pt:/^[A-ZÃÁÀÂÇÉÊÍÕÓÔÚÜ\s]*$/i,ru:/^[А-ЯЁ\s]*$/i,sr:/^[A-ZČĆŽŠĐ\s]*$/i,tr:/^[A-ZÇĞİıÖŞÜ\s]*$/i,uk:/^[А-ЩЬЮЯЄIЇҐ\s]*$/i,ar:/^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ\s]*$/},r={en:/^[0-9A-Z]*$/i,cs:/^[0-9A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]*$/i,da:/^[0-9A-ZÆØÅ]$/i,de:/^[0-9A-ZÄÖÜß]*$/i,es:/^[0-9A-ZÁÉÍÑÓÚÜ]*$/i,fr:/^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]*$/i,hu:/^[0-9A-ZÁÉÍÓÖŐÚÜŰ]*$/i,nl:/^[0-9A-ZÉËÏÓÖÜ]*$/i,pl:/^[0-9A-ZĄĆĘŚŁŃÓŻŹ]*$/i,pt:/^[0-9A-ZÃÁÀÂÇÉÊÍÕÓÔÚÜ]*$/i,ru:/^[0-9А-ЯЁ]*$/i,sr:/^[0-9A-ZČĆŽŠĐ]*$/i,tr:/^[0-9A-ZÇĞİıÖŞÜ]*$/i,uk:/^[0-9А-ЩЬЮЯЄIЇҐ]*$/i,ar:/^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]*$/},s={en:/^[0-9A-Z_-]*$/i,cs:/^[0-9A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ_-]*$/i,da:/^[0-9A-ZÆØÅ_-]*$/i,de:/^[0-9A-ZÄÖÜß_-]*$/i,es:/^[0-9A-ZÁÉÍÑÓÚÜ_-]*$/i,fr:/^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ_-]*$/i,nl:/^[0-9A-ZÉËÏÓÖÜ_-]*$/i,hu:/^[0-9A-ZÁÉÍÓÖŐÚÜŰ_-]*$/i,pl:/^[0-9A-ZĄĆĘŚŁŃÓŻŹ_-]*$/i,pt:/^[0-9A-ZÃÁÀÂÇÉÊÍÕÓÔÚÜ_-]*$/i,ru:/^[0-9А-ЯЁ_-]*$/i,sr:/^[0-9A-ZČĆŽŠĐ_-]*$/i,tr:/^[0-9A-ZÇĞİıÖŞÜ_-]*$/i,uk:/^[0-9А-ЩЬЮЯЄIЇҐ_-]*$/i,ar:/^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ_-]*$/},o=function(e,t){void 0===t&&(t=[null]);var n=t[0];return n?(i[n]||i.en).test(e):Object.keys(i).some(function(t){return i[t].test(e)})},a=function(e,t){void 0===t&&(t=[null]);var i=t[0];return i?(s[i]||s.en).test(e):Object.keys(s).some(function(t){return s[t].test(e)})},u=function(e,t){void 0===t&&(t=[null]);var i=t[0];return i?(r[i]||r.en).test(e):Object.keys(r).some(function(t){return r[t].test(e)})},l=function(e,t){void 0===t&&(t=[null]);var i=t[0];return i?(n[i]||n.en).test(e):Object.keys(n).some(function(t){return n[t].test(e)})},c=function(e,t){var i=t[0],n=t[1];return Number(i)<=e&&Number(n)>=e},f=function(e,t,i){var n=t[0],r=n?document.querySelector("input[name='"+n+"']"):document.querySelector("input[name='"+i+"_confirmation']");return!(!r||String(e)!==r.value)},d=t(function(e,t){function i(e){if("string"!=typeof e)throw new TypeError("This library (validator.js) validates strings only")}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i,e.exports=t.default}),h=t(function(e,t){function i(e){(0,n.default)(e);var t=e.replace(/[^0-9]+/g,"");if(!r.test(t))return!1;for(var i=0,s=void 0,o=void 0,a=void 0,u=t.length-1;u>=0;u--)s=t.substring(u,u+1),o=parseInt(s,10),a?(o*=2,i+=o>=10?o%10+1:o):i+=o,a=!a;return!(i%10!=0||!t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var n=function(e){return e&&e.__esModule?e:{default:e}}(d),r=/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})|62[0-9]{14}$/;e.exports=t.default}),p=e(h),v=function(e){return p(String(e))},m=function(e,t){var i=Array.isArray(t)?t[0]||"*":"*";if(Array.isArray(e))return!1;if(null===e||void 0===e||""===e)return!0;if(0===Number(i))return/^-?\d*$/.test(e);var n="*"===i?"+":"{1,"+i+"}";if(!new RegExp("^-?\\d*(\\.\\d"+n+")?$").test(e))return!1;var r=parseFloat(e);return r===r},g=function(e,t){var i=t[0],n=String(e);return/^[0-9]*$/.test(n)&&n.length===Number(i)},_=function(e,t,i){var n=window.URL||window.webkitURL;return new Promise(function(r){var s=new Image;s.onerror=function(){return r({valid:!1})},s.onload=function(){return r({valid:s.width===Number(t)&&s.height===Number(i)})},s.src=n.createObjectURL(e)})},y=function(e,t){for(var i=t[0],n=t[1],r=[],s=0;s<e.length;s++){if(!/\.(jpg|svg|jpeg|png|bmp|gif)$/i.test(e[s].name))return!1;r.push(e[s])}return Promise.all(r.map(function(e){return _(e,i,n)}))},b=t(function(e,t){function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];for(var i in t)void 0===e[i]&&(e[i]=t[i]);return e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i,e.exports=t.default}),$=t(function(e,t){function i(e,t){(0,r.default)(e);var i=void 0,s=void 0;"object"===(void 0===t?"undefined":n(t))?(i=t.min||0,s=t.max):(i=arguments[1],s=arguments[2]);var o=encodeURI(e).split(/%..|./).length-1;return o>=i&&(void 0===s||o<=s)}Object.defineProperty(t,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.default=i;var r=function(e){return e&&e.__esModule?e:{default:e}}(d);e.exports=t.default}),x=t(function(e,t){function i(e){return e&&e.__esModule?e:{default:e}}function n(e,t){(0,r.default)(e),t=(0,s.default)(t,o),t.allow_trailing_dot&&"."===e[e.length-1]&&(e=e.substring(0,e.length-1));var i=e.split(".");if(t.require_tld){var n=i.pop();if(!i.length||!/^([a-z\u00a1-\uffff]{2,}|xn[a-z0-9-]{2,})$/i.test(n))return!1}for(var a,u=0;u<i.length;u++){if(a=i[u],t.allow_underscores&&(a=a.replace(/_/g,"")),!/^[a-z\u00a1-\uffff0-9-]+$/i.test(a))return!1;if(/[\uff01-\uff5e]/.test(a))return!1;if("-"===a[0]||"-"===a[a.length-1])return!1}return!0}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;var r=i(d),s=i(b),o={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1};e.exports=t.default}),A=t(function(e,t){function i(e){return e&&e.__esModule?e:{default:e}}function n(e,t){if((0,r.default)(e),t=(0,s.default)(t,u),t.require_display_name||t.allow_display_name){var i=e.match(l);if(i)e=i[1];else if(t.require_display_name)return!1}var n=e.split("@"),d=n.pop(),v=n.join("@"),m=d.toLowerCase();if("gmail.com"!==m&&"googlemail.com"!==m||(v=v.replace(/\./g,"").toLowerCase()),!(0,o.default)(v,{max:64})||!(0,o.default)(d,{max:256}))return!1;if(!(0,a.default)(d,{require_tld:t.require_tld}))return!1;if('"'===v[0])return v=v.slice(1,v.length-1),t.allow_utf8_local_part?p.test(v):f.test(v);for(var g=t.allow_utf8_local_part?h:c,_=v.split("."),y=0;y<_.length;y++)if(!g.test(_[y]))return!1;return!0}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;var r=i(d),s=i(b),o=i($),a=i(x),u={allow_display_name:!1,require_display_name:!1,allow_utf8_local_part:!0,require_tld:!0},l=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\.\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\.\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF\s]*<(.+)>$/i,c=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i,f=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i,h=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i,p=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*$/i;e.exports=t.default}),w=e(A),F=function(e){return w(String(e))},E=function(e,t){var i=new RegExp(".("+t.join("|")+")$","i");return e.every(function(e){return i.test(e.name)})},L=function(e){return e.every(function(e){return/\.(jpg|svg|jpeg|png|bmp|gif)$/i.test(e.name)})},N=function(e,t){return!!t.filter(function(t){return t==e}).length},j=t(function(e,t){function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if((0,n.default)(e),!(t=String(t)))return i(e,4)||i(e,6);if("4"===t){if(!r.test(e))return!1;return e.split(".").sort(function(e,t){return e-t})[3]<=255}if("6"===t){var o=e.split(":"),a=!1,u=i(o[o.length-1],4),l=u?7:8;if(o.length>l)return!1;if("::"===e)return!0;"::"===e.substr(0,2)?(o.shift(),o.shift(),a=!0):"::"===e.substr(e.length-2)&&(o.pop(),o.pop(),a=!0);for(var c=0;c<o.length;++c)if(""===o[c]&&c>0&&c<o.length-1){if(a)return!1;a=!0}else if(u&&c===o.length-1);else if(!s.test(o[c]))return!1;return a?o.length>=1:o.length===l}return!1}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var n=function(e){return e&&e.__esModule?e:{default:e}}(d),r=/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/,s=/^[0-9A-F]{1,4}$/i;e.exports=t.default}),O=e(j),k=function(e,t){void 0===t&&(t=[4]);var i=t[0];return O(e,i)},S=function(e,t){var i=t[0];return void 0===e||null===e?i>=0:String(e).length<=i},T=function(e,t){var i=t[0];return!Array.isArray(e)&&null!==e&&void 0!==e&&""!==e&&Number(e)<=i},Z=function(e,t){var i=new RegExp(t.join("|").replace("*",".+")+"$","i");return e.every(function(e){return i.test(e.type)})},M=function(e,t){var i=t[0];return void 0!==e&&null!==e&&String(e).length>=i},q=function(e,t){var i=t[0];return!Array.isArray(e)&&null!==e&&void 0!==e&&""!==e&&Number(e)>=i},D=function(e,t){return!t.filter(function(t){return t==e}).length},B=function(e){return/^[0-9]+$/.test(String(e))},V=function(e,t){var i=t[0],n=t.slice(1);return i instanceof RegExp?i.test(e):new RegExp(i,n).test(String(e))},R=function(e){return Array.isArray(e)?!!e.length:void 0!==e&&null!==e&&!1!==e&&!!String(e).trim().length},P=function(e,t){var i=t[0];if(isNaN(i))return!1;for(var n=1024*Number(i),r=0;r<e.length;r++)if(e[r].size>n)return!1;return!0},z=t(function(e,t){function i(e){return e&&e.__esModule?e:{default:e}}function n(e){return"[object RegExp]"===Object.prototype.toString.call(e)}function r(e,t){for(var i=0;i<t.length;i++){var r=t[i];if(e===r||n(r)&&r.test(e))return!0}return!1}function s(e,t){if((0,o.default)(e),!e||e.length>=2083||/[\s<>]/.test(e))return!1;if(0===e.indexOf("mailto:"))return!1;t=(0,l.default)(t,c);var i=void 0,n=void 0,s=void 0,d=void 0,h=void 0,p=void 0,v=void 0,m=void 0;if(v=e.split("#"),e=v.shift(),v=e.split("?"),e=v.shift(),v=e.split("://"),v.length>1){if(i=v.shift(),t.require_valid_protocol&&-1===t.protocols.indexOf(i))return!1}else{if(t.require_protocol)return!1;t.allow_protocol_relative_urls&&"//"===e.substr(0,2)&&(v[0]=e.substr(2))}if(e=v.join("://"),v=e.split("/"),""===(e=v.shift())&&!t.require_host)return!0;if(v=e.split("@"),v.length>1&&(n=v.shift(),n.indexOf(":")>=0&&n.split(":").length>2))return!1;d=v.join("@"),p=m=null;var g=d.match(f);return g?(s="",m=g[1],p=g[2]||null):(v=d.split(":"),s=v.shift(),v.length&&(p=v.join(":"))),!(null!==p&&(h=parseInt(p,10),!/^[0-9]+$/.test(p)||h<=0||h>65535))&&(!!((0,u.default)(s)||(0,a.default)(s,t)||m&&(0,u.default)(m,6)||"localhost"===s)&&(s=s||m,!(t.host_whitelist&&!r(s,t.host_whitelist))&&(!t.host_blacklist||!r(s,t.host_blacklist))))}Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var o=i(d),a=i(x),u=i(j),l=i(b),c={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1},f=/^\[([^\]]+)\](?::([0-9]+))?$/;e.exports=t.default}),C=e(z),I=function(e,t){void 0===t&&(t=[!0]);var i=t[0];return C(e,{require_protocol:!!i})},U={alpha_dash:a,alpha_num:u,alpha_spaces:l,alpha:o,between:c,confirmed:f,credit_card:v,decimal:m,digits:g,dimensions:y,email:F,ext:E,image:L,in:N,ip:k,max:S,max_value:T,mimes:Z,min:M,min_value:q,not_in:D,numeric:B,regex:V,required:R,size:P,url:I},G=function(){this.errors=[]};G.prototype.add=function(e,t,i,n){void 0===n&&(n="__global__"),this.errors.push({field:e,msg:t,rule:i,scope:n})},G.prototype.all=function(e){return e?this.errors.filter(function(t){return t.scope===e}).map(function(e){return e.msg}):this.errors.map(function(e){return e.msg})},G.prototype.any=function(e){return e?!!this.errors.filter(function(t){return t.scope===e}).length:!!this.errors.length},G.prototype.clear=function(e){e||(e="__global__"),this.errors=this.errors.filter(function(t){return t.scope!==e})},G.prototype.collect=function(e,t,i){if(void 0===i&&(i=!0),!e){var n={};return this.errors.forEach(function(e){n[e.field]||(n[e.field]=[]),n[e.field].push(i?e.msg:e)}),n}return t?this.errors.filter(function(i){return i.field===e&&i.scope===t}).map(function(e){return i?e.msg:e}):this.errors.filter(function(t){return t.field===e}).map(function(e){return i?e.msg:e})},G.prototype.count=function(){return this.errors.length},G.prototype.first=function(e,t){var i=this;void 0===t&&(t="__global__");var n=this._selector(e),r=this._scope(e);if(r){var s=this.first(r.name,r.scope);if(s)return s}if(n)return this.firstByRule(n.name,n.rule,t);for(var o=0;o<this.errors.length;o++)if(i.errors[o].field===e&&i.errors[o].scope===t)return i.errors[o].msg;return null},G.prototype.firstRule=function(e,t){var i=this.collect(e,t,!1);return i.length&&i[0].rule||null},G.prototype.has=function(e,t){return void 0===t&&(t="__global__"),!!this.first(e,t)},G.prototype.firstByRule=function(e,t,i){var n=this.collect(e,i,!1).filter(function(e){return e.rule===t})[0];return n&&n.msg||null},G.prototype.remove=function(e,t){var i=t?function(i){return i.field!==e||i.scope!==t}:function(t){return t.field!==e||"__global__"!==t.scope};this.errors=this.errors.filter(i)},G.prototype._selector=function(e){if(e.indexOf(":")>-1){var t=e.split(":");return{name:t[0],rule:t[1]}}return null},G.prototype._scope=function(e){if(e.indexOf(".")>-1){var t=e.split("."),i=t[0];return{name:t[1],scope:i}}return null};var J=function(){function e(e){this.msg="[vee-validate]: "+e}return e.prototype.toString=function(){return this.msg},e}(),Y=function(e,t){return e.getAttribute("data-vv-"+t)},W=function(e){var t=Y(e,"scope");return!t&&e.form&&(t=Y(e.form,"scope")),t},K=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 Object.prototype.hasOwnProperty.call(n,e)?(n=n[e],!0):(n=i,!1)}),n},H=function(e,t,i){void 0===t&&(t=0),void 0===i&&(i=!0);var n;return function(){for(var r=[],s=arguments.length;s--;)r[s]=arguments[s];var o=function(){n=null,i||e.apply(void 0,r)},a=i&&!n;clearTimeout(n),n=setTimeout(o,t),a&&e(r)}},Q=function(e){console&&console.warn("[vee-validate]: "+e)},X=function(e){return null!==e&&e&&"object"==typeof e&&!Array.isArray(e)},ee=function(e){return"function"==typeof e},te=function(e,t){return e.classList?e.classList.contains(t):!!e.className.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))},ie=function(e,t){if(e.classList)return void e.classList.add(t);te(e,t)||(e.className+=" "+t)},ne=function(e,t){if(e.classList)return void e.classList.remove(t);if(te(e,t)){var i=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(i," ")}},re=function(e){if(Array.from)return Array.from(e);for(var t=[],i=e.length,n=0;n<i;n++)t.push(e[n]);return t},se=function(e){for(var t=[],i=arguments.length-1;i-- >0;)t[i]=arguments[i+1];if(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(e){null!=e&&Object.keys(e).forEach(function(t){n[t]=e[t]})}),n},oe=function(e,t){if(e.find)return e.find(t);var i;return e.some(function(e){return!!t(e)&&(i=e,!0)}),i},ae=function(e,t,i){return e?"string"==typeof t?t:~["string","object"].indexOf(typeof t.rules)?t.rules:t:Y(i,"rules")},ue=function(e){void 0===e&&(e={}),this.dictionary={},this.merge(e)};ue.prototype.hasLocale=function(e){return!!this.dictionary[e]},ue.prototype.getMessage=function(e,t,i){return this.hasMessage(e,t)?this.dictionary[e].messages[t]:i||this._getDefaultMessage(e)},ue.prototype.getFieldMessage=function(e,t,i){if(!this.hasLocale(e))return this.getMessage(e,i);var n=this.dictionary[e].custom&&this.dictionary[e].custom[t];return n&&n[i]?n[i]:this.getMessage(e,i)},ue.prototype._getDefaultMessage=function(e){return this.hasMessage(e,"_default")?this.dictionary[e].messages._default:this.dictionary.en.messages._default},ue.prototype.getAttribute=function(e,t,i){return void 0===i&&(i=""),this.hasAttribute(e,t)?this.dictionary[e].attributes[t]:i},ue.prototype.hasMessage=function(e,t){return!!(this.hasLocale(e)&&this.dictionary[e].messages&&this.dictionary[e].messages[t])},ue.prototype.hasAttribute=function(e,t){return!!(this.hasLocale(e)&&this.dictionary[e].attributes&&this.dictionary[e].attributes[t])},ue.prototype.merge=function(e){this._merge(this.dictionary,e)},ue.prototype.setMessage=function(e,t,i){this.hasLocale(e)||(this.dictionary[e]={messages:{},attributes:{}}),this.dictionary[e].messages[t]=i},ue.prototype.setAttribute=function(e,t,i){this.hasLocale(e)||(this.dictionary[e]={messages:{},attributes:{}}),this.dictionary[e].attributes[t]=i},ue.prototype._merge=function(e,t){var i=this;return X(e)&&X(t)?(Object.keys(t).forEach(function(n){if(X(t[n])){if(!e[n]){se(e,(r={},r[n]={},r));var r}return void i._merge(e[n],t[n])}se(e,(s={},s[n]=t[n],s));var s}),e):e};var le={_default:function(e){return"The "+e+" value is not valid."},alpha_dash:function(e){return"The "+e+" field may contain alpha-numeric characters as well as dashes and underscores."},alpha_num:function(e){return"The "+e+" field may only contain alpha-numeric characters."},alpha_spaces:function(e){return"The "+e+" field may only contain alphabetic characters as well as spaces."},alpha:function(e){return"The "+e+" field may only contain alphabetic characters."},between:function(e,t){return"The "+e+" field must be between "+t[0]+" and "+t[1]+"."},confirmed:function(e){return"The "+e+" confirmation does not match."},credit_card:function(e){return"The "+e+" field is invalid."},decimal:function(e,t){void 0===t&&(t=["*"]);var i=t[0];return"The "+e+" field must be numeric and may contain "+("*"===i?"":i)+" decimal points."},digits:function(e,t){return"The "+e+" field must be numeric and exactly contain "+t[0]+" digits."},dimensions:function(e,t){return"The "+e+" field must be "+t[0]+" pixels by "+t[1]+" pixels."},email:function(e){return"The "+e+" field must be a valid email."},ext:function(e){return"The "+e+" field must be a valid file."},image:function(e){return"The "+e+" field must be an image."},in:function(e){return"The "+e+" field must be a valid value."},ip:function(e){return"The "+e+" field must be a valid ip address."},max:function(e,t){return"The "+e+" field may not be greater than "+t[0]+" characters."},max_value:function(e,t){return"The "+e+" field must be "+t[0]+" or less."},mimes:function(e){return"The "+e+" field must have a valid file type."},min:function(e,t){return"The "+e+" field must be at least "+t[0]+" characters."},min_value:function(e,t){return"The "+e+" field must be "+t[0]+" or more."},not_in:function(e){return"The "+e+" field must be a valid value."},numeric:function(e){return"The "+e+" field may only contain numeric characters."},regex:function(e){return"The "+e+" field format is invalid."},required:function(e){return"The "+e+" field is required."},size:function(e,t){return"The "+e+" field must be less than "+t[0]+" KB."},url:function(e){return"The "+e+" field is not a valid URL."}},ce=function(e){return function(t,i){var n=i[0],r=i[1],s=i[2],o=document.querySelector("input[name='"+n+"']");void 0===s&&(s=r,r=!1);var a=e(t,s,!0),u=e(o?o.value:n,s,!0);return!(!a.isValid()||!u.isValid())&&(a.isAfter(u)||r&&a.isSame(u))}},fe=function(e){return function(t,i){var n=i[0],r=i[1],s=i[2],o=document.querySelector("input[name='"+n+"']");void 0===s&&(s=r,r=!1);var a=e(t,s,!0),u=e(o?o.value:n,s,!0);return!(!a.isValid()||!u.isValid())&&(a.isBefore(u)||r&&a.isSame(u))}},de=function(e){return function(t,i){var n=i[0];return e(t,n,!0).isValid()}},he=function(e){return function(t,i){var n,r,s,o="()";if(i.length>3){var a;a=i,n=a[0],r=a[1],o=a[2],s=a[3]}else{var u;u=i,n=u[0],r=u[1],s=u[2]}var l=e(n,s,!0),c=e(r,s,!0),f=e(t,s,!0);return!!(l.isValid()&&c.isValid()&&f.isValid())&&f.isBetween(l,c,"days",o)}},pe={after:function(e,t){return"The "+e+" must be after "+t[0]+"."},before:function(e,t){return"The "+e+" must be before "+t[0]+"."},date_between:function(e,t){return"The "+e+" must be between "+t[0]+" and "+t[1]+"."},date_format:function(e,t){return"The "+e+" must be in the format "+t[0]+"."}},ve={make:function(e){return{date_format:de(e),after:ce(e),before:fe(e),date_between:he(e)}},messages:pe,installed:!1},me="en",ge=!0,_e=new ue({en:{messages:le,attributes:{},custom:{}}}),ye=function(e,t){void 0===t&&(t={init:!0,vm:null}),this.strictMode=ge,this.$scopes={__global__:{}},this._createFields(e),this.errorBag=new G,this.fieldBag={},this.paused=!1,this.$vm=t.vm,this.$deferred=[],this.$ready=!1,"function"==typeof moment&&this.installDateTimeValidators(moment),t.init&&this.init()},be={dictionary:{},locale:{},rules:{}};be.dictionary.get=function(){return _e},be.locale.get=function(){return me},be.rules.get=function(){return U},ye._merge=function(e,t){if(ee(t))return void(U[e]=t);U[e]=t.validate,ee(t.getMessage)&&_e.setMessage(me,e,t.getMessage),t.messages&&_e.merge(Object.keys(t.messages).reduce(function(i,n){var r=i;r[n]={messages:(s={},s[e]=t.messages[n],s)};var s;return r},{}))},ye._guardExtend=function(e,t){if(U[e])throw new J("Extension Error: There is an existing validator with the same name '"+e+"'.");if(!ee(t)){if(!ee(t.validate))throw new J("Extension Error: The validator '"+e+"' must be a function or have a 'validate' method.");if(!ee(t.getMessage)&&!X(t.messages))throw new J("Extension Error: The validator '"+e+"' must have a 'getMessage' method or have a 'messages' object.")}},ye.create=function(e,t){return new ye(e,t)},ye.extend=function(e,t){ye._guardExtend(e,t),ye._merge(e,t)},ye.installDateTimeValidators=function(e){if("function"!=typeof e)return Q("To use the date-time validators you must provide moment reference."),!1;if(ve.installed)return!0;var t=ve.make(e);return Object.keys(t).forEach(function(e){ye.extend(e,t[e])}),ye.updateDictionary({en:{messages:ve.messages}}),ve.installed=!0,!0},ye.remove=function(e){delete U[e]},ye.setLocale=function(e){void 0===e&&(e="en"),_e.hasLocale(e)||Q("You are setting the validator locale to a locale that is not defined in the dicitionary. English messages may still be generated."),me=e},ye.setStrictMode=function(e){void 0===e&&(e=!0),ge=e},ye.updateDictionary=function(e){_e.merge(e)},ye.addLocale=function(e){if(!e.name)return void Q("Your locale must have a name property");this.updateDictionary((t={},t[e.name]=e,t));var t},ye.prototype.addLocale=function(e){ye.addLocale(e)},ye.prototype._resolveScope=function(e){if("string"==typeof e)return e;if(ee(e)){var t=e();return"string"==typeof t?t:"__global__"}return"__global__"},ye.prototype._resolveValuesFromGetters=function(e){var t=this;if(void 0===e&&(e="__global__"),!this.$scopes[e])return{};var i={};return Object.keys(this.$scopes[e]).forEach(function(n){var r=t.$scopes[e][n],s=r.getter,o=r.context,a=t._resolveScope(r.scope);s&&o&&("__global__"===e||a===e)&&(i[n]={value:s(o()),scope:a})}),i},ye.prototype._createFields=function(e){var t=this;e&&Object.keys(e).forEach(function(i){t._createField(i,e[i])})},ye.prototype._createField=function(e,t,i){void 0===i&&(i="__global__"),i=this._resolveScope(i),this.$scopes[i]||(this.$scopes[i]={}),this.$scopes[i][e]||(this.$scopes[i][e]={});var n=this.$scopes[i][e];n.validations=this._normalizeRules(e,t,i),n.required=this._isRequired(n)},ye.prototype._normalizeRules=function(e,t,i){return t?"string"==typeof t?this._normalizeString(t):X(t)?this._normalizeObject(t):(Q("Your checks for '"+i+"."+e+"' must be either a string or an object."),{}):{}},ye.prototype._isRequired=function(e){return e.validations&&e.validations.required},ye.prototype._normalizeObject=function(e){var t=this,i={};return Object.keys(e).forEach(function(n){var r=[];if(r=!0===e[n]?[]:Array.isArray(e[n])?e[n]:[e[n]],!1===e[n]?delete i[n]:i[n]=r,ve.installed&&t._isADateRule(n)){var s=t._getDateFormat(i);t._containsValidation(i[n],s)||i[n].push(t._getDateFormat(i))}}),i},ye.prototype._getDateFormat=function(e){return e.date_format&&Array.isArray(e.date_format)?e.date_format[0]:null},ye.prototype._isADateRule=function(e){return!!~["after","before","date_between"].indexOf(e)},ye.prototype._containsValidation=function(e,t){return!!~e.indexOf(t)},ye.prototype._normalizeString=function(e){var t=this,i={};return e.split("|").forEach(function(e){var n=t._parseRule(e);if(n.name&&("required"===n.name&&(i.required=!0),i[n.name]=n.params,ve.installed&&t._isADateRule(n.name))){var r=t._getDateFormat(i);t._containsValidation(i[n.name],r)||i[n.name].push(t._getDateFormat(i))}}),i},ye.prototype._parseRule=function(e){var t=[],i=e.split(":")[0];return~e.indexOf(":")&&(t=e.split(":").slice(1).join(":").split(",")),{name:i,params:t}},ye.prototype._formatErrorMessage=function(e,t,i,n){void 0===i&&(i={}),void 0===n&&(n="__global__");var r=this._getFieldDisplayName(e,n),s=this._getLocalizedParams(t,n);if(!this.dictionary.hasLocale(me)){var o=this.dictionary.getFieldMessage("en",e,t.name);return ee(o)?o(r,s,i):o}var a=this.dictionary.getFieldMessage(me,e,t.name);return ee(a)?a(r,s,i):a},ye.prototype._getLocalizedParams=function(e,t){if(void 0===t&&(t="__global__"),~["after","before","confirmed"].indexOf(e.name)&&e.params&&e.params[0]){var i=this.$scopes[t][e.params[0]];return i&&i.name?[i.name]:[this.dictionary.getAttribute(me,e.params[0],e.params[0])]}return e.params},ye.prototype._getFieldDisplayName=function(e,t){return void 0===t&&(t="__global__"),this.$scopes[t][e].as||this.dictionary.getAttribute(me,e,e)},ye.prototype._test=function(e,t,i,n){var r=this;void 0===n&&(n="__global__");var s=U[i.name];if(!s||"function"!=typeof s)throw new J("No such validator '"+i.name+"' exists.");var o=s(t,i.params,e);return ee(o.then)?o.then(function(t){var s=!0,o={};return Array.isArray(t)?s=t.every(function(e){return e.valid}):(s=t.valid,o=t.data),s||r.errorBag.add(e,r._formatErrorMessage(e,i,o,n),i.name,n),s}):(X(o)||(o={valid:o,data:{}}),o.valid||this.errorBag.add(e,this._formatErrorMessage(e,i,o.data,n),i.name,n),o.valid)},ye.prototype.on=function(e,t,i,n){if(!t)throw new J("Cannot add a listener for non-existent field "+t+".");if(!ee(n))throw new J("The "+e+" callback for field "+t+" is not callable.");this.$scopes[i][t].events[e]=n},ye.prototype.off=function(e,t,i){t||Q("Cannot remove a listener for non-existent field "+t+"."),this.$scopes[i][t].events[e]=void 0},ye.prototype._assignFlags=function(e){e.flags={untouched:!0,touched:!1,dirty:!1,pristine:!0,valid:null,invalid:null,required:e.required,pending:!1};var t={};if(t[e.name]=e.flags,"__global__"===e.scope)return void(this.fieldBag=se({},this.fieldBag,t));var i=se({},this.fieldBag["$"+e.scope],t);this.fieldBag=se({},this.fieldBag,(n={},n["$"+e.scope]=i,n));var n},ye.prototype.attach=function(e,t,i){var n=this;void 0===i&&(i={});var r=function(){i.scope=n._resolveScope(i.scope),n.updateField(e,t,i);var r=n.$scopes[i.scope][e];r.scope=i.scope,r.name=e,r.as=i.prettyName,r.getter=i.getter,r.context=i.context,r.listeners=i.listeners||{detach:function(){}},r.el=r.listeners.el,r.events={},n._assignFlags(r),r.el&&ee(r.el.setAttribute)&&r.el.setAttribute("data-vv-scope",r.scope),r.listeners.classes&&r.listeners.classes.attach(r),n._setAriaRequiredAttribute(r),n._setAriaValidAttribute(r,!0),i.initial&&n.validate(e,r.getter(r.context()),r.scope).catch(function(){})};if(!(ee(i.scope)?i.scope():i.scope)&&!this.$ready)return void this.$deferred.push(r);r()},ye.prototype.init=function(){return this.$ready=!0,this.$deferred.forEach(function(e){e()}),this.$deferred=[],this},ye.prototype.flag=function(e,t){var i=e.split("."),n=i[0],r=i[1];r||(r=n,n=null);var s=n?K(n+"."+r,this.$scopes):this.$scopes.__global__[r];s&&(Object.keys(s.flags).forEach(function(e){s.flags[e]=void 0!==t[e]?t[e]:s.flags[e]}),s.listeners.classes.sync())},ye.prototype.append=function(e,t,i){void 0===i&&(i={}),i.scope=this._resolveScope(i.scope),this.$scopes[i.scope]&&this.$scopes[i.scope][e]||this.attach(e,t,i);var n=this.$scopes[i.scope][e],r=this._normalizeRules(e,t,i.scope);Object.keys(r).forEach(function(e){n.validations[e]=r[e]})},ye.prototype.updateField=function(e,t,i){void 0===i&&(i={});var n=K(i.scope+"."+e,this.$scopes,null),r=n?JSON.stringify(n.validations):"";this._createField(e,t,i.scope),n=K(i.scope+"."+e,this.$scopes,null),(n?JSON.stringify(n.validations):"")!==r&&this.errorBag.remove(e,i.scope)},ye.prototype.clean=function(){var e=this;this.$vm&&ee(this.$vm.$nextTick)&&this.$vm.$nextTick(function(){e.errorBag.clear()})},ye.prototype.detach=function(e,t){void 0===t&&(t="__global__"),this.$scopes[t]&&this.$scopes[t][e]&&(this.$scopes[t][e].listeners&&this.$scopes[t][e].listeners.detach(),this.errorBag.remove(e,t),delete this.$scopes[t][e])},ye.prototype.extend=function(e,t){ye.extend(e,t)},ye.prototype.getErrors=function(){return this.errorBag},ye.prototype.installDateTimeValidators=function(e){ye.installDateTimeValidators(e)},ye.prototype.remove=function(e){ye.remove(e)},ye.prototype.setLocale=function(e){this.dictionary.hasLocale(e)||Q("You are setting the validator locale to a locale that is not defined in the dicitionary. English messages may still be generated."),me=e},ye.prototype.setStrictMode=function(e){void 0===e&&(e=!0),this.strictMode=e},ye.prototype.updateDictionary=function(e){ye.updateDictionary(e)},ye.prototype.addScope=function(e){e&&!this.$scopes[e]&&(this.$scopes[e]={})},ye.prototype.validate=function(e,t,i,n){var r=this;if(void 0===i&&(i="__global__"),void 0===n&&(n=!0),this.paused)return Promise.resolve(!0);if(e&&e.indexOf(".")>-1&&!this.$scopes.__global__[e]){var s;s=e.split("."),i=s[0],e=s[1]}if(i||(i="__global__"),!this.$scopes[i]||!this.$scopes[i][e]){if(!this.strictMode)return Promise.resolve(!0);throw Q('Validating a non-existant field: "'+("__global__"===i?e:i+"."+e)+'". Use "attach()" first.'),new J("Validation Failed")}var o=this.$scopes[i][e];if(o.flags&&(o.flags.pending=!0),this.errorBag.remove(e,i),!o.required&&~[null,void 0,""].indexOf(t))return this._setAriaValidAttribute(o,!0),o.events&&ee(o.events.after)&&o.events.after({valid:!0}),Promise.resolve(!0);try{var a=Object.keys(o.validations).map(function(n){var s=r._test(e,t,{name:n,params:o.validations[n]},i);if(ee(s.then))return s;if(!s)throw o.events&&ee(o.events.after)&&o.events.after({valid:!1}),new J("Validation Aborted.");return o.events&&ee(o.events.after)&&o.events.after({valid:!0}),Promise.resolve(s)});return Promise.all(a).then(function(e){var t=e.every(function(e){return e});if(r._setAriaValidAttribute(o,t),!t&&n)throw o.events&&ee(o.events.after)&&o.events.after({valid:!1}),new J("Failed Validation");return t})}catch(e){if("[vee-validate]: Validation Aborted."===e.msg)return o.events&&ee(o.events.after)&&o.events.after({valid:!1}),Promise.resolve(!1);throw e}},ye.prototype._setAriaValidAttribute=function(e,t){e.el&&!e.listeners.component&&e.el.setAttribute("aria-invalid",!t)},ye.prototype._setAriaRequiredAttribute=function(e){e.el&&!e.listeners.component&&e.el.setAttribute("aria-required",!!e.required)},ye.prototype.pause=function(){return this.paused=!0,this},ye.prototype.resume=function(){return this.paused=!1,this},ye.prototype.validateAll=function(e,t){var i=this;if(void 0===t&&(t="__global__"),this.paused)return Promise.resolve(!0);var n;e&&"string"!=typeof e?(n={},Object.keys(e).forEach(function(i){n[i]={value:e[i],scope:t}})):(this.errorBag.clear(e),n=this._resolveValuesFromGetters(e));var r=Object.keys(n).map(function(e){return i.validate(e,n[e].value,n[e].scope,!1)});return Promise.all(r).then(function(e){var t=e.every(function(e){return e});if(!t)throw new J("Validation Failed");return t})},ye.prototype.validateScopes=function(){var e=this;return this.paused?Promise.resolve(!0):Promise.all(Object.keys(this.$scopes).map(function(t){return e.validateAll(t)}))},Object.defineProperties(ye.prototype,be);var $e=function(e){
return!!e&&(!(!Array.isArray(e)||!~e.indexOf("$validator"))||!(!X(e)||!e.$validator))},xe=function(e,t){var i={};return i.provide=function(){return this.$validator?{$validator:this.$validator}:{}},i.beforeCreate=function(){!this.$options.$validates&&this.$parent||(this.$validator=new ye(null,{init:!1,vm:this}));var i=$e(this.$options.inject);this.$validator||!t.inject||i||(this.$validator=new ye(null,{init:!1,vm:this})),(i||this.$validator)&&(!i&&this.$validator&&(e.util.defineReactive(this.$validator,"errorBag",this.$validator.errorBag),e.util.defineReactive(this.$validator,"fieldBag",this.$validator.fieldBag)),this.$options.computed||(this.$options.computed={}),this.$options.computed[t.errorBagName]=function(){return this.$validator.errorBag},this.$options.computed[t.fieldsBagName]=function(){return this.$validator.fieldBag})},i.mounted=function(){this.$validator&&this.$validator.init()},i},Ae={touched:"touched",untouched:"untouched",valid:"valid",invalid:"invalid",pristine:"pristine",dirty:"dirty"},we=function(e,t,i){void 0===i&&(i={}),this.el=e,this.validator=t,this.enabled=i.enableAutoClasses,this.classNames=se({},Ae,i.classNames||{}),this.component=i.component,this.listeners={}};we.prototype.reset=function(){this.detach(),this.remove(this.classNames.dirty),this.remove(this.classNames.touched),this.remove(this.classNames.valid),this.remove(this.classNames.invalid),this.attach(this.field)},we.prototype.sync=function(){this.addInteractionListeners(),this.enabled&&(this.toggle(this.classNames.dirty,this.field.flags.dirty),this.toggle(this.classNames.pristine,this.field.flags.pristine),this.toggle(this.classNames.valid,this.field.flags.valid),this.toggle(this.classNames.invalid,this.field.flags.invalid),this.toggle(this.classNames.touched,this.field.flags.touched),this.toggle(this.classNames.untouched,this.field.flags.untouched))},we.prototype.addFocusListener=function(){var e=this;this.listeners.focus=function(){e.remove(e.classNames.untouched),e.add(e.classNames.touched),e.field.flags.touched=!0,e.field.flags.untouched=!1,e.component||(e.el.removeEventListener("focus",e.listeners.focus),e.listeners.focus=null)},this.component?this.component.$once("focus",this.listeners.focus):this.el.addEventListener("focus",this.listeners.focus)},we.prototype.addInputListener=function(){var e=this;this.listeners.input=function(){e.remove(e.classNames.pristine),e.add(e.classNames.dirty),e.field.flags.dirty=!0,e.field.flags.pristine=!1,e.component||(e.el.removeEventListener("input",e.listeners.input),e.listeners.input=null)},this.component?this.component.$once("input",this.listeners.input):this.el.addEventListener("input",this.listeners.input)},we.prototype.addInteractionListeners=function(){this.listeners.focus||this.addFocusListener(),this.listeners.input||this.addInputListener()},we.prototype.attach=function(e){var t=this;this.field=e,this.add(this.classNames.pristine),this.add(this.classNames.untouched),this.addInteractionListeners(),this.listeners.after=function(e){t.remove(e.valid?t.classNames.invalid:t.classNames.valid),t.add(e.valid?t.classNames.valid:t.classNames.invalid),t.field.flags.valid=e.valid,t.field.flags.invalid=!e.valid,t.field.flags.pending=!1},this.validator.on("after",this.field.name,this.field.scope,this.listeners.after)},we.prototype.detach=function(){this.field&&(this.component?(this.component.$off("input",this.listeners.input),this.component.$off("focus",this.listeners.focus)):(this.el.removeEventListener("focus",this.listeners.focus),this.el.removeEventListener("input",this.listeners.input)),this.validator.off("after",this.field.name,this.field.scope))},we.prototype.add=function(e){this.enabled&&ie(this.el,e)},we.prototype.remove=function(e){this.enabled&&ne(this.el,e)},we.prototype.toggle=function(e,t){if(t)return void this.add(e);this.remove(e)};var Fe={locale:"en",delay:0,errorBagName:"errors",dictionary:null,strict:!0,fieldsBagName:"fields",enableAutoClasses:!1,classNames:{},events:"input|blur",inject:!0},Ee=function(e,t,i,n){this.unwatch=void 0,this.callbacks=[],this.el=e,this.scope=X(t.value)?t.value.scope:W(e),this.binding=t,this.vm=i.context,this.component=i.child,this.options=se({},Fe,n),this.fieldName=this._resolveFieldName(),this.model=this._resolveModel(i.data.directives),this.classes=new we(e,this.vm.$validator,{component:this.component,enableAutoClasses:n.enableAutoClasses,classNames:n.classNames})};Ee.prototype._resolveModel=function(e){var t=/^[a-z_]+[0-9]*(\w*\.[a-z_]\w*)*$/i,i=oe(e,function(e){return"model"===e.name&&t.test(e.expression)});return i&&this._isExistingPath(i.expression)&&i.expression},Ee.prototype._isExistingPath=function(e){var t=this.vm;return e.split(".").every(function(e){return!!Object.prototype.hasOwnProperty.call(t,e)&&(t=t[e],!0)})},Ee.prototype._resolveFieldName=function(){return this.component?Y(this.el,"name")||this.component.name:Y(this.el,"name")||this.el.name},Ee.prototype._hasFieldDependency=function(e){var t=this,i=!1;return!!e&&(X(e)?(Object.keys(e).forEach(function(t){if(/confirmed|after|before/.test(t))return i=e[t],!1}),i):(e.split("|").every(function(e){return/\b(confirmed|after|before):/.test(e)?(i=e.split(":")[1],!1):!/\b(confirmed)/.test(e)||(i=t.fieldName+"_confirmation",!1)}),i))},Ee.prototype._inputListener=function(){return this._validate(this.el.value)},Ee.prototype._fileListener=function(){var e=this;return this._validate(re(this.el.files)).then(function(t){!t&&e.binding.modifiers.reject&&(e.el.value="")})},Ee.prototype._radioListener=function(){var e=document.querySelector('input[name="'+this.el.name+'"]:checked');return this._validate(e?e.value:null)},Ee.prototype._checkboxListener=function(){var e=this,t=document.querySelectorAll('input[name="'+this.el.name+'"]:checked');if(!t||!t.length)return void this._validate(null);re(t).forEach(function(t){e._validate(t.value)})},Ee.prototype._validate=function(e){return this.vm.$validator.validate(this.fieldName,e,this.scope||W(this.el)).catch(function(e){return e})},Ee.prototype._getScopedListener=function(e){var t=this;return function(i){(!i||i===t.scope||i instanceof window.Event)&&e()}},Ee.prototype._attachValidatorEvent=function(){var e=this,t=this._getScopedListener(this._getSuitableListener().listener.bind(this)),i=this._hasFieldDependency(ae(this.binding.expression,this.binding.value,this.el));i&&this.vm.$nextTick(function(){var n=document.querySelector("input[name='"+i+"']");if(!n)return void Q("Cannot find target field, no additional listeners were attached.");(Y(e.el,"validate-on")||e.options.events).split("|").forEach(function(i){n.addEventListener(i,t,!1),e.callbacks.push({name:i,listener:t,el:n})})})},Ee.prototype._getSuitableListener=function(){var e,t={input:"input",blur:"blur"};if("SELECT"===this.el.tagName)t.input="change",e={names:["change","blur"],listener:this._inputListener};else switch(this.el.type){case"file":t.input="change",t.blur=null,e={names:["change"],listener:this._fileListener};break;case"radio":t.input="change",t.blur=null,e={names:["change"],listener:this._radioListener};break;case"checkbox":t.input="change",t.blur=null,e={names:["change"],listener:this._checkboxListener};break;default:e={names:["input","blur"],listener:this._inputListener}}var i=Y(this.el,"validate-on")||this.options.events;return e.names=i.split("|").filter(function(e){return null!==t[e]}).map(function(e){return t[e]||e}),e},Ee.prototype._attachComponentListeners=function(){var e=this;this.componentListener=H(function(t){e._validate(t)},Y(this.el,"delay")||this.options.delay),this.component.$on("input",this.componentListener),this.componentPropUnwatch=this.component.$watch("value",this.componentListener)},Ee.prototype._attachFieldListeners=function(){var e=this;if(this.component)return void this._attachComponentListeners();var t=this._getSuitableListener(),i=H(t.listener.bind(this),Y(this.el,"delay")||this.options.delay);if(~["radio","checkbox"].indexOf(this.el.type))return void this.vm.$nextTick(function(){var n=document.querySelectorAll('input[name="'+e.el.name+'"]');re(n).forEach(function(n){t.names.forEach(function(t){n.addEventListener(t,i,!1),e.callbacks.push({name:t,listener:i,el:n})})})});t.names.forEach(function(t){e.el.addEventListener(t,i,!1),e.callbacks.push({name:t,listener:i,el:e.el})})},Ee.prototype._resolveValueGetter=function(){var e=this;if(this.component)return{context:function(){return e.component},getter:function(e){return e.value}};switch(this.el.type){case"checkbox":return{context:function(){return document.querySelectorAll('input[name="'+e.el.name+'"]:checked')},getter:function(e){return e&&e.length?re(e).map(function(e){return e.value}):null}};case"radio":return{context:function(){return document.querySelector('input[name="'+e.el.name+'"]:checked')},getter:function(e){return e&&e.value}};case"file":return{context:function(){return e.el},getter:function(e){return re(e.files)}};default:return{context:function(){return e.el},getter:function(e){return e.value}}}},Ee.prototype._getArg=function(){return this.binding.arg?this.binding.arg:this.model?this.model:X(this.binding.value)?this.binding.value.arg:null},Ee.prototype._attachModelWatcher=function(e){var t=this,i=Y(this.el,"validate-on")||this.options.events,n=H(this._getSuitableListener().listener.bind(this),Y(this.el,"delay")||this.options.delay);i.split("|").forEach(function(i){if(~["input","change"].indexOf(i)){var r=H(function(e){t.vm.$validator.validate(t.fieldName,e,t.scope||W(t.el)).catch(function(e){return e})},Y(t.el,"delay")||t.options.delay);return void(t.unwatch=t.vm.$watch(e,r,{deep:!0}))}t.el.addEventListener(i,n,!1),t.callbacks.push({name:i,listener:n,el:t.el})})},Ee.prototype.attach=function(){var e=this,t=this._resolveValueGetter(),i=t.context,n=t.getter;if(this.vm.$validator.attach(this.fieldName,ae(this.binding.expression,this.binding.value,this.el),{scope:function(){return e.scope||W(e.el)},prettyName:Y(this.el,"as")||this.el.title,context:i,getter:n,listeners:this,initial:this.binding.modifiers.initial}),!this.binding.modifiers.disable){this._attachValidatorEvent();var r=this._getArg();if(r)return void this._attachModelWatcher(r);this._attachFieldListeners()}},Ee.prototype.detach=function(){this.component&&(this.component.$off("input",this.componentListener),ee(this.componentPropUnwatch)&&this.componentPropUnwatch()),this.unwatch&&this.unwatch(),this.classes.detach(),this.callbacks.forEach(function(e){e.el.removeEventListener(e.name,e.listener)}),this.callbacks=[]};var Le=[],Ne=function(e){return{inserted:function(t,i,n){if(!n.context.$validator){var r=n.context.$options._componentTag;return void Q("No validator instance is present on "+(r?'component "'+r+'"':"un-named component")+", did you forget to inject '$validator'?")}var s=new Ee(t,i,n,e);s.attach(),Le.push({vm:n.context,el:t,instance:s})},update:function(e,t,i){var n=t.expression,r=t.value,s=i.context,o=oe(Le,function(t){return t.vm===s&&t.el===e}),a=o.instance;if(n&&a.cachedExp!==JSON.stringify(r)){a.cachedExp=JSON.stringify(r);var u=X(r)?r.scope||W(e):W(e);s.$validator.updateField(a.fieldName,ae(n,r,e),{scope:u||"__global__"})}},unbind:function(e,t,i){var n=t.value,r=i.context,s=oe(Le,function(t){return t.vm===r&&t.el===e});if(void 0!==s){var o=X(n)?n.scope:W(e)||"__global__";r.$validator.detach(s.instance.fieldName,o),Le.splice(Le.indexOf(s),1)}}}},je=function(e){return Array.isArray(e)?e.reduce(function(e,t){return~t.indexOf(".")?e[t.split(".")[1]]=t:e[t]=t,e},{}):e},Oe=function(e){var t=je(e);return Object.keys(t).reduce(function(e,i){var n=t[i];return e[i]=function(){if(this.$validator.fieldBag[n])return this.$validator.fieldBag[n];if(n.indexOf(".")<=0)return{};var e=n.split("."),t=e[0],i=e[1];return K("$"+t+"."+i,this.$validator.fieldBag,{})},e},{})};return{install:function(e,t){var i=se({},Fe,t);i.dictionary&&ye.updateDictionary(i.dictionary),ye.setLocale(i.locale),ye.setStrictMode(i.strict),e.mixin(xe(e,i)),e.directive("validate",Ne(i))},mapFields:Oe,Validator:ye,ErrorBag:G,Rules:U,version:"2.0.0-rc.4"}});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.VeeValidate=t()}(this,function(){"use strict";function e(e){return e&&e.__esModule?e.default:e}function t(e,t){return t={exports:{}},e(t,t.exports),t.exports}var i={en:/^[A-Z]*$/i,cs:/^[A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]*$/i,da:/^[A-ZÆØÅ]*$/i,de:/^[A-ZÄÖÜß]*$/i,es:/^[A-ZÁÉÍÑÓÚÜ]*$/i,fr:/^[A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]*$/i,nl:/^[A-ZÉËÏÓÖÜ]*$/i,hu:/^[A-ZÁÉÍÓÖŐÚÜŰ]*$/i,pl:/^[A-ZĄĆĘŚŁŃÓŻŹ]*$/i,pt:/^[A-ZÃÁÀÂÇÉÊÍÕÓÔÚÜ]*$/i,ru:/^[А-ЯЁ]*$/i,sr:/^[A-ZČĆŽŠĐ]*$/i,tr:/^[A-ZÇĞİıÖŞÜ]*$/i,uk:/^[А-ЩЬЮЯЄIЇҐ]*$/i,ar:/^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]*$/},n={en:/^[A-Z\s]*$/i,cs:/^[A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ\s]*$/i,da:/^[A-ZÆØÅ\s]*$/i,de:/^[A-ZÄÖÜß\s]*$/i,es:/^[A-ZÁÉÍÑÓÚÜ\s]*$/i,fr:/^[A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ\s]*$/i,nl:/^[A-ZÉËÏÓÖÜ\s]*$/i,hu:/^[A-ZÁÉÍÓÖŐÚÜŰ\s]*$/i,pl:/^[A-ZĄĆĘŚŁŃÓŻŹ\s]*$/i,pt:/^[A-ZÃÁÀÂÇÉÊÍÕÓÔÚÜ\s]*$/i,ru:/^[А-ЯЁ\s]*$/i,sr:/^[A-ZČĆŽŠĐ\s]*$/i,tr:/^[A-ZÇĞİıÖŞÜ\s]*$/i,uk:/^[А-ЩЬЮЯЄIЇҐ\s]*$/i,ar:/^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ\s]*$/},r={en:/^[0-9A-Z]*$/i,cs:/^[0-9A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]*$/i,da:/^[0-9A-ZÆØÅ]$/i,de:/^[0-9A-ZÄÖÜß]*$/i,es:/^[0-9A-ZÁÉÍÑÓÚÜ]*$/i,fr:/^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]*$/i,hu:/^[0-9A-ZÁÉÍÓÖŐÚÜŰ]*$/i,nl:/^[0-9A-ZÉËÏÓÖÜ]*$/i,pl:/^[0-9A-ZĄĆĘŚŁŃÓŻŹ]*$/i,pt:/^[0-9A-ZÃÁÀÂÇÉÊÍÕÓÔÚÜ]*$/i,ru:/^[0-9А-ЯЁ]*$/i,sr:/^[0-9A-ZČĆŽŠĐ]*$/i,tr:/^[0-9A-ZÇĞİıÖŞÜ]*$/i,uk:/^[0-9А-ЩЬЮЯЄIЇҐ]*$/i,ar:/^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]*$/},s={en:/^[0-9A-Z_-]*$/i,cs:/^[0-9A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ_-]*$/i,da:/^[0-9A-ZÆØÅ_-]*$/i,de:/^[0-9A-ZÄÖÜß_-]*$/i,es:/^[0-9A-ZÁÉÍÑÓÚÜ_-]*$/i,fr:/^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ_-]*$/i,nl:/^[0-9A-ZÉËÏÓÖÜ_-]*$/i,hu:/^[0-9A-ZÁÉÍÓÖŐÚÜŰ_-]*$/i,pl:/^[0-9A-ZĄĆĘŚŁŃÓŻŹ_-]*$/i,pt:/^[0-9A-ZÃÁÀÂÇÉÊÍÕÓÔÚÜ_-]*$/i,ru:/^[0-9А-ЯЁ_-]*$/i,sr:/^[0-9A-ZČĆŽŠĐ_-]*$/i,tr:/^[0-9A-ZÇĞİıÖŞÜ_-]*$/i,uk:/^[0-9А-ЩЬЮЯЄIЇҐ_-]*$/i,ar:/^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ_-]*$/},o=function(e,t){void 0===t&&(t=[null]);var n=t[0];return n?(i[n]||i.en).test(e):Object.keys(i).some(function(t){return i[t].test(e)})},a=function(e,t){void 0===t&&(t=[null]);var i=t[0];return i?(s[i]||s.en).test(e):Object.keys(s).some(function(t){return s[t].test(e)})},u=function(e,t){void 0===t&&(t=[null]);var i=t[0];return i?(r[i]||r.en).test(e):Object.keys(r).some(function(t){return r[t].test(e)})},l=function(e,t){void 0===t&&(t=[null]);var i=t[0];return i?(n[i]||n.en).test(e):Object.keys(n).some(function(t){return n[t].test(e)})},c=function(e,t){var i=t[0],n=t[1];return Number(i)<=e&&Number(n)>=e},f=function(e,t,i){var n=t[0],r=n?document.querySelector("input[name='"+n+"']"):document.querySelector("input[name='"+i+"_confirmation']");return!(!r||String(e)!==r.value)},d=t(function(e,t){function i(e){if("string"!=typeof e)throw new TypeError("This library (validator.js) validates strings only")}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i,e.exports=t.default}),h=t(function(e,t){function i(e){(0,n.default)(e);var t=e.replace(/[^0-9]+/g,"");if(!r.test(t))return!1;for(var i=0,s=void 0,o=void 0,a=void 0,u=t.length-1;u>=0;u--)s=t.substring(u,u+1),o=parseInt(s,10),a?(o*=2,i+=o>=10?o%10+1:o):i+=o,a=!a;return!(i%10!=0||!t)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var n=function(e){return e&&e.__esModule?e:{default:e}}(d),r=/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})|62[0-9]{14}$/;e.exports=t.default}),p=e(h),v=function(e){return p(String(e))},m=function(e,t){var i=Array.isArray(t)?t[0]||"*":"*";if(Array.isArray(e))return!1;if(null===e||void 0===e||""===e)return!0;if(0===Number(i))return/^-?\d*$/.test(e);var n="*"===i?"+":"{1,"+i+"}";if(!new RegExp("^-?\\d*(\\.\\d"+n+")?$").test(e))return!1;var r=parseFloat(e);return r===r},g=function(e,t){var i=t[0],n=String(e);return/^[0-9]*$/.test(n)&&n.length===Number(i)},_=function(e,t,i){var n=window.URL||window.webkitURL;return new Promise(function(r){var s=new Image;s.onerror=function(){return r({valid:!1})},s.onload=function(){return r({valid:s.width===Number(t)&&s.height===Number(i)})},s.src=n.createObjectURL(e)})},y=function(e,t){for(var i=t[0],n=t[1],r=[],s=0;s<e.length;s++){if(!/\.(jpg|svg|jpeg|png|bmp|gif)$/i.test(e[s].name))return!1;r.push(e[s])}return Promise.all(r.map(function(e){return _(e,i,n)}))},b=t(function(e,t){function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1];for(var i in t)void 0===e[i]&&(e[i]=t[i]);return e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i,e.exports=t.default}),$=t(function(e,t){function i(e,t){(0,r.default)(e);var i=void 0,s=void 0;"object"===(void 0===t?"undefined":n(t))?(i=t.min||0,s=t.max):(i=arguments[1],s=arguments[2]);var o=encodeURI(e).split(/%..|./).length-1;return o>=i&&(void 0===s||o<=s)}Object.defineProperty(t,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.default=i;var r=function(e){return e&&e.__esModule?e:{default:e}}(d);e.exports=t.default}),x=t(function(e,t){function i(e){return e&&e.__esModule?e:{default:e}}function n(e,t){(0,r.default)(e),t=(0,s.default)(t,o),t.allow_trailing_dot&&"."===e[e.length-1]&&(e=e.substring(0,e.length-1));var i=e.split(".");if(t.require_tld){var n=i.pop();if(!i.length||!/^([a-z\u00a1-\uffff]{2,}|xn[a-z0-9-]{2,})$/i.test(n))return!1}for(var a,u=0;u<i.length;u++){if(a=i[u],t.allow_underscores&&(a=a.replace(/_/g,"")),!/^[a-z\u00a1-\uffff0-9-]+$/i.test(a))return!1;if(/[\uff01-\uff5e]/.test(a))return!1;if("-"===a[0]||"-"===a[a.length-1])return!1}return!0}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;var r=i(d),s=i(b),o={require_tld:!0,allow_underscores:!1,allow_trailing_dot:!1};e.exports=t.default}),A=t(function(e,t){function i(e){return e&&e.__esModule?e:{default:e}}function n(e,t){if((0,r.default)(e),t=(0,s.default)(t,u),t.require_display_name||t.allow_display_name){var i=e.match(l);if(i)e=i[1];else if(t.require_display_name)return!1}var n=e.split("@"),d=n.pop(),v=n.join("@"),m=d.toLowerCase();if("gmail.com"!==m&&"googlemail.com"!==m||(v=v.replace(/\./g,"").toLowerCase()),!(0,o.default)(v,{max:64})||!(0,o.default)(d,{max:256}))return!1;if(!(0,a.default)(d,{require_tld:t.require_tld}))return!1;if('"'===v[0])return v=v.slice(1,v.length-1),t.allow_utf8_local_part?p.test(v):f.test(v);for(var g=t.allow_utf8_local_part?h:c,_=v.split("."),y=0;y<_.length;y++)if(!g.test(_[y]))return!1;return!0}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;var r=i(d),s=i(b),o=i($),a=i(x),u={allow_display_name:!1,require_display_name:!1,allow_utf8_local_part:!0,require_tld:!0},l=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\.\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\.\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF\s]*<(.+)>$/i,c=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i,f=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i,h=/^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i,p=/^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*$/i;e.exports=t.default}),w=e(A),F=function(e){return w(String(e))},E=function(e,t){var i=new RegExp(".("+t.join("|")+")$","i");return e.every(function(e){return i.test(e.name)})},L=function(e){return e.every(function(e){return/\.(jpg|svg|jpeg|png|bmp|gif)$/i.test(e.name)})},N=function(e,t){return!!t.filter(function(t){return t==e}).length},j=t(function(e,t){function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if((0,n.default)(e),!(t=String(t)))return i(e,4)||i(e,6);if("4"===t){if(!r.test(e))return!1;return e.split(".").sort(function(e,t){return e-t})[3]<=255}if("6"===t){var o=e.split(":"),a=!1,u=i(o[o.length-1],4),l=u?7:8;if(o.length>l)return!1;if("::"===e)return!0;"::"===e.substr(0,2)?(o.shift(),o.shift(),a=!0):"::"===e.substr(e.length-2)&&(o.pop(),o.pop(),a=!0);for(var c=0;c<o.length;++c)if(""===o[c]&&c>0&&c<o.length-1){if(a)return!1;a=!0}else if(u&&c===o.length-1);else if(!s.test(o[c]))return!1;return a?o.length>=1:o.length===l}return!1}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var n=function(e){return e&&e.__esModule?e:{default:e}}(d),r=/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/,s=/^[0-9A-F]{1,4}$/i;e.exports=t.default}),O=e(j),k=function(e,t){void 0===t&&(t=[4]);var i=t[0];return O(e,i)},S=function(e,t){var i=t[0];return void 0===e||null===e?i>=0:String(e).length<=i},T=function(e,t){var i=t[0];return!Array.isArray(e)&&null!==e&&void 0!==e&&""!==e&&Number(e)<=i},Z=function(e,t){var i=new RegExp(t.join("|").replace("*",".+")+"$","i");return e.every(function(e){return i.test(e.type)})},M=function(e,t){var i=t[0];return void 0!==e&&null!==e&&String(e).length>=i},q=function(e,t){var i=t[0];return!Array.isArray(e)&&null!==e&&void 0!==e&&""!==e&&Number(e)>=i},D=function(e,t){return!t.filter(function(t){return t==e}).length},B=function(e){return/^[0-9]+$/.test(String(e))},V=function(e,t){var i=t[0],n=t.slice(1);return i instanceof RegExp?i.test(e):new RegExp(i,n).test(String(e))},R=function(e){return Array.isArray(e)?!!e.length:void 0!==e&&null!==e&&!1!==e&&!!String(e).trim().length},P=function(e,t){var i=t[0];if(isNaN(i))return!1;for(var n=1024*Number(i),r=0;r<e.length;r++)if(e[r].size>n)return!1;return!0},z=t(function(e,t){function i(e){return e&&e.__esModule?e:{default:e}}function n(e){return"[object RegExp]"===Object.prototype.toString.call(e)}function r(e,t){for(var i=0;i<t.length;i++){var r=t[i];if(e===r||n(r)&&r.test(e))return!0}return!1}function s(e,t){if((0,o.default)(e),!e||e.length>=2083||/[\s<>]/.test(e))return!1;if(0===e.indexOf("mailto:"))return!1;t=(0,l.default)(t,c);var i=void 0,n=void 0,s=void 0,d=void 0,h=void 0,p=void 0,v=void 0,m=void 0;if(v=e.split("#"),e=v.shift(),v=e.split("?"),e=v.shift(),v=e.split("://"),v.length>1){if(i=v.shift(),t.require_valid_protocol&&-1===t.protocols.indexOf(i))return!1}else{if(t.require_protocol)return!1;t.allow_protocol_relative_urls&&"//"===e.substr(0,2)&&(v[0]=e.substr(2))}if(e=v.join("://"),v=e.split("/"),""===(e=v.shift())&&!t.require_host)return!0;if(v=e.split("@"),v.length>1&&(n=v.shift(),n.indexOf(":")>=0&&n.split(":").length>2))return!1;d=v.join("@"),p=m=null;var g=d.match(f);return g?(s="",m=g[1],p=g[2]||null):(v=d.split(":"),s=v.shift(),v.length&&(p=v.join(":"))),!(null!==p&&(h=parseInt(p,10),!/^[0-9]+$/.test(p)||h<=0||h>65535))&&(!!((0,u.default)(s)||(0,a.default)(s,t)||m&&(0,u.default)(m,6)||"localhost"===s)&&(s=s||m,!(t.host_whitelist&&!r(s,t.host_whitelist))&&(!t.host_blacklist||!r(s,t.host_blacklist))))}Object.defineProperty(t,"__esModule",{value:!0}),t.default=s;var o=i(d),a=i(x),u=i(j),l=i(b),c={protocols:["http","https","ftp"],require_tld:!0,require_protocol:!1,require_host:!0,require_valid_protocol:!0,allow_underscores:!1,allow_trailing_dot:!1,allow_protocol_relative_urls:!1},f=/^\[([^\]]+)\](?::([0-9]+))?$/;e.exports=t.default}),C=e(z),I=function(e,t){void 0===t&&(t=[!0]);var i=t[0];return C(e,{require_protocol:!!i})},U={alpha_dash:a,alpha_num:u,alpha_spaces:l,alpha:o,between:c,confirmed:f,credit_card:v,decimal:m,digits:g,dimensions:y,email:F,ext:E,image:L,in:N,ip:k,max:S,max_value:T,mimes:Z,min:M,min_value:q,not_in:D,numeric:B,regex:V,required:R,size:P,url:I},G=function(){this.errors=[]};G.prototype.add=function(e,t,i,n){void 0===n&&(n="__global__"),this.errors.push({field:e,msg:t,rule:i,scope:n})},G.prototype.all=function(e){return e?this.errors.filter(function(t){return t.scope===e}).map(function(e){return e.msg}):this.errors.map(function(e){return e.msg})},G.prototype.any=function(e){return e?!!this.errors.filter(function(t){return t.scope===e}).length:!!this.errors.length},G.prototype.clear=function(e){e||(e="__global__"),this.errors=this.errors.filter(function(t){return t.scope!==e})},G.prototype.collect=function(e,t,i){if(void 0===i&&(i=!0),!e){var n={};return this.errors.forEach(function(e){n[e.field]||(n[e.field]=[]),n[e.field].push(i?e.msg:e)}),n}return t?this.errors.filter(function(i){return i.field===e&&i.scope===t}).map(function(e){return i?e.msg:e}):this.errors.filter(function(t){return t.field===e}).map(function(e){return i?e.msg:e})},G.prototype.count=function(){return this.errors.length},G.prototype.first=function(e,t){var i=this;void 0===t&&(t="__global__");var n=this._selector(e),r=this._scope(e);if(r){var s=this.first(r.name,r.scope);if(s)return s}if(n)return this.firstByRule(n.name,n.rule,t);for(var o=0;o<this.errors.length;o++)if(i.errors[o].field===e&&i.errors[o].scope===t)return i.errors[o].msg;return null},G.prototype.firstRule=function(e,t){var i=this.collect(e,t,!1);return i.length&&i[0].rule||null},G.prototype.has=function(e,t){return void 0===t&&(t="__global__"),!!this.first(e,t)},G.prototype.firstByRule=function(e,t,i){var n=this.collect(e,i,!1).filter(function(e){return e.rule===t})[0];return n&&n.msg||null},G.prototype.remove=function(e,t){var i=t?function(i){return i.field!==e||i.scope!==t}:function(t){return t.field!==e||"__global__"!==t.scope};this.errors=this.errors.filter(i)},G.prototype._selector=function(e){if(e.indexOf(":")>-1){var t=e.split(":");return{name:t[0],rule:t[1]}}return null},G.prototype._scope=function(e){if(e.indexOf(".")>-1){var t=e.split("."),i=t[0];return{name:t[1],scope:i}}return null};var J=function(){function e(e){this.msg="[vee-validate]: "+e}return e.prototype.toString=function(){return this.msg},e}(),Y=function(e,t){return e.getAttribute("data-vv-"+t)},W=function(e){var t=Y(e,"scope");return!t&&e.form&&(t=Y(e.form,"scope")),t},K=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 Object.prototype.hasOwnProperty.call(n,e)?(n=n[e],!0):(n=i,!1)}),n},H=function(e,t,i){void 0===t&&(t=0),void 0===i&&(i=!0);var n;return function(){for(var r=[],s=arguments.length;s--;)r[s]=arguments[s];var o=function(){n=null,i||e.apply(void 0,r)},a=i&&!n;clearTimeout(n),n=setTimeout(o,t),a&&e.apply(void 0,r)}},Q=function(e){console&&console.warn("[vee-validate]: "+e)},X=function(e){return null!==e&&e&&"object"==typeof e&&!Array.isArray(e)},ee=function(e){return"function"==typeof e},te=function(e,t){return e.classList?e.classList.contains(t):!!e.className.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))},ie=function(e,t){if(e.classList)return void e.classList.add(t);te(e,t)||(e.className+=" "+t)},ne=function(e,t){if(e.classList)return void e.classList.remove(t);if(te(e,t)){var i=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(i," ")}},re=function(e){if(Array.from)return Array.from(e);for(var t=[],i=e.length,n=0;n<i;n++)t.push(e[n]);return t},se=function(e){for(var t=[],i=arguments.length-1;i-- >0;)t[i]=arguments[i+1];if(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(e){null!=e&&Object.keys(e).forEach(function(t){n[t]=e[t]})}),n},oe=function(e,t){if(e.find)return e.find(t);var i;return e.some(function(e){return!!t(e)&&(i=e,!0)}),i},ae=function(e,t,i){return e?"string"==typeof t?t:~["string","object"].indexOf(typeof t.rules)?t.rules:t:Y(i,"rules")},ue=function(e){void 0===e&&(e={}),this.dictionary={},this.merge(e)};ue.prototype.hasLocale=function(e){return!!this.dictionary[e]},ue.prototype.getMessage=function(e,t,i){return this.hasMessage(e,t)?this.dictionary[e].messages[t]:i||this._getDefaultMessage(e)},ue.prototype.getFieldMessage=function(e,t,i){if(!this.hasLocale(e))return this.getMessage(e,i);var n=this.dictionary[e].custom&&this.dictionary[e].custom[t];return n&&n[i]?n[i]:this.getMessage(e,i)},ue.prototype._getDefaultMessage=function(e){return this.hasMessage(e,"_default")?this.dictionary[e].messages._default:this.dictionary.en.messages._default},ue.prototype.getAttribute=function(e,t,i){return void 0===i&&(i=""),this.hasAttribute(e,t)?this.dictionary[e].attributes[t]:i},ue.prototype.hasMessage=function(e,t){return!!(this.hasLocale(e)&&this.dictionary[e].messages&&this.dictionary[e].messages[t])},ue.prototype.hasAttribute=function(e,t){return!!(this.hasLocale(e)&&this.dictionary[e].attributes&&this.dictionary[e].attributes[t])},ue.prototype.merge=function(e){this._merge(this.dictionary,e)},ue.prototype.setMessage=function(e,t,i){this.hasLocale(e)||(this.dictionary[e]={messages:{},attributes:{}}),this.dictionary[e].messages[t]=i},ue.prototype.setAttribute=function(e,t,i){this.hasLocale(e)||(this.dictionary[e]={messages:{},attributes:{}}),this.dictionary[e].attributes[t]=i},ue.prototype._merge=function(e,t){var i=this;return X(e)&&X(t)?(Object.keys(t).forEach(function(n){if(X(t[n])){if(!e[n]){se(e,(r={},r[n]={},r));var r}return void i._merge(e[n],t[n])}se(e,(s={},s[n]=t[n],s));var s}),e):e};var le={_default:function(e){return"The "+e+" value is not valid."},alpha_dash:function(e){return"The "+e+" field may contain alpha-numeric characters as well as dashes and underscores."},alpha_num:function(e){return"The "+e+" field may only contain alpha-numeric characters."},alpha_spaces:function(e){return"The "+e+" field may only contain alphabetic characters as well as spaces."},alpha:function(e){return"The "+e+" field may only contain alphabetic characters."},between:function(e,t){return"The "+e+" field must be between "+t[0]+" and "+t[1]+"."},confirmed:function(e){return"The "+e+" confirmation does not match."},credit_card:function(e){return"The "+e+" field is invalid."},decimal:function(e,t){void 0===t&&(t=["*"]);var i=t[0];return"The "+e+" field must be numeric and may contain "+("*"===i?"":i)+" decimal points."},digits:function(e,t){return"The "+e+" field must be numeric and exactly contain "+t[0]+" digits."},dimensions:function(e,t){return"The "+e+" field must be "+t[0]+" pixels by "+t[1]+" pixels."},email:function(e){return"The "+e+" field must be a valid email."},ext:function(e){return"The "+e+" field must be a valid file."},image:function(e){return"The "+e+" field must be an image."},in:function(e){return"The "+e+" field must be a valid value."},ip:function(e){return"The "+e+" field must be a valid ip address."},max:function(e,t){return"The "+e+" field may not be greater than "+t[0]+" characters."},max_value:function(e,t){return"The "+e+" field must be "+t[0]+" or less."},mimes:function(e){return"The "+e+" field must have a valid file type."},min:function(e,t){return"The "+e+" field must be at least "+t[0]+" characters."},min_value:function(e,t){return"The "+e+" field must be "+t[0]+" or more."},not_in:function(e){return"The "+e+" field must be a valid value."},numeric:function(e){return"The "+e+" field may only contain numeric characters."},regex:function(e){return"The "+e+" field format is invalid."},required:function(e){return"The "+e+" field is required."},size:function(e,t){return"The "+e+" field must be less than "+t[0]+" KB."},url:function(e){return"The "+e+" field is not a valid URL."}},ce=function(e){return function(t,i){var n=i[0],r=i[1],s=i[2],o=document.querySelector("input[name='"+n+"']");void 0===s&&(s=r,r=!1);var a=e(t,s,!0),u=e(o?o.value:n,s,!0);return!(!a.isValid()||!u.isValid())&&(a.isAfter(u)||r&&a.isSame(u))}},fe=function(e){return function(t,i){var n=i[0],r=i[1],s=i[2],o=document.querySelector("input[name='"+n+"']");void 0===s&&(s=r,r=!1);var a=e(t,s,!0),u=e(o?o.value:n,s,!0);return!(!a.isValid()||!u.isValid())&&(a.isBefore(u)||r&&a.isSame(u))}},de=function(e){return function(t,i){var n=i[0];return e(t,n,!0).isValid()}},he=function(e){return function(t,i){var n,r,s,o="()";if(i.length>3){var a;a=i,n=a[0],r=a[1],o=a[2],s=a[3]}else{var u;u=i,n=u[0],r=u[1],s=u[2]}var l=e(n,s,!0),c=e(r,s,!0),f=e(t,s,!0);return!!(l.isValid()&&c.isValid()&&f.isValid())&&f.isBetween(l,c,"days",o)}},pe={after:function(e,t){return"The "+e+" must be after "+t[0]+"."},before:function(e,t){return"The "+e+" must be before "+t[0]+"."},date_between:function(e,t){return"The "+e+" must be between "+t[0]+" and "+t[1]+"."},date_format:function(e,t){return"The "+e+" must be in the format "+t[0]+"."}},ve={make:function(e){return{date_format:de(e),after:ce(e),before:fe(e),date_between:he(e)}},messages:pe,installed:!1},me="en",ge=!0,_e=new ue({en:{messages:le,attributes:{},custom:{}}}),ye=function(e,t){void 0===t&&(t={init:!0,vm:null}),this.strictMode=ge,this.$scopes={__global__:{}},this._createFields(e),this.errorBag=new G,this.fieldBag={},this.paused=!1,this.$vm=t.vm,this.$deferred=[],this.$ready=!1,"function"==typeof moment&&this.installDateTimeValidators(moment),t.init&&this.init()},be={dictionary:{},locale:{},rules:{}};be.dictionary.get=function(){return _e},be.locale.get=function(){return me},be.rules.get=function(){return U},ye._merge=function(e,t){if(ee(t))return void(U[e]=t);U[e]=t.validate,ee(t.getMessage)&&_e.setMessage(me,e,t.getMessage),t.messages&&_e.merge(Object.keys(t.messages).reduce(function(i,n){var r=i;r[n]={messages:(s={},s[e]=t.messages[n],s)};var s;return r},{}))},ye._guardExtend=function(e,t){if(U[e])throw new J("Extension Error: There is an existing validator with the same name '"+e+"'.");if(!ee(t)){if(!ee(t.validate))throw new J("Extension Error: The validator '"+e+"' must be a function or have a 'validate' method.");if(!ee(t.getMessage)&&!X(t.messages))throw new J("Extension Error: The validator '"+e+"' must have a 'getMessage' method or have a 'messages' object.")}},ye.create=function(e,t){return new ye(e,t)},ye.extend=function(e,t){ye._guardExtend(e,t),ye._merge(e,t)},ye.installDateTimeValidators=function(e){if("function"!=typeof e)return Q("To use the date-time validators you must provide moment reference."),!1;if(ve.installed)return!0;var t=ve.make(e);return Object.keys(t).forEach(function(e){ye.extend(e,t[e])}),ye.updateDictionary({en:{messages:ve.messages}}),ve.installed=!0,!0},ye.remove=function(e){delete U[e]},ye.setLocale=function(e){void 0===e&&(e="en"),_e.hasLocale(e)||Q("You are setting the validator locale to a locale that is not defined in the dicitionary. English messages may still be generated."),me=e},ye.setStrictMode=function(e){void 0===e&&(e=!0),ge=e},ye.updateDictionary=function(e){_e.merge(e)},ye.addLocale=function(e){if(!e.name)return void Q("Your locale must have a name property");this.updateDictionary((t={},t[e.name]=e,t));var t},ye.prototype.addLocale=function(e){ye.addLocale(e)},ye.prototype._resolveScope=function(e){if("string"==typeof e)return e;if(ee(e)){var t=e();return"string"==typeof t?t:"__global__"}return"__global__"},ye.prototype._resolveValuesFromGetters=function(e){var t=this;if(void 0===e&&(e="__global__"),!this.$scopes[e])return{};var i={};return Object.keys(this.$scopes[e]).forEach(function(n){var r=t.$scopes[e][n],s=r.getter,o=r.context,a=t._resolveScope(r.scope);s&&o&&("__global__"===e||a===e)&&(i[n]={value:s(o()),scope:a})}),i},ye.prototype._createFields=function(e){var t=this;e&&Object.keys(e).forEach(function(i){t._createField(i,e[i])})},ye.prototype._createField=function(e,t,i){void 0===i&&(i="__global__"),i=this._resolveScope(i),this.$scopes[i]||(this.$scopes[i]={}),this.$scopes[i][e]||(this.$scopes[i][e]={});var n=this.$scopes[i][e];n.validations=this._normalizeRules(e,t,i),n.required=this._isRequired(n)},ye.prototype._normalizeRules=function(e,t,i){return t?"string"==typeof t?this._normalizeString(t):X(t)?this._normalizeObject(t):(Q("Your checks for '"+i+"."+e+"' must be either a string or an object."),{}):{}},ye.prototype._isRequired=function(e){return e.validations&&e.validations.required},ye.prototype._normalizeObject=function(e){var t=this,i={};return Object.keys(e).forEach(function(n){var r=[];if(r=!0===e[n]?[]:Array.isArray(e[n])?e[n]:[e[n]],!1===e[n]?delete i[n]:i[n]=r,ve.installed&&t._isADateRule(n)){var s=t._getDateFormat(i);t._containsValidation(i[n],s)||i[n].push(t._getDateFormat(i))}}),i},ye.prototype._getDateFormat=function(e){return e.date_format&&Array.isArray(e.date_format)?e.date_format[0]:null},ye.prototype._isADateRule=function(e){return!!~["after","before","date_between"].indexOf(e)},ye.prototype._containsValidation=function(e,t){return!!~e.indexOf(t)},ye.prototype._normalizeString=function(e){var t=this,i={};return e.split("|").forEach(function(e){var n=t._parseRule(e);if(n.name&&("required"===n.name&&(i.required=!0),i[n.name]=n.params,ve.installed&&t._isADateRule(n.name))){var r=t._getDateFormat(i);t._containsValidation(i[n.name],r)||i[n.name].push(t._getDateFormat(i))}}),i},ye.prototype._parseRule=function(e){var t=[],i=e.split(":")[0];return~e.indexOf(":")&&(t=e.split(":").slice(1).join(":").split(",")),{name:i,params:t}},ye.prototype._formatErrorMessage=function(e,t,i,n){void 0===i&&(i={}),void 0===n&&(n="__global__");var r=this._getFieldDisplayName(e,n),s=this._getLocalizedParams(t,n);if(!this.dictionary.hasLocale(me)){var o=this.dictionary.getFieldMessage("en",e,t.name);return ee(o)?o(r,s,i):o}var a=this.dictionary.getFieldMessage(me,e,t.name);return ee(a)?a(r,s,i):a},ye.prototype._getLocalizedParams=function(e,t){if(void 0===t&&(t="__global__"),~["after","before","confirmed"].indexOf(e.name)&&e.params&&e.params[0]){var i=this.$scopes[t][e.params[0]];return i&&i.name?[i.name]:[this.dictionary.getAttribute(me,e.params[0],e.params[0])]}return e.params},ye.prototype._getFieldDisplayName=function(e,t){return void 0===t&&(t="__global__"),this.$scopes[t][e].as||this.dictionary.getAttribute(me,e,e)},ye.prototype._test=function(e,t,i,n){var r=this;void 0===n&&(n="__global__");var s=U[i.name];if(!s||"function"!=typeof s)throw new J("No such validator '"+i.name+"' exists.");var o=s(t,i.params,e);return ee(o.then)?o.then(function(t){var s=!0,o={};return Array.isArray(t)?s=t.every(function(e){return e.valid}):(s=t.valid,o=t.data),s||r.errorBag.add(e,r._formatErrorMessage(e,i,o,n),i.name,n),s}):(X(o)||(o={valid:o,data:{}}),o.valid||this.errorBag.add(e,this._formatErrorMessage(e,i,o.data,n),i.name,n),o.valid)},ye.prototype.on=function(e,t,i,n){if(!t)throw new J("Cannot add a listener for non-existent field "+t+".");if(!ee(n))throw new J("The "+e+" callback for field "+t+" is not callable.");this.$scopes[i][t].events[e]=n},ye.prototype.off=function(e,t,i){t||Q("Cannot remove a listener for non-existent field "+t+"."),this.$scopes[i][t].events[e]=void 0},ye.prototype._assignFlags=function(e){e.flags={untouched:!0,touched:!1,dirty:!1,pristine:!0,valid:null,invalid:null,required:e.required,pending:!1};var t={};if(t[e.name]=e.flags,"__global__"===e.scope)return void(this.fieldBag=se({},this.fieldBag,t));var i=se({},this.fieldBag["$"+e.scope],t);this.fieldBag=se({},this.fieldBag,(n={},n["$"+e.scope]=i,n));var n},ye.prototype.attach=function(e,t,i){var n=this;void 0===i&&(i={});var r=function(){i.scope=n._resolveScope(i.scope),n.updateField(e,t,i);var r=n.$scopes[i.scope][e];r.scope=i.scope,r.name=e,r.as=i.prettyName,r.getter=i.getter,r.context=i.context,r.listeners=i.listeners||{detach:function(){}},r.el=r.listeners.el,r.events={},n._assignFlags(r),r.el&&ee(r.el.setAttribute)&&r.el.setAttribute("data-vv-scope",r.scope),r.listeners.classes&&r.listeners.classes.attach(r),n._setAriaRequiredAttribute(r),n._setAriaValidAttribute(r,!0),i.initial&&n.validate(e,r.getter(r.context()),r.scope).catch(function(){})};if(!(ee(i.scope)?i.scope():i.scope)&&!this.$ready)return void this.$deferred.push(r);r()},ye.prototype.init=function(){return this.$ready=!0,this.$deferred.forEach(function(e){e()}),this.$deferred=[],this},ye.prototype.flag=function(e,t){var i=e.split("."),n=i[0],r=i[1];r||(r=n,n=null);var s=n?K(n+"."+r,this.$scopes):this.$scopes.__global__[r];s&&(Object.keys(s.flags).forEach(function(e){s.flags[e]=void 0!==t[e]?t[e]:s.flags[e]}),s.listeners.classes.sync())},ye.prototype.append=function(e,t,i){void 0===i&&(i={}),i.scope=this._resolveScope(i.scope),this.$scopes[i.scope]&&this.$scopes[i.scope][e]||this.attach(e,t,i);var n=this.$scopes[i.scope][e],r=this._normalizeRules(e,t,i.scope);Object.keys(r).forEach(function(e){n.validations[e]=r[e]})},ye.prototype.updateField=function(e,t,i){void 0===i&&(i={});var n=K(i.scope+"."+e,this.$scopes,null),r=n?JSON.stringify(n.validations):"";this._createField(e,t,i.scope),n=K(i.scope+"."+e,this.$scopes,null),(n?JSON.stringify(n.validations):"")!==r&&this.errorBag.remove(e,i.scope)},ye.prototype.clean=function(){var e=this;this.$vm&&ee(this.$vm.$nextTick)&&this.$vm.$nextTick(function(){e.errorBag.clear()})},ye.prototype.detach=function(e,t){void 0===t&&(t="__global__"),this.$scopes[t]&&this.$scopes[t][e]&&(this.$scopes[t][e].listeners&&this.$scopes[t][e].listeners.detach(),this.errorBag.remove(e,t),delete this.$scopes[t][e])},ye.prototype.extend=function(e,t){ye.extend(e,t)},ye.prototype.getErrors=function(){return this.errorBag},ye.prototype.installDateTimeValidators=function(e){ye.installDateTimeValidators(e)},ye.prototype.remove=function(e){ye.remove(e)},ye.prototype.setLocale=function(e){this.dictionary.hasLocale(e)||Q("You are setting the validator locale to a locale that is not defined in the dicitionary. English messages may still be generated."),me=e},ye.prototype.setStrictMode=function(e){void 0===e&&(e=!0),this.strictMode=e},ye.prototype.updateDictionary=function(e){ye.updateDictionary(e)},ye.prototype.addScope=function(e){e&&!this.$scopes[e]&&(this.$scopes[e]={})},ye.prototype.validate=function(e,t,i,n){var r=this;if(void 0===i&&(i="__global__"),void 0===n&&(n=!0),this.paused)return Promise.resolve(!0);if(e&&e.indexOf(".")>-1&&!this.$scopes.__global__[e]){var s;s=e.split("."),i=s[0],e=s[1]}if(i||(i="__global__"),!this.$scopes[i]||!this.$scopes[i][e]){if(!this.strictMode)return Promise.resolve(!0);throw Q('Validating a non-existant field: "'+("__global__"===i?e:i+"."+e)+'". Use "attach()" first.'),new J("Validation Failed")}var o=this.$scopes[i][e];if(o.flags&&(o.flags.pending=!0),this.errorBag.remove(e,i),!o.required&&~[null,void 0,""].indexOf(t))return this._setAriaValidAttribute(o,!0),o.events&&ee(o.events.after)&&o.events.after({valid:!0}),Promise.resolve(!0);try{var a=Object.keys(o.validations).map(function(n){var s=r._test(e,t,{name:n,params:o.validations[n]},i);if(ee(s.then))return s;if(!s)throw o.events&&ee(o.events.after)&&o.events.after({valid:!1}),new J("Validation Aborted.");return o.events&&ee(o.events.after)&&o.events.after({valid:!0}),Promise.resolve(s)});return Promise.all(a).then(function(e){var t=e.every(function(e){return e});if(r._setAriaValidAttribute(o,t),!t&&n)throw o.events&&ee(o.events.after)&&o.events.after({valid:!1}),new J("Failed Validation");return t})}catch(e){if("[vee-validate]: Validation Aborted."===e.msg)return o.events&&ee(o.events.after)&&o.events.after({valid:!1}),Promise.resolve(!1);throw e}},ye.prototype._setAriaValidAttribute=function(e,t){e.el&&!e.listeners.component&&e.el.setAttribute("aria-invalid",!t)},ye.prototype._setAriaRequiredAttribute=function(e){e.el&&!e.listeners.component&&e.el.setAttribute("aria-required",!!e.required)},ye.prototype.pause=function(){return this.paused=!0,this},ye.prototype.resume=function(){return this.paused=!1,this},ye.prototype.validateAll=function(e,t){var i=this;if(void 0===t&&(t="__global__"),this.paused)return Promise.resolve(!0);var n;e&&"string"!=typeof e?(n={},Object.keys(e).forEach(function(i){n[i]={value:e[i],scope:t}})):(this.errorBag.clear(e),n=this._resolveValuesFromGetters(e));var r=Object.keys(n).map(function(e){return i.validate(e,n[e].value,n[e].scope,!1)});return Promise.all(r).then(function(e){var t=e.every(function(e){return e});if(!t)throw new J("Validation Failed");return t})},ye.prototype.validateScopes=function(){var e=this;return this.paused?Promise.resolve(!0):Promise.all(Object.keys(this.$scopes).map(function(t){return e.validateAll(t)}))},Object.defineProperties(ye.prototype,be);var $e=function(e){
return!!e&&(!(!Array.isArray(e)||!~e.indexOf("$validator"))||!(!X(e)||!e.$validator))},xe=function(e,t){var i={};return i.provide=function(){return this.$validator?{$validator:this.$validator}:{}},i.beforeCreate=function(){!this.$options.$validates&&this.$parent||(this.$validator=new ye(null,{init:!1,vm:this}));var i=$e(this.$options.inject);this.$validator||!t.inject||i||(this.$validator=new ye(null,{init:!1,vm:this})),(i||this.$validator)&&(!i&&this.$validator&&(e.util.defineReactive(this.$validator,"errorBag",this.$validator.errorBag),e.util.defineReactive(this.$validator,"fieldBag",this.$validator.fieldBag)),this.$options.computed||(this.$options.computed={}),this.$options.computed[t.errorBagName]=function(){return this.$validator.errorBag},this.$options.computed[t.fieldsBagName]=function(){return this.$validator.fieldBag})},i.mounted=function(){this.$validator&&this.$validator.init()},i},Ae={touched:"touched",untouched:"untouched",valid:"valid",invalid:"invalid",pristine:"pristine",dirty:"dirty"},we=function(e,t,i){void 0===i&&(i={}),this.el=e,this.validator=t,this.enabled=i.enableAutoClasses,this.classNames=se({},Ae,i.classNames||{}),this.component=i.component,this.listeners={}};we.prototype.reset=function(){this.detach(),this.remove(this.classNames.dirty),this.remove(this.classNames.touched),this.remove(this.classNames.valid),this.remove(this.classNames.invalid),this.attach(this.field)},we.prototype.sync=function(){this.addInteractionListeners(),this.enabled&&(this.toggle(this.classNames.dirty,this.field.flags.dirty),this.toggle(this.classNames.pristine,this.field.flags.pristine),this.toggle(this.classNames.valid,this.field.flags.valid),this.toggle(this.classNames.invalid,this.field.flags.invalid),this.toggle(this.classNames.touched,this.field.flags.touched),this.toggle(this.classNames.untouched,this.field.flags.untouched))},we.prototype.addFocusListener=function(){var e=this;this.listeners.focus=function(){e.remove(e.classNames.untouched),e.add(e.classNames.touched),e.field.flags.touched=!0,e.field.flags.untouched=!1,e.component||(e.el.removeEventListener("focus",e.listeners.focus),e.listeners.focus=null)},this.component?this.component.$once("focus",this.listeners.focus):this.el.addEventListener("focus",this.listeners.focus)},we.prototype.addInputListener=function(){var e=this;this.listeners.input=function(){e.remove(e.classNames.pristine),e.add(e.classNames.dirty),e.field.flags.dirty=!0,e.field.flags.pristine=!1,e.component||(e.el.removeEventListener("input",e.listeners.input),e.listeners.input=null)},this.component?this.component.$once("input",this.listeners.input):this.el.addEventListener("input",this.listeners.input)},we.prototype.addInteractionListeners=function(){this.listeners.focus||this.addFocusListener(),this.listeners.input||this.addInputListener()},we.prototype.attach=function(e){var t=this;this.field=e,this.add(this.classNames.pristine),this.add(this.classNames.untouched),this.addInteractionListeners(),this.listeners.after=function(e){t.remove(e.valid?t.classNames.invalid:t.classNames.valid),t.add(e.valid?t.classNames.valid:t.classNames.invalid),t.field.flags.valid=e.valid,t.field.flags.invalid=!e.valid,t.field.flags.pending=!1},this.validator.on("after",this.field.name,this.field.scope,this.listeners.after)},we.prototype.detach=function(){this.field&&(this.component?(this.component.$off("input",this.listeners.input),this.component.$off("focus",this.listeners.focus)):(this.el.removeEventListener("focus",this.listeners.focus),this.el.removeEventListener("input",this.listeners.input)),this.validator.off("after",this.field.name,this.field.scope))},we.prototype.add=function(e){this.enabled&&ie(this.el,e)},we.prototype.remove=function(e){this.enabled&&ne(this.el,e)},we.prototype.toggle=function(e,t){if(t)return void this.add(e);this.remove(e)};var Fe={locale:"en",delay:0,errorBagName:"errors",dictionary:null,strict:!0,fieldsBagName:"fields",enableAutoClasses:!1,classNames:{},events:"input|blur",inject:!0},Ee=function(e,t,i,n){this.unwatch=void 0,this.callbacks=[],this.el=e,this.scope=X(t.value)?t.value.scope:W(e),this.binding=t,this.vm=i.context,this.component=i.child,this.options=se({},Fe,n),this.fieldName=this._resolveFieldName(),this.model=this._resolveModel(i.data.directives),this.classes=new we(e,this.vm.$validator,{component:this.component,enableAutoClasses:n.enableAutoClasses,classNames:n.classNames})};Ee.prototype._resolveModel=function(e){var t=/^[a-z_]+[0-9]*(\w*\.[a-z_]\w*)*$/i,i=oe(e,function(e){return"model"===e.name&&t.test(e.expression)});return i&&this._isExistingPath(i.expression)&&i.expression},Ee.prototype._isExistingPath=function(e){var t=this.vm;return e.split(".").every(function(e){return!!Object.prototype.hasOwnProperty.call(t,e)&&(t=t[e],!0)})},Ee.prototype._resolveFieldName=function(){return this.component?Y(this.el,"name")||this.component.name:Y(this.el,"name")||this.el.name},Ee.prototype._hasFieldDependency=function(e){var t=this,i=!1;return!!e&&(X(e)?(Object.keys(e).forEach(function(t){if(/confirmed|after|before/.test(t))return i=e[t],!1}),i):(e.split("|").every(function(e){return/\b(confirmed|after|before):/.test(e)?(i=e.split(":")[1],!1):!/\b(confirmed)/.test(e)||(i=t.fieldName+"_confirmation",!1)}),i))},Ee.prototype._inputListener=function(){return this._validate(this.el.value)},Ee.prototype._fileListener=function(){var e=this;return this._validate(re(this.el.files)).then(function(t){!t&&e.binding.modifiers.reject&&(e.el.value="")})},Ee.prototype._radioListener=function(){var e=document.querySelector('input[name="'+this.el.name+'"]:checked');return this._validate(e?e.value:null)},Ee.prototype._checkboxListener=function(){var e=this,t=document.querySelectorAll('input[name="'+this.el.name+'"]:checked');if(!t||!t.length)return void this._validate(null);re(t).forEach(function(t){e._validate(t.value)})},Ee.prototype._validate=function(e){return this.vm.$validator.validate(this.fieldName,e,this.scope||W(this.el)).catch(function(e){return e})},Ee.prototype._getScopedListener=function(e){var t=this;return function(i){(!i||i===t.scope||i instanceof window.Event)&&e()}},Ee.prototype._attachValidatorEvent=function(){var e=this,t=this._getScopedListener(this._getSuitableListener().listener.bind(this)),i=this._hasFieldDependency(ae(this.binding.expression,this.binding.value,this.el));i&&this.vm.$nextTick(function(){var n=document.querySelector("input[name='"+i+"']");if(!n)return void Q("Cannot find target field, no additional listeners were attached.");(Y(e.el,"validate-on")||e.options.events).split("|").forEach(function(i){n.addEventListener(i,t,!1),e.callbacks.push({name:i,listener:t,el:n})})})},Ee.prototype._getSuitableListener=function(){var e,t={input:"input",blur:"blur"};if("SELECT"===this.el.tagName)t.input="change",e={names:["change","blur"],listener:this._inputListener};else switch(this.el.type){case"file":t.input="change",t.blur=null,e={names:["change"],listener:this._fileListener};break;case"radio":t.input="change",t.blur=null,e={names:["change"],listener:this._radioListener};break;case"checkbox":t.input="change",t.blur=null,e={names:["change"],listener:this._checkboxListener};break;default:e={names:["input","blur"],listener:this._inputListener}}var i=Y(this.el,"validate-on")||this.options.events;return e.names=i.split("|").filter(function(e){return null!==t[e]}).map(function(e){return t[e]||e}),e},Ee.prototype._attachComponentListeners=function(){var e=this;this.componentListener=H(function(t){e._validate(t)},Y(this.el,"delay")||this.options.delay),this.component.$on("input",this.componentListener),this.componentPropUnwatch=this.component.$watch("value",this.componentListener)},Ee.prototype._attachFieldListeners=function(){var e=this;if(this.component)return void this._attachComponentListeners();var t=this._getSuitableListener(),i=H(t.listener.bind(this),Y(this.el,"delay")||this.options.delay);if(~["radio","checkbox"].indexOf(this.el.type))return void this.vm.$nextTick(function(){var n=document.querySelectorAll('input[name="'+e.el.name+'"]');re(n).forEach(function(n){t.names.forEach(function(t){n.addEventListener(t,i,!1),e.callbacks.push({name:t,listener:i,el:n})})})});t.names.forEach(function(t){e.el.addEventListener(t,i,!1),e.callbacks.push({name:t,listener:i,el:e.el})})},Ee.prototype._resolveValueGetter=function(){var e=this;if(this.component)return{context:function(){return e.component},getter:function(e){return e.value}};switch(this.el.type){case"checkbox":return{context:function(){return document.querySelectorAll('input[name="'+e.el.name+'"]:checked')},getter:function(e){return e&&e.length?re(e).map(function(e){return e.value}):null}};case"radio":return{context:function(){return document.querySelector('input[name="'+e.el.name+'"]:checked')},getter:function(e){return e&&e.value}};case"file":return{context:function(){return e.el},getter:function(e){return re(e.files)}};default:return{context:function(){return e.el},getter:function(e){return e.value}}}},Ee.prototype._getArg=function(){return this.binding.arg?this.binding.arg:this.model?this.model:X(this.binding.value)?this.binding.value.arg:null},Ee.prototype._attachModelWatcher=function(e){var t=this,i=Y(this.el,"validate-on")||this.options.events,n=H(this._getSuitableListener().listener.bind(this),Y(this.el,"delay")||this.options.delay);i.split("|").forEach(function(i){if(~["input","change"].indexOf(i)){var r=H(function(e){t.vm.$validator.validate(t.fieldName,e,t.scope||W(t.el)).catch(function(e){return e})},Y(t.el,"delay")||t.options.delay);return void(t.unwatch=t.vm.$watch(e,r,{deep:!0}))}t.el.addEventListener(i,n,!1),t.callbacks.push({name:i,listener:n,el:t.el})})},Ee.prototype.attach=function(){var e=this,t=this._resolveValueGetter(),i=t.context,n=t.getter;if(this.vm.$validator.attach(this.fieldName,ae(this.binding.expression,this.binding.value,this.el),{scope:function(){return e.scope||W(e.el)},prettyName:Y(this.el,"as")||this.el.title,context:i,getter:n,listeners:this,initial:this.binding.modifiers.initial}),!this.binding.modifiers.disable){this._attachValidatorEvent();var r=this._getArg();if(r)return void this._attachModelWatcher(r);this._attachFieldListeners()}},Ee.prototype.detach=function(){this.component&&(this.component.$off("input",this.componentListener),ee(this.componentPropUnwatch)&&this.componentPropUnwatch()),this.unwatch&&this.unwatch(),this.classes.detach(),this.callbacks.forEach(function(e){e.el.removeEventListener(e.name,e.listener)}),this.callbacks=[]};var Le=[],Ne=function(e){return{inserted:function(t,i,n){if(!n.context.$validator){var r=n.context.$options._componentTag;return void Q("No validator instance is present on "+(r?'component "'+r+'"':"un-named component")+", did you forget to inject '$validator'?")}var s=new Ee(t,i,n,e);s.attach(),Le.push({vm:n.context,el:t,instance:s})},update:function(e,t,i){var n=t.expression,r=t.value,s=i.context,o=oe(Le,function(t){return t.vm===s&&t.el===e}),a=o.instance;if(n&&a.cachedExp!==JSON.stringify(r)){a.cachedExp=JSON.stringify(r);var u=X(r)?r.scope||W(e):W(e);s.$validator.updateField(a.fieldName,ae(n,r,e),{scope:u||"__global__"})}},unbind:function(e,t,i){var n=t.value,r=i.context,s=oe(Le,function(t){return t.vm===r&&t.el===e});if(void 0!==s){var o=X(n)?n.scope:W(e)||"__global__";r.$validator.detach(s.instance.fieldName,o),Le.splice(Le.indexOf(s),1)}}}},je=function(e){return Array.isArray(e)?e.reduce(function(e,t){return~t.indexOf(".")?e[t.split(".")[1]]=t:e[t]=t,e},{}):e},Oe=function(e){var t=je(e);return Object.keys(t).reduce(function(e,i){var n=t[i];return e[i]=function(){if(this.$validator.fieldBag[n])return this.$validator.fieldBag[n];if(n.indexOf(".")<=0)return{};var e=n.split("."),t=e[0],i=e[1];return K("$"+t+"."+i,this.$validator.fieldBag,{})},e},{})};return{install:function(e,t){var i=se({},Fe,t);i.dictionary&&ye.updateDictionary(i.dictionary),ye.setLocale(i.locale),ye.setStrictMode(i.strict),e.mixin(xe(e,i)),e.directive("validate",Ne(i))},mapFields:Oe,Validator:ye,ErrorBag:G,Rules:U,version:"2.0.0-rc.5"}});
{
"name": "vee-validate",
"version": "2.0.0-rc.4",
"version": "2.0.0-rc.5",
"description": "Simple Vue.js input validation plugin",

@@ -5,0 +5,0 @@ "main": "dist/vee-validate.js",

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

```
bower install vee-validate#2.0.0-rc.4--save
bower install vee-validate#2.0.0-rc.5--save
```

@@ -59,0 +59,0 @@

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