diff --git a/src/assets/netteForms.min.js b/src/assets/netteForms.min.js index 84ae06b8e..56eb1d213 100644 --- a/src/assets/netteForms.min.js +++ b/src/assets/netteForms.min.js @@ -1,15 +1,16 @@ /*! netteForms.js | (c) 2004 David Grudl (https://davidgrudl.com) */ -(function(n,e){if(n.JSON)if("function"===typeof define&&define.amd)define(function(){return e(n)});else if("object"===typeof module&&"object"===typeof module.exports)module.exports=e(n);else{var v=!n.Nette||!n.Nette.noInit;n.Nette=e(n);v&&n.Nette.initOnLoad()}})("undefined"!==typeof window?window:this,function(n){var e={},v={},t={},y=new n.WeakMap;e.formErrors=[];e.version="3.0";e.invalidNumberMessage="Please enter a valid value.";e.onDocumentReady=function(a){"loading"!==document.readyState?a.call(this): +(function(n,e){if(n.JSON)if("function"===typeof define&&define.amd)define(function(){return e(n)});else if("object"===typeof module&&"object"===typeof module.exports)module.exports=e(n);else{var v=!n.Nette||!n.Nette.noInit;n.Nette=e(n);v&&n.Nette.initOnLoad()}})("undefined"!==typeof window?window:this,function(n){var e={},v={},t={},y=new n.WeakMap;e.formErrors=[];e.version="3.3.0";e.invalidNumberMessage="Please enter a valid value.";e.onDocumentReady=function(a){"loading"!==document.readyState?a.call(this): document.addEventListener("DOMContentLoaded",a)};e.getValue=function(a){var c;if(a){if(a.tagName){if("radio"===a.type){var b=a.form.elements;for(c=0;cc?null:b[c].value;for(c=0;cb.indexOf(k)&&(b.push(k),!d&&g.focus&&(d=g))}b.length&&(alert(b.join("\n")),d&&d.focus())};e.validateRule=function(a,c,b,d){d=void 0===d?{value:e.getEffectiveValue(a,!0)}:d;":"===c.charAt(0)&&(c=c.substr(1));c=c.replace("::","_");c=c.replace(/\\/g,"");for(var f=Array.isArray(b)?b.slice(0):[b],g=0,k=f.length;g=c},maxLength:function(a,c,b){if("number"===a.type){if(a.validity.tooLong)return!1;if(a.validity.badInput)return null}return b.length<=c},length:function(a, -c,b){if("number"===a.type){if(a.validity.tooShort||a.validity.tooLong)return!1;if(a.validity.badInput)return null}c=Array.isArray(c)?c:[c,c];return(null===c[0]||b.length>=c[0])&&(null===c[1]||b.length<=c[1])},email:function(a,c,b){return/^("([ !#-[\]-~]|\\[ -~])+"|[-a-z0-9!#$%&'*+/=?^_`{|}~]+(\.[-a-z0-9!#$%&'*+/=?^_`{|}~]+)*)@([0-9a-z\u00C0-\u02FF\u0370-\u1EFF]([-0-9a-z\u00C0-\u02FF\u0370-\u1EFF]{0,61}[0-9a-z\u00C0-\u02FF\u0370-\u1EFF])?\.)+[a-z\u00C0-\u02FF\u0370-\u1EFF]([-0-9a-z\u00C0-\u02FF\u0370-\u1EFF]{0,17}[a-z\u00C0-\u02FF\u0370-\u1EFF])?$/i.test(b)}, +c[f].element,k=c[f].message;0>b.indexOf(k)&&(b.push(k),!d&&g.focus&&(d=g))}b.length&&e.showModal(b.join("\n"),function(){d&&d.focus()})};e.showModal=function(a,c){var b=document.createElement("dialog"),d=navigator.userAgentData;if(d&&b.showModal&&d.brands.some(function(k){return"Opera"===k.brand||"Chromium"===k.brand&&d.mobile})){var f=document.createElement("style");f.innerText=".netteFormsModal { text-align: center } .netteFormsModal button { padding: .1em 2em }";var g=document.createElement("button"); +g.innerText="OK";g.onclick=function(){b.remove();c()};b.setAttribute("class","netteFormsModal");b.innerText=a+"\n\n";b.appendChild(f);b.appendChild(g);document.body.appendChild(b);b.showModal()}else alert(a),c()};e.validateRule=function(a,c,b,d){d=void 0===d?{value:e.getEffectiveValue(a,!0)}:d;":"===c.charAt(0)&&(c=c.substr(1));c=c.replace("::","_");c=c.replace(/\\/g,"");for(var f=Array.isArray(b)?b.slice(0):[b],g=0,k=f.length;g=c},maxLength:function(a,c,b){if("number"===a.type){if(a.validity.tooLong)return!1; +if(a.validity.badInput)return null}return b.length<=c},length:function(a,c,b){if("number"===a.type){if(a.validity.tooShort||a.validity.tooLong)return!1;if(a.validity.badInput)return null}c=Array.isArray(c)?c:[c,c];return(null===c[0]||b.length>=c[0])&&(null===c[1]||b.length<=c[1])},email:function(a,c,b){return/^("([ !#-[\]-~]|\\[ -~])+"|[-a-z0-9!#$%&'*+/=?^_`{|}~]+(\.[-a-z0-9!#$%&'*+/=?^_`{|}~]+)*)@([0-9a-z\u00C0-\u02FF\u0370-\u1EFF]([-0-9a-z\u00C0-\u02FF\u0370-\u1EFF]{0,61}[0-9a-z\u00C0-\u02FF\u0370-\u1EFF])?\.)+[a-z\u00C0-\u02FF\u0370-\u1EFF]([-0-9a-z\u00C0-\u02FF\u0370-\u1EFF]{0,17}[a-z\u00C0-\u02FF\u0370-\u1EFF])?$/i.test(b)}, url:function(a,c,b,d){/^[a-z\d+.-]+:/.test(b)||(b="https://"+b);return/^https?:\/\/((([-_0-9a-z\u00C0-\u02FF\u0370-\u1EFF]+\.)*[0-9a-z\u00C0-\u02FF\u0370-\u1EFF]([-0-9a-z\u00C0-\u02FF\u0370-\u1EFF]{0,61}[0-9a-z\u00C0-\u02FF\u0370-\u1EFF])?\.)?[a-z\u00C0-\u02FF\u0370-\u1EFF]([-0-9a-z\u00C0-\u02FF\u0370-\u1EFF]{0,17}[a-z\u00C0-\u02FF\u0370-\u1EFF])?|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|\[[0-9a-f:]{3,39}\])(:\d{1,5})?(\/\S*)?$/i.test(b)?(d.value=b,!0):!1},regexp:function(a,c,b){a="string"===typeof c?c.match(/^\/(.*)\/([imu]*)$/): !1;try{return a&&(new RegExp(a[1],a[2].replace("u",""))).test(b)}catch(d){}},pattern:function(a,c,b,d,f){if("string"!==typeof c)return null;try{try{var g=new RegExp("^(?:"+c+")$",f?"ui":"u")}catch(k){g=new RegExp("^(?:"+c+")$",f?"i":"")}if(n.FileList&&b instanceof FileList){for(a=0;a=c},max:function(a,c,b){if("number"===a.type){if(a.validity.rangeOverflow)return!1;