text: !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("./foundation.core"),require("jquery")):"function"==typeof define&&define.amd?define(["./foundation.core","jquery"],e):"object"==typeof exports?exports["foundation.abide"]=e(require("./foundation.core"),require("jquery")):(t.__FOUNDATION_EXTERNAL__=t.__FOUNDATION_EXTERNAL__||{},t.__FOUNDATION_EXTERNAL__["foundation.abide"]=e(t.__FOUNDATION_EXTERNAL__["foundation.core"],t.jQuery))}(window,function(r,a){return function(r){var a={};function i(t){if(a[t])return a[t].exports;var e=a[t]={i:t,l:!1,exports:{}};return r[t].call(e.exports,e,e.exports,i),e.l=!0,e.exports}return i.m=r,i.c=a,i.d=function(t,e,r){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)i.d(r,a,function(t){return e[t]}.bind(null,a));return r},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=0)}({"./foundation.core":function(t,e){t.exports=r},"./js/entries/plugins/foundation.abide.js":function(t,e,r){"use strict";r.r(e);var a=r("./foundation.core");r.d(e,"Foundation",function(){return a.Foundation});var i=r("./js/foundation.abide.js");r.d(e,"Abide",function(){return i.Abide}),a.Foundation.plugin(i.Abide,"Abide")},"./js/foundation.abide.js":function(t,e,r){"use strict";r.r(e),r.d(e,"Abide",function(){return f});var a=r("jquery"),d=r.n(a),o=r("./foundation.core");function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function n(t,e){for(var r=0;r<e.length;r++){var a=e[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}function s(t,e){return!e||"object"!==i(e)&&"function"!=typeof e?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t):e}function l(t){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var f=function(t){function r(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),s(this,l(r).apply(this,arguments))}var e,a,i;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(r,o["Plugin"]),e=r,(a=[{key:"_setup",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};this.$element=t,this.options=d.a.extend(!0,{},r.defaults,this.$element.data(),e),this.className="Abide",this._init()}},{key:"_init",value:function(){var r=this;this.$inputs=d.a.merge(this.$element.find("input").not("[type=submit]"),this.$element.find("textarea, select"));var t=this.$element.find("[data-abide-error]");this.options.a11yAttributes&&(this.$inputs.each(function(t,e){return r.addA11yAttributes(d()(e))}),t.each(function(t,e){return r.addGlobalErrorA11yAttributes(d()(e))})),this._events()}},{key:"_events",value:function(){var e=this;this.$element.off(".abide").on("reset.zf.abide",function(){e.resetForm()}).on("submit.zf.abide",function(){return e.validateForm()}),"fieldChange"===this.options.validateOn&&this.$inputs.off("change.zf.abide").on("change.zf.abide",function(t){e.validateInput(d()(t.target))}),this.options.liveValidate&&this.$inputs.off("input.zf.abide").on("input.zf.abide",function(t){e.validateInput(d()(t.target))}),this.options.validateOnBlur&&this.$inputs.off("blur.zf.abide").on("blur.zf.abide",function(t){e.validateInput(d()(t.target))})}},{key:"_reflow",value:function(){this._init()}},{key:"requiredCheck",value:function(t){if(!t.attr("required"))return!0;var e=!0;switch(t[0].type){case"checkbox":e=t[0].checked;break;case"select":case"select-one":case"select-multiple":var r=t.find("option:selected");r.length&&r.val()||(e=!1);break;default:t.val()&&t.val().length||(e=!1)}return e}},{key:"findFormError",value:function(t){var e=t[0].id,r=t.siblings(this.options.formErrorSelector);return r.length||(r=t.parent().find(this.options.formErrorSelector)),e&&(r=r.add(this.$element.find('[data-form-error-for="'.concat(e,'"]')))),r}},{key:"findLabel",value:function(t){var e=t[0].id,r=this.$element.find('label[for="'.concat(e,'"]'));return r.length?r:t.closest("label")}},{key:"findRadioLabels",value:function(t){var i=this,e=t.map(function(t,e){var r=e.id,a=i.$element.find('label[for="'.concat(r,'"]'));return a.length||(a=d()(e).closest("label")),a[0]});return d()(e)}},{key:"addErrorClasses",value:function(t){var e=this.findLabel(t),r=this.findFormError(t);e.length&&e.addClass(this.options.labelErrorClass),r.length&&r.addClass(this.options.formErrorClass),t.addClass(this.options.inputErrorClass).attr({"data-invalid":"","aria-invalid":!0})}},{key:"addA11yAttributes",value:function(t){var e=this.findFormError(t),r=e.filter("label"),a=e.first();if(e.length){if(void 0===t.attr("aria-describedby")){var i=a.attr("id");void 0===i&&(i=Object(o.GetYoDigits)(6,"abide-error"),a.attr("id",i)),t.attr("aria-describedby",i)}if(r.filter("[for]").length<r.length){var n=t.attr("id");void 0===n&&(n=Object(o.GetYoDigits)(6,"abide-input"),t.attr("id",n)),r.each(function(t,e){var r=d()(e);void 0===r.attr("for")&&r.attr("for",n)})}e.each(function(t,e){var r=d()(e);void 0===r.attr("role")&&r.attr("role","alert")}).end()}}},{key:"addGlobalErrorA11yAttributes",value:function(t){void 0===t.attr("aria-live")&&t.attr("aria-live",this.options.a11yErrorLevel)}},{key:"removeRadioErrorClasses",value:function(t){var e=this.$element.find(':radio[name="'.concat(t,'"]')),r=this.findRadioLabels(e),a=this.findFormError(e);r.length&&r.removeClass(this.options.labelErrorClass),a.length&&a.removeClass(this.options.formErrorClass),e.removeClass(this.options.inputErrorClass).attr({"data-invalid":null,"aria-invalid":null})}},{key:"removeErrorClasses",value:function(t){if("radio"==t[0].type)return this.removeRadioErrorClasses(t.attr("name"));var e=this.findLabel(t),r=this.findFormError(t);e.length&&e.removeClass(this.options.labelErrorClass),r.length&&r.removeClass(this.options.formErrorClass),t.removeClass(this.options.inputErrorClass).attr({"data-invalid":null,"aria-invalid":null})}},{key:"validateInput",value:function(t){var e=this.requiredCheck(t),r=!1,a=!0,i=t.attr("data-validator"),n=!0;if(t.is("[data-abide-ignore]")||t.is('[type="hidden"]')||t.is("[disabled]"))return!0;switch(t[0].type){case"radio":r=this.validateRadio(t.attr("name"));break;case"checkbox":r=e;break;case"select":case"select-one":case"select-multiple":r=e;break;default:r=this.validateText(t)}i&&(a=this.matchValidation(t,i,t.attr("required"))),t.attr("data-equalto")&&(n=this.options.validators.equalTo(t));var o=-1===[e,r,a,n].indexOf(!1),s=(o?"valid":"invalid")+".zf.abide";if(o){var l=this.$element.find('[data-equalto="'.concat(t.attr("id"),'"]'));if(l.length){var u=this;l.each(function(){d()(this).val()&&u.validateInput(d()(this))})}}return this[o?"removeErrorClasses":"addErrorClasses"](t),t.trigger(s,[t]),o}},{key:"validateForm",value:function(){var a=this,t=[],e=this;this.$inputs.each(function(){t.push(e.validateInput(d()(this)))});var i=-1===t.indexOf(!1);return this.$element.find("[data-abide-error]").each(function(t,e){var r=d()(e);a.options.a11yAttributes&&a.addGlobalErrorA11yAttributes(r),r.css("display",i?"none":"block")}),this.$element.trigger((i?"formvalid":"forminvalid")+".zf.abide",[this.$element]),i}},{key:"validateText",value:function(t,e){e=e||t.attr("pattern")||t.attr("type");var r=t.val(),a=!1;return r.length?a=this.options.patterns.hasOwnProperty(e)?this.options.patterns[e].test(r):e===t.attr("type")||new RegExp(e).test(r):t.prop("required")||(a=!0),a}},{key:"validateRadio",value:function(t){var e=this.$element.find(':radio[name="'.concat(t,'"]')),r=!1,a=!1;return e.each(function(t,e){d()(e).attr("required")&&(a=!0)}),a||(r=!0),r||e.each(function(t,e){d()(e).prop("checked")&&(r=!0)}),r}},{key:"matchValidation",value:function(e,t,r){var a=this;return r=!!r,-1===t.split(" ").map(function(t){return a.options.validators[t](e,r,e.parent())}).indexOf(!1)}},{key:"resetForm",value:function(){var t=this.$element,e=this.options;d()(".".concat(e.labelErrorClass),t).not("small").removeClass(e.labelErrorClass),d()(".".concat(e.inputErrorClass),t).not("small").removeClass(e.inputErrorClass),d()("".concat(e.formErrorSelector,".").concat(e.formErrorClass)).removeClass(e.formErrorClass),t.find("[data-abide-error]").css("display","none"),d()(":input",t).not(":button, :submit, :reset, :hidden, :radio, :checkbox, [data-abide-ignore]").val("").attr({"data-invalid":null,"aria-invalid":null}),d()(":input:radio",t).not("[data-abide-ignore]").prop("checked",!1).attr({"data-invalid":null,"aria-invalid":null}),d()(":input:checkbox",t).not("[data-abide-ignore]").prop("checked",!1).attr({"data-invalid":null,"aria-invalid":null}),t.trigger("formreset.zf.abide",[t])}},{key:"_destroy",value:function(){var t=this;this.$element.off(".abide").find("[data-abide-error]").css("display","none"),this.$inputs.off(".abide").each(function(){t.removeErrorClasses(d()(this))})}}])&&n(e.prototype,a),i&&n(e,i),r}();f.defaults={validateOn:"fieldChange",labelErrorClass:"is-invalid-label",inputErrorClass:"is-invalid-input",formErrorSelector:".form-error",formErrorClass:"is-visible",a11yAttributes:!0,a11yErrorLevel:"assertive",liveValidate:!1,validateOnBlur:!1,patterns:{alpha:/^[a-zA-Z]+$/,alpha_numeric:/^[a-zA-Z0-9]+$/,integer:/^[-+]?\d+$/,number:/^[-+]?\d*(?:[\.\,]\d+)?$/,card:/^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|(?:222[1-9]|2[3-6][0-9]{2}|27[0-1][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})$/,cvv:/^([0-9]){3,4}$/,email:/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+$/,url:/^((?:(https?|ftps?|file|ssh|sftp):\/\/|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\((?:[^\s()<>]+|(?:\([^\s()<>]+\)))*\))+(?:\((?:[^\s()<>]+|(?:\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:\'".,<>?\xab\xbb\u201c\u201d\u2018\u2019]))$/,domain:/^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,8}$/,datetime:/^([0-2][0-9]{3})\-([0-1][0-9])\-([0-3][0-9])T([0-5][0-9])\:([0-5][0-9])\:([0-5][0-9])(Z|([\-\+]([0-1][0-9])\:00))$/,date:/(?:19|20)[0-9]{2}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-9])|(?:(?!02)(?:0[1-9]|1[0-2])-(?:30))|(?:(?:0[13578]|1[02])-31))$/,time:/^(0[0-9]|1[0-9]|2[0-3])(:[0-5][0-9]){2}$/,dateISO:/^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/,month_day_year:/^(0[1-9]|1[012])[- \/.](0[1-9]|[12][0-9]|3[01])[- \/.]\d{4}$/,day_month_year:/^(0[1-9]|[12][0-9]|3[01])[- \/.](0[1-9]|1[012])[- \/.]\d{4}$/,color:/^#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/,website:{test:function(t){return f.defaults.patterns.domain.test(t)||f.defaults.patterns.url.test(t)}}},validators:{equalTo:function(t,e,r){return d()("#".concat(t.attr("data-equalto"))).val()===t.val()}}}},0:function(t,e,r){t.exports=r("./js/entries/plugins/foundation.abide.js")},jquery:function(t,e){t.exports=a}})});
  //# sourceMappingURL=foundation.abide.min.js.map
  