!function(r,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t=e();for(var n in t)("object"==typeof exports?exports:r)[n]=t[n]}}(this,(()=>(()=>{"use strict";var r={d:(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o:(r,e)=>Object.prototype.hasOwnProperty.call(r,e),r:r=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})}},e={};r.r(e),r.d(e,{cnpjIsValid:()=>o,cpfIsValid:()=>n,default:()=>Nr,getOnlyEmail:()=>d,identifyFlagCard:()=>z,isAscii:()=>j,isBase64:()=>O,isCEP:()=>c,isCreditCardValid:()=>Z,isDate:()=>D,isDecimal:()=>U,isEmail:()=>y,isEmpty:()=>P,isMACAddress:()=>C,isMD5:()=>k,isNumber:()=>L,isPort:()=>F,isPostalCode:()=>R,isTime:()=>B,isValidAudio:()=>br,isValidImage:()=>gr,isValidPdf:()=>wr,isValidTxt:()=>Vr,isValidVideo:()=>Sr,passwordStrengthTester:()=>K,validateBRPhoneNumber:()=>J,validateEmail:()=>p,validateName:()=>ar,validatePassportNumber:()=>q,validatePassword:()=>E,validatePhoneNumber:()=>H,validateSurname:()=>tr,validateTextarea:()=>sr,validateUSPhoneNumber:()=>W,validateUsername:()=>I});var t=["CPF invalid","CPF must have 11 numerical digits","CPF is not valid"];const n=function(r,e){var n,i;if(void 0===e&&(e=t),"string"!=typeof r)throw new TypeError("The input should be a string.");if(e){if(!Array.isArray(e))throw new TypeError("Must be an Array");try{for(var o=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),a=o.next();!a.done;a=o.next()){var l=a.value;if(null!=l&&"string"!=typeof l)throw new TypeError("All values within the array must be strings or null/undefined.")}}catch(r){n={error:r}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}}function u(r){var n=e?e[r]:null;return null!=n?n:t[r]}if(!r)return{isValid:!1,errorMsg:u(0)};var s=r.replace(/\D+/g,"");if(/^(\d)\1{10}$/.test(s))return{isValid:!1,errorMsg:u(2)};if(11!==s.length)return{isValid:!1,errorMsg:u(1)};var f=s.split("").map(Number),d=function(r){return r%11<2?0:11-r%11},c=f.slice(0,9).reduce((function(r,e,t){return r+e*(10-t)}),0),y=f.slice(0,10).reduce((function(r,e,t){return r+e*(11-t)}),0);return f[9]===d(c)&&f[10]===d(y)?{isValid:!0,errorMsg:null}:{isValid:!1,errorMsg:u(2)}};var i=["CNPJ invalid","CNPJ must have 14 numerical digits","CNPJ is not valid"];const o=function(r,e){var t,n;if(void 0===e&&(e=i),"string"!=typeof r)throw new TypeError("The input should be a string.");if(e){if(!Array.isArray(e))throw new Error("Must be an Array");try{for(var o=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),a=o.next();!a.done;a=o.next()){var l=a.value;if(null!=l&&"string"!=typeof l)throw new TypeError("All values within the array must be strings or null/undefined.")}}catch(r){t={error:r}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}}function u(r){var t=e?e[r]:null;return null!=t?t:i[r]}if(!r)return{isValid:!1,errorMsg:u(0)};if(14!==r.length&&18!==r.length)return{isValid:!1,errorMsg:u(1)};var s=r.replace(/\D+/g,"").split("").map(Number),f=function(r){for(var e=[5,4,3,2,9,8,7,6,5,4,3,2],t=0,n=0;n<12;n+=1)t+=r[n]*e[n];var i=t%11;return i<2?0:11-i}(s.slice(0,12)),d=function(r,e){for(var t=[6,5,4,3,2,9,8,7,6,5,4,3,2],n=0,i=0;i<12;i+=1)n+=r[i]*t[i];var o=(n+=e*t[12])%11;return o<2?0:11-o}(s.slice(0,12).concat(f),f);return s[12]===f&&s[13]===d?{isValid:!0,errorMsg:null}:{isValid:!1,errorMsg:u(2)}};var a=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},l=function(r,e){var t="function"==typeof Symbol&&r[Symbol.iterator];if(!t)return r;var n,i,o=t.call(r),a=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(r){i={error:r}}finally{try{n&&!n.done&&(t=o.return)&&t.call(o)}finally{if(i)throw i.error}}return a},u=function(r,e,t){if(t||2===arguments.length)for(var n,i=0,o=e.length;i10)&&8===r.replace(/\D/g,"").length},y=function(r){if("string"!=typeof r)throw new TypeError("Invalid input, must be a string");if(!r)throw new Error("Value cannot be null or empty");if(/^[^a-zA-Z0-9]/.test(r))return!1;if(Number(r[0]))return!1;if(!/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(r))return!1;var e=r.indexOf("@"),t=r.indexOf("@")+1;if(Number(r[t]))return!1;if(r.substring(0,e).includes(".."))return!1;if(r.substring(0,e).endsWith("."))return!1;var n=r.split(".");if(n.length>2&&n[n.length-2]===n[n.length-3])return!1;if(r.substring(t).includes(".."))return!1;var i=r.split("@")[1].split("."),o=Array.from(new Set(i));return i.length===o.length};var h=["Email cannot be empty","This e-mail is not valid","Email too big, try again","This email is not valid in the country","Email domain is not allowed."],g=["@gmail.com","@outlook.com","@yahoo.com","@icloud.com","@hotmail.com","@mail.ru","@yandex.ru","@gmx.com","@zoho.com","@protonmail.com","@protonmail.ch"],m={maxLength:void 0,country:"",errorMsg:h,validDomains:!1};function v(r,e,t){var n=e?e[r]:h[r];return"Email too big, try again"===n?"Email cannot be greater than ".concat(t.toString()," characters"):null!=n?n:h[r]}const p=function(r,e){var t=void 0===e?m:e,n=t.maxLength,i=t.country,o=t.errorMsg,a=t.validDomains;if("string"!=typeof r)throw new TypeError("The input should be a string.");var l=function(r){if(Array.isArray(r)&&r.length>0){var e=r.map((function(r){return r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}));return new RegExp("".concat(e.join("|"),"$"),"i")}return r?new RegExp("".concat(g.join("|"),"$"),"i"):null}(null!=a&&a);!function(r){var e,t;if(r){if(!Array.isArray(r))throw new Error("errorMsg must be an Array or null");try{for(var n=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(r),i=n.next();!i.done;i=n.next()){var o=i.value;if(null!=o&&"string"!=typeof o)throw new TypeError("All values within the array must be strings or null/undefined.")}}catch(r){e={error:r}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}}}(o);var u=function(r){if((r||0===r)&&(r<1||"number"!=typeof r))throw new Error("maxLength must be a number and cannot be less than 1");return null!=r?r:400}(n);return r?l&&!l.test(r)?{isValid:!1,errorMsg:v(4,o,u)}:y(r)?r.length>u?{isValid:!1,errorMsg:v(2,o,u)}:i&&!r.endsWith(".".concat(i))?{isValid:!1,errorMsg:v(3,o,u)}:{isValid:!0,errorMsg:null}:{isValid:!1,errorMsg:v(1,o,u)}:{isValid:!1,errorMsg:v(0,o,u)}};var b=["This password is too long","password too short","Password requires at least one capital letter","Password requires at least one special character","Password requires at least one number","Password requires at least one letter"],w={minLength:void 0,maxLength:void 0,options:{requireUppercase:!1,requireSpecialChar:!1,requireNumber:!1,requireString:!1},errorMsg:b};function x(r,e,t,n){var i=n?n[r]:b[r];return"This password is too long"===i||"password too short"===i?t===1/0?"Password must be greater than ".concat(e.toString()," characters"):"Password must be between ".concat(e.toString()," and ").concat(t.toString()," characters"):null!=i?i:b[r]}const E=function(r,e){var t=void 0===e?w:e,n=t.minLength,i=t.maxLength,o=t.options,a=t.errorMsg;if("string"!=typeof r)throw new TypeError("The input should be a string.");!function(r){var e,t;if(r){if(!Array.isArray(r))throw new Error("errorMsg must be an Array or null");try{for(var n=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(r),i=n.next();!i.done;i=n.next()){var o=i.value;if(null!=o&&"string"!=typeof o)throw new TypeError("All values within the array must be strings or null/undefined.")}}catch(r){e={error:r}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}}}(a);var l=null!=n?n:1,u=null!=i?i:1/0;!function(r,e){if("number"!=typeof r||"number"!=typeof e)throw new Error("maxLength and/or minLength must be a number");if(r>e)throw new Error("the minimum size cannot be larger than the maximum");if(r<1||e<1)throw new Error("No size can be smaller than 1")}(l,u);var s=function(r,e,t,n){return r.length>t?x(0,e,t,n):r.length]/.test(r)?x(3,0,0,t):(null==e?void 0:e.requireNumber)&&!/\d/.test(r)?x(4,0,0,t):(null==e?void 0:e.requireString)&&!/[a-zA-Z]/.test(r)?x(5,0,0,t):null}(r,o,a);return f?{isValid:!1,errorMsg:f}:{isValid:!0,errorMsg:null}};var A=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},T=/\s/,S=/^\d+$/,M=/^\d/,V=["Username cannot be empty","username too short","This username is too long","Username cannot contain spaces","Cannot start with a number","Cannot contain only numbers"],N={minLength:void 0,maxLength:void 0,errorMsg:V};function $(r,e,t,n){var i=e?e[r]:V[r];return"username too short"===i||"This username is too long"===i?"Username must be between ".concat(t.toString()," and ").concat(n.toString()," characters"):null!=i?i:V[r]}const I=function(r,e){var t=void 0===e?N:e,n=t.minLength,i=t.maxLength,o=t.errorMsg;if("string"!=typeof r)throw new TypeError("The input should be a string.");!function(r){var e,t;if(r){if(!Array.isArray(r))throw new Error("errorMsg must be an Array or null");try{for(var n=A(r),i=n.next();!i.done;i=n.next()){var o=i.value;if(null!=o&&"string"!=typeof o)throw new TypeError("All values within the array must be strings or null/undefined.")}}catch(r){e={error:r}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}}}(o);var a=null!=n?n:1,l=null!=i?i:1/0;return r?(function(r,e){if(!("number"==typeof r&&"number"==typeof e||Number.isNaN(r)&&Number.isNaN(e)))throw new Error("maxLength or minLength must be a number");if(r>e)throw new Error("Minimum cannot be greater than maximum");if(r<1||e<1)throw new Error("Size parameters cannot be less than one")}(a,l),T.test(r)?{isValid:!1,errorMsg:$(3,o,a,l)}:S.test(r)?{isValid:!1,errorMsg:$(5,o,a,l)}:M.test(r)?{isValid:!1,errorMsg:$(4,o,a,l)}:r.lengthl?{isValid:!1,errorMsg:$(2,o,a,l)}:function(r){var e,t,n=["!","@","#","$","%","^","&","*","(",")","-","_","=","+","[","]","{","}","|","\\",";",":","'",'"',",",".","<",">","/","?"],i={};try{for(var o=A(r),a=o.next();!a.done;a=o.next()){var l=a.value;if(n.includes(l)&&(i[l]=(i[l]||0)+1,i[l]>2))return!0}}catch(r){e={error:r}}finally{try{a&&!a.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}return!1}(r)?{isValid:!1,errorMsg:"Username cannot contain multiple special characters"}:{isValid:!0,errorMsg:null}):{isValid:!1,errorMsg:$(0,o,a,l)}},P=function(r){if("string"!=typeof r)throw new TypeError("Input value must be a string.");return 0===r.trim().length},L=function(r){return null!=r&&"boolean"!=typeof r&&("string"==typeof r?!Number.isNaN(parseFloat(r))&&Number.isFinite(parseFloat(r)):"number"==typeof r&&Number.isFinite(r))},Z=function(r){if("string"!=typeof r)throw new TypeError("The input should be a string.");var e=r.replace(/\D/g,"");if(P(e)||!L(e))return!1;for(var t=r.replace(/\D+/g,"").split("").map(Number),n=0,i=!1,o=t.length-1;o>=0;o-=1){var a=t[o];i&&(a*=2)>9&&(a-=9),n+=a,i=!i}return n%10==0},z=function(r){if("string"!=typeof r)throw new TypeError("The input should be a string.");var e=[{name:"Visa",interval:/^4/},{name:"Mastercard",interval:/^5[1-5]/},{name:"American Express",interval:/^3[47]/},{name:"Discover",interval:/^6(?:011|5)/},{name:"JCB",interval:/^(?:2131|1800|35\d{3})/},{name:"Diners Club",interval:/^3(?:0[0-5]|[68])/},{name:"Maestro",interval:/^(?:5[0678]\d\d|6304|6390|67\d\d)/},{name:"UnionPay",interval:/^(62|88)/},{name:"Elo",interval:/^63[789]/},{name:"Hipercard",interval:/^(3841|60)/}].find((function(e){return e.interval.test(r)}));return e?e.name:"Unknown"},C=function(r){if("string"!=typeof r)throw new TypeError("The input should be a string.");var e=r.replace(/[^0-9A-Fa-f]/g,"");return 12===e.length&&/^([0-9A-Fa-f]{2}){6}$/.test(e)},j=function(r){if("string"!=typeof r)throw new TypeError("The input should be a string.");if(0===r.trim().length)throw new Error("Input value must not be an empty string.");for(var e=0;e127)return!1}return!0},O=function(r){if("string"!=typeof r)throw new TypeError("Input value must be a string.");if(0===r.trim().length)throw new Error("Input value must not be an empty string.");return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(r)},D=function(r){if("string"!=typeof r)throw new TypeError("Input value must be a string.");if(0===r.trim().length)throw new Error("Input value must not be an empty string.");var e,t,n,i=/^\d{4}[-/]\d{2}[-/]\d{2}$/,o=/^\d{2}[-/]\d{2}[-/]\d{4}$/;if(!i.test(r)&&!o.test(r)&&!/^[A-Za-z]+\s\d{1,2}, \d{4}$/.test(r))return!1;if(i.test(r)){var a=r.split(/[-/]/);e=parseInt(a[0],10),t=parseInt(a[1],10),n=parseInt(a[2],10)}else o.test(r)?(a=r.split(/[-/]/),t=parseInt(a[0],10),n=parseInt(a[1],10),e=parseInt(a[2],10)):(a=r.split(/[\s,]+/),t=new Date(Date.parse(a[0]+" 1, 2000")).getMonth()+1,n=parseInt(a[1],10),e=parseInt(a[2],10));return!(e<1e3||e>9999||t<1||t>12||n<1||n>31||n>[31,e%4==0&&e%100!=0||e%400==0?29:28,31,30,31,30,31,31,30,31,30,31][t-1])},U=function(r){var e=r;if(function(r){if("number"==typeof r&&Number.isNaN(r))throw new TypeError("Input value must not be NaN.");if("number"==typeof r&&!isFinite(r))throw new TypeError("Input value must not be Infinity, -Infinity or NaN.");if("string"!=typeof r&&"number"!=typeof r)throw new TypeError("Input value must be a string or a number.")}(e),"number"==typeof e){if(Number.isInteger(e))return!1;e=e.toString()}if(0===e.trim().length)throw new Error("Input value must not be an empty string.");return!function(r){return/^\d+$/.test(r)}(e)&&!!function(r){return/^[-+]?(?:\d+(?:[,.]\d*)?|\d*[,.]\d+)$/.test(r)}(e)},k=function(r){if("string"!=typeof r)throw new TypeError("Input value must be a string.");var e=r.trim();return 32===e.length&&!/^(\d)\1+$/.test(e)&&!["d41d8cd98f00b204e9800998ecf8427e"].includes(e)};const q=function(r){var e,t;if("string"!=typeof r)throw new TypeError("The input should be a string.");var n=r.replace(/\s/g,"");try{for(var i=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}([{country:"United States",regex:/^\d{9}$/},{country:"United Kingdom",regex:/^[A-Z]{2}\d{6}$/},{country:"Germany",regex:/^[A-Z]{2}\d{8}$/},{country:"Canada",regex:/^[A-Z]\d{7}$/},{country:"Australia",regex:/^[A-Z]\d{7}$/},{country:"Brazil",regex:/^\d{9}$/},{country:"France",regex:/^[A-Z]{2}\d{7}$/},{country:"Italy",regex:/^[A-Z]\d{7}$/},{country:"India",regex:/^[A-Z]\d{7}$/},{country:"China",regex:/^[A-Z]\d{8}$/}]),o=i.next();!o.done;o=i.next()){var a=o.value;if(a.regex.test(n))return{isValid:!0,country:a.country}}}catch(r){e={error:r}}finally{try{o&&!o.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}return{isValid:!1,country:null}},F=function(r){if("string"!=typeof r&&"number"!=typeof r)throw new TypeError("Input value must be a string or a number.");var e=parseInt(String(r),10);return Number.isInteger(e)&&e>=1&&e<=65535},R=function(r){if("string"!=typeof r)throw new TypeError("Input value must be a string.");return/^\d{5}(-\d{4})?$/.test(r)||/^[A-Za-z]\d[A-Za-z] \d[A-Za-z]\d$/.test(r)||/^[A-Za-z]{1,2}\d[A-Za-z\d]?\s\d[A-Za-z]{2}$/.test(r)||/^\d{5}$/.test(r)||/^\d{4}$/.test(r)||/^\d{3}-\d{4}$/.test(r)||/^\d{5}$/.test(r)||/^\d{4}$/.test(r)||/^\d{5}$/.test(r)||/^\d{4}$/.test(r)||/^\d{5}-\d{3}$/.test(r)||/^\d{5}$/.test(r)||/^\d{5}$/.test(r)},B=function(r){if("string"!=typeof r)throw new TypeError("Input value must be a string.");return/^(?:2[0-3]|1\d|0?\d):[0-5]\d(?::[0-5]\d)?(?: [APap][Mm])?$/.test(r)};var _=["Field phone number cannot be empty","Invalid phone number"];const J=function(r,e){var t,n;if(void 0===e&&(e=_),"string"!=typeof r)throw new TypeError("The input should be a string.");if(e){if(!Array.isArray(e))throw new Error("errorMsg must be an Array");try{for(var i=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),o=i.next();!o.done;o=i.next()){var a=o.value;if(null!=a&&"string"!=typeof a)throw new TypeError("All values within the array must be strings or null/undefined.")}}catch(r){t={error:r}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}}function l(r){var t=e?e[r]:null;return null!=t?t:_[r]}return r?/^\(\d{2}\) \d{5}-\d{4}$/.test(r)?{isValid:!0,errorMsg:null}:{isValid:!1,errorMsg:l(1)}:{isValid:!1,errorMsg:l(0)}};var Q=["US phone number cannot be empty","Invalid phone number"];const W=function(r,e){var t,n;if(void 0===e&&(e=Q),"string"!=typeof r)throw new TypeError("The input should be a string.");if(e){if(!Array.isArray(e))throw new Error("errorMsg must be an Array or null");try{for(var i=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),o=i.next();!o.done;o=i.next()){var a=o.value;if(null!=a&&"string"!=typeof a)throw new TypeError("All values within the array must be strings or null/undefined.")}}catch(r){t={error:r}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}}function l(r){var t=e?e[r]:null;return null!=t?t:Q[r]}return r?/^(1\s?)?(\(\d{3}\)|\d{3})(\s?|-)\d{3}(\s?|-)\d{4}$/.test(r)?{isValid:!0,errorMsg:null}:{isValid:!1,errorMsg:l(1)}:{isValid:!1,errorMsg:l(0)}};var G=["Phone number cannot be empty","Invalid phone number"];const H=function(r,e){var t,n;if(void 0===e&&(e=G),"string"!=typeof r)throw new TypeError("The input should be a string.");if(e){if(!Array.isArray(e))throw new Error("errorMsg must be an Array or null");try{for(var i=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),o=i.next();!o.done;o=i.next()){var a=o.value;if(null!=a&&"string"!=typeof a)throw new TypeError("All values within the array must be strings or null/undefined.")}}catch(r){t={error:r}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}}function l(r){var t=e?e[r]:null;return null!=t?t:G[r]}return r?/^\(\d{3}\) \d{3}-\d{4}$/.test(r)?{isValid:!0,errorMsg:null}:{isValid:!1,errorMsg:l(1)}:{isValid:!1,errorMsg:l(0)}},K=function(r){if("string"!=typeof r)throw new TypeError("The input should be a string.");var e,t=r.length;switch(!0){case function(r,e){return e<=5&&/^\d+$/.test(r)}(r,t)||function(r){return["123","1234","12345","123456","1234567","12345678","123456789","password","password","password!","password!1","admin","admin!","Admin","Admin!","admin123","P@ssw0rd","Password","password123","password123!","Qwerty","Qwerty!","Qwerty123","Qwerty123!"].includes(r)}(r):e="veryWeak";break;case function(r,e){return e<=5&&/^[a-zA-Z0-9]+$/.test(r)||e>=6&&/^[a-zA-Z0-9]+$/.test(r)&&e<=7||e<10&&/(.)\1{3,}/.test(r)||e>=5&&e<=8&&/^\d+$/.test(r)}(r,t):e="weak";break;case function(r,e){return/(.)\1{5,}/.test(r)&&e>10}(r,t):e="regular";break;case function(r,e){return e>16||r.length>=8&&/[A-Z]/.test(r)&&/[a-z]/.test(r)&&/\d/.test(r)&&/[\W_]/.test(r)}(r,t):e="veryStrong";break;case function(r,e){return e>=13&&e<=16||r.length>=8&&/[A-Z]/.test(r)&&/[a-z]/.test(r)&&/\d/.test(r)}(r,t):e="strong";break;case function(r,e){return e>=9&&e<=12||r.length>=6&&r.length<=8&&/\d/.test(r)&&/[a-zA-Z]/.test(r)}(r,t):e="regular";break;default:e="not classified"}return e};var X=["Surname cannot be empty","Surname cannot contain numbers","Surname cannot contain special characters","This surname is not valid","Surname too big, try again"],Y={minLength:void 0,maxLength:void 0,errorMsg:X};function rr(r,e){return{isValid:!1,errorMsg:er(r,e)}}function er(r,e){var t=e?e[r]:null;return null!=t?t:X[r]}const tr=function(r,e){var t=void 0===e?Y:e,n=t.minLength,i=t.maxLength,o=t.errorMsg;if("string"!=typeof r)throw new TypeError("The input should be a string.");!function(r){var e,t;if(r){if(!Array.isArray(r))throw new Error("errorMsg must be an Array or null");try{for(var n=function(r){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&"number"==typeof r.length)return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(r),i=n.next();!i.done;i=n.next()){var o=i.value;if(null!=o&&"string"!=typeof o)throw new TypeError("All values within the array must be strings or null/undefined.")}}catch(r){e={error:r}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}}}(o);var a=null!=n?n:1,l=null!=i?i:25;return function(r,e){if(e<1||r<1||"number"!=typeof r||"number"!=typeof e)throw new Error("maxLength or minLength must be a number and cannot be less than 1");if(r>e)throw new Error("minLength cannot be greater than maxLength")}(a,l),r?r.length>l?rr(4,o):r.length=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(r),i=n.next();!i.done;i=n.next()){var o=i.value;if(null!=o&&"string"!=typeof o)throw new TypeError("All values within the array must be strings or null/undefined.")}}catch(r){e={error:r}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}}}(o);var a=null!=n?n:1,l=null!=i?i:20;!function(r,e){if(e<1||r<1||"number"!=typeof r||"number"!=typeof e)throw new Error("maxLength or minLength must be a number and cannot be less than 1");if(r>e)throw new Error("minLength cannot be greater than maxLength")}(a,l);var u=function(r){return function(e){var t=r?r[e]:null;return null!=t?t:nr[e]}}(o);return r?r.length>l?or(u(4)):r.length=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(l),s=u.next();!s.done;s=u.next()){var f=s.value;if(null!=f&&"string"!=typeof f)throw new TypeError("All values within the array must be strings or null/undefined.")}}catch(r){t={error:r}}finally{try{s&&!s.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}}var d=null!=a?a:50;function c(r){var e=l?l[r]:lr[r];return"This textarea is too big"===e?"Textarea cannot exceed ".concat(d.toString()," characters"):null!=e?e:lr[r]}if(d<1||"number"!=typeof d)throw new Error("maxLength or minLength must be a number and cannot be less than 1");return""===r&&o?{isValid:!1,errorMsg:c(1)}:r.length>d?{isValid:!1,errorMsg:c(0)}:{isValid:!0,errorMsg:null}};function fr(r){var e=71===r[0]&&73===r[1]&&70===r[2]&&56===r[3]&&(57===r[4]||55===r[4])&&97===r[5];if(e){var t=r.length;return 0===r[t-2]&&59===r[t-1]}return e}function dr(r){return 0===r[0]&&0===r[1]&&1===r[2]&&0===r[3]}function cr(r){var e=255===r[0]&&216===r[1]&&255===r[2];if(e){var t=r.length;return 255===r[t-2]&&217===r[t-1]}return e}function yr(r){var e=137===r[0]&&80===r[1]&&78===r[2]&&71===r[3]&&13===r[4]&&10===r[5]&&26===r[6]&&10===r[7];if(e)for(var t=r.length,n=[73,69,78,68,174,66,96,130],i=0;i=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function Vr(r){var e,t;if(0===r.length)return!1;try{for(var n=Mr(r),i=n.next();!i.done;i=n.next()){var o=i.value;if((o<32||o>126)&&10!==o&&13!==o)return!1}}catch(r){e={error:r}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}return!0}const Nr={cpfIsValid:n,cnpjIsValid:o,isEmail:y,validateEmail:p,isCEP:c,validateUsername:I,validatePassword:E,getOnlyEmail:d,isCreditCardValid:Z,identifyFlagCard:z,isMACAddress:C,isAscii:j,isBase64:O,isDate:D,isDecimal:U,isEmpty:P,isMD5:k,isPort:F,isPostalCode:R,isTime:B,validatePassportNumber:q,validateBRPhoneNumber:J,validateUSPhoneNumber:W,validatePhoneNumber:H,isNumber:L,passwordStrengthTester:K,validateName:ar,validateSurname:tr,validateTextarea:sr,isValidImage:gr,isValidAudio:br,isValidPdf:wr,isValidVideo:Sr,isValidTxt:Vr};return e})()));