s?{start:e-i-5,end:e}:{start:e,end:e+i+5}}function l(t){var n,o,l,h=i(t),u=Math.min(t.height/2,t.width/2),d={r:t.width,l:0,t:t.height,b:0},c={};t.ctx.font=h.font,t._pointLabelSizes=[];var p=e(t);for(n=0;nd.r&&(d.r=m.end,c.r=f),v.startd.b&&(d.b=v.end,c.b=f)}t.setReductions(u,d,c)}function h(t){var e=Math.min(t.height/2,t.width/2);t.drawingArea=Math.round(e),t.setCenterPoint(0,0,0,0)}function u(t){return 0===t||180===t?"center":t<180?"left":"right"}function d(t,e,i,n){if(s.isArray(e))for(var o=i.y,a=1.5*n,r=0;r270||t<90)&&(i.y-=e.h)}function p(t){var n=t.ctx,o=t.options,a=o.angleLines,r=o.pointLabels;n.lineWidth=a.lineWidth,n.strokeStyle=a.color;var l=t.getDistanceFromCenterForValue(o.ticks.reverse?t.min:t.max),h=i(t);n.textBaseline="top";for(var p=e(t)-1;p>=0;p--){if(a.display){var f=t.getPointPosition(p,l);n.beginPath(),n.moveTo(t.xCenter,t.yCenter),n.lineTo(f.x,f.y),n.stroke(),n.closePath()}if(r.display){var g=t.getPointPosition(p,l+5),v=s.valueAtIndexOrDefault(r.fontColor,p,m.defaultFontColor);n.font=h.font,n.fillStyle=v;var b=t.getIndexAngle(p),_=s.toDegrees(b);n.textAlign=u(_),c(_,t._pointLabelSizes[p],g),d(n,t.pointLabels[p]||"",g,h.size)}}}function f(t,i,n,o){var a=t.ctx;if(a.strokeStyle=s.valueAtIndexOrDefault(i.color,o-1),a.lineWidth=s.valueAtIndexOrDefault(i.lineWidth,o-1),t.options.gridLines.circular)a.beginPath(),a.arc(t.xCenter,t.yCenter,n,0,2*Math.PI),a.closePath(),a.stroke();else{var r=e(t);if(0===r)return;a.beginPath();var l=t.getPointPosition(0,n);a.moveTo(l.x,l.y);for(var h=1;h0&&i>0?e:0)},draw:function(){var t=this,e=t.options,i=e.gridLines,n=e.ticks,o=s.valueOrDefault;if(e.display){var a=t.ctx,r=this.getIndexAngle(0),l=o(n.fontSize,m.defaultFontSize),h=o(n.fontStyle,m.defaultFontStyle),u=o(n.fontFamily,m.defaultFontFamily),d=s.fontString(l,h,u);s.each(t.ticks,function(e,s){if(s>0||n.reverse){var h=t.getDistanceFromCenterForValue(t.ticksAsNumbers[s]);if(i.display&&0!==s&&f(t,i,h,s),n.display){var u=o(n.fontColor,m.defaultFontColor);if(a.font=d,a.save(),a.translate(t.xCenter,t.yCenter),a.rotate(r),n.showLabelBackdrop){var c=a.measureText(e).width;a.fillStyle=n.backdropColor,a.fillRect(-c/2-n.backdropPaddingX,-h-l/2-n.backdropPaddingY,c+2*n.backdropPaddingX,l+2*n.backdropPaddingY)}a.textAlign="center",a.textBaseline="middle",a.fillStyle=u,a.fillText(e,0,-h),a.restore()}}}),(e.angleLines.display||e.pointLabels.display)&&p(t)}}});t.scaleService.registerScaleType("radialLinear",b,v)}},{25:25,34:34,45:45}],58:[function(t,e,i){"use strict";function n(t,e){return t-e}function s(t){var e,i,n,s={},o=[];for(e=0,i=t.length;ee&&r=0&&a<=r;){if(n=a+r>>1,s=t[n-1]||null,o=t[n],!s)return{lo:null,hi:o};if(o[e]i))return{lo:s,hi:o};r=n-1}}return{lo:o,hi:null}}function r(t,e,i,n){var s=a(t,e,i),o=s.lo?s.hi?s.lo:t[t.length-2]:t[0],r=s.lo?s.hi?s.hi:t[t.length-1]:t[1],l=r[e]-o[e],h=l?(i-o[e])/l:0,u=(r[n]-o[n])*h;return o[n]+u}function l(t,e){var i=e.parser,n=e.parser||e.format;return"function"==typeof i?i(t):"string"==typeof t&&"string"==typeof n?b(t,n):(t instanceof b||(t=b(t)),
t.isValid()?t:"function"==typeof n?n(t):t)}function h(t,e){if(y.isNullOrUndef(t))return null;var i=e.options.time,n=l(e.getRightValue(t),i);return n.isValid()?(i.round&&n.startOf(i.round),n.valueOf()):null}function u(t,e,i,n){var s,o,a,r=e-t,l=k[i],h=l.size,u=l.steps;if(!u)return Math.ceil(r/(n*h));for(s=0,o=u.length;s=C.indexOf(e);s--)if(o=C[s],k[o].common&&a.as(o)>=t.length)return o;return C[e?C.indexOf(e):0]}function p(t){for(var e=C.indexOf(t)+1,i=C.length;e1?e[1]:n,a=e[0],l=(r(t,"time",o,"pos")-r(t,"time",a,"pos"))/2),s.time.max||(o=e[e.length-1],a=e.length>1?e[e.length-2]:i,h=(r(t,"time",o,"pos")-r(t,"time",a,"pos"))/2)),{left:l,right:h}}function m(t,e){var i,n,s,o,a=[];for(i=0,n=t.length;i=s&&i<=a&&d.push(i);return n.min=s,n.max=a,n._unit=l.unit||c(d,l.minUnit,n.min,n.max),n._majorUnit=p(n._unit),n._table=o(n._timestamps.data,s,a,r.distribution),n._offsets=g(n._table,d,s,a,r),n._labelFormat=v(n._timestamps.data,l),m(d,n._majorUnit)},getLabelForIndex:function(t,e){var i=this,n=i.chart.data,s=i.options.time,o=n.labels&&t=0&&t0?a:1}});t.scaleService.registerScaleType("time",i,e)}},{1:1,25:25,45:45}]},{},[7])(7)}),function(t,e){"function"==typeof define&&define.amd?define([],function(){return t.SignaturePad=e()}):"object"==typeof exports?module.exports=e():t.SignaturePad=e()}(this,function(){return function(t){"use strict";var e=function(t,e){var i=this,n=e||{};this.velocityFilterWeight=n.velocityFilterWeight||.7,this.minWidth=n.minWidth||.5,this.maxWidth=n.maxWidth||2.5,this.dotSize=n.dotSize||function(){return(this.minWidth+this.maxWidth)/2},this.penColor=n.penColor||"black",this.backgroundColor=n.backgroundColor||"rgba(0,0,0,0)",this.onEnd=n.onEnd,this.onBegin=n.onBegin,this._canvas=t,this._ctx=t.getContext("2d"),this.clear(),this._handleMouseDown=function(t){1===t.which&&(i._mouseButtonDown=!0,i._strokeBegin(t))},this._handleMouseMove=function(t){i._mouseButtonDown&&i._strokeUpdate(t)},this._handleMouseUp=function(t){1===t.which&&i._mouseButtonDown&&(i._mouseButtonDown=!1,i._strokeEnd(t))},this._handleTouchStart=function(t){if(1==t.targetTouches.length){var e=t.changedTouches[0];i._strokeBegin(e)}},this._handleTouchMove=function(t){t.preventDefault();var e=t.targetTouches[0];i._strokeUpdate(e)},this._handleTouchEnd=function(t){t.target===i._canvas&&(t.preventDefault(),i._strokeEnd(t))},this._handleMouseEvents(),this._handleTouchEvents()};e.prototype.clear=function(){var t=this._ctx,e=this._canvas;t.fillStyle=this.backgroundColor,t.clearRect(0,0,e.width,e.height),t.fillRect(0,0,e.width,e.height),this._reset()},e.prototype.toDataURL=function(t,e){var i=this._canvas;return i.toDataURL.apply(i,arguments)},e.prototype.fromDataURL=function(t){var e=this,i=new Image,n=window.devicePixelRatio||1,s=this._canvas.width/n,o=this._canvas.height/n;this._reset(),i.src=t,i.onload=function(){e._ctx.drawImage(i,0,0,s,o)},this._isEmpty=!1},e.prototype._strokeUpdate=function(t){var e=this._createPoint(t);this._addPoint(e)},e.prototype._strokeBegin=function(t){this._reset(),this._strokeUpdate(t),"function"==typeof this.onBegin&&this.onBegin(t)},e.prototype._strokeDraw=function(t){var e=this._ctx,i="function"==typeof this.dotSize?this.dotSize():this.dotSize;e.beginPath(),this._drawPoint(t.x,t.y,i),e.closePath(),e.fill()},e.prototype._strokeEnd=function(t){var e=this.points.length>2,i=this.points[0];!e&&i&&this._strokeDraw(i),"function"==typeof this.onEnd&&this.onEnd(t)},e.prototype._handleMouseEvents=function(){this._mouseButtonDown=!1,this._canvas.addEventListener("mousedown",this._handleMouseDown),this._canvas.addEventListener("mousemove",this._handleMouseMove),t.addEventListener("mouseup",this._handleMouseUp)},e.prototype._handleTouchEvents=function(){this._canvas.style.msTouchAction="none",this._canvas.style.touchAction="none",this._canvas.addEventListener("touchstart",this._handleTouchStart),this._canvas.addEventListener("touchmove",this._handleTouchMove),this._canvas.addEventListener("touchend",this._handleTouchEnd)},e.prototype.on=function(){this._handleMouseEvents(),this._handleTouchEvents()},e.prototype.off=function(){this._canvas.removeEventListener("mousedown",this._handleMouseDown),this._canvas.removeEventListener("mousemove",this._handleMouseMove),t.removeEventListener("mouseup",this._handleMouseUp),this._canvas.removeEventListener("touchstart",this._handleTouchStart),this._canvas.removeEventListener("touchmove",this._handleTouchMove),this._canvas.removeEventListener("touchend",this._handleTouchEnd)},e.prototype.isEmpty=function(){return this._isEmpty},e.prototype._reset=function(){this.points=[],this._lastVelocity=0,this._lastWidth=(this.minWidth+this.maxWidth)/2,this._isEmpty=!0,this._ctx.fillStyle=this.penColor},e.prototype._createPoint=function(t){var e=this._canvas.getBoundingClientRect();return new i(t.clientX-e.left,t.clientY-e.top)},e.prototype._addPoint=function(t){var e,i,s,o,a=this.points;a.push(t),a.length>2&&(3===a.length&&a.unshift(a[0]),o=this._calculateCurveControlPoints(a[0],a[1],a[2]),e=o.c2,o=this._calculateCurveControlPoints(a[1],a[2],a[3]),i=o.c1,s=new n(a[1],e,i,a[2]),this._addCurve(s),a.shift())},e.prototype._calculateCurveControlPoints=function(t,e,n){var s=t.x-e.x,o=t.y-e.y,a=e.x-n.x,r=e.y-n.y,l={x:(t.x+e.x)/2,y:(t.y+e.y)/2},h={x:(e.x+n.x)/2,y:(e.y+n.y)/2},u=Math.sqrt(s*s+o*o),d=Math.sqrt(a*a+r*r),c=l.x-h.x,p=l.y-h.y,f=d/(u+d),g={x:h.x+c*f,y:h.y+p*f},m=e.x-g.x,v=e.y-g.y;return{c1:new i(l.x+m,l.y+v),c2:new i(h.x+m,h.y+v)}},e.prototype._addCurve=function(t){var e,i,n=t.startPoint,s=t.endPoint;e=s.velocityFrom(n),e=this.velocityFilterWeight*e+(1-this.velocityFilterWeight)*this._lastVelocity,i=this._strokeWidth(e),this._drawCurve(t,this._lastWidth,i),this._lastVelocity=e,this._lastWidth=i},e.prototype._drawPoint=function(t,e,i){var n=this._ctx;n.moveTo(t,e),n.arc(t,e,i,0,2*Math.PI,!1),this._isEmpty=!1},e.prototype._drawCurve=function(t,e,i){var n,s,o,a,r,l,h,u,d,c,p,f=this._ctx,g=i-e;for(n=Math.floor(t.length()),f.beginPath(),o=0;o0&&(a=i-s,r=n-o,l+=Math.sqrt(a*a+r*r)),s=i,o=n;return l},n.prototype._point=function(t,e,i,n,s){return e*(1-t)*(1-t)*(1-t)+3*i*(1-t)*(1-t)*t+3*n*(1-t)*t*t+s*t*t*t},e}(document)}),function(t,e){"function"==typeof define&&define.amd?define(["jquery"],function(t){return e(t)}):"object"==typeof module&&module.exports?module.exports=e(require("jquery")):e(t.jQuery)}(this,function(t){!function(t,e,i){function n(t,e){this.$form=t,this.$input=e,this.reset(),e.on("change paste",this.reset.bind(this))}var s=function(){return!1},o=null,a={numHalted:0,haltValidation:function(e){this.numHalted++,t.formUtils.haltValidation=!0,e.unbind("submit",s).bind("submit",s).find('*[type="submit"]').addClass("disabled").attr("disabled","disabled")},unHaltValidation:function(e){0===--this.numHalted&&(t.formUtils.haltValidation=!1,e.unbind("submit",s).find('*[type="submit"]').removeClass("disabled").removeAttr("disabled","disabled"))}};n.prototype.reset=function(){this.haltedFormValidation=!1,this.hasRun=!1,this.isRunning=!1,this.result=void 0},n.prototype.run=function(t,e){return"keyup"===t?null:this.isRunning?(o=t,this.haltedFormValidation||(a.haltValidation(),this.haltedFormValidation=!0),null):this.hasRun?this.result:(o=t,a.haltValidation(this.$form),this.haltedFormValidation=!0,this.isRunning=!0,this.$input.attr("disabled","disabled").addClass("async-validation"),this.$form.addClass("async-validation"),e(function(t){this.done(t)}.bind(this)),null)},n.prototype.done=function(t){this.result=t,this.hasRun=!0,this.isRunning=!1,this.$input.removeAttr("disabled").removeClass("async-validation"),this.$form.removeClass("async-validation"),this.haltedFormValidation&&(a.unHaltValidation(this.$form),"submit"===o?this.$form.trigger("submit"):this.$input.trigger("validation.revalidate"))},n.loadInstance=function(t,e,i){var s,o=e.get(0);return o.asyncValidators||(o.asyncValidators={}),o.asyncValidators[t]?s=o.asyncValidators[t]:(s=new n(i,e),o.asyncValidators[t]=s),s},t.formUtils=t.extend(t.formUtils||{},{asyncValidation:function(t,e,i){return this.warn("Use of deprecated function $.formUtils.asyncValidation, use $.formUtils.addAsyncValidator() instead"),n.loadInstance(t,e,i)},addAsyncValidator:function(e){var i=t.extend({},e),s=i.validatorFunction;i.async=!0,i.validatorFunction=function(t,e,o,a,r,l){return n.loadInstance(this.name,e,r).run(l,function(n){s.apply(i,[n,t,e,o,a,r,l])})},this.addValidator(i)}}),t(e).bind("validatorsLoaded formValidationSetup",function(e,i){i||(i=t("form")),i.find("[data-validation]").each(function(){var e=t(this);e.valAttr("async",!1),t.each(t.split(e.attr("data-validation")),function(i,n){var s=t.formUtils.validators["validate_"+n];s&&s.async&&e.valAttr("async","yes")})})})}(t,window),function(t,e){"use strict";function i(e){e&&"custom"===e.errorMessagePosition&&"function"==typeof e.errorMessageCustom&&(t.formUtils.warn("Use of deprecated function errorMessageCustom, use config.submitErrorMessageCallback instead"),e.submitErrorMessageCallback=function(t,i){e.errorMessageCustom(t,e.language.errorTitle,i,e)})}function n(e){if(e.errorMessagePosition&&"object"==typeof e.errorMessagePosition){t.formUtils.warn("Deprecated use of config parameter errorMessagePosition, use config.submitErrorMessageCallback instead");var i=e.errorMessagePosition;e.errorMessagePosition="top",e.submitErrorMessageCallback=function(){return i}}}function s(e){var i=e.find("[data-validation-if-checked]");i.length&&t.formUtils.warn('Detected use of attribute "data-validation-if-checked" which is deprecated. Use "data-validation-depends-on" provided by module "logic"'),i.on("beforeValidation",function(){var i=t(this),n=i.valAttr("if-checked"),s=t('input[name="'+n+'"]',e),o=s.is(":checked"),a=(t.formUtils.getValue(s)||"").toString(),r=i.valAttr("if-checked-value");(!o||r&&r!==a)&&i.valAttr("skipped",!0)})}function o(e){var i={se:"sv",cz:"cs",dk:"da"};if(e.lang in i){var n=i[e.lang];t.formUtils.warn('Deprecated use of lang code "'+e.lang+'" use "'+n+'" instead'),e.lang=n}}t.fn.validateForm=function(e,i){return t.formUtils.warn("Use of deprecated function $.validateForm, use $.isValid instead"),this.isValid(e,i,!0)},t(window).on("formValidationPluginInit",function(t,e){o(e),i(e),n(e)}).on("validatorsLoaded formValidationSetup",function(e,i){i||(i=t("form")),s(i)})}(t),function(t){"use strict";var e={resolveErrorMessage:function(t,e,i,n,s){var o=n.validationErrorMsgAttribute+"-"+i.replace("validate_",""),a=t.attr(o);return a||(a=t.attr(n.validationErrorMsgAttribute))||(a="function"!=typeof e.errorMessageKey?s[e.errorMessageKey]:s[e.errorMessageKey(n)])||(a=e.errorMessage),a},getParentContainer:function(e){if(e.valAttr("error-msg-container"))return t(e.valAttr("error-msg-container"));var i=e.parent();return"checkbox"===e.attr("type")&&e.closest(".checkbox").length?i=e.closest(".checkbox").parent():"radio"===e.attr("type")&&e.closest(".radio").length&&(i=e.closest(".radio").parent()),i.closest(".input-group").length&&(i=i.closest(".input-group").parent()),i},applyInputErrorStyling:function(t,e){t.addClass(e.errorElementClass).removeClass(e.successElementClass),this.getParentContainer(t).addClass(e.inputParentClassOnError).removeClass(e.inputParentClassOnSuccess),""!==e.borderColorOnError&&t.css("border-color",e.borderColorOnError)},applyInputSuccessStyling:function(t,e){t.addClass(e.successElementClass),this.getParentContainer(t).addClass(e.inputParentClassOnSuccess)},removeInputStylingAndMessage:function(t,i){t.removeClass(i.successElementClass).removeClass(i.errorElementClass).css("border-color","");var n=e.getParentContainer(t);if(n.removeClass(i.inputParentClassOnError).removeClass(i.inputParentClassOnSuccess),"function"==typeof i.inlineErrorMessageCallback){var s=i.inlineErrorMessageCallback(t,!1,i);s&&s.html("")}else n.find("."+i.errorMessageClass).remove()},removeAllMessagesAndStyling:function(i,n){if("function"==typeof n.submitErrorMessageCallback){var s=n.submitErrorMessageCallback(i,!1,n);s&&s.html("")}else i.find("."+n.errorMessageClass+".alert").remove();i.find("."+n.errorElementClass+",."+n.successElementClass).each(function(){e.removeInputStylingAndMessage(t(this),n)})},setInlineMessage:function(e,i,n){this.applyInputErrorStyling(e,n);var s,o=document.getElementById(e.attr("name")+"_err_msg"),a=!1,r=function(n){t.formUtils.$win.trigger("validationErrorDisplay",[e,n]),n.html(i)},l=function(){var o=!1;a.find("."+n.errorMessageClass).each(function(){if(this.inputReferer===e[0])return o=t(this),!1}),o?i?r(o):o.remove():""!==i&&(s=t(''),r(s),s[0].inputReferer=e[0],a.prepend(s))};if(o)t.formUtils.warn("Using deprecated element reference "+o.id),a=t(o),l();else if("function"==typeof n.inlineErrorMessageCallback){if(!(a=n.inlineErrorMessageCallback(e,i,n)))return;l()}else{var h=this.getParentContainer(e);s=h.find("."+n.errorMessageClass+".help-block"),0===s.length&&(s=t("").addClass("help-block").addClass(n.errorMessageClass),s.appendTo(h)),r(s)}},setMessageInTopOfForm:function(e,i,n,s){var o='',a=!1;if("function"!=typeof n.submitErrorMessageCallback||(a=n.submitErrorMessageCallback(e,i,n))){var r={errorTitle:s.errorTitle,fields:"",errorMessageClass:n.errorMessageClass};t.each(i,function(t,e){r.fields+=""+e+""}),t.each(r,function(t,e){o=o.replace("{"+t+"}",e)}),a?a.html(o):e.children().eq(0).before(t(o))}}};t.formUtils=t.extend(t.formUtils||{},{dialogs:e})}(t),function(t,e,i){"use strict";var n=0;t.fn.validateOnBlur=function(e,i){var n=this,s=this.find("*[data-validation]");return s.each(function(){var s=t(this);if(s.is("[type=radio]")){var o=n.find('[type=radio][name="'+s.attr("name")+'"]');o.bind("blur.validation",function(){s.validateInputOnBlur(e,i,!0,"blur")}),i.validateCheckboxRadioOnClick&&o.bind("click.validation",function(){s.validateInputOnBlur(e,i,!0,"click")})}}),s.bind("blur.validation",function(){t(this).validateInputOnBlur(e,i,!0,"blur")}),i.validateCheckboxRadioOnClick&&this.find("input[type=checkbox][data-validation],input[type=radio][data-validation]").bind("click.validation",function(){t(this).validateInputOnBlur(e,i,!0,"click")}),this},t.fn.validateOnEvent=function(e,i){if(0!==this.length){return("FORM"===this[0].nodeName?this.find("*[data-validation-event]"):this).each(function(){var n=t(this),s=n.valAttr("event");s&&n.unbind(s+".validation").bind(s+".validation",function(n){9!==(n||{}).keyCode&&t(this).validateInputOnBlur(e,i,!0,s)})}),this}},t.fn.showHelpOnFocus=function(e){return e||(e="data-validation-help"),this.find("textarea,input").each(function(){var i=t(this),s="jquery_form_help_"+ ++n,o=i.attr(e);i.removeClass("has-help-text").unbind("focus.help").unbind("blur.help"),o&&i.addClass("has-help-txt").bind("focus.help",function(){var e=i.parent().find("."+s);0===e.length&&(e=t("").addClass(s).addClass("help").addClass("help-block").text(o).hide(),i.after(e)),e.fadeIn()}).bind("blur.help",function(){t(this).parent().find("."+s).fadeOut("slow")})}),this},t.fn.validate=function(e,i,n){var s=t.extend({},t.formUtils.LANG,n||{});this.each(function(){var n=t(this),o=n.closest("form").get(0)||{},a=o.validationConfig||t.formUtils.defaultConfig();n.one("validation",function(t,i){"function"==typeof e&&e(i,this,t)}),n.validateInputOnBlur(s,t.extend({},a,i||{}),!0)})},t.fn.willPostponeValidation=function(){return(this.valAttr("suggestion-nr")||this.valAttr("postpone")||this.hasClass("hasDatepicker"))&&!e.postponedValidation},t.fn.validateInputOnBlur=function(i,n,s,o){if(t.formUtils.eventType=o,this.willPostponeValidation()){var a=this,r=this.valAttr("postpone")||200;return e.postponedValidation=function(){a.validateInputOnBlur(i,n,s,o),e.postponedValidation=!1},setTimeout(function(){e.postponedValidation&&e.postponedValidation()},r),this}i=t.extend({},t.formUtils.LANG,i||{}),t.formUtils.dialogs.removeInputStylingAndMessage(this,n);var l=this,h=l.closest("form"),u=t.formUtils.validateInput(l,i,n,h,o),d=function(){l.validateInputOnBlur(i,n,!1,"blur.revalidated")};return"blur"===o&&l.unbind("validation.revalidate",d).one("validation.revalidate",d),s&&l.removeKeyUpValidation(),u.shouldChangeDisplay&&(u.isValid?t.formUtils.dialogs.applyInputSuccessStyling(l,n):t.formUtils.dialogs.setInlineMessage(l,u.errorMsg,n)),!u.isValid&&s&&l.validateOnKeyUp(i,n),this},t.fn.validateOnKeyUp=function(e,i){return this.each(function(){var n=t(this);n.valAttr("has-keyup-event")||n.valAttr("has-keyup-event","true").bind("keyup.validation",function(t){9!==t.keyCode&&n.validateInputOnBlur(e,i,!1,"keyup")})}),this},t.fn.removeKeyUpValidation=function(){return this.each(function(){t(this).valAttr("has-keyup-event",!1).unbind("keyup.validation")}),this},t.fn.valAttr=function(t,e){return void 0===e?this.attr("data-validation-"+t):!1===e||null===e?this.removeAttr("data-validation-"+t):(t=t.length>0?"-"+t:"",this.attr("data-validation"+t,e))},t.fn.isValid=function(e,i,n){if(t.formUtils.isLoadingModules){var s=this;return setTimeout(function(){s.isValid(e,i,n)},200),null}i=t.extend({},t.formUtils.defaultConfig(),i||{}),e=t.extend({},t.formUtils.LANG,e||{}),n=!1!==n,t.formUtils.errorDisplayPreventedWhenHalted&&(delete t.formUtils.errorDisplayPreventedWhenHalted,n=!1);var o=function(e,s){t.inArray(e,r)<0&&r.push(e),l.push(s),s.valAttr("current-error",e),n&&t.formUtils.dialogs.applyInputErrorStyling(s,i)},a=[],r=[],l=[],h=this,u=function(e,n){return"submit"===n||"button"===n||"reset"===n||t.inArray(e,i.ignore||[])>-1};if(n&&t.formUtils.dialogs.removeAllMessagesAndStyling(h,i),h.find("input,textarea,select").filter(':not([type="submit"],[type="button"])').each(function(){var n=t(this),s=n.attr("type"),r="radio"===s||"checkbox"===s,l=n.attr("name");if(!u(l,s)&&(!r||t.inArray(l,a)<0)){r&&a.push(l);var d=t.formUtils.validateInput(n,e,i,h,"submit");d.isValid?d.isValid&&d.shouldChangeDisplay&&(n.valAttr("current-error",!1),t.formUtils.dialogs.applyInputSuccessStyling(n,i)):o(d.errorMsg,n)}}),"function"==typeof i.onValidate){var d=i.onValidate(h);t.isArray(d)?t.each(d,function(t,e){o(e.message,e.element)}):d&&d.element&&d.message&&o(d.message,d.element)}return t.formUtils.isValidatingEntireForm=!1,l.length>0&&n&&("top"===i.errorMessagePosition?t.formUtils.dialogs.setMessageInTopOfForm(h,r,i,e):t.each(l,function(e,n){t.formUtils.dialogs.setInlineMessage(n,n.valAttr("current-error"),i)}),i.scrollToTopOnError&&t.formUtils.$win.scrollTop(h.offset().top-20)),!n&&t.formUtils.haltValidation&&(t.formUtils.errorDisplayPreventedWhenHalted=!0),0===l.length&&!t.formUtils.haltValidation},t.fn.restrictLength=function(e){return new t.formUtils.lengthRestriction(this,e),this},t.fn.addSuggestions=function(e){var i=!1;return this.find("input").each(function(){var n=t(this);i=t.split(n.attr("data-suggestions")),i.length>0&&!n.hasClass("has-suggestions")&&(t.formUtils.suggest(n,i,e),n.addClass("has-suggestions"))}),this}}(t,window),function(t){"use strict";t.formUtils=t.extend(t.formUtils||{},{isLoadingModules:!1,loadedModules:{},registerLoadedModule:function(e){this.loadedModules[t.trim(e).toLowerCase()]=!0},hasLoadedModule:function(e){return t.trim(e).toLowerCase()in this.loadedModules},loadModules:function(e,i,n){if(t.formUtils.isLoadingModules)return void setTimeout(function(){t.formUtils.loadModules(e,i,n)},100);var s=function(e,i){var s=t.split(e),o=s.length,a=function(){0===--o&&(t.formUtils.isLoadingModules=!1,"function"==typeof n&&n())};o>0&&(t.formUtils.isLoadingModules=!0);var r="?_="+(new Date).getTime(),l=document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0];t.each(s,function(e,n){if(n=t.trim(n),0===n.length||t.formUtils.hasLoadedModule(n))a();else{var s=i+n+(".js"===n.slice(-3)?"":".js"),o=document.createElement("SCRIPT");"function"==typeof define&&define.amd?require([s+(".dev.js"===s.slice(-7)?r:"")],a):(o.type="text/javascript",o.onload=a,o.src=s+(".dev.js"===s.slice(-7)?r:""),o.onerror=function(){t.formUtils.warn("Unable to load form validation module "+s,!0),a()},o.onreadystatechange=function(){"complete"!==this.readyState&&"loaded"!==this.readyState||(a(),this.onload=null,this.onreadystatechange=null)},l.appendChild(o))}})};if(i)s(e,i);else{var o=function(){var i=!1;return t('script[src*="form-validator"]').each(function(){if(!(this.src.split("form-validator")[1].split("node_modules").length>1))return i=this.src.substr(0,this.src.lastIndexOf("/"))+"/","/"===i&&(i=""),!1}),!1!==i&&(s(e,i),!0)};o()||t(function(){o()||"function"==typeof n&&n()})}}})}(t),function(t){"use strict";t.split=function(e,i,n){n=void 0===n||!0===n;var s="[,|"+(n?"\\s":"")+"-]\\s*",o=new RegExp(s,"g");if("function"!=typeof i){if(!e)return[];var a=[];return t.each(e.split(i||o),function(e,i){i=t.trim(i),i.length&&a.push(i)}),a}e&&t.each(e.split(o),function(e,n){if(n=t.trim(n),n.length)return i(n,e)})},t.validate=function(e){var i=t.extend(t.formUtils.defaultConfig(),{form:"form",validateOnEvent:!1,validateOnBlur:!0,validateCheckboxRadioOnClick:!0,showHelpOnFocus:!0,addSuggestions:!0,modules:"",onModulesLoaded:null,language:!1,onSuccess:!1,onError:!1,onElementValidate:!1});if(e=t.extend(i,e||{}),t(window).trigger("formValidationPluginInit",[e]),e.lang&&"en"!==e.lang){var n="lang/"+e.lang+".js";e.modules+=e.modules.length?","+n:n}t(e.form).each(function(i,n){n.validationConfig=e;var s=t(n);s.trigger("formValidationSetup",[s,e]),s.find(".has-help-txt").unbind("focus.validation").unbind("blur.validation"),s.removeClass("has-validation-callback").unbind("submit.validation").unbind("reset.validation").find("input[data-validation],textarea[data-validation]").unbind("blur.validation"),s.bind("submit.validation",function(i){var n=t(this),s=function(){return i.stopImmediatePropagation(),!1};if(t.formUtils.haltValidation)return s();if(t.formUtils.isLoadingModules)return setTimeout(function(){n.trigger("submit.validation")},200),s();var o=n.isValid(e.language,e);return t.formUtils.haltValidation?s():o&&"function"==typeof e.onSuccess?!1===e.onSuccess(n)?s():void 0:o||"function"!=typeof e.onError?!!o||s():(e.onError(n),s())}).bind("reset.validation",function(){t.formUtils.dialogs.removeAllMessagesAndStyling(s,e)}).addClass("has-validation-callback"),e.showHelpOnFocus&&s.showHelpOnFocus(),e.addSuggestions&&s.addSuggestions(),e.validateOnBlur&&(s.validateOnBlur(e.language,e),s.bind("html5ValidationAttrsFound",function(){s.validateOnBlur(e.language,e)})),e.validateOnEvent&&s.validateOnEvent(e.language,e)}),""!==e.modules&&t.formUtils.loadModules(e.modules,null,function(){"function"==typeof e.onModulesLoaded&&e.onModulesLoaded();var i="string"==typeof e.form?t(e.form):e.form;t.formUtils.$win.trigger("validatorsLoaded",[i,e])})}}(t),function(t,e){"use strict";var i=t(e);t.formUtils=t.extend(t.formUtils||{},{$win:i,defaultConfig:function(){return{ignore:[],errorElementClass:"error",successElementClass:"valid",borderColorOnError:"#b94a48",errorMessageClass:"form-error",validationRuleAttribute:"data-validation",validationErrorMsgAttribute:"data-validation-error-msg",errorMessagePosition:"inline",errorMessageTemplate:{container:'{messages}
',messages:"{errorTitle}",field:"{msg}"},scrollToTopOnError:!0,dateFormat:"yyyy-mm-dd",addValidClassOnAll:!1,decimalSeparator:".",inputParentClassOnError:"has-error",inputParentClassOnSuccess:"has-success",validateHiddenInputs:!1,inlineErrorMessageCallback:!1,submitErrorMessageCallback:!1}},validators:{},sanitizers:{},_events:{load:[],valid:[],invalid:[]},haltValidation:!1,addValidator:function(t){var e=0===t.name.indexOf("validate_")?t.name:"validate_"+t.name;void 0===t.validateOnKeyUp&&(t.validateOnKeyUp=!0),this.validators[e]=t},addSanitizer:function(t){this.sanitizers[t.name]=t},warn:function(t,i){"console"in e?"function"==typeof e.console.warn?e.console.warn(t):"function"==typeof e.console.log&&e.console.log(t):i&&alert(t)},getValue:function(t,e){var i=e?e.find(t):t;if(i.length>0){var n=i.eq(0).attr("type");return"radio"===n||"checkbox"===n?i.filter(":checked").val()||"":i.val()||""}return!1},validateInput:function(e,i,n,s,o){n=n||t.formUtils.defaultConfig(),i=i||t.formUtils.LANG,s.length||(s=e.parent());var a=this.getValue(e);e.valAttr("skipped",!1).one("beforeValidation",function(){(e.attr("disabled")||!e.is(":visible")&&!n.validateHiddenInputs)&&e.valAttr("skipped",1)}).trigger("beforeValidation",[a,i,n]);var r="true"===e.valAttr("optional"),l=!a&&r,h=e.attr(n.validationRuleAttribute),u=!0,d="",c={isValid:!0,shouldChangeDisplay:!0,errorMsg:""};if(!h||l||e.valAttr("skipped"))return c.shouldChangeDisplay=n.addValidClassOnAll,c;var p=e.valAttr("ignore");return p&&t.each(p.split(""),function(t,e){a=a.replace(new RegExp("\\"+e,"g"),"")}),t.split(h,function(r){0!==r.indexOf("validate_")&&(r="validate_"+r);var l=t.formUtils.validators[r];if(!l)throw new Error('Using undefined validator "'+r+'". Maybe you have forgotten to load the module that "'+r+'" belongs to?');if("validate_checkbox_group"===r&&(e=s.find('[name="'+e.attr("name")+'"]:eq(0)')),("keyup"!==o||l.validateOnKeyUp)&&(u=l.validatorFunction(a,e,n,i,s,o)),!u)return n.validateOnBlur&&e.validateOnKeyUp(i,n),d=t.formUtils.dialogs.resolveErrorMessage(e,l,r,n,i),!1}),!1===u?(e.trigger("validation",!1),c.errorMsg=d,c.isValid=!1,
c.shouldChangeDisplay=!0):null===u?c.shouldChangeDisplay=!1:(e.trigger("validation",!0),c.shouldChangeDisplay=!0),"function"==typeof n.onElementValidate&&null!==d&&n.onElementValidate(c.isValid,e,s,d),e.trigger("afterValidation",[c,o]),c},parseDate:function(e,i,n){var s,o,a,r,l=i.replace(/[a-zA-Z]/gi,"").substring(0,1),h="^",u=i.split(l||null);if(t.each(u,function(t,e){h+=(t>0?"\\"+l:"")+"(\\d{"+e.length+"})"}),h+="$",n){var d=[];t.each(e.split(l),function(t,e){1===e.length&&(e="0"+e),d.push(e)}),e=d.join(l)}if(null===(s=e.match(new RegExp(h))))return!1;var c=function(e,i,n){for(var s=0;s28&&(r%4!=0||r%100==0&&r%400!=0)||2===a&&o>29&&(r%4==0||r%100!=0&&r%400==0)||a>12||0===a)&&(!(this.isShortMonth(a)&&o>30||!this.isShortMonth(a)&&o>31||0===o)&&[r,a,o])},parseDateInt:function(t){return 0===t.indexOf("0")&&(t=t.replace("0","")),parseInt(t,10)},isShortMonth:function(t){return t%2==0&&t<7||t%2!=0&&t>7},lengthRestriction:function(e,i){var n=parseInt(i.text(),10),s=0,o=function(){var t=e.val().length;if(t>n){var o=e.scrollTop();e.val(e.val().substring(0,n)),e.scrollTop(o)}s=n-t,s<0&&(s=0),i.text(s)};t(e).bind("keydown keyup keypress focus blur",o).bind("cut paste",function(){setTimeout(o,100)}),t(document).bind("ready",o)},numericRangeCheck:function(e,i){var n=t.split(i),s=parseInt(i.substr(3),10);return 1===n.length&&-1===i.indexOf("min")&&-1===i.indexOf("max")&&(n=[i,i]),2===n.length&&(eparseInt(n[1],10))?["out",n[0],n[1]]:0===i.indexOf("min")&&es?["max",s]:["ok"]},_numSuggestionElements:0,_selectedSuggestion:null,_previousTypedVal:null,suggest:function(e,n,s){var o={css:{maxHeight:"150px",background:"#FFF",lineHeight:"150%",textDecoration:"underline",overflowX:"hidden",overflowY:"auto",border:"#CCC solid 1px",borderTop:"none",cursor:"pointer"},activeSuggestionCSS:{background:"#E9E9E9"}},a=function(t,e){var i=e.offset();t.css({width:e.outerWidth(),left:i.left+"px",top:i.top+e.outerHeight()+"px"})};s&&t.extend(o,s),o.css.position="absolute",o.css["z-index"]=9999,e.attr("autocomplete","off"),0===this._numSuggestionElements&&i.bind("resize",function(){t(".jquery-form-suggestions").each(function(){var e=t(this),i=e.attr("data-suggest-container");a(e,t(".suggestions-"+i).eq(0))})}),this._numSuggestionElements++;var r=function(e){var i=e.valAttr("suggestion-nr");t.formUtils._selectedSuggestion=null,t.formUtils._previousTypedVal=null,t(".jquery-form-suggestion-"+i).fadeOut("fast")};return e.data("suggestions",n).valAttr("suggestion-nr",this._numSuggestionElements).unbind("focus.suggest").bind("focus.suggest",function(){t(this).trigger("keyup"),t.formUtils._selectedSuggestion=null}).unbind("keyup.suggest").bind("keyup.suggest",function(){var i=t(this),n=[],s=t.trim(i.val()).toLocaleLowerCase();if(s!==t.formUtils._previousTypedVal){t.formUtils._previousTypedVal=s;var l=!1,h=i.valAttr("suggestion-nr"),u=t(".jquery-form-suggestion-"+h);if(u.scrollTop(0),""!==s){var d=s.length>2;t.each(i.data("suggestions"),function(t,e){var i=e.toLocaleLowerCase();if(i===s)return n.push(""+e+""),l=!0,!1;(0===i.indexOf(s)||d&&i.indexOf(s)>-1)&&n.push(e.replace(new RegExp(s,"gi"),"$&"))})}l||0===n.length&&u.length>0?u.hide():n.length>0&&0===u.length?(u=t("").css(o.css).appendTo("body"),e.addClass("suggestions-"+h),u.attr("data-suggest-container",h).addClass("jquery-form-suggestions").addClass("jquery-form-suggestion-"+h)):n.length>0&&!u.is(":visible")&&u.show(),n.length>0&&s.length!==n[0].length&&(a(u,i),u.html(""),t.each(n,function(e,n){t("").append(n).css({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"5px"}).addClass("form-suggest-element").appendTo(u).click(function(){i.focus(),i.val(t(this).text()),i.trigger("change"),r(i)})}))}}).unbind("keydown.validation").bind("keydown.validation",function(e){var i,n,s=e.keyCode?e.keyCode:e.which,a=t(this);if(13===s&&null!==t.formUtils._selectedSuggestion){if(i=a.valAttr("suggestion-nr"),n=t(".jquery-form-suggestion-"+i),n.length>0){var l=n.find("div").eq(t.formUtils._selectedSuggestion).text();a.val(l),a.trigger("change"),r(a),e.preventDefault()}}else{i=a.valAttr("suggestion-nr"),n=t(".jquery-form-suggestion-"+i);var h=n.children();if(h.length>0&&t.inArray(s,[38,40])>-1){38===s?(null===t.formUtils._selectedSuggestion?t.formUtils._selectedSuggestion=h.length-1:t.formUtils._selectedSuggestion--,t.formUtils._selectedSuggestion<0&&(t.formUtils._selectedSuggestion=h.length-1)):40===s&&(null===t.formUtils._selectedSuggestion?t.formUtils._selectedSuggestion=0:t.formUtils._selectedSuggestion++,t.formUtils._selectedSuggestion>h.length-1&&(t.formUtils._selectedSuggestion=0));var u=n.innerHeight(),d=n.scrollTop(),c=n.children().eq(0).outerHeight(),p=c*t.formUtils._selectedSuggestion;return(pd+u)&&n.scrollTop(p),h.removeClass("active-suggestion").css("background","none").eq(t.formUtils._selectedSuggestion).addClass("active-suggestion").css(o.activeSuggestionCSS),e.preventDefault(),!1}}}).unbind("blur.suggest").bind("blur.suggest",function(){r(t(this))}),e},LANG:{errorTitle:"Form submission failed!",requiredField:"This is a required field",requiredFields:"You have not answered all required fields",badTime:"You have not given a correct time",badEmail:"You have not given a correct e-mail address",badTelephone:"You have not given a correct phone number",badSecurityAnswer:"You have not given a correct answer to the security question",badDate:"You have not given a correct date",lengthBadStart:"The input value must be between ",lengthBadEnd:" characters",lengthTooLongStart:"The input value is longer than ",lengthTooShortStart:"The input value is shorter than ",notConfirmed:"Input values could not be confirmed",badDomain:"Incorrect domain value",badUrl:"The input value is not a correct URL",badCustomVal:"The input value is incorrect",andSpaces:" and spaces ",badInt:"The input value was not a correct number",badSecurityNumber:"Your social security number was incorrect",badUKVatAnswer:"Incorrect UK VAT Number",badUKNin:"Incorrect UK NIN",badUKUtr:"Incorrect UK UTR Number",badStrength:"The password isn't strong enough",badNumberOfSelectedOptionsStart:"You have to choose at least ",badNumberOfSelectedOptionsEnd:" answers",badAlphaNumeric:"The input value can only contain alphanumeric characters ",badAlphaNumericExtra:" and ",wrongFileSize:"The file you are trying to upload is too large (max %s)",wrongFileType:"Only files of type %s is allowed",groupCheckedRangeStart:"Please choose between ",groupCheckedTooFewStart:"Please choose at least ",groupCheckedTooManyStart:"Please choose a maximum of ",groupCheckedEnd:" item(s)",badCreditCard:"The credit card number is not correct",badCVV:"The CVV number was not correct",wrongFileDim:"Incorrect image dimensions,",imageTooTall:"the image can not be taller than",imageTooWide:"the image can not be wider than",imageTooSmall:"the image was too small",min:"min",max:"max",imageRatioNotAccepted:"Image ratio is not be accepted",badBrazilTelephoneAnswer:"The phone number entered is invalid",badBrazilCEPAnswer:"The CEP entered is invalid",badBrazilCPFAnswer:"The CPF entered is invalid",badPlPesel:"The PESEL entered is invalid",badPlNip:"The NIP entered is invalid",badPlRegon:"The REGON entered is invalid",badreCaptcha:"Please confirm that you are not a bot",passwordComplexityStart:"Password must contain at least ",passwordComplexitySeparator:", ",passwordComplexityUppercaseInfo:" uppercase letter(s)",passwordComplexityLowercaseInfo:" lowercase letter(s)",passwordComplexitySpecialCharsInfo:" special character(s)",passwordComplexityNumericCharsInfo:" numeric character(s)",passwordComplexityEnd:"."}})}(t,window),function(t){t.formUtils.addValidator({name:"email",validatorFunction:function(e){var i=e.toLowerCase().split("@"),n=i[0],s=i[1];if(n&&s){if(0===n.indexOf('"')){var o=n.length;if(n=n.replace(/\"/g,""),n.length!==o-2)return!1}return t.formUtils.validators.validate_domain.validatorFunction(i[1])&&0!==n.indexOf(".")&&"."!==n.substring(n.length-1,n.length)&&-1===n.indexOf("..")&&!/[^\w\+\.\-\#\-\_\~\!\$\&\'\(\)\*\+\,\;\=\:]/.test(n)}return!1},errorMessage:"",errorMessageKey:"badEmail"}),t.formUtils.addValidator({name:"domain",validatorFunction:function(t){return t.length>0&&t.length<=253&&!/[^a-zA-Z0-9]/.test(t.slice(-2))&&!/[^a-zA-Z0-9]/.test(t.substr(0,1))&&!/[^a-zA-Z0-9\.\-]/.test(t)&&1===t.split("..").length&&t.split(".").length>1},errorMessage:"",errorMessageKey:"badDomain"}),t.formUtils.addValidator({name:"required",validatorFunction:function(e,i,n,s,o){switch(i.attr("type")){case"checkbox":return i.is(":checked");case"radio":return o.find('input[name="'+i.attr("name")+'"]').filter(":checked").length>0;default:return""!==t.trim(e)}},errorMessage:"",errorMessageKey:function(t){return"top"===t.errorMessagePosition||"function"==typeof t.errorMessagePosition?"requiredFields":"requiredField"}}),t.formUtils.addValidator({name:"length",validatorFunction:function(e,i,n,s){var o=i.valAttr("length"),a=i.attr("type");if(void 0===o)return alert('Please add attribute "data-validation-length" to '+i[0].nodeName+" named "+i.attr("name")),!0;var r,l="file"===a&&void 0!==i.get(0).files?i.get(0).files.length:e.length,h=t.formUtils.numericRangeCheck(l,o);switch(h[0]){case"out":this.errorMessage=s.lengthBadStart+o+s.lengthBadEnd,r=!1;break;case"min":this.errorMessage=s.lengthTooShortStart+h[1]+s.lengthBadEnd,r=!1;break;case"max":this.errorMessage=s.lengthTooLongStart+h[1]+s.lengthBadEnd,r=!1;break;default:r=!0}return r},errorMessage:"",errorMessageKey:""}),t.formUtils.addValidator({name:"url",validatorFunction:function(e){if(/^(https?|ftp):\/\/((((\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])(\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])(\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/(((\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/((\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|\[|\]|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#(((\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(e)){var i=e.split("://")[1],n=i.indexOf("/");return n>-1&&(i=i.substr(0,n)),t.formUtils.validators.validate_domain.validatorFunction(i)}return!1},errorMessage:"",errorMessageKey:"badUrl"}),t.formUtils.addValidator({name:"number",validatorFunction:function(t,e,i){if(""!==t){var n,s,o=e.valAttr("allowing")||"",a=e.valAttr("decimal-separator")||i.decimalSeparator,r=!1,l=e.valAttr("step")||"",h=!1;if((e.attr("data-sanitize")||"").match(/(^|[\s])numberFormat([\s]|$)/i)){if(!window.numeral)throw new ReferenceError("The data-sanitize value numberFormat cannot be used without the numeral library. Please see Data Validation in http://www.formvalidator.net for more information.");t.length&&(t=String(numeral().unformat(t)))}if(-1===o.indexOf("number")&&(o+=",number"),-1===o.indexOf("negative")&&0===t.indexOf("-"))return!1;if(o.indexOf("range")>-1&&(n=parseFloat(o.substring(o.indexOf("[")+1,o.indexOf(";"))),s=parseFloat(o.substring(o.indexOf(";")+1,o.indexOf("]"))),r=!0),""!==l&&(h=!0),","===a){if(t.indexOf(".")>-1)return!1;t=t.replace(",",".")}if(""===t.replace(/[0-9-]/g,"")&&(!r||t>=n&&t<=s)&&(!h||t%l==0))return!0;if(o.indexOf("float")>-1&&null!==t.match(new RegExp("^([0-9-]+)\\.([0-9]+)$"))&&(!r||t>=n&&t<=s)&&(!h||t%l==0))return!0}return!1},errorMessage:"",errorMessageKey:"badInt"}),t.formUtils.addValidator({name:"alphanumeric",validatorFunction:function(e,i,n,s){var o=i.valAttr("allowing"),a="",r=!1;if(o){a="^([a-zA-Z0-9"+o+"]+)$";var l=o.replace(/\\/g,"");l.indexOf(" ")>-1&&(r=!0,l=l.replace(" ",""),l+=s.andSpaces||t.formUtils.LANG.andSpaces),s.badAlphaNumericAndExtraAndSpaces&&s.badAlphaNumericAndExtra?this.errorMessage=r?s.badAlphaNumericAndExtraAndSpaces+l:s.badAlphaNumericAndExtra+l+s.badAlphaNumericExtra:this.errorMessage=s.badAlphaNumeric+s.badAlphaNumericExtra+l}else a="^([a-zA-Z0-9]+)$",this.errorMessage=s.badAlphaNumeric;return new RegExp(a).test(e)},errorMessage:"",errorMessageKey:""}),t.formUtils.addValidator({name:"custom",validatorFunction:function(t,e){return new RegExp(e.valAttr("regexp")).test(t)},errorMessage:"",errorMessageKey:"badCustomVal"}),t.formUtils.addValidator({name:"date",validatorFunction:function(e,i,n){var s=i.valAttr("format")||n.dateFormat||"yyyy-mm-dd",o="false"===i.valAttr("require-leading-zero");return!1!==t.formUtils.parseDate(e,s,o)},errorMessage:"",errorMessageKey:"badDate"}),t.formUtils.addValidator({name:"checkbox_group",validatorFunction:function(e,i,n,s,o){var a=!0,r=i.attr("name"),l=t('input[type=checkbox][name^="'+r+'"]',o),h=l.filter(":checked").length,u=i.valAttr("qty");if(void 0===u){var d=i.get(0).nodeName;alert('Attribute "data-validation-qty" is missing from '+d+" named "+i.attr("name"))}var c=t.formUtils.numericRangeCheck(h,u);switch(c[0]){case"out":this.errorMessage=s.groupCheckedRangeStart+u+s.groupCheckedEnd,a=!1;break;case"min":this.errorMessage=s.groupCheckedTooFewStart+c[1]+(s.groupCheckedTooFewEnd||s.groupCheckedEnd),a=!1;break;case"max":this.errorMessage=s.groupCheckedTooManyStart+c[1]+(s.groupCheckedTooManyEnd||s.groupCheckedEnd),a=!1;break;default:a=!0}if(!a){var p=function(){l.unbind("click",p),l.filter("*[data-validation]").validateInputOnBlur(s,n,!1,"blur")};l.bind("click",p)}return a}})}(t)});